diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2c6a4204e19..13e9c5c254c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # CODEOWNERS: https://help.github.com/articles/about-codeowners/ -* @colin-axner @AdityaSripal @crodriguezvega @seantking @charleenfei @damiannolan +* @colin-axner @AdityaSripal @crodriguezvega @seantking @charleenfei @damiannolan @chatton # Order is important; the last matching pattern takes the most # precedence. When someone opens a pull request that only @@ -13,20 +13,30 @@ # CODEOWNERS for the core IBC module -/modules/core/ @colin-axner @fedekunze @AdityaSripal -/proto/core/ @colin-axner @fedekunze @AdityaSripal +/modules/core/ @colin-axner @AdityaSripal +/proto/ibc/core/ @colin-axner @AdityaSripal + +## CODEOWNERS for core/02-client + +/modules/core/02-client @colin-axner @AdityaSripal @seantking @damiannolan +/proto/ibc/core/client @colin-axner @AdityaSripal @seantking @damiannolan # CODEOWNERS for the light-clients -/modules/light-clients/ @colin-axner @fedekunze @AdityaSripal -/proto/lightclients/ @colin-axner @fedekunze @AdityaSripal +/modules/light-clients/ @colin-axner @AdityaSripal @seantking @damiannolan +/proto/ibc/lightclients/ @colin-axner @AdityaSripal @seantking @damiannolan # CODEOWNERS for ICS 20 -/modules/apps/transfer/ @colin-axner @fedekunze @AdityaSripal -/proto/applications/transfer/ @colin-axner @fedekunze @AdityaSripal +/modules/apps/transfer/ @colin-axner @AdityaSripal +/proto/ibc/applications/transfer/ @colin-axner @AdityaSripal # CODEOWNERS for interchain-accounts module /modules/apps/27-interchain-accounts/ @seantking @colin-axner @AdityaSripal @damiannolan -/proto/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal @damiannolan +/proto/ibc/applications/interchain_accounts/ @seantking @colin-axner @AdityaSripal @damiannolan + +# CODEOWNERS for fee module + +/modules/apps/29-fee/ @AdityaSripal @seantking @charleenfei @colin-axner @damiannolan +/proto/ibc/applications/fee/ @AdityaSripal @seantking @charleenfei @colin-axner @damiannolan diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 5bdfad7c29a..9cb089d1f23 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -20,6 +20,10 @@ through the appropriate channels won't receive any bounty. +## Expected Behaviour + + + ## Version diff --git a/.github/ISSUE_TEMPLATE/epic-tracker.md b/.github/ISSUE_TEMPLATE/epic-tracker.md new file mode 100644 index 00000000000..df3f553ff49 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/epic-tracker.md @@ -0,0 +1,64 @@ +--- +name: Epic Tracker +about: Create an issue to track feature epic progress + +--- + + + +## Requirements document + + + +## IBC spec + + + +## ADRs + + + +## Milestones + + + +## Implementation issues + + + +## QA scenarios + + + +## Automated e2e tests + + + +## Pre-releases + + + +## Checklist + + + +- [ ] Internal audit(s) +- [ ] External audit(s) +- [ ] Documentation +- [ ] Swagger +- [ ] Integration with relayers: + - [ ] Hermes + - [ ] Rly + +____ + +#### For Admin Use + +- [ ] Not duplicate issue +- [ ] Appropriate labels applied +- [ ] Appropriate contributors tagged/assigned diff --git a/.github/ISSUE_TEMPLATE/release-tracker.md b/.github/ISSUE_TEMPLATE/release-tracker.md new file mode 100644 index 00000000000..e4ae04f37a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release-tracker.md @@ -0,0 +1,66 @@ +--- +name: Release tracker +about: Create an issue to track release progress + +--- + + + +## Milestones + + + +## IBC spec compatibility + + + +## QA + +### Backwards compatibility + + + +- [ ] Fungible token transfers over a non-incentivised channel works with a counterparty chain running each previous major version. +- [ ] Fungible token transfers over an incentivised channel works with a counterparty chain running each previous major version that supports ICS-29 Fee Middleware. +- [ ] Interchain Accounts over a non-incentivised channel works with a counterparty chain running each previous major version that supports ICS-27 Interchain Accounts over non-incentivised channels. +- [ ] Interchain Accounts over an incentivised channel works with a counterparty chain running each previous major version that supports ICS-27 Interchain Accounts over incentivised channels. + +## Migration + + + +## Checklist + + + +- [ ] Bump [go package version](https://github.com/cosmos/ibc-go/blob/main/go.mod#L3). +- [ ] Change all imports starting with `github.com/cosmos/ibc-go/v{x}` to `github.com/cosmos/ibc-go/v{x+1}`. +- [ ] Branch off main to create release branch in the form of `release/vx.y.z`. +- [ ] Add branch protection rules to new release branch. +- [ ] Add backport task to [`mergify.yml`](https://github.com/cosmos/ibc-go/blob/main/.github/mergify.yml) +- [ ] Upgrade ibc-go version in [ibctest](https://github.com/strangelove-ventures/ibctest). +- [ ] Check Swagger is up-to-date. + +## Post-release checklist + +- [ ] Update [`CHANGELOG.md`](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) +- [ ] Update the table of supported release lines (and End of Life dates) in [`RELEASES.md`](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md). +- [ ] Update [version matrix](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md#version-matrix) in `RELEASES.md`. +- [ ] Update docs site: + - [ ] Add new release branch to [`docs/versions`](https://github.com/cosmos/ibc-go/blob/main/docs/versions) file. + - [ ] Add `label` and `key` to `versions` array in [`config.js`](https://github.com/cosmos/ibc-go/blob/main/docs/.vuepress/config.js#L33). +- [ ] After changes to docs site are deployed, check [ibc.cosmos.network](https://ibc.cosmos.network) is updated. + +____ + +#### For Admin Use + +- [ ] Not duplicate issue +- [ ] Appropriate labels applied +- [ ] Appropriate contributors tagged/assigned diff --git a/.github/mergify.yml b/.github/mergify.yml index 70c3828d03f..840d32a3eaa 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -18,67 +18,75 @@ pull_request_rules: commit_message_template: | {{ title }} (#{{ number }}) {{ body }} - - name: backport patches to v1.1.x branch + - name: backport patches to v2.1.x branch conditions: - base=main - - label=backport-to-v1.1.x + - label=backport-to-v2.1.x actions: backport: branches: - - release/v1.1.x - - name: backport patches to v1.2.x branch + - release/v2.1.x + - name: backport patches to v2.2.x branch conditions: - base=main - - label=backport-to-v1.2.x + - label=backport-to-v2.2.x actions: backport: branches: - - release/v1.2.x - - name: backport patches to v1.3.x branch + - release/v2.2.x + - name: backport patches to v2.3.x branch conditions: - base=main - - label=backport-to-v1.3.x + - label=backport-to-v2.3.x actions: backport: branches: - - release/v1.3.x - - name: backport patches to v1.4.x branch + - release/v2.3.x + - name: backport patches to v2.4.x branch conditions: - base=main - - label=backport-to-v1.4.x + - label=backport-to-v2.4.x actions: backport: branches: - - release/v1.4.x - - name: backport patches to v2.0.x branch + - release/v2.4.x + - name: backport patches to v3.0.x branch conditions: - base=main - - label=backport-to-v2.0.x + - label=backport-to-v3.0.x actions: backport: branches: - - release/v2.0.x - - name: backport patches to v2.1.x branch + - release/v3.0.x + - name: backport patches to v3.1.x branch conditions: - base=main - - label=backport-to-v2.1.x + - label=backport-to-v3.1.x actions: backport: branches: - - release/v2.1.x - - name: backport patches to v2.2.x branch + - release/v3.1.x + - name: backport patches to v3.2.x branch conditions: - base=main - - label=backport-to-v2.2.x + - label=backport-to-v3.2.x actions: backport: branches: - - release/v2.2.x - - name: backport patches to v3.0.x branch + - release/v3.2.x + - name: backport patches to v4.0.x branch conditions: - base=main - - label=backport-to-v3.0.x + - label=backport-to-v4.0.x actions: backport: branches: - - release/v3.0.x + - release/v4.0.x + - name: backport patches to v5.0.x branch + conditions: + - base=main + - label=backport-to-v5.0.x + actions: + backport: + branches: + - release/v5.0.x diff --git a/.github/scripts/go-imports.sh b/.github/scripts/go-imports.sh new file mode 100755 index 00000000000..bc5e6db3f86 --- /dev/null +++ b/.github/scripts/go-imports.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +formatted_files="$(docker run -v "$(pwd)":/ibc-go --rm -w "/ibc-go" --entrypoint="" cytopia/goimports goimports -l -local 'github.com/cosmos/ibc-go' /ibc-go)" + +exit_code=0 +for f in $formatted_files +do + # we don't care about formatting in pb.go files. + if [ "${f: -5}" == "pb.go" ]; then + continue + fi + exit_code=1 + echo "formatted file ${f}..." +done + +if [ "${exit_code}" == 1 ]; then + echo "not all files were correctly formated, run the following:" + echo "make goimports" +fi + +exit $exit_code diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 0060623ba15..b14911092ce 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -3,7 +3,7 @@ name: Check docs build # This will check if the docs build successfully by running `npm run build` on: pull_request: - paths: + paths: - './docs' jobs: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 11d7c0e90bb..f9a7c4a9230 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,8 +39,8 @@ jobs: steps: - name: Checkout repository - - uses: actions/checkout@v3 - - uses: technote-space/get-diff-action@v6.0.1 + uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.1.0 with: PATTERNS: | **/**.go @@ -49,19 +49,21 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main + queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality if: env.GIT_DIFF # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 + if: env.GIT_DIFF # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -75,5 +77,5 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 if: env.GIT_DIFF diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml new file mode 100644 index 00000000000..d3717d2c35a --- /dev/null +++ b/.github/workflows/e2e-fork.yml @@ -0,0 +1,50 @@ +name: Tests / E2E Fork +on: + workflow_dispatch: + pull_request: + branches: + - main + paths-ignore: + - docs/** + +jobs: + # dynamically build a matrix of test/test suite pairs to run + build-test-matrix: + if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - id: set-matrix + run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" + + e2e: + env: + SIMD_TAG: latest + SIMD_IMAGE: ibc-go-simd-e2e + if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} + needs: + - build-test-matrix + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }} + steps: + - uses: actions/checkout@v3 + - name: Docker Build + run: docker build . -t "${SIMD_IMAGE}:${SIMD_TAG}" + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + - name: Run e2e Test + env: + # see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions + RLY_TAG: "v2.0.0-rc2" + run: | + cd e2e + make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }} diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 00000000000..ae4d29e7b51 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,105 @@ +name: Tests / E2E +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + paths-ignore: + - docs/** + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ibc-go-simd-e2e + +jobs: + docker-build: + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a + with: + images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@1cb9d22b932e4832bb29793b7777ec860fc1cde0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # dynamically build a matrix of test/test suite pairs to run + build-test-matrix: + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - id: set-matrix + run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" + + + # the tag of the image will differ if this is a PR or the branch is being merged into main. + # we store the tag as an environment variable and use it in the E2E tests to determine the tag. + determine-image-tag: + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + outputs: + simd-tag: ${{ steps.get-tag.outputs.simd-tag }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - id: get-tag + run: | + tag=$(go run cmd/determine_simd_tag/main.go -pr "${{ github.event.pull_request.number }}" ) + echo "Using tag $tag" + echo "::set-output name=simd-tag::$tag" + + + e2e: + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + needs: + - build-test-matrix + - determine-image-tag + - docker-build + env: + SIMD_TAG: ${{ needs.determine-image-tag.outputs.simd-tag }} + SIMD_IMAGE: ghcr.io/cosmos/ibc-go-simd-e2e + # see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions + RLY_TAG: "v2.0.0-rc2" + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }} + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - name: Log in to the Container registry + uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Run e2e Test + run: | + cd e2e + make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }} diff --git a/.github/workflows/goimports.yaml b/.github/workflows/goimports.yaml new file mode 100644 index 00000000000..b951b17aa1d --- /dev/null +++ b/.github/workflows/goimports.yaml @@ -0,0 +1,9 @@ +name: Goimports +on: pull_request +jobs: + goimports: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: "Go Imports" + run: .github/scripts/go-imports.sh diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml new file mode 100644 index 00000000000..ae9545c2df4 --- /dev/null +++ b/.github/workflows/golangci.yml @@ -0,0 +1,26 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3.2.0 + with: + version: latest + args: --timeout 5m \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06b91b20c75..06b11e26d46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,10 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0.0, v20.15.10 - 'v[0-9]+.[0-9]+.[0-9]+-?[a-z0-9]+' # Push events to matching v*-[alpha/beta/rc], i.e. v3.0.0-alpha1, v3.0.0-beta1, v3.0.0-rc0 +env: + REGISTRY: ghcr.io + IMAGE_NAME: ibc-go-simd + jobs: goreleaser: runs-on: ubuntu-latest @@ -17,13 +21,34 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.17' + go-version: '1.18' - name: Release - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v3 if: startsWith(github.ref, 'refs/tags/') with: version: latest args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Log in to the Container registry + uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a + with: + images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@1cb9d22b932e4832bb29793b7777ec860fc1cde0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 31ef80c80f2..09add80b02b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,7 @@ on: push: branches: - main + jobs: cleanup-runs: runs-on: ubuntu-latest @@ -20,12 +21,12 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - name: Display go version run: go version - name: install tparse run: | - export GO111MODULE="on" && go get github.com/mfridman/tparse@v0.8.3 + go install github.com/mfridman/tparse@v0.8.3 - uses: actions/cache@v3 with: path: ~/go/bin @@ -40,8 +41,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 - - uses: technote-space/get-diff-action@v6.0.1 + go-version: 1.18 + - uses: technote-space/get-diff-action@v6.1.0 id: git_diff with: PATTERNS: | @@ -88,8 +89,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17 - - uses: technote-space/get-diff-action@v6.0.1 + go-version: 1.18 + - uses: technote-space/get-diff-action@v6.1.0 with: PATTERNS: | **/**.go @@ -101,7 +102,7 @@ jobs: if: env.GIT_DIFF - name: test & coverage report creation run: | - cat pkgs.txt.part.${{ matrix.part }} | xargs go test -race -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock' + cat pkgs.txt.part.${{ matrix.part }} | xargs go test $(go list ./... | grep -v e2e) -race -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock' if: env.GIT_DIFF - uses: actions/upload-artifact@v3 with: @@ -113,7 +114,7 @@ jobs: needs: tests steps: - uses: actions/checkout@v3 - - uses: technote-space/get-diff-action@v6.0.1 + - uses: technote-space/get-diff-action@v6.1.0 with: PATTERNS: | **/**.go diff --git a/.golangci.yml b/.golangci.yml index 34738ccf7e6..b7a6b8bbcdc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,40 +1,35 @@ run: tests: false -# # timeout for analysis, e.g. 30s, 5m, default is 1m -# timeout: 5m + # # timeout for analysis, e.g. 30s, 5m, default is 1m + timeout: 5m linters: disable-all: true enable: - - bodyclose - deadcode - depguard - dogsled - # - errcheck + - exportloopref + - errcheck - goconst - gocritic - gofmt + - gofumpt - goimports - - golint - gosec - gosimple - govet - ineffassign - - interfacer - - maligned - misspell - nakedret - prealloc - - scopelint - staticcheck - - structcheck - stylecheck + - revive - typecheck - unconvert - unused - - unparam - misspell - # - wsl - nolintlint issues: @@ -42,12 +37,6 @@ issues: - text: "Use of weak random number generator" linters: - gosec - - text: "comment on exported var" - linters: - - golint - - text: "don't use an underscore in package name" - linters: - - golint - text: "ST1003:" linters: - stylecheck diff --git a/CHANGELOG.md b/CHANGELOG.md index 176830f33d6..a493409e68c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,25 +38,37 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [\#1247](https://github.com/cosmos/ibc-go/pull/1247) Bump SDK version to v0.45.3 and Tendermint to version 0.34.19 +* [\#1615](https://github.com/cosmos/ibc-go/pull/1615) Bump SDK version to v0.45.6 +* [\#1627](https://github.com/cosmos/ibc-go/pull/1627) Bump Go version to 1.18 ### API Breaking -* (transfer) [\#1250](https://github.com/cosmos/ibc-go/pull/1250) Deprecate `GetTransferAccount` since the `transfer` module account is never used. * (06-solomachine) [\#1679](https://github.com/cosmos/ibc-go/pull/1679) Remove `types` sub-package from `06-solomachine` lightclient directory. * (07-tendermint) [\#1677](https://github.com/cosmos/ibc-go/pull/1677) Remove `types` sub-package from `07-tendermint` lightclient directory. * (06-solomachine) [\#1687](https://github.com/cosmos/ibc-go/pull/1687) Bump `06-solomachine` protobuf version from `v2` to `v3`. * (06-solomachine) [\#1687](https://github.com/cosmos/ibc-go/pull/1687) Removed `DataType` enum and associated message types from `06-solomachine`. `DataType` has been removed from `SignBytes` and `SignatureAndData` in favour of `path`. +* (core/03-connection) [\#1797](https://github.com/cosmos/ibc-go/pull/1797) Remove `PreviousConnectionID` from `NewMsgConnectionOpenTry` arguments. `MsgConnectionOpenTry.ValidateBasic()` returns error if the deprecated `PreviousConnectionID` is not empty. +* (core/04-channel) [\#1792](https://github.com/cosmos/ibc-go/pull/1792) Remove `PreviousChannelID` from `NewMsgChannelOpenTry` arguments. `MsgChannelOpenTry.ValidateBasic()` returns error if the deprecated `PreviousChannelID` is not empty. +* (core/04-channel) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) `NewPacketId` has been renamed to `NewPacketID` to comply with go linting rules. +* (core/ante) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) `AnteDecorator` has been renamed to `RedundancyDecorator` to comply with go linting rules and to give more clarity to the purpose of the Decorator. +* (core/ante) [\#1820](https://github.com/cosmos/ibc-go/pull/1418) `RedundancyDecorator` has been renamed to `RedundantRelayDecorator` to make the name for explicit. +* (testing) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) `MockIBCApp` has been renamed to `IBCApp` and `MockEmptyAcknowledgement` has been renamed to `EmptyAcknowledgement` to comply with go linting rules +* (modules/core/03-connection) [\#1672](https://github.com/cosmos/ibc-go/pull/1672) Remove crossing hellos from connection handshakes. The `PreviousConnectionId` in `MsgConnectionOpenTry` has been deprecated. +* (modules/core/04-channel) [\#1317](https://github.com/cosmos/ibc-go/pull/1317) Remove crossing hellos from channel handshakes. The `PreviousChannelId` in `MsgChannelOpenTry` has been deprecated. +* (transfer) [\#1250](https://github.com/cosmos/ibc-go/pull/1250) Deprecate `GetTransferAccount` since the `transfer` module account is never used. +* (channel) [\#1283](https://github.com/cosmos/ibc-go/pull/1283) The `OnChanOpenInit` application callback now returns a version string in line with the latest [spec changes](https://github.com/cosmos/ibc/pull/629). +* (modules/29-fee)[\#1338](https://github.com/cosmos/ibc-go/pull/1338) Renaming `Result` field in `IncentivizedAcknowledgement` to `AppAcknowledgement`. +* (modules/29-fee)[\#1343](https://github.com/cosmos/ibc-go/pull/1343) Renaming `KeyForwardRelayerAddress` to `KeyRelayerAddressForAsyncAck`, and `ParseKeyForwardRelayerAddress` to `ParseKeyRelayerAddressForAsyncAck`. +* (apps/27-interchain-accounts)[\#1432](https://github.com/cosmos/ibc-go/pull/1432) Updating `RegisterInterchainAccount` to include an additional `version` argument, supporting ICS29 fee middleware functionality in ICS27 interchain accounts. +* (apps/27-interchain-accounts)[\#1565](https://github.com/cosmos/ibc-go/pull/1565) Removing `NewErrorAcknowledgement` in favour of `channeltypes.NewErrorAcknowledgement`. +* (transfer)[\#1565](https://github.com/cosmos/ibc-go/pull/1565) Removing `NewErrorAcknowledgement` in favour of `channeltypes.NewErrorAcknowledgement`. +* (channel)[\#1565](https://github.com/cosmos/ibc-go/pull/1565) Updating `NewErrorAcknowledgement` to accept an error instead of a string and removing the possibility of non-deterministic writes to application state. +* (core/04-channel)[\#1636](https://github.com/cosmos/ibc-go/pull/1636) Removing `SplitChannelVersion` and `MergeChannelVersions` functions since they are not used. ### State Machine Breaking ### Improvements -* (middleware) [\#1022](https://github.com/cosmos/ibc-go/pull/1022) Add `GetAppVersion` to the ICS4Wrapper interface. This function should be used by IBC applications to obtain their own version since the version set in the channel structure may be wrapped many times by middleware. -* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. -* (modules/core/04-channel) [\#1232](https://github.com/cosmos/ibc-go/pull/1232) Updating params on `NewPacketId` and moving to bottom of file. -* (modules/core/04-channel) [\#1279](https://github.com/cosmos/ibc-go/pull/1279) Add selected channel version to MsgChanOpenInitResponse and MsgChanOpenTryResponse. Emit channel version during OpenInit/OpenTry -* (modules/light-clients/07-tendermint) [\#1118](https://github.com/cosmos/ibc-go/pull/1118) Deprecating `AllowUpdateAfterExpiry and AllowUpdateAfterMisbehaviour`. See ADR-026 for context. * (modules/core/02-client) [\#1188](https://github.com/cosmos/ibc-go/pull/1188/files) Routing `MsgSubmitMisbehaviour` to `UpdateClient` keeper function. Deprecating `SubmitMisbehaviour` endpoint. * (modules/core/02-client) [\#1208](https://github.com/cosmos/ibc-go/pull/1208) Replace `CheckHeaderAndUpdateState` usage in 02-client with calls to `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour` and `UpdateState`. * (modules/light-clients/09-localhost) [\#1187](https://github.com/cosmos/ibc-go/pull/1187/) Removing localhost light client implementation as it is not functional. An upgrade handler is provided in `modules/migrations/v5` to prune `09-localhost` clients and consensus states from the store. @@ -68,24 +80,90 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules/core/02-client) [\#1195](https://github.com/cosmos/ibc-go/pull/1210) Removing `CheckHeaderAndUpdateState` from `ClientState` interface & associated light client implementations. * (modules/core/02-client) [\#1189](https://github.com/cosmos/ibc-go/pull/1212) Removing `CheckMisbehaviourAndUpdateState` from `ClientState` interface & associated light client implementations. * (modules/core/exported) [\#1206](https://github.com/cosmos/ibc-go/pull/1206) Adding new method `UpdateState` to `ClientState` interface. -* (testing) [\#1302](https://github.com/cosmos/ibc-go/pull/1302) Change testchain default behaviour to use a chainID in the revision format. Set `ChainIDSuffix` to an empty string to disable this functionality. * (modules/core/02-client) [\#1741](https://github.com/cosmos/ibc-go/pull/1741) Emitting a new `upgrade_chain` event upon setting upgrade consensus state. +* (linting) [\#1418](https://github.com/cosmos/ibc-go/pull/1418) Fix linting errors, resulting compatiblity with go1.18 linting style, golangci-lint 1.46.2 and the revivie linter. This caused breaking changes in core/04-channel, core/ante, and the testing library. +* (app/20-transfer) [\#1680](https://github.com/cosmos/ibc-go/pull/1680) Adds migration to correct any malformed trace path information of tokens with denoms that contains slashes. The transfer module consensus version has been bumped to 2. +* (app/20-transfer) [\#1730](https://github.com/cosmos/ibc-go/pull/1730) parse the ics20 denomination provided via a packet using the channel identifier format specified by ibc-go. +* (cleanup) [\#1335](https://github.com/cosmos/ibc-go/pull/1335/) `gofumpt -w -l .` to standardize the code layout more strictly than `go fmt ./...` +* (middleware) [\#1022](https://github.com/cosmos/ibc-go/pull/1022) Add `GetAppVersion` to the ICS4Wrapper interface. This function should be used by IBC applications to obtain their own version since the version set in the channel structure may be wrapped many times by middleware. +* (modules/core/04-channel) [\#1232](https://github.com/cosmos/ibc-go/pull/1232) Updating params on `NewPacketID` and moving to bottom of file. +* (modules/core/04-channel) [\#1232](https://github.com/cosmos/ibc-go/pull/1232) Updating params on `NewPacketId` and moving to bottom of file. +* (app/29-fee) [\#1305](https://github.com/cosmos/ibc-go/pull/1305) Change version string for fee module to `ics29-1` +* (app/29-fee) [\#1341](https://github.com/cosmos/ibc-go/pull/1341) Check if the fee module is locked and if the fee module is enabled before refunding all fees +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (testing/simapp) [\#1397](https://github.com/cosmos/ibc-go/pull/1397) Adding mock module to maccperms and adding check to ensure mock module is not a blocked account address. +* (core/02-client) [\#1570](https://github.com/cosmos/ibc-go/pull/1570) Emitting an event when handling an upgrade client proposal. +* (modules/light-clients/07-tendermint) [\#1713](https://github.com/cosmos/ibc-go/pull/1713) Allow client upgrade proposals to update `TrustingPeriod`. See ADR-026 for context. +* (core/client) [\#1740](https://github.com/cosmos/ibc-go/pull/1740) Add `cosmos_proto.implements_interface` to adhere to guidelines in [Cosmos SDK ADR 019](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-019-protobuf-state-encoding.md#safe-usage-of-any) for annotating `google.protobuf.Any` types ### Features * [\#276](https://github.com/cosmos/ibc-go/pull/276) Adding the Fee Middleware module v1 -* (apps/29-fee) [\#1229](https://github.com/cosmos/ibc-go/pull/1229) Adding CLI commands for getting all unrelayed incentivized packets and packet by packet-id. -* (apps/29-fee) [\#1224](https://github.com/cosmos/ibc-go/pull/1224) Adding Query/CounterpartyAddress and CLI to ICS29 fee middleware -* (apps/29-fee) [\#1225](https://github.com/cosmos/ibc-go/pull/1225) Adding Query/FeeEnabledChannel and Query/FeeEnabledChannels with CLIs to ICS29 fee middleware. -* (modules/apps/29-fee) [\#1230](https://github.com/cosmos/ibc-go/pull/1230) Adding CLI command for getting incentivized packets for a specific channel-id. ### Bug Fixes * (light-clients/solomachine) [#1839](https://github.com/cosmos/ibc-go/issues/1839) Fixed usage of the new diversifier in validation of changing diversifiers for the solo machine. The current diversifier must sign over the new diversifier. -* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output -* (apps/29-fee) [\#1278](https://github.com/cosmos/ibc-go/pull/1278) The URI path for the query to get all incentivized packets for a specifc channel did not follow the same format as the rest of queries. * (07-tendermint) [\#1674](https://github.com/cosmos/ibc-go/pull/1674) Submitted ClientState is zeroed out before checking the proof in order to prevent the proposal from containing information governance is not actually voting on. * (modules/core/02-client)[\#1676](https://github.com/cosmos/ibc-go/pull/1676) ClientState must be zeroed out for `UpgradeProposals` to pass validation. This prevents a proposal containing information governance is not actually voting on. +* (apps/29-fee) [\#1229](https://github.com/cosmos/ibc-go/pull/1229) Adding CLI commands for getting all unrelayed incentivized packets and packet by packet-id. +* (apps/29-fee) [\#1224](https://github.com/cosmos/ibc-go/pull/1224) Adding Query/CounterpartyAddress and CLI to ICS29 fee middleware +* (apps/29-fee) [\#1225](https://github.com/cosmos/ibc-go/pull/1225) Adding Query/FeeEnabledChannel and Query/FeeEnabledChannels with CLIs to ICS29 fee middleware. +* (modules/apps/29-fee) [\#1230](https://github.com/cosmos/ibc-go/pull/1230) Adding CLI command for getting incentivized packets for a specific channel-id. + +### Bug Fixes + +* (apps/29-fee) [\#1774](https://github.com/cosmos/ibc-go/pull/1774) Change non nil relayer assertion to non empty to avoid import/export issues for genesis upgrades. +* (makefile) [\#1785](https://github.com/cosmos/ibc-go/pull/1785) Fetch the correct versions of protocol buffers dependencies from tendermint, cosmos-sdk, and ics23. +* (apps/29-fee) [\#1278](https://github.com/cosmos/ibc-go/pull/1278) The URI path for the query to get all incentivized packets for a specific channel did not follow the same format as the rest of queries. + +## [v3.1.0](https://github.com/cosmos/ibc-go/releases/tag/v3.1.0) - 2022-04-16 + +### Dependencies + +* [\#1300](https://github.com/cosmos/ibc-go/pull/1300) Bump SDK version to v0.45.4 + +### API Breaking + +### State Machine Breaking + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/04-channel) [\#1279](https://github.com/cosmos/ibc-go/pull/1279) Add selected channel version to MsgChanOpenInitResponse and MsgChanOpenTryResponse. Emit channel version during OpenInit/OpenTry +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. +* (modules/light-clients/07-tendermint) [\#1118](https://github.com/cosmos/ibc-go/pull/1118) Deprecating `AllowUpdateAfterExpiry` and `AllowUpdateAfterMisbehaviour`. See ADR-026 for context. + +### Features + +* (modules/core/02-client) [\#1336](https://github.com/cosmos/ibc-go/pull/1336) Adding Query/ConsensusStateHeights gRPC for fetching the height of every consensus state associated with a client. +* (modules/apps/transfer) [\#1416](https://github.com/cosmos/ibc-go/pull/1416) Adding gRPC endpoint for getting an escrow account for a given port-id and channel-id. +* (modules/apps/27-interchain-accounts) [\#1512](https://github.com/cosmos/ibc-go/pull/1512) Allowing ICA modules to handle all message types with "*". + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output +* (apps/transfer) [\#1451](https://github.com/cosmos/ibc-go/pull/1451) Fixing the support for base denoms that contain slashes. + +## [v3.0.1](https://github.com/cosmos/ibc-go/releases/tag/v3.0.1) - 2022-04-16 + +### Dependencies + +* [\#1300](https://github.com/cosmos/ibc-go/pull/1300) Bump SDK version to v0.45.4 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output ## [v3.0.0](https://github.com/cosmos/ibc-go/releases/tag/v3.0.0) - 2022-03-15 @@ -99,17 +177,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking * (02-client) [\#598](https://github.com/cosmos/ibc-go/pull/598) The client state and consensus state return value has been removed from `VerifyUpgradeAndUpdateState`. Light client implementations must update the client state and consensus state after verifying a valid client upgrade. -* (testing) [\#939](https://github.com/cosmos/ibc-go/pull/939) Support custom power reduction for testing. -* (modules/core/05-port) [\#1086](https://github.com/cosmos/ibc-go/pull/1086) Added `counterpartyChannelID` argument to IBCModule.OnChanOpenAck * (06-solomachine) [\#1100](https://github.com/cosmos/ibc-go/pull/1100) Remove `GetClientID` function from 06-solomachine `Misbehaviour` type. * (06-solomachine) [\#1100](https://github.com/cosmos/ibc-go/pull/1100) Deprecate `ClientId` field in 06-solomachine `Misbehaviour` type. * (07-tendermint) [\#1097](https://github.com/cosmos/ibc-go/pull/1097) Remove `GetClientID` function from 07-tendermint `Misbehaviour` type. * (07-tendermint) [\#1097](https://github.com/cosmos/ibc-go/pull/1097) Deprecate `ClientId` field in 07-tendermint `Misbehaviour` type. -* (channel( [\#848](https://github.com/cosmos/ibc-go/pull/848) Added `ChannelId` to MsgChannelOpenInitResponse -* (testing( [\#813](https://github.com/cosmos/ibc-go/pull/813) The `ack` argument to the testing function `RelayPacket` has been removed as it is no longer needed. -* (testing) [\#1003](https://github.com/cosmos/ibc-go/pull/1003) `CreateTMClientHeader` takes an additional `nextVals *tmtypes.ValidatorSet` as an argument * (testing) [\#939](https://github.com/cosmos/ibc-go/pull/939) Support custom power reduction for testing. * (modules/core/05-port) [\#1086](https://github.com/cosmos/ibc-go/pull/1086) Added `counterpartyChannelID` argument to IBCModule.OnChanOpenAck +* (channel) [\#848](https://github.com/cosmos/ibc-go/pull/848) Added `ChannelId` to MsgChannelOpenInitResponse +* (testing) [\#813](https://github.com/cosmos/ibc-go/pull/813) The `ack` argument to the testing function `RelayPacket` has been removed as it is no longer needed. * (testing) [\#774](https://github.com/cosmos/ibc-go/pull/774) Added `ChainID` arg to `SetupWithGenesisValSet` on the testing app. `Coordinator` generated ChainIDs now starts at index 1 * (transfer) [\#675](https://github.com/cosmos/ibc-go/pull/675) Transfer `NewKeeper` now takes in an ICS4Wrapper. The ICS4Wrapper may be the IBC Channel Keeper when ICS20 is not used in a middleware stack. The ICS4Wrapper is required for applications wishing to connect middleware to ICS20. * (core) [\#650](https://github.com/cosmos/ibc-go/pull/650) Modify `OnChanOpenTry` IBC application module callback to return the negotiated app version. The version passed into the `MsgChanOpenTry` has been deprecated and will be ignored by core IBC. @@ -117,11 +192,11 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (transfer) [\#517](https://github.com/cosmos/ibc-go/pull/517) Separates the ICS 26 callback functions from `AppModule` into a new type `IBCModule` for ICS 20 transfer. * (modules/core/02-client) [\#536](https://github.com/cosmos/ibc-go/pull/536) `GetSelfConsensusState` return type changed from bool to error. * (channel) [\#644](https://github.com/cosmos/ibc-go/pull/644) Removes `CounterpartyHops` function from the ChannelKeeper. -* (testing) [\#776](https://github.com/cosmos/ibc-go/pull/776) Adding helper fn to generate capability name for testing callbacks +* (modules/core/exported) [\#1107](https://github.com/cosmos/ibc-go/pull/1107) Merging the `Header` and `Misbehaviour` interfaces into a single `ClientMessage` type +* (testing) [\#776](https://github.com/cosmos/ibc-go/pull/776) Adding helper fn to generate capability name for testing callbacks * (testing) [\#892](https://github.com/cosmos/ibc-go/pull/892) IBC Mock modules store the scoped keeper and portID within the IBCMockApp. They also maintain reference to the AppModule to update the AppModule's list of IBC applications it references. Allows for the mock module to be reused as a base application in middleware stacks. * (channel) [\#882](https://github.com/cosmos/ibc-go/pull/882) The `WriteAcknowledgement` API now takes `exported.Acknowledgement` instead of a byte array * (modules/core/ante) [\#950](https://github.com/cosmos/ibc-go/pull/950) Replaces the channel keeper with the IBC keeper in the IBC `AnteDecorator` in order to execute the entire message and be able to reject redundant messages that are in the same block as the non-redundant messages. -* (modules/core/exported) [\#1107](https://github.com/cosmos/ibc-go/pull/1107) Merging the `Header` and `Misbehaviour` interfaces into a single `ClientMessage` type ### State Machine Breaking @@ -131,9 +206,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (client) [\#888](https://github.com/cosmos/ibc-go/pull/888) Add `GetTimestampAtHeight` to `ClientState` * (interchain-accounts) [\#1037](https://github.com/cosmos/ibc-go/pull/1037) Add a function `InitModule` to the interchain accounts `AppModule`. This function should be called within the upgrade handler when adding the interchain accounts module to a chain. It should be called in place of InitGenesis (set the consensus version in the version map). -* (testing) [\#1003](https://github.com/cosmos/ibc-go/pull/1003) Testing chain's `Signer` fields has changed from `[]tmtypes.PrivValidator` to `map[string]tmtypes.PrivValidator` to accomodate valset updates changing the order of the ValidatorSet. -* (testing) [\#1003](https://github.com/cosmos/ibc-go/pull/1003) `SignAndDeliver` will now just deliver the transaction without creating and committing a block. Thus, it requires that `BeginBlock` MUST be called before `SignAndDeliver` -* (testing) [\#1003](https://github.com/cosmos/ibc-go/pull/1003) `NextBlock` will now call `EndBlock` and `Commit` internally and apply validator updates to the `NextVals` of `TestChain` and the `NextValsHash` of the current header. Test writers can now make changes to validator set and have them reflected in the `TestChain` and handled appropriately in `UpdateClient` * (testing) [\#942](https://github.com/cosmos/ibc-go/pull/942) `NewTestChain` will create 4 validators in validator set by default. A new constructor function `NewTestChainWithValSet` is provided for test writers who want custom control over the validator set of test chains. * (testing) [\#904](https://github.com/cosmos/ibc-go/pull/904) Add `ParsePacketFromEvents` function to the testing package. Useful when sending/relaying packets via the testing package. * (testing) [\#893](https://github.com/cosmos/ibc-go/pull/893) Support custom private keys for testing. @@ -142,13 +214,15 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (channel) [\#692](https://github.com/cosmos/ibc-go/pull/692) Minimize channel logging by only emitting the packet sequence, source port/channel, destination port/channel upon packet receives, acknowledgements and timeouts. * [\#383](https://github.com/cosmos/ibc-go/pull/383) Adds helper functions for merging and splitting middleware versions from the underlying app version. * (modules/core/05-port) [\#288](https://github.com/cosmos/ibc-go/issues/288) Making the 05-port keeper function IsBound public. The IsBound function checks if the provided portID is already binded to a module. -* (channel) [\#644](https://github.com/cosmos/ibc-go/pull/644) Adds `GetChannelConnection` to the ChannelKeeper. This function returns the connectionID and connection state associated with a channel. -* (channel) [\#647](https://github.com/cosmos/ibc-go/pull/647) Reorganizes channel handshake handling to set channel state after IBC application callbacks. * (client) [\#724](https://github.com/cosmos/ibc-go/pull/724) `IsRevisionFormat` and `IsClientIDFormat` have been updated to disallow newlines before the dash used to separate the chainID and revision number, and the client type and client sequence. +* (channel) [\#644](https://github.com/cosmos/ibc-go/pull/644) Adds `GetChannelConnection` to the ChannelKeeper. This function returns the connectionID and connection state associated with a channel. +* (channel) [\647](https://github.com/cosmos/ibc-go/pull/647) Reorganizes channel handshake handling to set channel state after IBC application callbacks. +* (client) [\#724](https://github.com/cosmos/ibc-go/pull/724) `IsRevisionFormat` and `IsClientIDFormat` have been updated to disallow newlines before the dash used to separate the chainID and revision number, and the client type and client sequence. +* (interchain-accounts) [\#1466](https://github.com/cosmos/ibc-go/pull/1466) Emit event when there is an acknowledgement during `OnRecvPacket`. ### Features -* [\#432](https://github.com/cosmos/ibc-go/pull/432) Introduce `MockIBCApp` struct to the mock module. Allows the mock module to be reused to perform custom logic on each IBC App interface function. This might be useful when testing out IBC applications written as middleware. +* [\#432](https://github.com/cosmos/ibc-go/pull/432) Introduce `MockIBCApp` struct to the mock module. Allows the mock module to be reused to perform custom logic on each IBC App interface function. This might be useful when testing out IBC applications written as middleware. * [\#380](https://github.com/cosmos/ibc-go/pull/380) Adding the Interchain Accounts module v1 * [\#679](https://github.com/cosmos/ibc-go/pull/679) New CLI command `query ibc-transfer denom-hash ` to get the denom hash for a denom trace; this might be useful for debug @@ -159,12 +233,69 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (client) [\#941](https://github.com/cosmos/ibc-go/pull/941) Classify client states without consensus states as expired * (channel) [\#995](https://github.com/cosmos/ibc-go/pull/995) Call `packet.GetSequence()` rather than passing func in `AcknowledgePacket` log output +## [v2.3.0](https://github.com/cosmos/ibc-go/releases/tag/v2.3.0) - 2022-04-16 + +### Dependencies + +* [\#404](https://github.com/cosmos/ibc-go/pull/404) Bump Go version to 1.17 +* [\#1300](https://github.com/cosmos/ibc-go/pull/1300) Bump SDK version to v0.45.4 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. +* (modules/light-clients/07-tendermint) [\#1118](https://github.com/cosmos/ibc-go/pull/1118) Deprecating `AllowUpdateAfterExpiry` and `AllowUpdateAfterMisbehaviour`. See ADR-026 for context. + +### Features + +* (modules/core/02-client) [\#1336](https://github.com/cosmos/ibc-go/pull/1336) Adding Query/ConsensusStateHeights gRPC for fetching the height of every consensus state associated with a client. +* (modules/apps/transfer) [\#1416](https://github.com/cosmos/ibc-go/pull/1416) Adding gRPC endpoint for getting an escrow account for a given port-id and channel-id. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output +* (apps/transfer) [\#1451](https://github.com/cosmos/ibc-go/pull/1451) Fixing the support for base denoms that contain slashes. + +## [v2.2.1](https://github.com/cosmos/ibc-go/releases/tag/v2.2.1) - 2022-04-16 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output + ## [v2.2.0](https://github.com/cosmos/ibc-go/releases/tag/v2.2.0) - 2022-03-15 ### Dependencies * [\#851](https://github.com/cosmos/ibc-go/pull/851) Bump SDK version to v0.45.1 +## [v2.1.1](https://github.com/cosmos/ibc-go/releases/tag/v2.1.1) - 2022-04-16 + +### Dependencies + +* [\#1268](https://github.com/cosmos/ibc-go/pull/1268) Bump SDK version to v0.44.8 and Tendermint to version 0.34.19 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output + ## [v2.1.0](https://github.com/cosmos/ibc-go/releases/tag/v2.1.0) - 2022-03-15 ### Dependencies @@ -186,7 +317,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (transfer) [\#978](https://github.com/cosmos/ibc-go/pull/978) Support base denoms with slashes in denom validation * (channel) [\#995](https://github.com/cosmos/ibc-go/pull/995) Call `packet.GetSequence()` rather than passing func in `AcknowledgePacket` log output -## [v2.0.3](https://github.com/cosmos/ibc-go/releases/tag/v2.0.2) - 2022-02-03 +## [v2.0.3](https://github.com/cosmos/ibc-go/releases/tag/v2.0.3) - 2022-02-03 ### Improvements @@ -227,18 +358,76 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking * (core) [\#227](https://github.com/cosmos/ibc-go/pull/227) Remove sdk.Result from application callbacks -* (transfer) [\#350](https://github.com/cosmos/ibc-go/pull/350) Change FungibleTokenPacketData to use a string for the Amount field. This enables token transfers with amounts previously restricted by uint64. Up to the maximum uint256 value is supported. +* (transfer) [\#350](https://github.com/cosmos/ibc-go/pull/350) Change FungibleTokenPacketData to use a string for the Amount field. This enables token transfers with amounts previously restricted by uint64. Up to the maximum uint256 value is supported. ### Features * [\#384](https://github.com/cosmos/ibc-go/pull/384) Added `NegotiateAppVersion` method to `IBCModule` interface supported by a gRPC query service in `05-port`. This provides routing of requests to the desired application module callback, which in turn performs application version negotiation. +## [v1.5.0](https://github.com/cosmos/ibc-go/releases/tag/v1.5.0) - 2022-06-14 + +### Dependencies + +* [\#404](https://github.com/cosmos/ibc-go/pull/404) Bump Go version to 1.17 +* [\#1300](https://github.com/cosmos/ibc-go/pull/1300) Bump SDK version to v0.45.4 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. +* (modules/light-clients/07-tendermint) [\#1118](https://github.com/cosmos/ibc-go/pull/1118) Deprecating `AllowUpdateAfterExpiry` and `AllowUpdateAfterMisbehaviour`. See ADR-026 for context. + +### Features + +* (modules/core/02-client) [\#1336](https://github.com/cosmos/ibc-go/pull/1336) Adding Query/ConsensusStateHeights gRPC for fetching the height of every consensus state associated with a client. +* (modules/apps/transfer) [\#1416](https://github.com/cosmos/ibc-go/pull/1416) Adding gRPC endpoint for getting an escrow account for a given port-id and channel-id. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output +* (apps/transfer) [\#1451](https://github.com/cosmos/ibc-go/pull/1451) Fixing the support for base denoms that contain slashes. + +## [v1.4.1](https://github.com/cosmos/ibc-go/releases/tag/v1.4.1) - 2022-06-14 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output + ## [v1.4.0](https://github.com/cosmos/ibc-go/releases/tag/v1.4.0) - 2022-03-15 ### Dependencies * [\#851](https://github.com/cosmos/ibc-go/pull/851) Bump SDK version to v0.45.1 +## [v1.3.1](https://github.com/cosmos/ibc-go/releases/tag/v1.3.1) - 2022-06-14 + +### Dependencies + +* [\#1267](https://github.com/cosmos/ibc-go/pull/1267) Bump SDK version to v0.44.8 and Tendermint to version 0.34.19 + +### Improvements + +* (transfer) [\#1342](https://github.com/cosmos/ibc-go/pull/1342) `DenomTrace` grpc now takes in either an `ibc denom` or a `hash` instead of only accepting a `hash`. +* (modules/core/04-channel) [\#1160](https://github.com/cosmos/ibc-go/pull/1160) Improve `uint64 -> string` performance in `Logger`. +* (modules/core/keeper) [\#1284](https://github.com/cosmos/ibc-go/pull/1284) Add sanity check for the keepers passed into `ibckeeper.NewKeeper`. `ibckeeper.NewKeeper` now panics if any of the keepers passed in is empty. +* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`. +* (modules/core/04-channel) [\#1464](https://github.com/cosmos/ibc-go/pull/1464) Emit a channel close event when an ordered channel is closed. + +### Bug Fixes + +* (modules/core/04-channel) [\#1130](https://github.com/cosmos/ibc-go/pull/1130) Call `packet.GetSequence()` rather than passing func in `WriteAcknowledgement` log output + ## [v1.3.0](https://github.com/cosmos/ibc-go/releases/tag/v1.3.0) - 2022-03-15 ### Dependencies @@ -359,7 +548,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [v1.1.2](https://github.com/cosmos/ibc-go/releases/tag/v1.1.2) - 2021-10-15 * [\#485](https://github.com/cosmos/ibc-go/pull/485) Bump SDK version to v0.44.2 - + ## [v1.1.1](https://github.com/cosmos/ibc-go/releases/tag/v1.1.1) - 2021-10-04 ### Dependencies @@ -390,8 +579,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (core) [\#200](https://github.com/cosmos/ibc-go/pull/200) 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). * (02-client) [\#192](https://github.com/cosmos/ibc-go/pull/192) Fix IBC `query ibc client header` cli command. Support historical queries for query header/node-state commands. * (modules/light-clients/06-solomachine) [\#153](https://github.com/cosmos/ibc-go/pull/153) Fix solo machine proof height sequence mismatch bug. -* (modules/light-clients/06-solomachine) [\#122](https://github.com/cosmos/ibc-go/pull/122) Fix solo machine merkle prefix casting bug. -* (modules/light-clients/06-solomachine) [\#120](https://github.com/cosmos/ibc-go/pull/120) Fix solo machine handshake verification bug. +* (modules/light-clients/06-solomachine) [\#122](https://github.com/cosmos/ibc-go/pull/122) Fix solo machine merkle prefix casting bug. +* (modules/light-clients/06-solomachine) [\#120](https://github.com/cosmos/ibc-go/pull/120) Fix solo machine handshake verification bug. * (modules/light-clients/06-solomachine) [\#153](https://github.com/cosmos/ibc-go/pull/153) fix solo machine connection handshake failure at `ConnectionOpenAck`. ### API Breaking @@ -400,19 +589,19 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules) [\#206](https://github.com/cosmos/ibc-go/pull/206) Expose `relayer sdk.AccAddress` on `OnRecvPacket`, `OnAcknowledgementPacket`, `OnTimeoutPacket` module callbacks to enable incentivization. * (02-client) [\#181](https://github.com/cosmos/ibc-go/pull/181) Remove 'InitialHeight' from UpdateClient Proposal. Only copy over latest consensus state from substitute client. * (06-solomachine) [\#169](https://github.com/cosmos/ibc-go/pull/169) Change FrozenSequence to boolean in solomachine ClientState. The solo machine proto package has been bumped from `v1` to `v2`. -* (module/core/02-client) [\#165](https://github.com/cosmos/ibc-go/pull/165) Remove GetFrozenHeight from the ClientState interface. +* (module/core/02-client) [\#165](https://github.com/cosmos/ibc-go/pull/165) Remove GetFrozenHeight from the ClientState interface. * (modules) [\#166](https://github.com/cosmos/ibc-go/pull/166) Remove GetHeight from the misbehaviour interface. The `consensus_height` attribute has been removed from Misbehaviour events. -* (modules) [\#162](https://github.com/cosmos/ibc-go/pull/162) Remove deprecated Handler types in core IBC and the ICS 20 transfer module. +* (modules) [\#162](https://github.com/cosmos/ibc-go/pull/162) Remove deprecated Handler types in core IBC and the ICS 20 transfer module. * (modules/core) [\#161](https://github.com/cosmos/ibc-go/pull/161) Remove Type(), Route(), GetSignBytes() from 02-client, 03-connection, and 04-channel messages. * (modules) [\#140](https://github.com/cosmos/ibc-go/pull/140) IsFrozen() client state interface changed to Status(). gRPC `ClientStatus` route added. * (modules/core) [\#109](https://github.com/cosmos/ibc-go/pull/109) Remove connection and channel handshake CLI commands. -* (modules) [\#107](https://github.com/cosmos/ibc-go/pull/107) Modify OnRecvPacket callback to return an acknowledgement which indicates if it is successful or not. Callback state changes are discarded for unsuccessful acknowledgements only. +* (modules) [\#107](https://github.com/cosmos/ibc-go/pull/107) Modify OnRecvPacket callback to return an acknowledgement which indicates if it is successful or not. Callback state changes are discarded for unsuccessful acknowledgements only. * (modules) [\#108](https://github.com/cosmos/ibc-go/pull/108) All message constructors take the signer as a string to prevent upstream bugs. The `String()` function for an SDK Acc Address relies on external context. * (transfer) [\#275](https://github.com/cosmos/ibc-go/pull/275) Remove 'ChanCloseInit' function from transfer keeper. ICS20 does not close channels. ### State Machine Breaking -* (modules/light-clients/07-tendermint) [\#99](https://github.com/cosmos/ibc-go/pull/99) Enforce maximum chain-id length for tendermint client. +* (modules/light-clients/07-tendermint) [\#99](https://github.com/cosmos/ibc-go/pull/99) Enforce maximum chain-id length for tendermint client. * (modules/light-clients/07-tendermint) [\#141](https://github.com/cosmos/ibc-go/pull/141) Allow a new form of misbehaviour that proves counterparty chain breaks time monotonicity, automatically enforce monotonicity in UpdateClient and freeze client if monotonicity is broken. * (modules/light-clients/07-tendermint) [\#141](https://github.com/cosmos/ibc-go/pull/141) Freeze the client if there's a conflicting header submitted for an existing consensus state. * (modules/core/02-client) [\#8405](https://github.com/cosmos/cosmos-sdk/pull/8405) Refactor IBC client update governance proposals to use a substitute client to update a frozen or expired client. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..a193f54906e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.18 as builder + +ENV GOPATH="" +ENV GOMODULE="on" + +COPY go.mod . +COPY go.sum . + +RUN go mod download + +ADD testing testing +ADD modules modules +ADD LICENSE LICENSE + +COPY Makefile . + +RUN make build + +FROM ubuntu:20.04 + +COPY --from=builder /go/build/simd /bin/simd + +ENTRYPOINT ["simd"] diff --git a/Makefile b/Makefile index 0ea7f0c10c5..07208812edd 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation') PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') +CHANGED_GO_FILES := $(shell git diff --name-only | grep .go$$ | grep -v pb.go) +ALL_GO_FILES := $(shell find . -regex ".*\.go$$" | grep -v pb.go) VERSION := $(shell echo $(shell git describe --always) | sed 's/^v//') COMMIT := $(shell git log -1 --format='%H') LEDGER_ENABLED ?= true @@ -91,7 +93,7 @@ ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) BUILD_FLAGS += -trimpath endif -all: tools build lint test +all: build lint test # The below include contains the tools and runsim targets. #include contrib/devtools/Makefile @@ -154,7 +156,7 @@ mocks: $(MOCKS_DIR) $(MOCKS_DIR): mkdir -p $(MOCKS_DIR) -distclean: clean tools-clean +distclean: clean clean: rm -rf \ $(BUILDDIR)/ \ @@ -335,12 +337,17 @@ lint-fix: golangci-lint run --fix --out-format=tab --issues-exit-code=0 .PHONY: lint lint-fix -format: +format: goimports find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs gofmt -w -s find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs misspell -w - find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/cosmos/cosmos-sdk .PHONY: format +goimports: + $(DOCKER) run -v $(CURDIR):/ibc-go --rm -w "/ibc-go" cytopia/goimports -w -local 'github.com/cosmos/ibc-go' "$(CHANGED_GO_FILES)" &> /dev/null || echo "No changed go files to format" + +goimports-all: + $(DOCKER) run -v $(CURDIR):/ibc-go --rm -w "/ibc-go" cytopia/goimports -w -local 'github.com/cosmos/ibc-go' "$(ALL_GO_FILES)" + ############################################################################### ### Devdoc ### ############################################################################### @@ -400,10 +407,10 @@ proto-lint: proto-check-breaking: @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.20/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos -CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3 -SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.41.0/proto/cosmos +CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.7.1 +SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.46.0/proto/cosmos TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto TM_ABCI_TYPES = third_party/proto/tendermint/abci @@ -417,7 +424,7 @@ SDK_BASE = third_party/proto/cosmos/base/v1beta1 SDK_UPGRADE = third_party/proto/cosmos/upgrade GOGO_PROTO_TYPES = third_party/proto/gogoproto -CONFIO_TYPES = third_party/proto/confio +CONFIO_TYPES = third_party/proto proto-update-deps: @mkdir -p $(GOGO_PROTO_TYPES) @@ -455,7 +462,7 @@ proto-update-deps: ## insert go package option into proofs.proto file ## Issue link: https://github.com/confio/ics23/issues/32 - @sed -i '4ioption go_package = "github.com/confio/ics23/go";' $(CONFIO_TYPES)/proofs.proto + @perl -lp -i -e 'print q(option go_package = "github.com/confio/ics23/go";) if $$. == 4' $(CONFIO_TYPES)/proofs.proto .PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps diff --git a/RELEASES.md b/RELEASES.md index c92cc13aed0..acc69009b95 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -23,13 +23,13 @@ We ensure all major releases are supported by relayers ([hermes](https://github. ## Release cycle -IBC-Go follows a traditional release cycle involving an alpha, beta, and rc (release candidate) releases before finalizing a new version. As ibc-go works in a non-traditional area, we apply our own interpretation to each release type. We reserve the right to make both go API breaking changes and state machine breaking changes throughout the entire release cycle. The stable release guarentees do not go into affect until a final release is performed. +IBC-Go follows a traditional release cycle involving an alpha, beta, and rc (release candidate) releases before finalizing a new version. As ibc-go works in a non-traditional area, we apply our own interpretation to each release type. We reserve the right to make both go API breaking changes and state machine breaking changes throughout the entire release cycle. The stable release guarantees do not go into affect until a final release is performed. It is never advisable to use a non-final release in production. ### Alpha -Alpha releases are intended to make available new features as soon as they are functional. No correctness guarentees are made and alpha releases **may** contain serious security vulnerabilities, bugs, and lack of user tooling, so long as they don't affect the core functionality. +Alpha releases are intended to make available new features as soon as they are functional. No correctness guarantees are made and alpha releases **may** contain serious security vulnerabilities, bugs, and lack of user tooling, so long as they don't affect the core functionality. Initial users of alpha releases are expected to be advanced, patient, and capable of handling unusual errors. Very basic integration testing will be performed by the ibc-go development team before alpha releases. @@ -64,12 +64,15 @@ For example, if the current major release series is v1 and was released on Janua Only the following major release series have a stable release status: |Release|End of Life Date| -|-------|-------| +|-------|----------------| |`v1.3.x`|July 01, 2022| |`v1.4.x`|July 01, 2022| +|`v1.5.x`|July 01, 2022| |`v2.1.x`|February 01, 2023| |`v2.2.x`|February 01, 2023| +|`v2.3.x`|February 01, 2023| |`v3.0.x`|March 15, 2023| +|`v3.1.x`|March 15, 2023| **Note**: The v1 major release series will reach end of life 6 months after merging this policy. v2 will reach end of life one year after merging this policy. @@ -94,6 +97,26 @@ As rule of thumb, the following changes will **NOT** be automatically accepted i * **API-breaking changes**, i.e. changes that prevent client applications to *build without modifications* to the client application's source code. * **CLI-breaking changes**, i.e. changes that require usage changes for CLI users. +## Version matrix + +Versions of Golang, Cosmos SDK and Tendermint used by ibc-go in the currently active releases: + +| Go | ibc-go | Cosmos SDK | Tendermint | +|----|--------|------------|------------| +| 1.15 | v2.1.0 | v0.44.6 | v0.34.14 | +| 1.15 | v2.1.1 | v0.44.8 | v0.34.19 | +| 1.15 | v2.1.2 | v0.44.8 | v0.34.19 | +| 1.15 | v2.2.0 | v0.45.1 | v0.34.14 | +| 1.15 | v2.2.1 | v0.45.1 | v0.34.14 | +| 1.15 | v2.2.2 | v0.45.1 | v0.34.14 | +| 1.17 | v2.3.0 | v0.45.4 | v0.34.19 | +| 1.17 | v2.3.1 | v0.45.5 | v0.34.19 | +| 1.17 | v3.0.0 | v0.45.1 | v0.34.14 | +| 1.17 | v3.0.1 | v0.45.4 | v0.34.19 | +| 1.17 | v3.0.2 | v0.45.4 | v0.34.19 | +| 1.17 | v3.1.0 | v0.45.4 | v0.34.19 | +| 1.17 | v3.1.1 | v0.45.5 | v0.34.19 | + ## Graphics The decision tree above was generated with the following code: diff --git a/cmd/build_test_matrix/main.go b/cmd/build_test_matrix/main.go new file mode 100644 index 00000000000..9841e6e9035 --- /dev/null +++ b/cmd/build_test_matrix/main.go @@ -0,0 +1,133 @@ +package main + +import ( + "encoding/json" + "fmt" + "go/ast" + "go/parser" + "go/token" + "io/fs" + "os" + "path/filepath" + "strings" +) + +const ( + testNamePrefix = "Test" + testFileNameSuffix = "_test.go" + e2eTestDirectory = "e2e" +) + +// GithubActionTestMatrix represents +type GithubActionTestMatrix struct { + Include []TestSuitePair `json:"include"` +} + +type TestSuitePair struct { + Test string `json:"test"` + Suite string `json:"suite"` +} + +func main() { + githubActionMatrix, err := getGithubActionMatrixForTests(e2eTestDirectory) + if err != nil { + fmt.Printf("error generating github action json: %s", err) + os.Exit(1) + } + + ghBytes, err := json.Marshal(githubActionMatrix) + if err != nil { + fmt.Printf("error marshalling github action json: %s", err) + os.Exit(1) + } + fmt.Println(string(ghBytes)) +} + +// getGithubActionMatrixForTests returns a json string representing the contents that should go in the matrix +// field in a github action workflow. This string can be used with `fromJSON(str)` to dynamically build +// the workflow matrix to include all E2E tests under the e2eRootDirectory directory. +func getGithubActionMatrixForTests(e2eRootDirectory string) (GithubActionTestMatrix, error) { + testSuiteMapping := map[string][]string{} + fset := token.NewFileSet() + err := filepath.Walk(e2eRootDirectory, func(path string, info fs.FileInfo, err error) error { + if err != nil { + return fmt.Errorf("error walking e2e directory: %s", err) + } + + // only look at test files + if !strings.HasSuffix(path, testFileNameSuffix) { + return nil + } + + f, err := parser.ParseFile(fset, path, nil, 0) + if err != nil { + return fmt.Errorf("failed parsing file: %s", err) + } + + suiteNameForFile, testCases, err := extractSuiteAndTestNames(f) + if err != nil { + return fmt.Errorf("failed extracting test suite name and test cases: %s", err) + } + + testSuiteMapping[suiteNameForFile] = testCases + + return nil + }) + if err != nil { + return GithubActionTestMatrix{}, err + } + + gh := GithubActionTestMatrix{ + Include: []TestSuitePair{}, + } + + for testSuiteName, testCases := range testSuiteMapping { + for _, testCaseName := range testCases { + gh.Include = append(gh.Include, TestSuitePair{ + Test: testCaseName, + Suite: testSuiteName, + }) + } + } + + return gh, nil +} + +// extractSuiteAndTestNames extracts the name of the test suite function as well +// as all tests associated with it in the same file. +func extractSuiteAndTestNames(file *ast.File) (string, []string, error) { + var suiteNameForFile string + var testCases []string + + for _, d := range file.Decls { + if f, ok := d.(*ast.FuncDecl); ok { + functionName := f.Name.Name + if isTestSuiteMethod(f) { + if suiteNameForFile != "" { + return "", nil, fmt.Errorf("found a second test function: %s when %s was already found", f.Name.Name, suiteNameForFile) + } + suiteNameForFile = functionName + continue + } + if isTestFunction(f) { + testCases = append(testCases, functionName) + } + } + } + if suiteNameForFile == "" { + return "", nil, fmt.Errorf("file %s had no test suite test case", file.Name.Name) + } + return suiteNameForFile, testCases, nil +} + +// isTestSuiteMethod returns true if the function is a test suite function. +// e.g. func TestFeeMiddlewareTestSuite(t *testing.T) { ... } +func isTestSuiteMethod(f *ast.FuncDecl) bool { + return strings.HasPrefix(f.Name.Name, testNamePrefix) && len(f.Type.Params.List) == 1 +} + +// isTestFunction returns true if the function name starts with "Test" and has no parameters. +// as test suite functions do not accept a *testing.T. +func isTestFunction(f *ast.FuncDecl) bool { + return strings.HasPrefix(f.Name.Name, testNamePrefix) && len(f.Type.Params.List) == 0 +} diff --git a/cmd/build_test_matrix/main_test.go b/cmd/build_test_matrix/main_test.go new file mode 100644 index 00000000000..8dd75b4e4c1 --- /dev/null +++ b/cmd/build_test_matrix/main_test.go @@ -0,0 +1,161 @@ +package main + +import ( + "os" + "path" + "sort" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +const ( + nonTestFile = "not_test_file.go" + goTestFileNameOne = "first_go_file_test.go" + goTestFileNameTwo = "second_go_file_test.go" +) + +func TestGetGithubActionMatrixForTests(t *testing.T) { + t.Run("empty dir does not fail", func(t *testing.T) { + testingDir := t.TempDir() + _, err := getGithubActionMatrixForTests(testingDir) + assert.NoError(t, err) + }) + + t.Run("only test functions are picked up", func(t *testing.T) { + testingDir := t.TempDir() + createFileWithTestSuiteAndTests(t, "FeeMiddlewareTestSuite", "TestA", "TestB", testingDir, goTestFileNameOne) + + gh, err := getGithubActionMatrixForTests(testingDir) + assert.NoError(t, err) + + expected := GithubActionTestMatrix{ + Include: []TestSuitePair{ + { + Suite: "TestFeeMiddlewareTestSuite", + Test: "TestA", + }, + { + Suite: "TestFeeMiddlewareTestSuite", + Test: "TestB", + }, + }, + } + assertGithubActionTestMatricesEqual(t, expected, gh) + }) + + t.Run("all files are picked up", func(t *testing.T) { + testingDir := t.TempDir() + createFileWithTestSuiteAndTests(t, "FeeMiddlewareTestSuite", "TestA", "TestB", testingDir, goTestFileNameOne) + createFileWithTestSuiteAndTests(t, "TransferTestSuite", "TestC", "TestD", testingDir, goTestFileNameTwo) + + gh, err := getGithubActionMatrixForTests(testingDir) + assert.NoError(t, err) + + expected := GithubActionTestMatrix{ + Include: []TestSuitePair{ + { + Suite: "TestTransferTestSuite", + Test: "TestC", + }, + { + Suite: "TestFeeMiddlewareTestSuite", + Test: "TestA", + }, + { + Suite: "TestFeeMiddlewareTestSuite", + Test: "TestB", + }, + { + Suite: "TestTransferTestSuite", + Test: "TestD", + }, + }, + } + + assertGithubActionTestMatricesEqual(t, expected, gh) + }) + + t.Run("non test files are not picked up", func(t *testing.T) { + testingDir := t.TempDir() + createFileWithTestSuiteAndTests(t, "FeeMiddlewareTestSuite", "TestA", "TestB", testingDir, nonTestFile) + + gh, err := getGithubActionMatrixForTests(testingDir) + assert.NoError(t, err) + assert.Empty(t, gh.Include) + }) + + t.Run("fails when there are multiple suite runs", func(t *testing.T) { + testingDir := t.TempDir() + createFileWithTestSuiteAndTests(t, "FeeMiddlewareTestSuite", "TestA", "TestB", testingDir, nonTestFile) + + fileWithTwoSuites := `package foo +func SuiteOne(t *testing.T) { + suite.Run(t, new(FeeMiddlewareTestSuite)) +} + +func SuiteTwo(t *testing.T) { + suite.Run(t, new(FeeMiddlewareTestSuite)) +} + +type FeeMiddlewareTestSuite struct {} +` + + err := os.WriteFile(path.Join(testingDir, goTestFileNameOne), []byte(fileWithTwoSuites), os.FileMode(777)) + assert.NoError(t, err) + + _, err = getGithubActionMatrixForTests(testingDir) + assert.Error(t, err) + }) +} + +func assertGithubActionTestMatricesEqual(t *testing.T, expected, actual GithubActionTestMatrix) { + // sort by both suite and test as the order of the end result does not matter as + // all tests will be run. + sort.SliceStable(expected.Include, func(i, j int) bool { + memberI := expected.Include[i] + memberJ := expected.Include[j] + if memberI.Suite == memberJ.Suite { + return memberI.Test < memberJ.Test + } + return memberI.Suite < memberJ.Suite + }) + + sort.SliceStable(actual.Include, func(i, j int) bool { + memberI := actual.Include[i] + memberJ := actual.Include[j] + if memberI.Suite == memberJ.Suite { + return memberI.Test < memberJ.Test + } + return memberI.Suite < memberJ.Suite + }) + assert.Equal(t, expected.Include, actual.Include) +} + +func goTestFileContents(suiteName, fnName1, fnName2 string) string { + replacedSuiteName := strings.ReplaceAll(`package foo + +func TestSuiteName(t *testing.T) { + suite.Run(t, new(SuiteName)) +} + +type SuiteName struct {} + +func (s *SuiteName) fnName1() {} +func (s *SuiteName) fnName2() {} + +func (s *SuiteName) suiteHelper() {} + +func helper() {} +`, "SuiteName", suiteName) + + replacedFn1Name := strings.ReplaceAll(replacedSuiteName, "fnName1", fnName1) + return strings.ReplaceAll(replacedFn1Name, "fnName2", fnName2) +} + +func createFileWithTestSuiteAndTests(t *testing.T, suiteName, fn1Name, fn2Name, dir, filename string) { + goFileContents := goTestFileContents(suiteName, fn1Name, fn2Name) + err := os.WriteFile(path.Join(dir, filename), []byte(goFileContents), os.FileMode(777)) + assert.NoError(t, err) +} diff --git a/cmd/determine_simd_tag/main.go b/cmd/determine_simd_tag/main.go new file mode 100644 index 00000000000..e7b5d718194 --- /dev/null +++ b/cmd/determine_simd_tag/main.go @@ -0,0 +1,26 @@ +package main + +import ( + "flag" + "fmt" +) + +var prNum string + +func init() { + flag.StringVar(&prNum, "pr", "", "the number of the pr") + flag.Parse() +} + +// in the context of a GithubAction workflow, the PR is non empty if it is a pr. When +// code is merged to main, it will be empty. In this case we just use the "main" tag. +func main() { + fmt.Print(getSimdTag(prNum)) +} + +func getSimdTag(prNum string) string { + if prNum == "" { + return "main" + } + return fmt.Sprintf("pr-%s", prNum) +} diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index bdd58cd8d72..f459a997da6 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -3,23 +3,53 @@ module.exports = { title: "IBC-Go", locales: { "/": { - lang: "en-US" + lang: "en-US", }, }, base: process.env.VUEPRESS_BASE || "/", head: [ - ['link', { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" }], - ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png" }], - ['link', { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png" }], - ['link', { rel: "manifest", href: "/site.webmanifest" }], - ['meta', { name: "msapplication-TileColor", content: "#2e3148" }], - ['meta', { name: "theme-color", content: "#ffffff" }], - ['link', { rel: "icon", type: "image/svg+xml", href: "/favicon-svg.svg" }], - ['link', { rel: "apple-touch-icon-precomposed", href: "/apple-touch-icon-precomposed.png" }], + [ + "link", + { + rel: "apple-touch-icon", + sizes: "180x180", + href: "/apple-touch-icon.png", + }, + ], + [ + "link", + { + rel: "icon", + type: "image/png", + sizes: "32x32", + href: "/favicon-32x32.png", + }, + ], + [ + "link", + { + rel: "icon", + type: "image/png", + sizes: "16x16", + href: "/favicon-16x16.png", + }, + ], + ["link", { rel: "manifest", href: "/site.webmanifest" }], + ["meta", { name: "msapplication-TileColor", content: "#2e3148" }], + ["meta", { name: "theme-color", content: "#ffffff" }], + ["link", { rel: "icon", type: "image/svg+xml", href: "/favicon-svg.svg" }], + [ + "link", + { + rel: "apple-touch-icon-precomposed", + href: "/apple-touch-icon-precomposed.png", + }, + ], ], themeConfig: { repo: "cosmos/ibc-go", docsRepo: "cosmos/ibc-go", + docsBranch: "main", docsDir: "docs", editLinks: true, label: "ibc", @@ -31,97 +61,109 @@ module.exports = { //}, versions: [ { - "label": "main", - "key": "main" + label: "main", + key: "main", }, { - "label": "v1.1.0", - "key": "v1.1.0" + label: "v1.1.0", + key: "v1.1.0", }, { - "label": "v1.2.0", - "key": "v1.2.0" + label: "v1.2.0", + key: "v1.2.0", }, { - "label": "v1.3.0", - "key": "v1.3.0" + label: "v1.3.0", + key: "v1.3.0", }, { - "label": "v1.4.0", - "key": "v1.4.0" + label: "v1.5.0", + key: "v1.5.0", }, { - "label": "v2.0.0", - "key": "v2.0.0" - } , + label: "v1.4.0", + key: "v1.4.0", + }, { - "label": "v2.1.0", - "key": "v2.1.0" - }, - { - "label": "v2.2.0", - "key": "v2.2.0" + label: "v2.0.0", + key: "v2.0.0", }, { - "label": "v3.0.0", - "key": "v3.0.0" - } + label: "v2.1.0", + key: "v2.1.0", + }, + { + label: "v2.2.0", + key: "v2.2.0", + }, + { + label: "v2.3.0", + key: "v2.3.0", + }, + { + label: "v3.0.0", + key: "v3.0.0", + }, + { + label: "v3.1.0", + key: "v3.1.0", + }, ], topbar: { - banner: true + banner: true, }, - sidebar: { + sidebar: { auto: false, nav: [ - { + { title: "Using IBC-Go", children: [ { title: "Overview", directory: false, - path: "/ibc/overview.html" - }, + path: "/ibc/overview.html", + }, { title: "Integration", directory: false, - path: "/ibc/integration.html" + path: "/ibc/integration.html", }, { title: "Applications", - directory: false, - path: "/ibc/apps.html" + directory: true, + path: "/ibc/apps", }, { title: "Middleware", directory: true, - path: "/ibc/middleware" + path: "/ibc/middleware", }, { title: "Upgrades", directory: true, - path: "/ibc/upgrades" + path: "/ibc/upgrades", }, { title: "Governance Proposals", directory: false, - path: "/ibc/proposals.html" + path: "/ibc/proposals.html", }, { title: "Relayer", directory: false, - path: "/ibc/relayer.html" + path: "/ibc/relayer.html", }, { title: "Protobuf Documentation", directory: false, - path: "/ibc/proto-docs.html" + path: "/ibc/proto-docs.html", }, { title: "Roadmap", directory: false, - path: "/roadmap/roadmap.html" + path: "/roadmap/roadmap.html", }, - ] + ], }, { title: "IBC Application Modules", @@ -132,69 +174,164 @@ module.exports = { path: "/apps", children: [ { - title: "Overview", - directory: false, - path: "/apps/interchain-accounts/overview.html" - }, + title: "Overview", + directory: false, + path: "/apps/interchain-accounts/overview.html", + }, { title: "Authentication Modules", directory: false, - path: "/apps/interchain-accounts/auth-modules.html" + path: "/apps/interchain-accounts/auth-modules.html", }, { title: "Active Channels", directory: false, - path: "/apps/interchain-accounts/active-channels.html" + path: "/apps/interchain-accounts/active-channels.html", }, { - title: "Integration", - directory: false, - path: "/apps/interchain-accounts/integration.html" + title: "Integration", + directory: false, + path: "/apps/interchain-accounts/integration.html", }, { title: "Parameters", directory: false, - path: "/apps/interchain-accounts/parameters.html" + path: "/apps/interchain-accounts/parameters.html", }, { title: "Transactions", directory: false, - path: "/apps/interchain-accounts/transactions.html" + path: "/apps/interchain-accounts/transactions.html", + }, + ], + }, + { + title: "Transfer", + directory: true, + path: "/apps", + children: [ + { + title: "Overview", + directory: false, + path: "/apps/transfer/overview.html", + }, + { + title: "State", + directory: false, + path: "/apps/transfer/state.html", + }, + { + title: "State Transitions", + directory: false, + path: "/apps/transfer/state-transitions.html", + }, + { + title: "Messages", + directory: false, + path: "/apps/transfer/messages.html", + }, + { + title: "Events", + directory: false, + path: "/apps/transfer/events.html", + }, + { + title: "Metrics", + directory: false, + path: "/apps/transfer/metrics.html", + }, + { + title: "Params", + directory: false, + path: "/apps/transfer/params.html", + }, + ], + }, + ], + }, + { + title: "IBC Middleware Modules", + children: [ + { + title: "Fee Middleware", + directory: true, + path: "/middleware", + children: [ + { + title: "Overview", + directory: false, + path: "/middleware/ics29-fee/overview.html", + }, + { + title: "Integration", + directory: false, + path: "/middleware/ics29-fee/integration.html", + }, + { + title: "Fee Messages", + directory: false, + path: "/middleware/ics29-fee/msgs.html", + }, + { + title: "Fee Distribution", + directory: false, + path: "/middleware/ics29-fee/fee-distribution.html", }, - ] + { + title: "Events", + directory: false, + path: "/middleware/ics29-fee/events.html", + }, + { + title: "End Users", + directory: false, + path: "/middleware/ics29-fee/end-users.html", + }, + ], }, - ] + ], }, { title: "Migrations", children: [ + { + title: + "Support transfer of coins whose base denom contains slashes", + directory: false, + path: "/migrations/support-denoms-with-slashes.html", + }, { title: "SDK v0.43 to IBC-Go v1", directory: false, - path: "/migrations/sdk-to-v1.html" + path: "/migrations/sdk-to-v1.html", }, { title: "IBC-Go v1 to v2", directory: false, - path: "/migrations/v1-to-v2.html" + path: "/migrations/v1-to-v2.html", }, { title: "IBC-Go v2 to v3", directory: false, - path: "/migrations/v2-to-v3.html" + path: "/migrations/v2-to-v3.html", + }, + { + title: "IBC-Go v3 to v4", + directory: false, + path: "/migrations/v3-to-v4.html", }, - ] + ], }, { title: "Resources", children: [ { title: "IBC Specification", - path: "https://github.com/cosmos/ibc" + path: "https://github.com/cosmos/ibc", }, - ] - } - ] + ], + }, + ], }, gutter: { title: "Help & Support", @@ -203,46 +340,46 @@ module.exports = { title: "Discord", text: "Chat with IBC developers on Discord.", url: "https://discordapp.com/channels/669268347736686612", - bg: "linear-gradient(225.11deg, #2E3148 0%, #161931 95.68%)" + bg: "linear-gradient(225.11deg, #2E3148 0%, #161931 95.68%)", }, github: { title: "Found an Issue?", - text: "Help us improve this page by suggesting edits on GitHub." - } + text: "Help us improve this page by suggesting edits on GitHub.", + }, }, footer: { question: { - text: "Chat with IBC developers in Discord." + text: "Chat with IBC developers in Discord.", }, textLink: { text: "ibcprotocol.org", - url: "https://ibcprotocol.org" + url: "https://ibcprotocol.org", }, services: [ { service: "medium", - url: "https://blog.cosmos.network/" + url: "https://blog.cosmos.network/", }, { service: "twitter", - url: "https://twitter.com/cosmos" + url: "https://twitter.com/cosmos", }, { service: "linkedin", - url: "https://www.linkedin.com/company/interchain-gmbh" + url: "https://www.linkedin.com/company/interchain-gmbh", }, { service: "reddit", - url: "https://reddit.com/r/cosmosnetwork" + url: "https://reddit.com/r/cosmosnetwork", }, { service: "telegram", - url: "https://t.me/cosmosproject" + url: "https://t.me/cosmosproject", }, { service: "youtube", - url: "https://www.youtube.com/c/CosmosProject" - } + url: "https://www.youtube.com/c/CosmosProject", + }, ], smallprint: "The development of IBC-Go is led primarily by [Interchain GmbH](https://interchain.berlin/). Funding for this development comes primarily from the Interchain Foundation, a Swiss non-profit.", @@ -252,64 +389,63 @@ module.exports = { children: [ { title: "Cosmos SDK", - url: "https://docs.cosmos.network" + url: "https://docs.cosmos.network", }, { title: "Cosmos Hub", - url: "https://hub.cosmos.network" + url: "https://hub.cosmos.network", }, { title: "Tendermint Core", - url: "https://docs.tendermint.com" - } - ] + url: "https://docs.tendermint.com", + }, + ], }, { title: "Community", children: [ { title: "Cosmos blog", - url: "https://blog.cosmos.network" + url: "https://blog.cosmos.network", }, { title: "Forum", - url: "https://forum.cosmos.network" + url: "https://forum.cosmos.network", }, { title: "Chat", - url: "https://discord.gg/W8trcGV" - } - ] + url: "https://discord.gg/W8trcGV", + }, + ], }, { title: "Contributing", children: [ { title: "Contributing to the docs", - url: - "https://github.com/cosmos/ibc-go/blob/main/docs/DOCS_README.md" + url: "https://github.com/cosmos/ibc-go/blob/main/docs/DOCS_README.md", }, { title: "Source code on GitHub", - url: "https://github.com/cosmos/ibc-go/" - } - ] - } - ] - } + url: "https://github.com/cosmos/ibc-go/", + }, + ], + }, + ], + }, }, plugins: [ [ "@vuepress/google-analytics", { - ga: "UA-51029217-2" - } + ga: "UA-51029217-2", + }, ], [ "sitemap", { - hostname: "https://ibc.cosmos.network" - } - ] - ] + hostname: "https://ibc.cosmos.network", + }, + ], + ], }; diff --git a/docs/apps/interchain-accounts/active-channels.md b/docs/apps/interchain-accounts/active-channels.md index c574ea87d85..d387bdea038 100644 --- a/docs/apps/interchain-accounts/active-channels.md +++ b/docs/apps/interchain-accounts/active-channels.md @@ -12,11 +12,11 @@ channel type that provides ordering of packets without the channel closing on ti When an Interchain Account is registered using the `RegisterInterchainAccount` API, a new channel is created on a particular port. During the `OnChanOpenAck` and `OnChanOpenConfirm` steps (controller & host chain) the `Active Channel` for this interchain account is stored in state. -It is possible to create a new channel using the same controller chain portID if the previously set `Active Channel` is now in a `CLOSED` state. This channel creation can be initialized programatically by sending a new `OnChanOpenInit` message like so: +It is possible to create a new channel using the same controller chain portID if the previously set `Active Channel` is now in a `CLOSED` state. This channel creation can be initialized programatically by sending a new `MsgChannelOpenInit` message like so: ```go - msg := channeltypes.NewMsgChannelOpenInit(portID, string(versionBytes), channeltypes.ORDERED, []string{connectionID}, icatypes.PortID, icatypes.ModuleName) - handler := k.msgRouter.Handler(msg) +msg := channeltypes.NewMsgChannelOpenInit(portID, string(versionBytes), channeltypes.ORDERED, []string{connectionID}, icatypes.PortID, icatypes.ModuleName) +handler := k.msgRouter.Handler(msg) ``` Alternatively, any relayer operator may initiate a new channel handshake for this interchain account once the previously set `Active Channel` is in a `CLOSED` state. This is done by initiating the channel handshake on the controller chain using the same portID associated with the interchain account in question. diff --git a/docs/apps/interchain-accounts/auth-modules.md b/docs/apps/interchain-accounts/auth-modules.md index 0e8738f50c0..ec4c58bf46c 100644 --- a/docs/apps/interchain-accounts/auth-modules.md +++ b/docs/apps/interchain-accounts/auth-modules.md @@ -38,15 +38,15 @@ func (im IBCModule) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { // the authentication module *must* claim the channel capability on OnChanOpenInit if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err + return version, err } // perform custom logic - return nil + return version, nil } // OnChanOpenAck implements the IBCModule interface @@ -150,13 +150,67 @@ func (im IBCModule) OnRecvPacket( The authentication module can begin registering interchain accounts by calling `RegisterInterchainAccount`: ```go -if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String()); err != nil { +if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionID, owner.String(), version); err != nil { return err } return nil ``` +The `version` argument is used to support ICS29 fee middleware for relayer incentivization of ICS27 packets. Consumers of the `RegisterInterchainAccount` are expected to build the appropriate JSON encoded version string themselves and pass it accordingly. If an empty string is passed in the `version` argument, then the version will be initialized to a default value in the `OnChanOpenInit` callback of the controller's handler, so that channel handshake can proceed. + +The following code snippet illustrates how to construct an appropriate interchain accounts `Metadata` and encode it as a JSON bytestring: + +```go +icaMetadata := icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: controllerConnectionID, + HostConnectionId: hostConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, +} + +appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata) +if err != nil { + return err +} + +if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(appVersion)); err != nil { + return err +} +``` + +Similarly, if the application stack is configured to route through ICS29 fee middleware and a fee enabled channel is desired, construct the appropriate ICS29 `Metadata` type: + +```go +icaMetadata := icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: controllerConnectionID, + HostConnectionId: hostConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, +} + +appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata) +if err != nil { + return err +} + +feeMetadata := feetypes.Metadata{ + AppVersion: string(appVersion), + FeeVersion: feetypes.Version, +} + +feeEnabledVersion, err := feetypes.ModuleCdc.MarshalJSON(&feeMetadata) +if err != nil { + return err +} + +if err := keeper.icaControllerKeeper.RegisterInterchainAccount(ctx, controllerConnectionID, owner.String(), string(feeEnabledVersion)); err != nil { + return err +} +``` + ## `SendTx` The authentication module can attempt to send a packet by calling `SendTx`: @@ -231,8 +285,8 @@ if err := proto.Unmarshal(ack.GetResult(), txMsgData); err != nil { } ``` -If the txMsgData.Data field is non nil, the host chain is using SDK version <= v0.45. -The auth module should interpret the txMsgData.Data as follows: +If the `txMsgData.Data` field is non nil, the host chain is using SDK version <= v0.45. +The auth module should interpret the `txMsgData.Data` as follows: ```go switch len(txMsgData.Data) { @@ -283,8 +337,8 @@ default: } ``` -If the txMsgData.Data is empty, the host chain is using SDK version > v0.45. -The auth module should interpret the txMsgData.Responses as follows: +If the `txMsgData.Data` is empty, the host chain is using SDK version > v0.45. +The auth module should interpret the `txMsgData.Responses` as follows: ```go ... diff --git a/docs/apps/interchain-accounts/parameters.md b/docs/apps/interchain-accounts/parameters.md index f4ddcbc1160..8f985b9293e 100644 --- a/docs/apps/interchain-accounts/parameters.md +++ b/docs/apps/interchain-accounts/parameters.md @@ -47,4 +47,12 @@ For example, a Cosmos SDK based chain that elects to provide hosted Interchain A "host_enabled": true, "allow_messages": ["/cosmos.staking.v1beta1.MsgDelegate", "/cosmos.gov.v1beta1.MsgVote"] } +``` +There is also a special wildcard `"*"` message type which allows any type of message to be executed by the interchain account. This must be the only message in the `allow_messages` array. + +``` +"params": { + "host_enabled": true, + "allow_messages": ["*"] +} ``` \ No newline at end of file diff --git a/docs/apps/interchain-accounts/transactions.md b/docs/apps/interchain-accounts/transactions.md index a78a917387f..e17571a6e00 100644 --- a/docs/apps/interchain-accounts/transactions.md +++ b/docs/apps/interchain-accounts/transactions.md @@ -16,6 +16,6 @@ Transactions are executed via the ICS27 [`SendTx` API](./auth-modules.md#trysend ## Atomicity -As the Interchain Accounts module supports the execution of multiple transactions using the Cosmos SDK `Msg` interface, it provides the same atomicity guarantees as Cosmos SDK-based applications, leveraging the [`CacheMultiStore`](https://docs.cosmos.network/master/core/store.html#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/master/core/context.html) type. +As the Interchain Accounts module supports the execution of multiple transactions using the Cosmos SDK `Msg` interface, it provides the same atomicity guarantees as Cosmos SDK-based applications, leveraging the [`CacheMultiStore`](https://docs.cosmos.network/main/core/store.html#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/main/core/context.html) type. This provides atomic execution of transactions when using Interchain Accounts, where state changes are only committed if all `Msg`s succeed. diff --git a/modules/apps/transfer/spec/05_events.md b/docs/apps/transfer/events.md similarity index 84% rename from modules/apps/transfer/spec/05_events.md rename to docs/apps/transfer/events.md index 51b49da4602..a538d07d068 100644 --- a/modules/apps/transfer/spec/05_events.md +++ b/docs/apps/transfer/events.md @@ -4,7 +4,7 @@ order: 5 # Events -## MsgTransfer +## `MsgTransfer` | Type | Attribute Key | Attribute Value | |--------------|---------------|-----------------| @@ -13,28 +13,31 @@ order: 5 | message | action | transfer | | message | module | transfer | -## OnRecvPacket callback +## `OnRecvPacket` callback | Type | Attribute Key | Attribute Value | |-----------------------|---------------|-----------------| | fungible_token_packet | module | transfer | +| fungible_token_packet | sender | {sender} | | fungible_token_packet | receiver | {receiver} | | fungible_token_packet | denom | {denom} | | fungible_token_packet | amount | {amount} | | fungible_token_packet | success | {ackSuccess} | | denomination_trace | trace_hash | {hex_hash} | -## OnAcknowledgePacket callback +## `OnAcknowledgePacket` callback | Type | Attribute Key | Attribute Value | |-----------------------|-----------------|-------------------| | fungible_token_packet | module | transfer | +| fungible_token_packet | sender | {sender} | | fungible_token_packet | receiver | {receiver} | | fungible_token_packet | denom | {denom} | | fungible_token_packet | amount | {amount} | +| fungible_token_packet | acknowledgement | {ack.String()} | | fungible_token_packet | success | error | {ack.Response} | -## OnTimeoutPacket callback +## `OnTimeoutPacket` callback | Type | Attribute Key | Attribute Value | |-----------------------|-----------------|-----------------| diff --git a/docs/apps/transfer/messages.md b/docs/apps/transfer/messages.md new file mode 100644 index 00000000000..7cb61402e04 --- /dev/null +++ b/docs/apps/transfer/messages.md @@ -0,0 +1,36 @@ + + +# Messages + +## `MsgTransfer` + +A fungible token cross chain transfer is achieved by using the `MsgTransfer`: + +```go +type MsgTransfer struct { + SourcePort string + SourceChannel string + Token sdk.Coin + Sender string + Receiver string + TimeoutHeight ibcexported.Height + TimeoutTimestamp uint64 +} +``` + +This message is expected to fail if: + +- `SourcePort` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators). +- `SourceChannel` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)). +- `Token` is invalid (denom is invalid or amount is negative) + - `Token.Amount` is not positive. + - `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](../../../docs/architecture/adr-001-coin-source-tracing.md). +- `Sender` is empty. +- `Receiver` is empty. +- `TimeoutHeight` and `TimeoutTimestamp` are both zero. + +This message will send a fungible token to the counterparty chain represented by the counterparty Channel End connected to the Channel End with the identifiers `SourcePort` and `SourceChannel`. + +The denomination provided for transfer should correspond to the same denomination represented on this chain. The prefixes will be added as necessary upon by the receiving chain. diff --git a/modules/apps/transfer/spec/06_metrics.md b/docs/apps/transfer/metrics.md similarity index 86% rename from modules/apps/transfer/spec/06_metrics.md rename to docs/apps/transfer/metrics.md index 3d2ce5000e6..e9e3086ba1d 100644 --- a/modules/apps/transfer/spec/06_metrics.md +++ b/docs/apps/transfer/metrics.md @@ -4,7 +4,7 @@ order: 6 # Metrics -The transfer IBC application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/master/docs/core/telemetry.md). +The IBC transfer application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/main/docs/core/telemetry.md). | Metric | Description | Unit | Type | |:--------------------------------|:------------------------------------------------------------------------------------------|:----------------|:--------| diff --git a/modules/apps/transfer/spec/01_concepts.md b/docs/apps/transfer/overview.md similarity index 72% rename from modules/apps/transfer/spec/01_concepts.md rename to docs/apps/transfer/overview.md index e70185fcae5..8b83b2c789b 100644 --- a/modules/apps/transfer/spec/01_concepts.md +++ b/docs/apps/transfer/overview.md @@ -2,19 +2,27 @@ order: 1 --> -# Concepts +# Overview -## Acknowledgements +Learn about what the token Transfer module is {synopsis} + +## What is the Transfer module? + +Transfer is the Cosmos SDK implementation of the [ICS-20](https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer) protocol, which enables cross-chain fungible token transfers. + +## Concepts + +### Acknowledgements ICS20 uses the recommended acknowledgement format as specified by [ICS 04](https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope). A successful receive of a transfer packet will result in a Result Acknowledgement being written -with the value `[]byte(byte(1))` in the `Response` field. +with the value `[]byte{byte(1)}` in the `Response` field. An unsuccessful receive of a transfer packet will result in an Error Acknowledgement being written with the error message in the `Response` field. -## Denomination Trace +### Denomination trace The denomination trace corresponds to the information that allows a token to be traced back to its origin chain. It contains a sequence of port and channel identifiers ordered from the most recent to @@ -31,14 +39,13 @@ acting as the "source zone". When the token is sent back to the chain it previou prefix is removed. This is a backwards movement in the token's timeline and the sender chain is acting as the "sink zone". -It is strongly recommended to read the full details of [ADR 001: Coin Source Tracing](https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-001-coin-source-tracing.md) to understand the implications and context of the IBC token representations. +It is strongly recommended to read the full details of [ADR 001: Coin Source Tracing](../../architecture/adr-001-coin-source-tracing.md) to understand the implications and context of the IBC token representations. -### UX suggestions for clients +## UX suggestions for clients -For clients (wallets, exchanges, applications, block explorers, etc) that want to display the source of the token, it is recommended to use the following -alternatives for each of the cases below: +For clients (wallets, exchanges, applications, block explorers, etc) that want to display the source of the token, it is recommended to use the following alternatives for each of the cases below: -#### Direct connection +### Direct connection If the denomination trace contains a single identifier prefix pair (as in the example above), then the easiest way to retrieve the chain and light client identifier is to map the trace information @@ -53,15 +60,15 @@ A general pseudo algorithm would look like the following: token. 3. Query the client state using the identifiers pair. Note that this query will return a `"Not Found"` response if the current chain is not connected to this channel. -4. Retrieve the the client identifier or chain identifier from the client state (eg: on +4. Retrieve the client identifier or chain identifier from the client state (eg: on Tendermint clients) and store it locally. -Using the gRPC gataway client service the steps above would be, with a given IBC token `ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` stored on `chainB`: +Using the gRPC gateway client service the steps above would be, with a given IBC token `ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` stored on `chainB`: -1. `GET /ibc_transfer/v1beta1/denom_traces/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` -> `{"path": "transfer/channelToA", "base_denom": "uatom"}` -2. `GET /ibc/channel/v1beta1/channels/channelToA/ports/transfer/client_state"` -> `{"client_id": "clientA", "chain-id": "chainA", ...}` -3. `GET /ibc/channel/v1beta1/channels/channelToA/ports/transfer"` -> `{"channel_id": "channelToA", port_id": "transfer", counterparty: {"channel_id": "channelToB", port_id": "transfer"}, ...}` -4. `GET /ibc/channel/v1beta1/channels/channelToB/ports/transfer/client_state" -> {"client_id": "clientB", "chain-id": "chainB", ...}` +1. `GET /ibc/apps/transfer/v1/denom_traces/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` -> `{"path": "transfer/channelToA", "base_denom": "uatom"}` +2. `GET /ibc/apps/transfer/v1/channels/channelToA/ports/transfer/client_state"` -> `{"client_id": "clientA", "chain-id": "chainA", ...}` +3. `GET /ibc/apps/transfer/v1/channels/channelToA/ports/transfer"` -> `{"channel_id": "channelToA", port_id": "transfer", counterparty: {"channel_id": "channelToB", port_id": "transfer"}, ...}` +4. `GET /ibc/apps/transfer/v1/channels/channelToB/ports/transfer/client_state" -> {"client_id": "clientB", "chain-id": "chainB", ...}` Then, the token transfer chain path for the `uatom` denomination would be: `chainA` -> `chainB`. @@ -69,9 +76,9 @@ Then, the token transfer chain path for the `uatom` denomination would be: `chai The multiple channel hops case applies when the token has passed through multiple chains between the original source and final destination chains. -The IBC protocol doesn't know the topology of the overall network (i.e connections between chains and identifier names between them). For this reason, in the the multiple hops case, a particular chain in the timeline of the individual transfers can't query the chain and client identifiers of the other chains. +The IBC protocol doesn't know the topology of the overall network (i.e connections between chains and identifier names between them). For this reason, in the multiple hops case, a particular chain in the timeline of the individual transfers can't query the chain and client identifiers of the other chains. -Take for example the following sequence of transfers `A -> B -> C` for an IBC token, with a final prefix path (trace info) of `transfer/channelChainC/transfer/channelChainB`. What the paragraph above means is that is that even in the case that chain `C` is directly connected to chain `A`, querying the port and channel identifiers that chain `B` uses to connect to chain `A` (eg: `transfer/channelChainA`) can be completely different from the one that chain `C` uses to connect to chain `A` (eg: `transfer/channelToChainA`). +Take for example the following sequence of transfers `A -> B -> C` for an IBC token, with a final prefix path (trace info) of `transfer/channelChainC/transfer/channelChainB`. What the paragraph above means is that even in the case that chain `C` is directly connected to chain `A`, querying the port and channel identifiers that chain `B` uses to connect to chain `A` (eg: `transfer/channelChainA`) can be completely different from the one that chain `C` uses to connect to chain `A` (eg: `transfer/channelToChainA`). Thus the proposed solution for clients that the IBC team recommends are the following: @@ -94,9 +101,9 @@ Thus the proposed solution for clients that the IBC team recommends are the foll The only viable alternative for clients (at the time of writing) to tokens with multiple connection hops, is to connect to all chains directly and perform relevant queries to each of them in the sequence. ::: -## Locked Funds +## Locked funds -In some [exceptional cases](https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md#exceptional-cases), a client state associated with a given channel cannot be updated. This causes that funds from fungible tokens in that channel will be permanently locked and thus can no longer be transferred. +In some [exceptional cases](../../architecture/adr-026-ibc-client-recovery-mechanisms.md#exceptional-cases), a client state associated with a given channel cannot be updated. This causes that funds from fungible tokens in that channel will be permanently locked and thus can no longer be transferred. To mitigate this, a client update governance proposal can be submitted to update the frozen client with a new valid header. Once the proposal passes the client state will be unfrozen and the funds @@ -104,14 +111,13 @@ from the associated channels will then be unlocked. This mechanism only applies allow updates via governance, such as Tendermint clients. In addition to this, it's important to mention that a token must be sent back along the exact route -that it took originally un order to return it to its original form on the source chain (eg: the +that it took originally in order to return it to its original form on the source chain (eg: the Cosmos Hub for the `uatom`). Sending a token back to the same chain across a different channel will **not** move the token back across its timeline. If a channel in the chain history closes before the token can be sent back across that channel, then the token will not be returnable to its original form. - -## Security Considerations +## Security considerations For safety, no other module must be capable of minting tokens with the `ibc/` prefix. The IBC transfer module needs a subset of the denomination space that only it can create tokens in. diff --git a/docs/apps/transfer/params.md b/docs/apps/transfer/params.md new file mode 100644 index 00000000000..e2e74305311 --- /dev/null +++ b/docs/apps/transfer/params.md @@ -0,0 +1,24 @@ + + +# Parameters + +The IBC transfer application module contains the following parameters: + +| Key | Type | Default Value | +|------------------|------|---------------| +| `SendEnabled` | bool | `true` | +| `ReceiveEnabled` | bool | `true` | + +## `SendEnabled` + +The transfers enabled parameter controls send cross-chain transfer capabilities for all fungible tokens. + +To prevent a single token from being transferred from the chain, set the `SendEnabled` parameter to `true` and then set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/main/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`. + +## `ReceiveEnabled` + +The transfers enabled parameter controls receive cross-chain transfer capabilities for all fungible tokens. + +To prevent a single token from being transferred to the chain, set the `ReceiveEnabled` parameter to `true` and then set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/main/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`. diff --git a/modules/apps/transfer/spec/03_state_transitions.md b/docs/apps/transfer/state-transitions.md similarity index 78% rename from modules/apps/transfer/spec/03_state_transitions.md rename to docs/apps/transfer/state-transitions.md index 9090da54343..86f7deab2d1 100644 --- a/modules/apps/transfer/spec/03_state_transitions.md +++ b/docs/apps/transfer/state-transitions.md @@ -2,27 +2,25 @@ order: 3 --> -# State Transitions +# State transitions -## Send Fungible Tokens +## Send fungible tokens -A successful fungible token send has two state transitions depending if the -transfer is a movement forward or backwards in the token's timeline: +A successful fungible token send has two state transitions depending if the transfer is a movement forward or backwards in the token's timeline: 1. Sender chain is the source chain, *i.e* a transfer to any chain other than the one it was previously received from is a movement forwards in the token's timeline. This results in the following state transitions: -- The coins are transferred to an escrow address (i.e locked) on the sender chain +- The coins are transferred to an escrow address (i.e locked) on the sender chain. - The coins are transferred to the receiving chain through IBC TAO logic. 2. Sender chain is the sink chain, *i.e* the token is sent back to the chain it previously received from. This is a backwards movement in the token's timeline. This results in the following state transitions: -- The coins (vouchers) are burned on the sender chain -- The coins transferred to the receiving chain though IBC TAO logic. +- The coins (vouchers) are burned on the sender chain. +- The coins are transferred to the receiving chain through IBC TAO logic. -## Receive Fungible Tokens +## Receive fungible tokens -A successful fungible token receive has two state transitions depending if the -transfer is a movement forward or backwards in the token's timeline: +A successful fungible token receive has two state transitions depending if the transfer is a movement forward or backwards in the token's timeline: 1. Receiver chain is the source chain. This is a backwards movement in the token's timeline. This results in the following state transitions: diff --git a/modules/apps/transfer/spec/02_state.md b/docs/apps/transfer/state.md similarity index 57% rename from modules/apps/transfer/spec/02_state.md rename to docs/apps/transfer/state.md index a0b2f99a4c5..f436d4af8cc 100644 --- a/modules/apps/transfer/spec/02_state.md +++ b/docs/apps/transfer/state.md @@ -4,7 +4,7 @@ order: 2 # State -The transfer IBC application module keeps state of the port to which the module is binded and the denomination trace information as outlined in [ADR 01](./../../../../docs/architecture/adr-001-coin-source-tracing.md). +The IBC transfer application module keeps state of the port to which the module is binded and the denomination trace information as outlined in [ADR 001](../../architecture/adr-001-coin-source-tracing.md). - `Port`: `0x01 -> ProtocolBuffer(string)` - `DenomTrace`: `0x02 | []bytes(traceHash) -> ProtocolBuffer(DenomTrace)` diff --git a/docs/architecture/adr-002-go-module-versioning.md b/docs/architecture/adr-002-go-module-versioning.md index 28207d5474d..983937e8537 100644 --- a/docs/architecture/adr-002-go-module-versioning.md +++ b/docs/architecture/adr-002-go-module-versioning.md @@ -23,7 +23,7 @@ v1.0.0 was decided to be used instead of v0.1.0 primarily for the following reas When a Go module is released under v1.0.0, all following releases must follow Go semantic versioning. Thus when the go API is broken, the Go module major version **must** be incremented. -For example, changing the go package version from `v2` to `v3` bumps the import from `github.com/cosmos/ibc-go/v2` to `github.com/cosmos/ibc-go/v3`. +For example, changing the go package version from `v2` to `v3` bumps the import from `github.com/cosmos/ibc-go/v2` to `github.com/cosmos/ibc-go/v5`. If the Go module version is not incremented then attempting to go get a module @v3.0.0 without the suffix results in: `invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v3` @@ -33,7 +33,7 @@ Not including a go.mod in our release is not a viable option. #### Attempting to import multiple go module versions for ibc-go -Attempting to import two versions of ibc-go, such as `github.com/cosmos/ibc-go/v2` and `github.com/cosmos/ibc-go/v3`, will result in multiple issues. +Attempting to import two versions of ibc-go, such as `github.com/cosmos/ibc-go/v2` and `github.com/cosmos/ibc-go/v5`, will result in multiple issues. The Cosmos SDK does global registration of error and governance proposal types. The errors and proposals used in ibc-go would need to now register their naming based on the go module version. @@ -72,11 +72,11 @@ This prevents the Go module version from being incremented with breaking changes It also requires all extended functions to live in the same Go module, disrupting the existing code structure. The version that implements this change will still be incompatible with previous versions, but future versions could be imported together without namespace collisions. -For example, lets say this solution is implmented in v3. Then +For example, lets say this solution is implemented in v3. Then `github.com/cosmos/ibc-go/v2` cannot be imported with any other ibc-go version -`github.com/cosmos/ibc-go/v3` cannot be imported with any previous ibc-go versions +`github.com/cosmos/ibc-go/v5` cannot be imported with any previous ibc-go versions `github.com/cosmos/ibc-go/v4` may be imported with ibc-go versions v3+ diff --git a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md index 27bcb33e545..bec25a3aad9 100644 --- a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md +++ b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md @@ -7,6 +7,7 @@ - 2021/01/15: Revision to support substitute clients for unfreezing - 2021/05/20: Revision to simplify consensus state copying, remove initial height - 2022/04/08: Revision to deprecate AllowUpdateAfterExpiry and AllowUpdateAfterMisbehaviour +- 2022/07/15: Revision to allow updating of TrustingPeriod ## Status @@ -49,8 +50,11 @@ We elect not to deal with chains which have actually halted, which is necessaril 1. The second client is a substitute client. It carries all the state for the client which may be updated. It must have identitical client and chain parameters to the client which may be updated (except for latest height, frozen height, and chain-id). It should be continually updated during the voting period. 1. If this governance proposal passes, the client on trial will be updated to the latest state of the substitute. - Previously, AllowUpdateAfterExpiry and AllowUpdateAfterMisbehaviour were used to signal the recovery options for an expired or frozen client, and governance proposals were not allowed to overwrite the client if these parameters were set to false. However, this has now been deprecated because a code migration can overwrite the client and consensus states regardless of the value of these parameters. If governance would vote to overwrite a client or consensus state, it is likely that governance would also willing to perform a code migration to do the same. + Previously, `AllowUpdateAfterExpiry` and `AllowUpdateAfterMisbehaviour` were used to signal the recovery options for an expired or frozen client, and governance proposals were not allowed to overwrite the client if these parameters were set to false. However, this has now been deprecated because a code migration can overwrite the client and consensus states regardless of the value of these parameters. If governance would vote to overwrite a client or consensus state, it is likely that governance would also be willing to perform a code migration to do the same. + In addition, `TrustingPeriod` was initally not allowed to be updated by a client upgrade proposal. However, due to the number of situations experienced in production where the `TrustingPeriod` of a client should be allowed to be updated because of ie: initial misconfiguration for a canonical channel, governance should be allowed to update this client parameter. + + Note that this should NOT be lightly updated, as there may be a gap in time between when misbehaviour has occured and when the evidence of misbehaviour is submitted. For example, if the `UnbondingPeriod` is 2 weeks and the `TrustingPeriod` has also been set to two weeks, a validator could wait until right before `UnbondingPeriod` finishes, submit false information, then unbond and exit without being slashed for misbehaviour. Therefore, we recommend that the trusting period for the 07-tendermint client be set to 2/3 of the `UnbondingPeriod`. Note that clients frozen due to misbehaviour must wait for the evidence to expire to avoid becoming refrozen. diff --git a/docs/assets/fee-mw/feeflow.png b/docs/assets/fee-mw/feeflow.png new file mode 100644 index 00000000000..ba02071f4d8 Binary files /dev/null and b/docs/assets/fee-mw/feeflow.png differ diff --git a/docs/assets/fee-mw/msgpaypacket.png b/docs/assets/fee-mw/msgpaypacket.png new file mode 100644 index 00000000000..1bd5deb01fd Binary files /dev/null and b/docs/assets/fee-mw/msgpaypacket.png differ diff --git a/docs/assets/fee-mw/paypacketfeeasync.png b/docs/assets/fee-mw/paypacketfeeasync.png new file mode 100644 index 00000000000..27c486a6f82 Binary files /dev/null and b/docs/assets/fee-mw/paypacketfeeasync.png differ diff --git a/docs/assets/fee-mw/registerrelayeraddr.png b/docs/assets/fee-mw/registerrelayeraddr.png new file mode 100644 index 00000000000..29b01da9a7c Binary files /dev/null and b/docs/assets/fee-mw/registerrelayeraddr.png differ diff --git a/docs/client/config.json b/docs/client/config.json index cfc6dc7b9c4..5c50905245f 100644 --- a/docs/client/config.json +++ b/docs/client/config.json @@ -14,6 +14,30 @@ } } }, + { + "url": "./tmp-swagger-gen/ibc/applications/interchain_accounts/controller/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "InterchainAccountsControllerParams" + } + } + }, + { + "url": "./tmp-swagger-gen/ibc/applications/interchain_accounts/host/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "InterchainAccountsHostParams" + } + } + }, + { + "url": "./tmp-swagger-gen/ibc/applications/fee/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "FeeParams" + } + } + }, { "url": "./tmp-swagger-gen/ibc/core/client/v1/query.swagger.json", "operationIds": { diff --git a/docs/client/swagger-ui/swagger.yaml b/docs/client/swagger-ui/swagger.yaml index 5feb43dd2a5..2952a69748d 100644 --- a/docs/client/swagger-ui/swagger.yaml +++ b/docs/client/swagger-ui/swagger.yaml @@ -4,6 +4,59 @@ info: description: A REST interface for state queries version: 1.0.0 paths: + '/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address': + get: + summary: >- + EscrowAddress returns the escrow address for a particular port and + channel id. + operationId: EscrowAddress + responses: + '200': + description: A successful response. + schema: + type: object + properties: + escrow_address: + type: string + title: the escrow account address + description: >- + QueryEscrowAddressResponse is the response type of the + EscrowAddress 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string + tags: + - Query '/ibc/apps/transfer/v1/denom_hashes/{trace}': get: summary: DenomHash queries a denomination hash information. @@ -90,9 +143,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -176,6 +230,17 @@ paths: required: false type: boolean format: 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 + format: boolean tags: - Query '/ibc/apps/transfer/v1/denom_traces/{hash}': @@ -235,7 +300,9 @@ paths: format: byte parameters: - name: hash - description: hash (in hex format) of the denomination trace information. + description: >- + hash (in hex format) or denom (full denom with ibc prefix) of the + denomination trace information. in: path required: true type: string @@ -298,10 +365,10 @@ paths: format: byte tags: - Query - /ibc/client/v1/params: + /ibc/apps/interchain_accounts/controller/v1/params: get: - summary: ClientParams queries all parameters of the ibc client. - operationId: ClientParams + summary: Params queries all parameters of the ICA controller submodule. + operationId: InterchainAccountsControllerParams responses: '200': description: A successful response. @@ -312,18 +379,110 @@ paths: description: params defines the parameters of the module. type: object properties: - allowed_clients: + controller_enabled: + type: boolean + format: boolean + description: >- + controller_enabled enables or disables the controller + submodule. + description: >- + QueryParamsResponse is the response type for the Query/Params 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 + /ibc/apps/interchain_accounts/host/v1/params: + get: + summary: Params queries all parameters of the ICA host submodule. + operationId: InterchainAccountsHostParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + host_enabled: + type: boolean + format: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: type: array items: type: string description: >- - allowed_clients defines the list of allowed client state - types. + allow_messages defines a list of sdk message typeURLs + allowed to be executed on a host chain. description: >- - QueryClientParamsResponse is the response type for the - Query/ClientParams RPC - + QueryParamsResponse is the response type for the Query/Params 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 + '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled': + get: + summary: >- + FeeEnabledChannel returns true if the provided port and channel + identifiers belong to a fee enabled channel + operationId: FeeEnabledChannel + responses: + '200': + description: A successful response. + schema: + type: object + properties: + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc default: description: An unexpected error response schema: @@ -513,304 +672,200 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string tags: - Query - /ibc/core/client/v1/client_states: + '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets': get: - summary: ClientStates queries all the IBC light clients of a chain. - operationId: ClientStates + summary: Gets all incentivized packets for a specific channel + operationId: IncentivizedPacketsForChannel responses: '200': description: A successful response. schema: type: object properties: - client_states: + incentivized_packets: type: array items: type: object properties: - client_id: - type: string - title: client identifier - client_state: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence type: object properties: - type_url: + port_id: type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + 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. + title: the packet receive fee + ack_fee: + type: array + items: + 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. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + 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. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's - path must represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the - binary all types that they + 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 + 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 + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * 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. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state - description: >- - IdentifiedClientState defines a client state with an - additional client - - identifier field. - description: list of stored ClientStates of the chain. - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - 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: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - description: >- - QueryClientStatesResponse is the response type for the - Query/ClientStates 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 - 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.) + * 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 @@ -940,6 +995,14 @@ paths: "value": "1.212s" } parameters: + - name: channel_id + in: path + required: true + type: string + - name: port_id + in: path + required: true + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -987,231 +1050,45 @@ paths: required: false type: boolean format: 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 + format: boolean + - name: query_height + description: Height to query at. + in: query + required: false + type: string + format: uint64 tags: - Query - '/ibc/core/client/v1/client_states/{client_id}': + '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee': get: - summary: ClientState queries an IBC light client. - operationId: ClientState + summary: >- + CounterpartyPayee returns the registered counterparty payee for forward + relaying + operationId: CounterpartyPayee responses: '200': description: A successful response. schema: type: object properties: - client_state: - 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. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state associated with the request identifier - proof: + counterparty_payee: type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - description: >- - QueryClientStateResponse is the response type for the - Query/ClientState RPC - - method. Besides the client state, it includes a proof and the - height from - - which the proof was retrieved. + title: >- + the counterparty payee address used to compensate forward + relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc default: description: An unexpected error response schema: @@ -1402,30 +1279,34 @@ paths: "value": "1.212s" } parameters: - - name: client_id - description: client state unique identifier + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the counterparty is registered in: path required: true type: string tags: - Query - '/ibc/core/client/v1/client_status/{client_id}': + '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee': get: - summary: Status queries the status of an IBC client. - operationId: ClientStatus + summary: >- + Payee returns the registered payee address for a specific channel given + the relayer address + operationId: Payee responses: '200': description: A successful response. schema: type: object properties: - status: + payee_address: type: string - description: >- - QueryClientStatusResponse is the response type for the - Query/ClientStatus RPC - - method. It returns the current status of the IBC client. + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc default: description: An unexpected error response schema: @@ -1616,274 +1497,135 @@ paths: "value": "1.212s" } parameters: - - name: client_id - description: client unique identifier + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the distribution address is registered in: path required: true type: string tags: - Query - '/ibc/core/client/v1/consensus_states/{client_id}': + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet': get: - summary: |- - ConsensusStates queries all the consensus state associated with a given - client. - operationId: ConsensusStates + summary: >- + IncentivizedPacket returns all packet fees for a packet given its + identifier + operationId: IncentivizedPacket responses: '200': description: A successful response. schema: type: object properties: - consensus_states: - type: array - items: - type: object - properties: - height: - title: consensus state height + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port + ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each - height while keeping - - RevisionNumber the same. However some consensus - algorithms may choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as - the RevisionHeight - - gets reset - consensus_state: - 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: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + 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. + title: the packet receive fee + ack_fee: + type: array + items: + 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. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + 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. + title: the packet timeout fee + refund_address: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: consensus state - description: >- - ConsensusStateWithHeight defines a consensus state with an - additional height - - field. - title: consensus states associated with the identifier - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - 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: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryConsensusStatesResponse is the response type for the - Query/ConsensusStates RPC method + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc default: description: An unexpected error response schema: @@ -2074,286 +1816,304 @@ paths: "value": "1.212s" } parameters: - - name: client_id - description: client identifier + - name: packet_id.channel_id + description: channel unique identifier in: path required: true 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 + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true 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. + - name: query_height + description: block height at which to query. 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 - format: boolean tags: - Query - '/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees': get: summary: >- - ConsensusState queries a consensus state associated with a client state - at - - a given height. - operationId: ConsensusState + TotalAckFees returns the total acknowledgement fees for a packet given + its identifier + operationId: TotalAckFees responses: '200': description: A successful response. schema: type: object properties: - consensus_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + ack_fees: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + NOTE: The amount field is an Int which implements the custom + method - the fully qualified name of the type (as in + signatures required by gogoproto. + title: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the + TotalAckFees rpc + 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - `path/google.protobuf.Duration`). The name should be in a - canonical form + protocol buffer message. This string must contain at + least - (e.g., leading "." is not accepted). + one "/" character. The last segment of the URL's path + must represent + the fully qualified name of the type (as in - In practice, teams usually precompile into the binary all - types that they + `path/google.protobuf.Duration`). The name should be in + a canonical form - expect it to use in the context of Any. However, for URLs - which use the + (e.g., leading "." is not accepted). - scheme `http`, `https`, or no scheme, one can optionally - set up a type - server that maps type URLs to message definitions as - follows: + 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 - * If no scheme is provided, `https` is assumed. + scheme `http`, `https`, or no scheme, one can optionally + set up a type - * 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.) + server that maps type URLs to message definitions as + follows: - Note: this functionality is not currently available in the - official - protobuf release, and it is not used for type URLs - beginning with + * If no scheme is provided, `https` is assumed. - type.googleapis.com. + * 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 - Schemes other than `http`, `https` (or the empty scheme) - might be + protobuf release, and it is not used for type URLs + beginning with - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + type.googleapis.com. - URL that describes the type of the serialized message. + Schemes other than `http`, `https` (or the empty scheme) + might be - Protobuf library provides support to pack/unpack Any values in - the form + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - of utility functions or additional generated methods of the - Any type. + URL that describes the type of the serialized message. - Example 1: Pack and unpack a message in C++. + Protobuf library provides support to pack/unpack Any values + in the form - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON - - ==== - - The JSON representation of an `Any` value uses the regular + JSON - representation of the deserialized, embedded message, with an + ==== - additional field `@type` which contains the type URL. Example: + The JSON representation of an `Any` value uses the regular - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + representation of the deserialized, embedded message, with + an - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + additional field `@type` which contains the type URL. + Example: - If the embedded message type is well-known and has a custom - JSON + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - representation, that representation will be embedded adding a - field + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - `value` which holds the custom JSON in addition to the `@type` + If the embedded message type is well-known and has a custom + JSON - field. Example (for message [google.protobuf.Duration][]): + representation, that representation will be embedded adding + a field - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - consensus state associated with the client identifier at the - given height - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping + `value` which holds the custom JSON in addition to the + `@type` - RevisionNumber the same. However some consensus algorithms may - choose to + field. Example (for message [google.protobuf.Duration][]): - reset the height in certain conditions e.g. hard forks, - state-machine + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees': + get: + summary: >- + TotalRecvFees returns the total receive fees for a packet given its + identifier + operationId: TotalRecvFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + recv_fees: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - breaking changes In these cases, the RevisionNumber is - incremented so that - height continues to be monitonically increasing even as the - RevisionHeight + NOTE: The amount field is an Int which implements the custom + method - gets reset + signatures required by gogoproto. + title: the total packet receive fees title: >- - QueryConsensusStateResponse is the response type for the - Query/ConsensusState - - RPC method + QueryTotalRecvFeesResponse defines the response type for the + TotalRecvFees rpc default: description: An unexpected error response schema: @@ -2544,220 +2304,293 @@ paths: "value": "1.212s" } parameters: - - name: client_id - description: client identifier + - name: packet_id.channel_id + description: channel unique identifier in: path required: true type: string - - name: revision_number - description: consensus state revision number + - name: packet_id.port_id + description: channel port identifier in: path required: true type: string - format: uint64 - - name: revision_height - description: consensus state revision height + - name: packet_id.sequence + description: packet sequence in: path required: true type: string format: uint64 - - name: latest_height - description: >- - latest_height overrrides the height field and queries the latest - stored - - ConsensusState. - in: query - required: false - type: boolean - format: boolean tags: - Query - /ibc/core/client/v1/upgraded_client_states: + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees': get: - summary: UpgradedClientState queries an Upgraded IBC light client. - operationId: UpgradedClientState + summary: >- + TotalTimeoutFees returns the total timeout fees for a packet given its + identifier + operationId: TotalTimeoutFees responses: '200': description: A successful response. schema: type: object properties: - upgraded_client_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + timeout_fees: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + NOTE: The amount field is an Int which implements the custom + method - the fully qualified name of the type (as in + signatures required by gogoproto. + title: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - `path/google.protobuf.Duration`). The name should be in a - canonical form + protocol buffer message. This string must contain at + least - (e.g., leading "." is not accepted). + one "/" character. The last segment of the URL's path + must represent + the fully qualified name of the type (as in - In practice, teams usually precompile into the binary all - types that they + `path/google.protobuf.Duration`). The name should be in + a canonical form - expect it to use in the context of Any. However, for URLs - which use the + (e.g., leading "." is not accepted). - scheme `http`, `https`, or no scheme, one can optionally - set up a type - server that maps type URLs to message definitions as - follows: + 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 - * If no scheme is provided, `https` is assumed. + scheme `http`, `https`, or no scheme, one can optionally + set up a type - * 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.) + server that maps type URLs to message definitions as + follows: - Note: this functionality is not currently available in the - official - protobuf release, and it is not used for type URLs - beginning with + * If no scheme is provided, `https` is assumed. - type.googleapis.com. + * 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 - Schemes other than `http`, `https` (or the empty scheme) - might be + protobuf release, and it is not used for type URLs + beginning with - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + type.googleapis.com. - URL that describes the type of the serialized message. + Schemes other than `http`, `https` (or the empty scheme) + might be - Protobuf library provides support to pack/unpack Any values in - the form + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - of utility functions or additional generated methods of the - Any type. + URL that describes the type of the serialized message. - Example 1: Pack and unpack a message in C++. + Protobuf library provides support to pack/unpack Any values + in the form - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state associated with the request identifier - description: |- - QueryUpgradedClientStateResponse is the response type for the - Query/UpgradedClientState RPC method. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/apps/fee/v1/fee_enabled: + get: + summary: FeeEnabledChannels returns a list of all fee enabled channels + operationId: FeeEnabledChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee + enabled channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc default: description: An unexpected error response schema: @@ -2947,193 +2780,195 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + 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 + format: 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 + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 tags: - Query - /ibc/core/client/v1/upgraded_consensus_states: + /ibc/apps/fee/v1/incentivized_packets: get: - summary: UpgradedConsensusState queries an Upgraded IBC consensus state. - operationId: UpgradedConsensusState + summary: >- + IncentivizedPackets returns all incentivized packets and their + associated fees + operationId: IncentivizedPackets responses: '200': description: A successful response. schema: type: object properties: - upgraded_consensus_state: - 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. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: Consensus state associated with the request identifier - description: |- - QueryUpgradedConsensusStateResponse is the response type for the - Query/UpgradedConsensusState RPC method. + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + 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. + title: the packet receive fee + ack_fee: + type: array + items: + 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. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + 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. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc default: description: An unexpected error response schema: @@ -3323,61 +3158,99 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + 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 + format: 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 + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 tags: - Query - '/ibc/core/connection/v1/client_connections/{client_id}': + /ibc/client/v1/params: get: - summary: |- - ClientConnections queries the connection paths associated with a client - state. - operationId: ClientConnections + summary: ClientParams queries all parameters of the ibc client. + operationId: ClientParams responses: '200': description: A successful response. schema: type: object properties: - connection_paths: - type: array - items: - type: string - description: slice of all the connection paths associated with a client. - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was generated + params: + description: params defines the parameters of the module. type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state + types. + description: >- + QueryClientParamsResponse is the response type for the + Query/ClientParams RPC - gets reset - title: |- - QueryClientConnectionsResponse is the response type for the - Query/ClientConnections RPC method + method. default: description: An unexpected error response schema: @@ -3567,206 +3440,277 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: client_id - description: client identifier associated with a connection - in: path - required: true - type: string tags: - Query - /ibc/core/connection/v1/connections: + /ibc/core/client/v1/client_states: get: - summary: Connections queries all the IBC connections of a chain. - operationId: Connections + summary: ClientStates queries all the IBC light clients of a chain. + operationId: ClientStates responses: '200': description: A successful response. schema: type: object properties: - connections: + client_states: type: array items: type: object properties: - id: - type: string - description: connection identifier. client_id: type: string - description: client associated with this connection. - versions: - type: array - items: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: >- - list of features compatible with the specified - identifier - description: >- - Version defines the versioning scheme used to - negotiate the IBC verison in - - the connection handshake. - title: >- - IBC version which can be utilised to determine encodings - or protocols for - - channels or packets utilising this connection - state: - description: current state of the connection end. - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - default: STATE_UNINITIALIZED_UNSPECIFIED - counterparty: - description: counterparty chain associated with this connection. + title: client identifier + client_state: type: object properties: - client_id: + type_url: type: string description: >- - identifies the client on the counterparty chain - associated with a given + A URL/resource name that uniquely identifies the + type of the serialized - connection. - connection_id: - type: string - description: >- - identifies the connection end on the counterparty - chain associated with a + protocol buffer message. This string must contain at + least - given connection. - prefix: - description: commitment merkle prefix of the counterparty chain. - type: object - properties: - key_prefix: - type: string - format: byte - title: >- - MerklePrefix is merkle path prefixed to the key. + one "/" character. The last segment of the URL's + path must represent - The constructed key from the Path and the key will - be append(Path.KeyPath, + the fully qualified name of the type (as in - append(Path.KeyPrefix, key...)) - delay_period: - type: string - format: uint64 - description: delay period associated with this connection. - description: >- - IdentifiedConnection defines a connection with additional - connection + `path/google.protobuf.Duration`). The name should be + in a canonical form - identifier field. - description: list of stored connections of the chain. - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + (e.g., leading "." is not accepted). - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - corresponding request message has used PageRequest. + In practice, teams usually precompile into the + binary all types that they - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - height: - title: query block height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping + expect it to use in the context of Any. However, for + URLs which use the - RevisionNumber the same. However some consensus algorithms may - choose to + scheme `http`, `https`, or no scheme, one can + optionally set up a type - reset the height in certain conditions e.g. hard forks, - state-machine + server that maps type URLs to message definitions as + follows: - breaking changes In these cases, the RevisionNumber is - incremented so that - height continues to be monitonically increasing even as the - RevisionHeight + * If no scheme is provided, `https` is assumed. - gets reset - description: >- - QueryConnectionsResponse is the response type for the - Query/Connections RPC + * 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.) - 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 - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + Note: this functionality is not currently available + in the official - protocol buffer message. This string must contain at - least + protobuf release, and it is not used for type URLs + beginning with - one "/" character. The last segment of the URL's path - must represent + type.googleapis.com. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination 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: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + description: >- + QueryClientStatesResponse is the response type for the + Query/ClientStates 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 + 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). @@ -3971,111 +3915,201 @@ paths: required: false type: boolean format: 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 + format: boolean tags: - Query - '/ibc/core/connection/v1/connections/{connection_id}': + '/ibc/core/client/v1/client_states/{client_id}': get: - summary: Connection queries an IBC connection end. - operationId: Connection + summary: ClientState queries an IBC light client. + operationId: ClientState responses: '200': description: A successful response. schema: type: object properties: - connection: - title: connection associated with the request identifier + client_state: type: object properties: - client_id: + type_url: type: string - description: client associated with this connection. - versions: - type: array - items: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: >- - list of features compatible with the specified - identifier - description: >- - Version defines the versioning scheme used to negotiate - the IBC verison in - - the connection handshake. description: >- - IBC version which can be utilised to determine encodings - or protocols for + A URL/resource name that uniquely identifies the type of + the serialized - channels or packets utilising this connection. - state: - description: current state of the connection end. - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - default: STATE_UNINITIALIZED_UNSPECIFIED - counterparty: - description: counterparty chain associated with this connection. - type: object - properties: - client_id: - type: string - description: >- - identifies the client on the counterparty chain - associated with a given + protocol buffer message. This string must contain at least - connection. - connection_id: - type: string - description: >- - identifies the connection end on the counterparty - chain associated with a + one "/" character. The last segment of the URL's path must + represent - given connection. - prefix: - description: commitment merkle prefix of the counterparty chain. - type: object - properties: - key_prefix: - type: string - format: byte - title: >- - MerklePrefix is merkle path prefixed to the key. + the fully qualified name of the type (as in - The constructed key from the Path and the key will be - append(Path.KeyPath, + `path/google.protobuf.Duration`). The name should be in a + canonical form - append(Path.KeyPrefix, key...)) - delay_period: + (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: uint64 + format: byte description: >- - delay period that must pass before a consensus state can - be used for + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - packet-verification NOTE: delay period logic is only - implemented by some + URL that describes the type of the serialized message. - clients. - description: >- - ConnectionEnd defines a stateful object on a chain connected - to another - separate one. + Protobuf library provides support to pack/unpack Any values in + the form - NOTE: there must only be 2 defined ConnectionEnds to establish + of utility functions or additional generated methods of the + Any type. - a connection between two chains. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state associated with the request identifier proof: type: string format: byte @@ -4110,10 +4144,10 @@ paths: gets reset description: >- - QueryConnectionResponse is the response type for the - Query/Connection RPC + QueryClientStateResponse is the response type for the + Query/ClientState RPC - method. Besides the connection end, it includes a proof and the + method. Besides the client state, it includes a proof and the height from which the proof was retrieved. @@ -4307,279 +4341,60 @@ paths: "value": "1.212s" } parameters: - - name: connection_id - description: connection unique identifier + - name: client_id + description: client state unique identifier in: path required: true type: string tags: - Query - '/ibc/core/connection/v1/connections/{connection_id}/client_state': + '/ibc/core/client/v1/client_status/{client_id}': get: - summary: |- - ConnectionClientState queries the client state associated with the - connection. - operationId: ConnectionClientState + summary: Status queries the status of an IBC client. + operationId: ClientStatus responses: '200': description: A successful response. schema: type: object properties: - identified_client_state: - title: client state associated with the channel - type: object - properties: - client_id: - type: string - title: client identifier - client_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the + Query/ClientStatus RPC - protocol buffer message. This string must contain at - least + method. It returns the current status of the IBC client. + 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - one "/" character. The last segment of the URL's path - must represent + protocol buffer message. This string must contain at + least - the fully qualified name of the type (as in + one "/" character. The last segment of the URL's path + must represent - `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. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state - description: >- - IdentifiedClientState defines a client state with an - additional client - - identifier field. - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - title: |- - QueryConnectionClientStateResponse is the response type for the - Query/ConnectionClientState 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 - 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 + the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form @@ -4740,236 +4555,275 @@ paths: "value": "1.212s" } parameters: - - name: connection_id - description: connection identifier + - name: client_id + description: client unique identifier in: path required: true type: string tags: - Query - '/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + '/ibc/core/client/v1/consensus_states/{client_id}': get: summary: |- - ConnectionConsensusState queries the consensus state associated with the - connection. - operationId: ConnectionConsensusState + ConsensusStates queries all the consensus state associated with a given + client. + operationId: ConsensusStates responses: '200': description: A successful response. schema: type: object properties: - consensus_state: - 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 + consensus_states: + type: array + items: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each + height while keeping - (e.g., leading "." is not accepted). + RevisionNumber the same. However some consensus + algorithms may choose to + reset the height in certain conditions e.g. hard forks, + state-machine - In practice, teams usually precompile into the binary all - types that they + breaking changes In these cases, the RevisionNumber is + incremented so that - expect it to use in the context of Any. However, for URLs - which use the + height continues to be monitonically increasing even as + the RevisionHeight - scheme `http`, `https`, or no scheme, one can optionally - set up a type + gets reset + consensus_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - server that maps type URLs to message definitions as - follows: + protocol buffer message. This string must contain at + least + one "/" character. The last segment of the URL's + path must represent - * If no scheme is provided, `https` is assumed. + the fully qualified name of the type (as in - * 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.) + `path/google.protobuf.Duration`). The name should be + in a canonical form - Note: this functionality is not currently available in the - official + (e.g., leading "." is not accepted). - protobuf release, and it is not used for type URLs - beginning with - type.googleapis.com. + 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 - Schemes other than `http`, `https` (or the empty scheme) - might be + scheme `http`, `https`, or no scheme, one can + optionally set up a type - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + server that maps type URLs to message definitions as + follows: - URL that describes the type of the serialized message. + * If no scheme is provided, `https` is assumed. - Protobuf library provides support to pack/unpack Any values in - the form + * 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.) - of utility functions or additional generated methods of the - Any type. + Note: this functionality is not currently available + in the official + protobuf release, and it is not used for type URLs + beginning with - Example 1: Pack and unpack a message in C++. + type.googleapis.com. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + Schemes other than `http`, `https` (or the empty + scheme) might be - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - Example 3: Pack and unpack a message in Python. + URL that describes the type of the serialized message. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Protobuf library provides support to pack/unpack Any + values in the form - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + of utility functions or additional generated methods of + the Any type. - The pack methods provided by protobuf library will by default - use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Example 1: Pack and unpack a message in C++. - methods only use the fully qualified type name after the last - '/' + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + Example 2: Pack and unpack a message in Java. - name "y.z". + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - JSON + Example 4: Pack and unpack a message in Go - ==== + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The JSON representation of an `Any` value uses the regular + The pack methods provided by protobuf library will by + default use - representation of the deserialized, embedded message, with an + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - additional field `@type` which contains the type URL. Example: + methods only use the fully qualified type name after the + last '/' - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + name "y.z". - If the embedded message type is well-known and has a custom - JSON - representation, that representation will be embedded adding a - field - `value` which holds the custom JSON in addition to the `@type` + JSON - field. Example (for message [google.protobuf.Duration][]): + ==== - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: consensus state associated with the channel - client_id: - type: string - title: client ID associated with the consensus state - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping + The JSON representation of an `Any` value uses the + regular - RevisionNumber the same. However some consensus algorithms may - choose to + representation of the deserialized, embedded message, + with an - reset the height in certain conditions e.g. hard forks, - state-machine + additional field `@type` which contains the type URL. + Example: - breaking changes In these cases, the RevisionNumber is - incremented so that + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - height continues to be monitonically increasing even as the - RevisionHeight + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - gets reset + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: consensus state + description: >- + ConsensusStateWithHeight defines a consensus state with an + additional height + + field. + title: consensus states associated with the identifier + pagination: + title: pagination 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: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } title: |- - QueryConnectionConsensusStateResponse is the response type for the - Query/ConnectionConsensusState RPC method + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method default: description: An unexpected error response schema: @@ -5160,113 +5014,121 @@ paths: "value": "1.212s" } parameters: - - name: connection_id - description: connection identifier + - name: client_id + description: client identifier in: path required: true type: string - - name: revision_number - in: path - required: true + - 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: revision_height - in: path - required: true + - 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 + format: 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 + format: boolean tags: - Query - /ibc/core/channel/v1/channels: + '/ibc/core/client/v1/consensus_states/{client_id}/heights': get: - summary: Channels queries all the IBC channels of a chain. - operationId: Channels + summary: >- + ConsensusStateHeights queries the height of every consensus states + associated with a given client. + operationId: ConsensusStateHeights responses: '200': description: A successful response. schema: type: object properties: - channels: + consensus_state_heights: type: array items: type: object properties: - state: - title: current state of the channel end + revision_number: type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - - STATE_CLOSED - default: STATE_UNINITIALIZED_UNSPECIFIED - description: >- - State defines if a channel is in one of the following - states: + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + RevisionNumber the same. However some consensus algorithms + may choose to - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are - ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - packets. - ordering: - title: whether the channel is ordered or unordered - type: string - enum: - - ORDER_NONE_UNSPECIFIED - - ORDER_UNORDERED - - ORDER_ORDERED - default: ORDER_NONE_UNSPECIFIED - description: >- - - ORDER_NONE_UNSPECIFIED: zero-value for channel - ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - counterparty: - title: counterparty channel end - type: object - properties: - port_id: - type: string - description: >- - port on the counterparty chain which owns the other - end of the channel. - channel_id: - type: string - title: channel end on the counterparty chain - connection_hops: - type: array - items: - type: string - title: >- - list of connection identifiers, in order, along which - packets sent on + reset the height in certain conditions e.g. hard forks, + state-machine - this channel will travel - version: - type: string - title: >- - opaque channel version, which is agreed upon during the - handshake - port_id: - type: string - title: port identifier - channel_id: - type: string - title: channel identifier - description: >- - IdentifiedChannel defines a channel with additional port and - channel + breaking changes In these cases, the RevisionNumber is + incremented so that - identifier fields. - description: list of stored channels of the chain. + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes + of updating and + + freezing clients + title: consensus state heights pagination: title: pagination response type: object @@ -5274,9 +5136,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -5295,38 +5158,9 @@ paths: repeated Bar results = 1; PageResponse page = 2; } - height: - title: query block height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - description: >- - QueryChannelsResponse is the response type for the Query/Channels - RPC method. + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method default: description: An unexpected error response schema: @@ -5517,6 +5351,11 @@ paths: "value": "1.212s" } parameters: + - name: client_id + description: client identifier + in: path + required: true + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -5564,98 +5403,212 @@ paths: required: false type: boolean format: 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 + format: boolean tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}': + '/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': get: - summary: Channel queries an IBC Channel. - operationId: Channel + summary: >- + ConsensusState queries a consensus state associated with a client state + at + + a given height. + operationId: ConsensusState responses: '200': description: A successful response. schema: type: object properties: - channel: - title: channel associated with the request identifiers + consensus_state: type: object properties: - state: - title: current state of the channel end + type_url: type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - - STATE_CLOSED - default: STATE_UNINITIALIZED_UNSPECIFIED description: >- - State defines if a channel is in one of the following - states: + A URL/resource name that uniquely identifies the type of + the serialized - CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + protocol buffer message. This string must contain at least - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are - ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - packets. - ordering: - title: whether the channel is ordered or unordered - type: string - enum: - - ORDER_NONE_UNSPECIFIED - - ORDER_UNORDERED - - ORDER_ORDERED - default: ORDER_NONE_UNSPECIFIED - description: |- - - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - counterparty: - title: counterparty channel end - type: object - properties: - port_id: - type: string - description: >- - port on the counterparty chain which owns the other - end of the channel. - channel_id: - type: string - title: channel end on the counterparty chain - connection_hops: - type: array - items: - type: string - title: >- - list of connection identifiers, in order, along which - packets sent on + one "/" character. The last segment of the URL's path must + represent - this channel will travel - version: + 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 - title: >- - opaque channel version, which is agreed upon during the - handshake + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - Channel defines pipeline for exactly-once packet delivery - between specific + `Any` contains an arbitrary serialized protocol buffer message + along with a - modules on separate blockchains, which has at least one end - capable of + URL that describes the type of the serialized message. - sending packets and one end capable of receiving packets. + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + consensus state associated with the client identifier at the + given height proof: type: string format: byte title: merkle proof of existence proof_height: - title: height at which the proof was retrieved type: object properties: revision_number: @@ -5683,14 +5636,18 @@ paths: RevisionHeight gets reset - description: >- - QueryChannelResponse is the response type for the Query/Channel - RPC method. + title: >- + Height is a monotonically increasing data type - Besides the Channel end, it includes a proof and the height from - which the + that can be compared against another Height for the purposes + of updating and - proof was retrieved. + freezing clients + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState + + RPC method default: description: An unexpected error response schema: @@ -5881,256 +5838,220 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier + - name: client_id + description: client identifier in: path required: true type: string - - name: port_id - description: port unique identifier + - name: revision_number + description: consensus state revision number + in: path + required: true + type: string + format: uint64 + - name: revision_height + description: consensus state revision height in: path required: true type: string + format: uint64 + - name: latest_height + description: >- + latest_height overrrides the height field and queries the latest + stored + + ConsensusState. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state': + /ibc/core/client/v1/upgraded_client_states: get: - summary: >- - ChannelClientState queries for the client state for the channel - associated - - with the provided channel identifiers. - operationId: ChannelClientState + summary: UpgradedClientState queries an Upgraded IBC light client. + operationId: UpgradedClientState responses: '200': description: A successful response. schema: type: object properties: - identified_client_state: - title: client state associated with the channel + upgraded_client_state: type: object properties: - client_id: + type_url: type: string - title: client identifier - client_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + 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 + 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 + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * 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.) + * 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 + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty - scheme) might be + 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. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any - values in the form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of - the Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state - description: >- - IdentifiedClientState defines a client state with an - additional client - - identifier field. - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - RevisionNumber the same. However some consensus algorithms may - choose to + If the embedded message type is well-known and has a custom + JSON - reset the height in certain conditions e.g. hard forks, - state-machine + representation, that representation will be embedded adding a + field - breaking changes In these cases, the RevisionNumber is - incremented so that + `value` which holds the custom JSON in addition to the `@type` - height continues to be monitonically increasing even as the - RevisionHeight + field. Example (for message [google.protobuf.Duration][]): - gets reset - title: |- - QueryChannelClientStateResponse is the Response type for the - Query/QueryChannelClientState RPC method + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state associated with the request identifier + description: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. default: description: An unexpected error response schema: @@ -6320,32 +6241,19 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + /ibc/core/client/v1/upgraded_consensus_states: get: - summary: |- - ChannelConsensusState queries for the consensus state for the channel - associated with the provided channel identifiers. - operationId: ChannelConsensusState + summary: UpgradedConsensusState queries an Upgraded IBC consensus state. + operationId: UpgradedConsensusState responses: '200': description: A successful response. schema: type: object properties: - consensus_state: + upgraded_consensus_state: type: object properties: type_url: @@ -6516,46 +6424,10 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state associated with the channel - client_id: - type: string - title: client ID associated with the consensus state - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - title: |- - QueryChannelClientStateResponse is the Response type for the - Query/QueryChannelClientState RPC method + title: Consensus state associated with the request identifier + description: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. default: description: An unexpected error response schema: @@ -6745,53 +6617,31 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string - - name: revision_number - description: revision number of the consensus state - in: path - required: true - type: string - format: uint64 - - name: revision_height - description: revision height of the consensus state - in: path - required: true - type: string - format: uint64 tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence': + '/ibc/core/connection/v1/client_connections/{client_id}': get: - summary: >- - NextSequenceReceive returns the next receive sequence for a given - channel. - operationId: NextSequenceReceive + summary: |- + ClientConnections queries the connection paths associated with a client + state. + operationId: ClientConnections responses: '200': description: A successful response. schema: type: object properties: - next_sequence_receive: - type: string - format: uint64 - title: next sequence receive number + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. proof: type: string format: byte title: merkle proof of existence proof_height: - title: height at which the proof was retrieved + title: height at which the proof was generated type: object properties: revision_number: @@ -6820,8 +6670,8 @@ paths: gets reset title: |- - QuerySequenceResponse is the request type for the - Query/QueryNextSequenceReceiveResponse RPC method + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method default: description: An unexpected error response schema: @@ -7012,71 +6862,121 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier + - name: client_id + description: client identifier associated with a connection in: path required: true type: string tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': + /ibc/core/connection/v1/connections: get: - summary: >- - PacketAcknowledgements returns all the packet acknowledgements - associated - - with a channel. - operationId: PacketAcknowledgements + summary: Connections queries all the IBC connections of a chain. + operationId: Connections responses: '200': description: A successful response. schema: type: object properties: - acknowledgements: + connections: type: array items: type: object properties: - port_id: - type: string - description: channel port identifier. - channel_id: - type: string - description: channel unique identifier. - sequence: + id: type: string - format: uint64 - description: packet sequence. - data: + description: connection identifier. + client_id: type: string - format: byte - description: embedded data that represents packet state. - description: >- - PacketState defines the generic type necessary to retrieve - and store - - packet commitments, acknowledgements, and receipts. + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to + negotiate the IBC verison in - Caller is responsible for knowing the context necessary to - interpret this + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings + or protocols for - state as a commitment, acknowledgement, or a receipt. - pagination: - title: pagination response + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will + be append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: >- + IdentifiedConnection defines a connection with additional + connection + + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination response type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -7124,9 +7024,11 @@ paths: RevisionHeight gets reset - title: |- - QueryPacketAcknowledgemetsResponse is the request type for the - Query/QueryPacketAcknowledgements RPC method + description: >- + QueryConnectionsResponse is the response type for the + Query/Connections RPC + + method. default: description: An unexpected error response schema: @@ -7317,16 +7219,6 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -7374,31 +7266,122 @@ paths: required: false type: boolean format: boolean - - name: packet_commitment_sequences - description: list of packet sequences. + - 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: array - items: - type: string - format: uint64 - collectionFormat: multi + type: boolean + format: boolean tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': + '/ibc/core/connection/v1/connections/{connection_id}': get: - summary: PacketAcknowledgement queries a stored packet acknowledgement hash. - operationId: PacketAcknowledgement + summary: Connection queries an IBC connection end. + operationId: Connection responses: '200': description: A successful response. schema: type: object properties: - acknowledgement: - type: string - format: byte - title: packet associated with the request fields + connection: + title: connection associated with the request identifier + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to negotiate + the IBC verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings + or protocols for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can + be used for + + packet-verification NOTE: delay period logic is only + implemented by some + + clients. + description: >- + ConnectionEnd defines a stateful object on a chain connected + to another + + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish + + a connection between two chains. proof: type: string format: byte @@ -7432,13 +7415,14 @@ paths: RevisionHeight gets reset - title: >- - QueryPacketAcknowledgementResponse defines the client query - response for a + description: >- + QueryConnectionResponse is the response type for the + Query/Connection RPC - packet which also includes a proof and the height from which the + method. Besides the connection end, it includes a proof and the + height from - proof was retrieved + which the proof was retrieved. default: description: An unexpected error response schema: @@ -7629,95 +7613,219 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier - in: path - required: true - type: string - - name: sequence - description: packet sequence + - name: connection_id + description: connection unique identifier in: path required: true type: string - format: uint64 tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments': + '/ibc/core/connection/v1/connections/{connection_id}/client_state': get: summary: |- - PacketCommitments returns all the packet commitments hashes associated - with a channel. - operationId: PacketCommitments + ConnectionClientState queries the client state associated with the + connection. + operationId: ConnectionClientState responses: '200': description: A successful response. schema: type: object properties: - commitments: - type: array - items: - type: object - properties: - port_id: - type: string - description: channel port identifier. - channel_id: - type: string - description: channel unique identifier. - sequence: - type: string - format: uint64 - description: packet sequence. - data: - type: string - format: byte - description: embedded data that represents packet state. - description: >- - PacketState defines the generic type necessary to retrieve - and store - - packet commitments, acknowledgements, and receipts. - - Caller is responsible for knowing the context necessary to - interpret this - - state as a commitment, acknowledgement, or a receipt. - pagination: - title: pagination response + identified_client_state: + title: client state associated with the channel type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + client_id: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + title: client identifier + client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + protocol buffer message. This string must contain at + least - corresponding request message has used PageRequest. + one "/" character. The last segment of the URL's path + must represent - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - height: - title: query block height + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -7746,8 +7854,8 @@ paths: gets reset title: |- - QueryPacketCommitmentsResponse is the request type for the - Query/QueryPacketCommitments RPC method + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method default: description: An unexpected error response schema: @@ -7938,87 +8046,206 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true - type: string - - name: port_id - description: port unique identifier + - name: connection_id + description: connection identifier in: path required: true 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. + tags: + - Query + '/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + get: + summary: |- + ConnectionConsensusState queries the consensus state associated with the + connection. + operationId: ConnectionConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - It is less efficient than using key. Only one of offset or key - should + protocol buffer message. This string must contain at least - 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. + one "/" character. The last segment of the URL's path must + represent - 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 + the fully qualified name of the type (as in - a count of the total number of items available for pagination in - UIs. + `path/google.protobuf.Duration`). The name should be in a + canonical form - count_total is only respected when offset is used. It is ignored - when key + (e.g., leading "." is not accepted). - is set. - in: query - required: false - type: boolean - format: boolean - tags: - - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': - get: - summary: >- - UnreceivedAcks returns all the unreceived IBC acknowledgements - associated - with a channel and sequences. - operationId: UnreceivedAcks - responses: - '200': - description: A successful response. - schema: - type: object - properties: - sequences: - type: array - items: - type: string - format: uint64 - title: list of unreceived acknowledgement sequences - height: - title: query block height + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: consensus state associated with the channel + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -8047,8 +8274,8 @@ paths: gets reset title: |- - QueryUnreceivedAcksResponse is the response type for the - Query/UnreceivedAcks RPC method + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method default: description: An unexpected error response schema: @@ -8239,52 +8466,146 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier + - name: connection_id + description: connection identifier in: path required: true type: string - - name: port_id - description: port unique identifier + - name: revision_number in: path required: true type: string - - name: packet_ack_sequences - description: list of acknowledgement sequences + format: uint64 + - name: revision_height in: path required: true - type: array - items: - type: string - format: uint64 - collectionFormat: csv - minItems: 1 + type: string + format: uint64 tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + /ibc/core/channel/v1/channels: get: - summary: >- - UnreceivedPackets returns all the unreceived IBC packets associated with - a - - channel and sequences. - operationId: UnreceivedPackets + summary: Channels queries all the IBC channels of a chain. + operationId: Channels responses: '200': description: A successful response. schema: type: object properties: - sequences: + channels: type: array items: - type: string - format: uint64 - title: list of unreceived packet sequences - height: - title: query block height - type: object - properties: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel + + identifier fields. + description: list of stored channels of the chain. + pagination: + title: pagination 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: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: revision_number: type: string format: uint64 @@ -8310,9 +8631,9 @@ paths: RevisionHeight gets reset - title: |- - QueryUnreceivedPacketsResponse is the response type for the - Query/UnreceivedPacketCommitments RPC method + description: >- + QueryChannelsResponse is the response type for the Query/Channels + RPC method. default: description: An unexpected error response schema: @@ -8503,94 +8824,202 @@ paths: "value": "1.212s" } parameters: - - name: channel_id - description: channel unique identifier - in: path - required: true + - 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 - - name: port_id - description: port unique identifier - in: path - required: true + 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 - - name: packet_commitment_sequences - description: list of packet sequences - in: path - required: true - type: array - items: - type: string - format: uint64 - collectionFormat: csv - minItems: 1 + 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 + format: 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 + format: boolean tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}': get: - summary: PacketCommitment queries a stored packet commitment hash. - operationId: PacketCommitment + summary: Channel queries an IBC Channel. + operationId: Channel responses: '200': description: A successful response. schema: type: object properties: - commitment: - type: string - format: byte - title: packet associated with the request fields - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved + channel: + title: channel associated with the request identifiers type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: + state: + title: current state of the channel end type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that - - height continues to be monitonically increasing even as the - RevisionHeight - - gets reset - title: >- - QueryPacketCommitmentResponse defines the client query response - for a packet + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: - which also includes a proof and the height from which the proof - was + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - retrieved - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + description: >- + Channel defines pipeline for exactly-once packet delivery + between specific + + modules on separate blockchains, which has at least one end + capable of + + sending packets and one end capable of receiving packets. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelResponse is the response type for the Query/Channel + RPC method. + + Besides the Channel end, it includes a proof and the height from + which the + + proof was retrieved. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: type: string details: type: array @@ -8780,130 +9209,303 @@ paths: in: path required: true type: string - - name: sequence - description: packet sequence - in: path - required: true - type: string - format: uint64 tags: - Query - '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state': get: summary: >- - PacketReceipt queries if a given packet sequence has been received on - the + ChannelClientState queries for the client state for the channel + associated - queried chain - operationId: PacketReceipt + with the provided channel identifiers. + operationId: ChannelClientState responses: '200': description: A successful response. schema: type: object properties: - received: - type: boolean - format: boolean - title: success flag for if receipt exists - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved + identified_client_state: + title: client state associated with the channel type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: + client_id: type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping + title: client identifier + client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - RevisionNumber the same. However some consensus algorithms may - choose to + protocol buffer message. This string must contain at + least - reset the height in certain conditions e.g. hard forks, - state-machine + one "/" character. The last segment of the URL's path + must represent - breaking changes In these cases, the RevisionNumber is - incremented so that + the fully qualified name of the type (as in - height continues to be monitonically increasing even as the - RevisionHeight + `path/google.protobuf.Duration`). The name should be + in a canonical form - gets reset - title: >- - QueryPacketReceiptResponse defines the client query response for a - packet + (e.g., leading "." is not accepted). - receipt which also includes a proof, and the height from which the - proof was - retrieved - 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 - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + In practice, teams usually precompile into the binary + all types that they - protocol buffer message. This string must contain at - least + expect it to use in the context of Any. However, for + URLs which use the - one "/" character. The last segment of the URL's path - must represent + scheme `http`, `https`, or no scheme, one can + optionally set up a type - the fully qualified name of the type (as in + server that maps type URLs to message definitions as + follows: - `path/google.protobuf.Duration`). The name should be in - a canonical form - (e.g., leading "." is not accepted). + * 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.) - In practice, teams usually precompile into the binary - all types that they + Note: this functionality is not currently available in + the official - expect it to use in the context of Any. However, for - URLs which use the + protobuf release, and it is not used for type URLs + beginning with - scheme `http`, `https`, or no scheme, one can optionally - set up a type + type.googleapis.com. - server that maps type URLs to message definitions as - follows: + Schemes other than `http`, `https` (or the empty + scheme) might be - * If no scheme is provided, `https` is assumed. + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - * 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 that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState 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 + 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 @@ -9047,136 +9649,201 @@ paths: in: path required: true type: string - - name: sequence - description: packet sequence - in: path - required: true - type: string - format: uint64 tags: - Query - '/ibc/core/channel/v1/connections/{connection}/channels': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}': get: summary: |- - ConnectionChannels queries all the channels associated with a connection - end. - operationId: ConnectionChannels + ChannelConsensusState queries for the consensus state for the channel + associated with the provided channel identifiers. + operationId: ChannelConsensusState responses: '200': description: A successful response. schema: type: object properties: - channels: - type: array - items: - type: object - properties: - state: - title: current state of the channel end - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - - STATE_CLOSED - default: STATE_UNINITIALIZED_UNSPECIFIED - description: >- - State defines if a channel is in one of the following - states: + consensus_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + protocol buffer message. This string must contain at least - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are - ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - packets. - ordering: - title: whether the channel is ordered or unordered - type: string - enum: - - ORDER_NONE_UNSPECIFIED - - ORDER_UNORDERED - - ORDER_ORDERED - default: ORDER_NONE_UNSPECIFIED - description: >- - - ORDER_NONE_UNSPECIFIED: zero-value for channel - ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - counterparty: - title: counterparty channel end - type: object - properties: - port_id: - type: string - description: >- - port on the counterparty chain which owns the other - end of the channel. - channel_id: - type: string - title: channel end on the counterparty chain - connection_hops: - type: array - items: - type: string - title: >- - list of connection identifiers, in order, along which - packets sent on + one "/" character. The last segment of the URL's path must + represent - this channel will travel - version: - type: string - title: >- - opaque channel version, which is agreed upon during the - handshake - port_id: - type: string - title: port identifier - channel_id: - type: string - title: channel identifier - description: >- - IdentifiedChannel defines a channel with additional port and - channel + the fully qualified name of the type (as in - identifier fields. - description: list of channels associated with a connection. - pagination: - title: pagination response - type: object - properties: - next_key: + `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 - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - 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: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - PageResponse is to be embedded in gRPC response messages where - the + `Any` contains an arbitrary serialized protocol buffer message + along with a - corresponding request message has used PageRequest. + URL that describes the type of the serialized message. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - height: - title: query block height + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: consensus state associated with the channel + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -9205,8 +9872,8 @@ paths: gets reset title: |- - QueryConnectionChannelsResponse is the Response type for the - Query/QueryConnectionChannels RPC method + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method default: description: An unexpected error response schema: @@ -9397,609 +10064,4077 @@ paths: "value": "1.212s" } parameters: - - name: connection - description: connection unique identifier + - name: channel_id + description: channel unique identifier in: path required: true 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 + - name: port_id + description: port unique identifier + in: path + required: true 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 + - name: revision_number + description: revision number of the consensus state + in: path + required: true 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 + - name: revision_height + description: revision height of the consensus state + in: path + required: true 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 - format: boolean tags: - Query -definitions: - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - 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. - offset: - type: string - format: uint64 - 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. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence': + get: + summary: >- + NextSequenceReceive returns the next receive sequence for a given + channel. + operationId: NextSequenceReceive + responses: + '200': + description: A successful response. + schema: + type: object + properties: + next_sequence_receive: + type: string + format: uint64 + title: next sequence receive number + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - format: boolean - description: >- - count_total is set to true to indicate that the result set should - include + RevisionNumber the same. However some consensus algorithms may + choose to - a count of the total number of items available for pagination in UIs. + reset the height in certain conditions e.g. hard forks, + state-machine - count_total is only respected when offset is used. It is ignored when - key + breaking changes In these cases, the RevisionNumber is + incremented so that - is set. - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - 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: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + height continues to be monitonically increasing even as the + RevisionHeight - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + gets reset + title: |- + QuerySequenceResponse is the request type for the + Query/QueryNextSequenceReceiveResponse 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 + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path must represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a canonical - form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types that - they + 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 + 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 + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * 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.) + * 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 + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be + 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. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the form + Protobuf library provides support to pack/unpack Any values + in the form - of utility functions or additional generated methods of the Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded adding a field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - grpc.gateway.runtime.Error: - 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 - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': + get: + summary: >- + PacketAcknowledgements returns all the packet acknowledgements + associated - protocol buffer message. This string must contain at least + with a channel. + operationId: PacketAcknowledgements + responses: + '200': + description: A successful response. + schema: + type: object + properties: + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store - one "/" character. The last segment of the URL's path must - represent + packet commitments, acknowledgements, and receipts. - the fully qualified name of the type (as in + Caller is responsible for knowing the context necessary to + interpret this - `path/google.protobuf.Duration`). The name should be in a - canonical form + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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 - (e.g., leading "." is not accepted). + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + corresponding request message has used PageRequest. - In practice, teams usually precompile into the binary all types - that they + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - expect it to use in the context of Any. However, for URLs which + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + 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 + format: 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 + format: boolean + - name: packet_commitment_sequences + description: list of packet sequences. + in: query + required: false + type: array + items: + type: string + format: uint64 + collectionFormat: multi + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': + get: + summary: PacketAcknowledgement queries a stored packet acknowledgement hash. + operationId: PacketAcknowledgement + responses: + '200': + description: A successful response. + schema: + type: object + properties: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketAcknowledgementResponse defines the client query + response for a + + packet which also includes a proof and the height from which the + + proof was retrieved + 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments': + get: + summary: |- + PacketCommitments returns all the packet commitments hashes associated + with a channel. + operationId: PacketCommitments + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitments: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + 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 + format: 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 + format: boolean + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': + get: + summary: >- + UnreceivedAcks returns all the unreceived IBC acknowledgements + associated + + with a channel and sequences. + operationId: UnreceivedAcks + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_ack_sequences + description: list of acknowledgement sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + get: + summary: >- + UnreceivedPackets returns all the unreceived IBC packets associated with + a + + channel and sequences. + operationId: UnreceivedPackets + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived packet sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedPacketsResponse is the response type for the + Query/UnreceivedPacketCommitments 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_commitment_sequences + description: list of packet sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + get: + summary: PacketCommitment queries a stored packet commitment hash. + operationId: PacketCommitment + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitment: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketCommitmentResponse defines the client query response + for a packet + + which also includes a proof and the height from which the proof + was + + retrieved + 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + get: + summary: >- + PacketReceipt queries if a given packet sequence has been received on + the + + queried chain + operationId: PacketReceipt + responses: + '200': + description: A successful response. + schema: + type: object + properties: + received: + type: boolean + format: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a + packet + + receipt which also includes a proof, and the height from which the + proof was + + retrieved + 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/core/channel/v1/connections/{connection}/channels': + get: + summary: |- + ConnectionChannels queries all the channels associated with a connection + end. + operationId: ConnectionChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel + + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination 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: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionChannelsResponse is the Response type for the + Query/QueryConnectionChannels 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection + description: connection unique identifier + in: path + required: true + 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 + format: 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 + format: boolean + tags: + - Query +definitions: + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + 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. + offset: + type: string + format: uint64 + 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. + limit: + type: string + format: uint64 + 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. + count_total: + type: boolean + format: boolean + 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. + reverse: + type: boolean + format: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + 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: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + grpc.gateway.runtime.Error: + 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 + 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 + 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. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + ibc.applications.transfer.v1.DenomTrace: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for tracing + the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens and + the + + source tracing information path. + ibc.applications.transfer.v1.Params: + type: object + properties: + send_enabled: + type: boolean + format: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers from + this + + chain. + receive_enabled: + type: boolean + format: boolean + description: >- + receive_enabled enables or disables all cross-chain token transfers to + this + + chain. + description: >- + Params defines the set of IBC transfer parameters. + + NOTE: To prevent a single token from being transferred, set the + + TransfersEnabled parameter to true and then set the bank module's + SendEnabled + + parameter for the denomination to false. + ibc.applications.transfer.v1.QueryDenomHashResponse: + type: object + properties: + hash: + type: string + description: hash (in hex format) of the denomination trace information. + description: |- + QueryDenomHashResponse is the response type for the Query/DenomHash RPC + method. + ibc.applications.transfer.v1.QueryDenomTraceResponse: + type: object + properties: + denom_trace: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for + tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens + and the + + source tracing information path. + description: |- + QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC + method. + ibc.applications.transfer.v1.QueryDenomTracesResponse: + type: object + properties: + denom_traces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for + tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens + and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + 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: >- + QueryConnectionsResponse is the response type for the Query/DenomTraces + RPC + + method. + ibc.applications.transfer.v1.QueryEscrowAddressResponse: + type: object + properties: + escrow_address: + type: string + title: the escrow account address + description: >- + QueryEscrowAddressResponse is the response type of the EscrowAddress RPC + method. + ibc.applications.transfer.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + format: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers + from this + + chain. + receive_enabled: + type: boolean + format: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this + + chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.interchain_accounts.controller.v1.Params: + type: object + properties: + controller_enabled: + type: boolean + format: boolean + description: controller_enabled enables or disables the controller submodule. + description: |- + Params defines the set of on-chain interchain accounts parameters. + The following parameters may be used to disable the controller submodule. + ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + controller_enabled: + type: boolean + format: boolean + description: controller_enabled enables or disables the controller submodule. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.interchain_accounts.host.v1.Params: + type: object + properties: + host_enabled: + type: boolean + format: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs allowed to be + executed on a host chain. + description: |- + Params defines the set of on-chain interchain accounts parameters. + The following parameters may be used to disable the host submodule. + ibc.applications.interchain_accounts.host.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + host_enabled: + type: boolean + format: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs allowed to + be executed on a host chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.base.v1beta1.Coin: + 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. + ibc.applications.fee.v1.Fee: + type: object + properties: + recv_fee: + type: array + items: + 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. + title: the packet receive fee + ack_fee: + type: array + items: + 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. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + 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. + title: the packet timeout fee + title: 'Fee defines the ICS29 receive, acknowledgement and timeout fees' + ibc.applications.fee.v1.FeeEnabledChannel: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + ibc.applications.fee.v1.IdentifiedPacketFees: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with + an IBC packet + type: object + properties: + recv_fee: + type: array + items: + 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 - server that maps type URLs to message definitions as follows: + signatures required by gogoproto. + title: the packet receive fee + ack_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - * If no scheme is provided, `https` is assumed. + NOTE: The amount field is an Int which implements the + custom method - * 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.) + signatures required by gogoproto. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - Note: this functionality is not currently available in the - official - protobuf release, and it is not used for type URLs beginning - with + NOTE: The amount field is an Int which implements the + custom method - type.googleapis.com. + signatures required by gogoproto. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional + list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + ibc.applications.fee.v1.PacketFee: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with an IBC + packet + type: object + properties: + recv_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - Schemes other than `http`, `https` (or the empty scheme) might - be + NOTE: The amount field is an Int which implements the custom + method - used with implementation specific semantics. - value: - type: string - format: byte + signatures required by gogoproto. + title: the packet receive fee + ack_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + Coin defines a token with a denomination and an amount. - URL that describes the type of the serialized message. + NOTE: The amount field is an Int which implements the custom + method - Protobuf library provides support to pack/unpack Any values in the - form + signatures required by gogoproto. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - of utility functions or additional generated methods of the Any - type. + NOTE: The amount field is an Int which implements the custom + method - Example 1: Pack and unpack a message in C++. + signatures required by gogoproto. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional list of + permitted relayers + ibc.applications.fee.v1.QueryCounterpartyPayeeResponse: + type: object + properties: + counterparty_payee: + type: string + title: the counterparty payee address used to compensate forward relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelResponse: + type: object + properties: + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc + ibc.applications.fee.v1.QueryIncentivizedPacketResponse: + type: object + properties: + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + NOTE: The amount field is an Int which implements the + custom method - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + signatures required by gogoproto. + title: the packet receive fee + ack_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + NOTE: The amount field is an Int which implements the + custom method - Example 4: Pack and unpack a message in Go + signatures required by gogoproto. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default use + NOTE: The amount field is an Int which implements the + custom method - 'type.googleapis.com/full.type.name' as the type URL and the unpack + signatures required by gogoproto. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc + ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + NOTE: The amount field is an Int which implements + the custom method - name "y.z". + signatures required by gogoproto. + title: the packet receive fee + ack_fee: + type: array + items: + 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 - JSON + signatures required by gogoproto. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - ==== - The JSON representation of an `Any` value uses the regular + NOTE: The amount field is an Int which implements + the custom method + + signatures required by gogoproto. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + ibc.applications.fee.v1.QueryIncentivizedPacketsResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + NOTE: The amount field is an Int which implements + the custom method - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + signatures required by gogoproto. + title: the packet receive fee + ack_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + NOTE: The amount field is an Int which implements + the custom method - representation, that representation will be embedded adding a field + signatures required by gogoproto. + title: the packet acknowledgement fee + timeout_fee: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + NOTE: The amount field is an Int which implements + the custom method - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - ibc.applications.transfer.v1.DenomTrace: + signatures required by gogoproto. + title: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc + ibc.applications.fee.v1.QueryPayeeResponse: type: object properties: - path: - type: string - description: >- - path defines the chain of port/channel identifiers used for tracing - the - - source of the fungible token. - base_denom: + payee_address: type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible tokens and - the - - source tracing information path. - ibc.applications.transfer.v1.Params: + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + ibc.applications.fee.v1.QueryTotalAckFeesResponse: type: object properties: - send_enabled: - type: boolean - format: boolean - description: >- - send_enabled enables or disables all cross-chain token transfers from - this - - chain. - receive_enabled: - type: boolean - format: boolean - description: >- - receive_enabled enables or disables all cross-chain token transfers to - this - - chain. - description: >- - Params defines the set of IBC transfer parameters. - - NOTE: To prevent a single token from being transferred, set the - - TransfersEnabled parameter to true and then set the bank module's - SendEnabled + ack_fees: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - parameter for the denomination to false. - ibc.applications.transfer.v1.QueryDenomHashResponse: - type: object - properties: - hash: - type: string - description: hash (in hex format) of the denomination trace information. - description: |- - QueryDenomHashResponse is the response type for the Query/DenomHash RPC - method. - ibc.applications.transfer.v1.QueryDenomTraceResponse: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the TotalAckFees + rpc + ibc.applications.fee.v1.QueryTotalRecvFeesResponse: type: object properties: - denom_trace: - type: object - properties: - path: - type: string - description: >- - path defines the chain of port/channel identifiers used for - tracing the - - source of the fungible token. - base_denom: - type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible tokens - and the + recv_fees: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - source tracing information path. - description: |- - QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC - method. - ibc.applications.transfer.v1.QueryDenomTracesResponse: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: the total packet receive fees + title: >- + QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees + rpc + ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse: type: object properties: - denom_traces: + timeout_fees: type: array items: type: object properties: - path: + denom: type: string - description: >- - path defines the chain of port/channel identifiers used for - tracing the - - source of the fungible token. - base_denom: + amount: type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible tokens - and the - - source tracing information path. - description: denom_traces returns all denominations trace information. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - 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: >- - QueryConnectionsResponse is the response type for the Query/DenomTraces - RPC + description: |- + Coin defines a token with a denomination and an amount. - method. - ibc.applications.transfer.v1.QueryParamsResponse: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + ibc.core.channel.v1.PacketId: type: object properties: - params: - description: params defines the parameters of the module. - type: object - properties: - send_enabled: - type: boolean - format: boolean - description: >- - send_enabled enables or disables all cross-chain token transfers - from this - - chain. - receive_enabled: - type: boolean - format: boolean - description: >- - receive_enabled enables or disables all cross-chain token - transfers to this - - chain. - description: QueryParamsResponse is the response type for the Query/Params RPC method. + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + title: |- + PacketId is an identifer for a unique Packet + Source chains refer to packets by source port/channel + Destination chains refer to packets by destination port/channel ibc.core.client.v1.ConsensusStateWithHeight: type: object properties: @@ -10812,9 +14947,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10846,6 +14982,77 @@ definitions: RPC method. It returns the current status of the IBC client. + ibc.core.client.v1.QueryConsensusStateHeightsResponse: + type: object + properties: + consensus_state_heights: + type: array + items: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is incremented + so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of + updating and + + freezing clients + title: consensus state heights + pagination: + title: pagination 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: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method ibc.core.client.v1.QueryConsensusStateResponse: type: object properties: @@ -11016,7 +15223,6 @@ definitions: format: byte title: merkle proof of existence proof_height: - title: height at which the proof was retrieved type: object properties: revision_number: @@ -11043,6 +15249,13 @@ definitions: RevisionHeight gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of + updating and + + freezing clients title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -11268,9 +15481,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12515,9 +16729,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13387,9 +17602,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13522,9 +17738,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13695,9 +17912,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13829,9 +18047,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 diff --git a/docs/ibc/apps.md b/docs/ibc/apps.md index f729d7dfd71..11fa1e84b7e 100644 --- a/docs/ibc/apps.md +++ b/docs/ibc/apps.md @@ -17,7 +17,7 @@ protocol. Then the document goes into detail on the abstraction layer most relev developers (channels and ports), and describes how to define your own custom packets, and `IBCModule` callbacks. -To have your module interact over IBC you must: bind to a port(s), define your own packet data and acknolwedgement structs as well as how to encode/decode them, and implement the +To have your module interact over IBC you must: bind to a port(s), define your own packet data and acknowledgement structs as well as how to encode/decode them, and implement the `IBCModule` interface. Below is a more detailed explanation of how to write an IBC application module correctly. @@ -73,15 +73,9 @@ OnChanOpenTry( counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error) { - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos - // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) - // If the module can already authenticate the capability then the module already owns it so we don't need to claim - // Otherwise, module does not have channel capability and we must claim it from IBC - if !k.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { - // Only claim channel capability passed back by IBC module if we do not already own it - if err := k.scopedKeeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err - } + // OpenTry must claim the channelCapability that IBC passes into the callback + if err := k.scopedKeeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return err } // ... do custom initialization logic diff --git a/docs/ibc/apps/apps.md b/docs/ibc/apps/apps.md new file mode 100644 index 00000000000..a24032168aa --- /dev/null +++ b/docs/ibc/apps/apps.md @@ -0,0 +1,51 @@ + + +# IBC Applications + +Learn how to build custom IBC application modules that enable packets to be sent to and received from other IBC-enabled chains. {synopsis} + +This document serves as a guide for developers who want to write their own Inter-blockchain Communication Protocol (IBC) applications for custom use cases. + +Due to the modular design of the IBC protocol, IBC application developers do not need to concern themselves with the low-level details of clients, connections, and proof verification. Nevertheless, an overview of these low-level concepts can be found in [the Overview section](../overview.md). +The document goes into detail on the abstraction layer most relevant for application developers (channels and ports), and describes how to define your own custom packets, `IBCModule` callbacks and more to make an application module IBC ready. + +**To have your module interact over IBC you must:** + +- implement the `IBCModule` interface, i.e.: + - channel (opening) handshake callbacks + - channel closing handshake callbacks + - packet callbacks +- bind to a port(s) +- add keeper methods +- define your own packet data and acknowledgement structs as well as how to encode/decode them +- add a route to the IBC router + +The following sections provide a more detailed explanation of how to write an IBC application +module correctly corresponding to the listed steps. + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +## Working example + +For a real working example of an IBC application, you can look through the `ibc-transfer` module +which implements everything discussed in this section. + +Here are the useful parts of the module to look at: + +[Binding to transfer +port](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/genesis.go) + +[Sending transfer +packets](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/relay.go) + +[Implementing IBC +callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/ibc_module.go) + +## Next {hide} + +Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/intro.md) {hide} diff --git a/docs/ibc/apps/bindports.md b/docs/ibc/apps/bindports.md new file mode 100644 index 00000000000..c0cfa703191 --- /dev/null +++ b/docs/ibc/apps/bindports.md @@ -0,0 +1,114 @@ + + +# Bind ports + +Learn what changes to make to bind modules to their ports on initialization. {synopsis} + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +Currently, ports must be bound on app initialization. In order to bind modules to their respective ports on initialization, the following needs to be implemented: + +> Note that `portID` does not refer to a certain numerical ID, like `localhost:8080` with a `portID` 8080. Rather it refers to the application module the port binds. For IBC Modules built with the Cosmos SDK, it defaults to the module's name and for Cosmwasm contracts it defaults to the contract address. + +1. Add port ID to the `GenesisState` proto definition: + + ```protobuf + message GenesisState { + string port_id = 1; + // other fields + } + ``` + +1. Add port ID as a key to the module store: + + ```go + // x//types/keys.go + const ( + // ModuleName defines the IBC Module name + ModuleName = "moduleName" + + // Version defines the current version the IBC + // module supports + Version = "moduleVersion-1" + + // PortID is the default port id that module binds to + PortID = "portID" + + // ... + ) + ``` + +1. Add port ID to `x//types/genesis.go`: + + ```go + // in x//types/genesis.go + + // DefaultGenesisState returns a GenesisState with "transfer" as the default PortID. + func DefaultGenesisState() *GenesisState { + return &GenesisState{ + PortId: PortID, + // additional k-v fields + } + } + + // Validate performs basic genesis state validation returning an error upon any + // failure. + func (gs GenesisState) Validate() error { + if err := host.PortIdentifierValidator(gs.PortId); err != nil { + return err + } + //addtional validations + + return gs.Params.Validate() + } + ``` + +1. Bind to port(s) in the module keeper's `InitGenesis`: + + ```go + // InitGenesis initializes the ibc-module state and binds to PortID. + func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { + k.SetPort(ctx, state.PortId) + + // ... + + // Only try to bind to port if it is not already bound, since we may already own + // port capability from capability InitGenesis + if !k.IsBound(ctx, state.PortId) { + // transfer module binds to the transfer port on InitChain + // and claims the returned capability + err := k.BindPort(ctx, state.PortId) + if err != nil { + panic(fmt.Sprintf("could not claim port capability: %v", err)) + } + } + + // ... + } + ``` + + With: + + ```go + // IsBound checks if the module is already bound to the desired port + func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { + _, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID)) + return ok + } + + // BindPort defines a wrapper function for the port Keeper's function in + // order to expose it to module's InitGenesis function + func (k Keeper) BindPort(ctx sdk.Context, portID string) error { + cap := k.portKeeper.BindPort(ctx, portID) + return k.ClaimCapability(ctx, cap, host.PortPath(portID)) + } + ``` + + The module binds to the desired port(s) and returns the capabilities. + + In the above we find reference to keeper methods that wrap other keeper functionality, in the next section the keeper methods that need to be implemented will be defined. diff --git a/docs/ibc/apps/ibcmodule.md b/docs/ibc/apps/ibcmodule.md new file mode 100644 index 00000000000..d5864435700 --- /dev/null +++ b/docs/ibc/apps/ibcmodule.md @@ -0,0 +1,342 @@ + + +# Implement `IBCModule` interface and callbacks + +Learn how to implement the `IBCModule` interface and all of the callbacks it requires. {synopsis} + +The Cosmos SDK expects all IBC modules to implement the [`IBCModule` +interface](https://github.com/cosmos/ibc-go/tree/main/modules/core/05-port/types/module.go). This interface contains all of the callbacks IBC expects modules to implement. They include callbacks related to channel handshake, closing and packet callbacks (`OnRecvPacket`, `OnAcknowledgementPacket` and `OnTimeoutPacket`). + +```go +// IBCModule implements the ICS26 interface for given the keeper. +// The implementation of the IBCModule interface could for example be in a file called ibc_module.go, +// but ultimately file structure is up to the developer +type IBCModule struct { + keeper keeper.Keeper +} +``` + +Additionally, in the `module.go` file, add the following line: + +```go +var ( + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} + // Add this line + _ porttypes.IBCModule = IBCModule{} +) +``` + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +## Channel handshake callbacks + +This section will describe the callbacks that are called during channel handshake execution. Among other things, it will claim channel capabilities passed on from core IBC. For a refresher on capabilities, check [the Overview section](../overview.md#capabilities). + +Here are the channel handshake callbacks that modules are expected to implement: + +> Note that some of the code below is _pseudo code_, indicating what actions need to happen but leaving it up to the developer to implement a custom implementation. E.g. the `checkArguments` and `negotiateAppVersion` functions. + +```go +// Called by IBC Handler on MsgOpenInit +func (im IBCModule) OnChanOpenInit(ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID string, + channelID string, + channelCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, +) (string, error) { + // ... do custom initialization logic + + // Use above arguments to determine if we want to abort handshake + // Examples: + // - Abort if order == UNORDERED, + // - Abort if version is unsupported + if err := checkArguments(args); err != nil { + return "", err + } + + // OpenInit must claim the channelCapability that IBC passes into the callback + if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return "", err + } + + return version, nil +} + +// Called by IBC Handler on MsgOpenTry +func (im IBCModule) OnChanOpenTry( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID, + channelID string, + channelCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + counterpartyVersion string, +) (string, error) { + // ... do custom initialization logic + + // Use above arguments to determine if we want to abort handshake + if err := checkArguments(args); err != nil { + return "", err + } + + // OpenTry must claim the channelCapability that IBC passes into the callback + if err := im.keeper.scopedKeeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return err + } + + // Construct application version + // IBC applications must return the appropriate application version + // This can be a simple string or it can be a complex version constructed + // from the counterpartyVersion and other arguments. + // The version returned will be the channel version used for both channel ends. + appVersion := negotiateAppVersion(counterpartyVersion, args) + + return appVersion, nil +} + +// Called by IBC Handler on MsgOpenAck +func (im IBCModule) OnChanOpenAck( + ctx sdk.Context, + portID, + channelID string, + counterpartyVersion string, +) error { + if counterpartyVersion != types.Version { + return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: %s, expected %s", counterpartyVersion, types.Version) + } + + // do custom logic + + return nil +} + +// Called by IBC Handler on MsgOpenConfirm +func (im IBCModule) OnChanOpenConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + // do custom logic + + return nil +} +``` + +The channel closing handshake will also invoke module callbacks that can return errors to abort the closing handshake. Closing a channel is a 2-step handshake, the initiating chain calls `ChanCloseInit` and the finalizing chain calls `ChanCloseConfirm`. + +```go +// Called by IBC Handler on MsgCloseInit +func (im IBCModule) OnChanCloseInit( + ctx sdk.Context, + portID, + channelID string, +) error { + // ... do custom finalization logic + + // Use above arguments to determine if we want to abort handshake + err := checkArguments(args) + return err +} + +// Called by IBC Handler on MsgCloseConfirm +func (im IBCModule) OnChanCloseConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + // ... do custom finalization logic + + // Use above arguments to determine if we want to abort handshake + err := checkArguments(args) + return err +} +``` + +### Channel handshake version negotiation + +Application modules are expected to verify versioning used during the channel handshake procedure. + +- `OnChanOpenInit` will verify that the relayer-chosen parameters + are valid and perform any custom `INIT` logic. + It may return an error if the chosen parameters are invalid + in which case the handshake is aborted. + If the provided version string is non-empty, `OnChanOpenInit` should return + the version string if valid or an error if the provided version is invalid. + **If the version string is empty, `OnChanOpenInit` is expected to + return a default version string representing the version(s) + it supports.** + If there is no default version string for the application, + it should return an error if the provided version is an empty string. +- `OnChanOpenTry` will verify the relayer-chosen parameters along with the + counterparty-chosen version string and perform custom `TRY` logic. + If the relayer-chosen parameters + are invalid, the callback must return an error to abort the handshake. + If the counterparty-chosen version is not compatible with this module's + supported versions, the callback must return an error to abort the handshake. + If the versions are compatible, the try callback must select the final version + string and return it to core IBC. + `OnChanOpenTry` may also perform custom initialization logic. +- `OnChanOpenAck` will error if the counterparty selected version string + is invalid and abort the handshake. It may also perform custom ACK logic. + +Versions must be strings but can implement any versioning structure. If your application plans to +have linear releases then semantic versioning is recommended. If your application plans to release +various features in between major releases then it is advised to use the same versioning scheme +as IBC. This versioning scheme specifies a version identifier and compatible feature set with +that identifier. Valid version selection includes selecting a compatible version identifier with +a subset of features supported by your application for that version. The struct used for this +scheme can be found in [03-connection/types](https://github.com/cosmos/ibc-go/blob/main/modules/core/03-connection/types/version.go#L16). + +Since the version type is a string, applications have the ability to do simple version verification +via string matching or they can use the already impelemented versioning system and pass the proto +encoded version into each handhshake call as necessary. + +ICS20 currently implements basic string matching with a single supported version. + +## Packet callbacks + +Just as IBC expects modules to implement callbacks for channel handshakes, it also expects modules to implement callbacks for handling the packet flow through a channel, as defined in the `IBCModule` interface. + +Once a module A and module B are connected to each other, relayers can start relaying packets and acknowledgements back and forth on the channel. + +![IBC packet flow diagram](https://ibcprotocol.org/_nuxt/img/packet_flow.1d89ee0.png) + +Briefly, a successful packet flow works as follows: + +1. module A sends a packet through the IBC module +2. the packet is received by module B +3. if module B writes an acknowledgement of the packet then module A will process the + acknowledgement +4. if the packet is not successfully received before the timeout, then module A processes the + packet's timeout. + +### Sending packets + +Modules **do not send packets through callbacks**, since the modules initiate the action of sending packets to the IBC module, as opposed to other parts of the packet flow where messages sent to the IBC +module must trigger execution on the port-bound module through the use of callbacks. Thus, to send a packet a module simply needs to call `SendPacket` on the `IBCChannelKeeper`. + +> Note that some of the code below is _pseudo code_, indicating what actions need to happen but leaving it up to the developer to implement a custom implementation. E.g. the `EncodePacketData(customPacketData)` function. + +```go +// retrieve the dynamic capability for this channel +channelCap := scopedKeeper.GetCapability(ctx, channelCapName) +// Sending custom application packet data +data := EncodePacketData(customPacketData) +packet.Data = data +// Send packet to IBC, authenticating with channelCap +IBCChannelKeeper.SendPacket(ctx, channelCap, packet) +``` + +::: warning +In order to prevent modules from sending packets on channels they do not own, IBC expects +modules to pass in the correct channel capability for the packet's source channel. +::: + +### Receiving packets + +To handle receiving packets, the module must implement the `OnRecvPacket` callback. This gets +invoked by the IBC module after the packet has been proved valid and correctly processed by the IBC +keepers. Thus, the `OnRecvPacket` callback only needs to worry about making the appropriate state +changes given the packet data without worrying about whether the packet is valid or not. + +Modules may return to the IBC handler an acknowledgement which implements the `Acknowledgement` interface. +The IBC handler will then commit this acknowledgement of the packet so that a relayer may relay the +acknowledgement back to the sender module. + +The state changes that occurred during this callback will only be written if: + +- the acknowledgement was successful as indicated by the `Success()` function of the acknowledgement +- if the acknowledgement returned is nil indicating that an asynchronous process is occurring + +NOTE: Applications which process asynchronous acknowledgements must handle reverting state changes +when appropriate. Any state changes that occurred during the `OnRecvPacket` callback will be written +for asynchronous acknowledgements. + +> Note that some of the code below is _pseudo code_, indicating what actions need to happen but leaving it up to the developer to implement a custom implementation. E.g. the `DecodePacketData(packet.Data)` function. + +```go +func (im IBCModule) OnRecvPacket( + ctx sdk.Context, + packet channeltypes.Packet, +) ibcexported.Acknowledgement { + // Decode the packet data + packetData := DecodePacketData(packet.Data) + + // do application state changes based on packet data and return the acknowledgement + // NOTE: The acknowledgement will indicate to the IBC handler if the application + // state changes should be written via the `Success()` function. Application state + // changes are only written if the acknowledgement is successful or the acknowledgement + // returned is nil indicating that an asynchronous acknowledgement will occur. + ack := processPacket(ctx, packet, packetData) + + return ack +} +``` + +Reminder, the `Acknowledgement` interface: + +```go +// Acknowledgement defines the interface used to return +// acknowledgements in the OnRecvPacket callback. +type Acknowledgement interface { + Success() bool + Acknowledgement() []byte +} +``` + +### Acknowledging packets + +After a module writes an acknowledgement, a relayer can relay back the acknowledgement to the sender module. The sender module can +then process the acknowledgement using the `OnAcknowledgementPacket` callback. The contents of the +acknowledgement is entirely up to the modules on the channel (just like the packet data); however, it +may often contain information on whether the packet was successfully processed along +with some additional data that could be useful for remediation if the packet processing failed. + +Since the modules are responsible for agreeing on an encoding/decoding standard for packet data and +acknowledgements, IBC will pass in the acknowledgements as `[]byte` to this callback. The callback +is responsible for decoding the acknowledgement and processing it. + +> Note that some of the code below is _pseudo code_, indicating what actions need to happen but leaving it up to the developer to implement a custom implementation. E.g. the `DecodeAcknowledgement(acknowledgments)` and `processAck(ack)` functions. + +```go +func (im IBCModule) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, +) (*sdk.Result, error) { + // Decode acknowledgement + ack := DecodeAcknowledgement(acknowledgement) + + // process ack + res, err := processAck(ack) + return res, err +} +``` + +### Timeout packets + +If the timeout for a packet is reached before the packet is successfully received or the +counterparty channel end is closed before the packet is successfully received, then the receiving +chain can no longer process it. Thus, the sending chain must process the timeout using +`OnTimeoutPacket` to handle this situation. Again the IBC module will verify that the timeout is +indeed valid, so our module only needs to implement the state machine logic for what to do once a +timeout is reached and the packet can no longer be received. + +```go +func (im IBCModule) OnTimeoutPacket( + ctx sdk.Context, + packet channeltypes.Packet, +) (*sdk.Result, error) { + // do custom timeout logic +} +``` diff --git a/docs/ibc/apps/keeper.md b/docs/ibc/apps/keeper.md new file mode 100644 index 00000000000..6cbba0fbb8f --- /dev/null +++ b/docs/ibc/apps/keeper.md @@ -0,0 +1,88 @@ + + +# Keeper + +Learn how to implement the IBC Module keeper. {synopsis} + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +In the previous sections, on channel handshake callbacks and port binding in `InitGenesis`, a reference was made to keeper methods that need to be implemented when creating a custom IBC module. Below is an overview of how to define an IBC module's keeper. + +> Note that some code has been left out for clarity, to get a full code overview, please refer to [the transfer module's keeper in the ibc-go repo](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/keeper.go). + +```go +// Keeper defines the IBC app module keeper +type Keeper struct { + storeKey sdk.StoreKey + cdc codec.BinaryCodec + paramSpace paramtypes.Subspace + + channelKeeper types.ChannelKeeper + portKeeper types.PortKeeper + scopedKeeper capabilitykeeper.ScopedKeeper + + // ... additional according to custom logic +} + +// NewKeeper creates a new IBC app module Keeper instance +func NewKeeper( + // args +) Keeper { + // ... + + return Keeper{ + cdc: cdc, + storeKey: key, + paramSpace: paramSpace, + + channelKeeper: channelKeeper, + portKeeper: portKeeper, + scopedKeeper: scopedKeeper, + + // ... additional according to custom logic + } +} + +// IsBound checks if the IBC app module is already bound to the desired port +func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { + _, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID)) + return ok +} + +// BindPort defines a wrapper function for the port Keeper's function in +// order to expose it to module's InitGenesis function +func (k Keeper) BindPort(ctx sdk.Context, portID string) error { + cap := k.portKeeper.BindPort(ctx, portID) + return k.ClaimCapability(ctx, cap, host.PortPath(portID)) +} + +// GetPort returns the portID for the IBC app module. Used in ExportGenesis +func (k Keeper) GetPort(ctx sdk.Context) string { + store := ctx.KVStore(k.storeKey) + return string(store.Get(types.PortKey)) +} + +// SetPort sets the portID for the IBC app module. Used in InitGenesis +func (k Keeper) SetPort(ctx sdk.Context, portID string) { + store := ctx.KVStore(k.storeKey) + store.Set(types.PortKey, []byte(portID)) +} + +// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function +func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool { + return k.scopedKeeper.AuthenticateCapability(ctx, cap, name) +} + +// ClaimCapability allows the IBC app module to claim a capability that core IBC +// passes to it +func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { + return k.scopedKeeper.ClaimCapability(ctx, cap, name) +} + +// ... additional according to custom logic +``` diff --git a/docs/ibc/apps/packets_acks.md b/docs/ibc/apps/packets_acks.md new file mode 100644 index 00000000000..1871eca8915 --- /dev/null +++ b/docs/ibc/apps/packets_acks.md @@ -0,0 +1,99 @@ + + +# Define packets and acks + +Learn how to define custom packet and acknowledgement structs and how to encode and decode them. {synopsis} + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +## Custom packets + +Modules connected by a channel must agree on what application data they are sending over the +channel, as well as how they will encode/decode it. This process is not specified by IBC as it is up +to each application module to determine how to implement this agreement. However, for most +applications this will happen as a version negotiation during the channel handshake. While more +complex version negotiation is possible to implement inside the channel opening handshake, a very +simple version negotation is implemented in the [ibc-transfer module](https://github.com/cosmos/ibc-go/tree/main/modules/apps/transfer/module.go). + +Thus, a module must define its custom packet data structure, along with a well-defined way to +encode and decode it to and from `[]byte`. + +```go +// Custom packet data defined in application module +type CustomPacketData struct { + // Custom fields ... +} + +EncodePacketData(packetData CustomPacketData) []byte { + // encode packetData to bytes +} + +DecodePacketData(encoded []byte) (CustomPacketData) { + // decode from bytes to packet data +} +``` + +> Note that the `CustomPacketData` struct is defined in the proto definition and then compiled by the protobuf compiler. + +Then a module must encode its packet data before sending it through IBC. + +```go +// Sending custom application packet data +data := EncodePacketData(customPacketData) +packet.Data = data +IBCChannelKeeper.SendPacket(ctx, packet) +``` + +A module receiving a packet must decode the `PacketData` into a structure it expects so that it can +act on it. + +```go +// Receiving custom application packet data (in OnRecvPacket) +packetData := DecodePacketData(packet.Data) +// handle received custom packet data +``` + +## Acknowledgements + +Modules may commit an acknowledgement upon receiving and processing a packet in the case of synchronous packet processing. +In the case where a packet is processed at some later point after the packet has been received (asynchronous execution), the acknowledgement +will be written once the packet has been processed by the application which may be well after the packet receipt. + +NOTE: Most blockchain modules will want to use the synchronous execution model in which the module processes and writes the acknowledgement +for a packet as soon as it has been received from the IBC module. + +This acknowledgement can then be relayed back to the original sender chain, which can take action +depending on the contents of the acknowledgement. + +Just as packet data was opaque to IBC, acknowledgements are similarly opaque. Modules must pass and +receive acknowledegments with the IBC modules as byte strings. + +Thus, modules must agree on how to encode/decode acknowledgements. The process of creating an +acknowledgement struct along with encoding and decoding it, is very similar to the packet data +example above. [ICS 04](https://github.com/cosmos/ibc/blob/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope) +specifies a recommended format for acknowledgements. This acknowledgement type can be imported from +[channel types](https://github.com/cosmos/ibc-go/tree/main/modules/core/04-channel/types). + +While modules may choose arbitrary acknowledgement structs, a default acknowledgement types is provided by IBC [here](https://github.com/cosmos/ibc-go/blob/main/proto/ibc/core/channel/v1/channel.proto): + +```protobuf +// Acknowledgement is the recommended acknowledgement format to be used by +// app-specific protocols. +// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental +// conflicts with other protobuf message formats used for acknowledgements. +// The first byte of any message with this format will be the non-ASCII values +// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: +// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope +message Acknowledgement { + // response contains either a result or an error and must be non-empty + oneof response { + bytes result = 21; + string error = 22; + } +} +``` diff --git a/docs/ibc/apps/routing.md b/docs/ibc/apps/routing.md new file mode 100644 index 00000000000..1095462dcba --- /dev/null +++ b/docs/ibc/apps/routing.md @@ -0,0 +1,36 @@ + + +# Routing + +## Pre-requisites Readings + +- [IBC Overview](../overview.md)) {prereq} +- [IBC default integration](../integration.md) {prereq} + +Learn how to hook a route to the IBC router for the custom IBC module. {synopsis} + +As mentioned above, modules must implement the `IBCModule` interface (which contains both channel +handshake callbacks and packet handling callbacks). The concrete implementation of this interface +must be registered with the module name as a route on the IBC `Router`. + +```go +// app.go +func NewApp(...args) *App { +// ... + +// Create static IBC router, add module routes, then set and seal it +ibcRouter := port.NewRouter() + +ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferModule) +// Note: moduleCallbacks must implement IBCModule interface +ibcRouter.AddRoute(moduleName, moduleCallbacks) + +// Setting Router will finalize all routes by sealing router +// No more routes can be added +app.IBCKeeper.SetRouter(ibcRouter) + +// ... +} +``` diff --git a/docs/ibc/events.md b/docs/ibc/events.md index b7b28351cab..2c584302566 100644 --- a/docs/ibc/events.md +++ b/docs/ibc/events.md @@ -58,7 +58,12 @@ callbacks to IBC applications. | update_client_proposal | client_type | {clientType} | | update_client_proposal | consensus_height | {consensusHeight} | +### UpgradeProposal +| Type | Attribute Key | Attribute Value | +|-------------------------|-----------------|-------------------| +| upgrade_client_proposal | title | {title} | +| upgrade_client_proposal | height | {height} | ## ICS 03 - Connection diff --git a/docs/ibc/integration.md b/docs/ibc/integration.md index 92c542ca717..0b01ffd7347 100644 --- a/docs/ibc/integration.md +++ b/docs/ibc/integration.md @@ -24,7 +24,7 @@ Integrating the IBC module to your SDK-based application is straighforward. The ### Module `BasicManager` and `ModuleAccount` permissions -The first step is to add the following modules to the `BasicManager`: `x/capability`, `x/ibc`, +The first step is to add the following modules to the `BasicManager`: `x/capability`, `x/ibc`, and `x/ibc-transfer`. After that, we need to grant `Minter` and `Burner` permissions to the `ibc-transfer` `ModuleAccount` to mint and burn relayed tokens. @@ -72,7 +72,7 @@ type App struct { ### Configure the `Keepers` -During initialization, besides initializing the IBC `Keepers` (for the `x/ibc`, and +During initialization, besides initializing the IBC `Keepers` (for the `x/ibc`, and `x/ibc-transfer` modules), we need to grant specific capabilities through the capability module `ScopedKeepers` so that we can authenticate the object-capability permissions for each of the IBC channels. @@ -210,4 +210,4 @@ different chains. If you want to have a broader view of the changes take a look ## Next {hide} -Learn about how to create [custom IBC modules](./apps.md) for your application {hide} +Learn about how to create [custom IBC modules](./apps/apps.md) for your application {hide} diff --git a/docs/ibc/middleware/develop.md b/docs/ibc/middleware/develop.md index 705040b1db7..7ee020ca9c8 100644 --- a/docs/ibc/middleware/develop.md +++ b/docs/ibc/middleware/develop.md @@ -2,7 +2,7 @@ order: 1 --> -# IBC Middleware +# IBC middleware Learn how to write your own custom middleware to wrap an IBC application, and understand how to hook different middleware to IBC base applications to form different IBC application stacks {synopsis}. @@ -12,11 +12,11 @@ IBC applications are designed to be self-contained modules that implement their Middleware allows developers to define the extensions as separate modules that can wrap over the base application. This middleware can thus perform its own custom logic, and pass data into the application so that it may run its logic without being aware of the middleware's existence. This allows both the application and the middleware to implement its own isolated logic while still being able to run as part of a single packet flow. -## Pre-requisite Readings +## Pre-requisite readings - [IBC Overview](../overview.md) {prereq} - [IBC Integration](../integration.md) {prereq} -- [IBC Application Developer Guide](../apps.md) {prereq} +- [IBC Application Developer Guide](../apps/apps.md) {prereq} ## Definitions @@ -26,11 +26,11 @@ Middleware allows developers to define the extensions as separate modules that c `Base Application`: A base application is an IBC application that does not contain any middleware. It may be nested by 0 or multiple middleware to form an application stack. -`Application Stack (or stack)`: A stack is the complete set of application logic (middleware(s) + base application) that gets connected to core IBC. A stack may be just a base application, or it may be a series of middlewares that nest a base application. +`Application Stack (or stack)`: A stack is the complete set of application logic (middleware(s) + base application) that gets connected to core IBC. A stack may be just a base application, or it may be a series of middlewares that nest a base application. -## Create a custom IBC Middleware +## Create a custom IBC middleware -IBC Middleware will wrap over an underlying IBC application and sits between core IBC and the application. It has complete control in modifying any message coming from IBC to the application, and any message coming from the application to core IBC. Thus, middleware must be completely trusted by chain developers who wish to integrate them, however this gives them complete flexibility in modifying the application(s) they wrap. +IBC middleware will wrap over an underlying IBC application and sits between core IBC and the application. It has complete control in modifying any message coming from IBC to the application, and any message coming from the application to core IBC. Thus, middleware must be completely trusted by chain developers who wish to integrate them, however this gives them complete flexibility in modifying the application(s) they wrap. #### Interfaces @@ -48,22 +48,31 @@ type Middleware interface { // which will call the next middleware until it reaches the core IBC handler. type ICS4Wrapper interface { SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.Packet) error - WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.Packet, ack []byte) error - GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) + WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.Packet, ack exported.Acknowledgement) error + GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) } ``` ### Implement `IBCModule` interface and callbacks -The IBCModule is struct that implements the ICS26Interface (`porttypes.IBCModule`). It is recommended to separate these callbacks into a separate file `ibc_module.go`. As will be mentioned in the [integration doc](./integration.md), this struct should be different than the struct that implements `AppModule` in case the middleware maintains its own internal state and processes separate SDK messages. +The `IBCModule` is a struct that implements the [ICS-26 interface (`porttypes.IBCModule`)](https://github.com/cosmos/ibc-go/blob/main/modules/core/05-port/types/module.go#L11-L106). It is recommended to separate these callbacks into a separate file `ibc_module.go`. As will be mentioned in the [integration section](./integration.md), this struct should be different than the struct that implements `AppModule` in case the middleware maintains its own internal state and processes separate SDK messages. The middleware must have access to the underlying application, and be called before during all ICS-26 callbacks. It may execute custom logic during these callbacks, and then call the underlying application's callback. Middleware **may** choose not to call the underlying application's callback at all. Though these should generally be limited to error cases. -In the case where the IBC middleware expects to speak to a compatible IBC middleware on the counterparty chain; they must use the channel handshake to negotiate the middleware version without interfering in the version negotiation of the underlying application. +In the case where the IBC middleware expects to speak to a compatible IBC middleware on the counterparty chain, they must use the channel handshake to negotiate the middleware version without interfering in the version negotiation of the underlying application. -Middleware accomplishes this by formatting the version in the following format: `{mw-version}:{app-version}`. +Middleware accomplishes this by formatting the version in a JSON-encoded string containing the middleware version and the application version. The application version may as well be a JSON-encoded string, possibly including further middleware and app versions, if the application stack consists of multiple milddlewares wrapping a base application. The format of the version is specified in ICS-30 as the following: -During the handshake callbacks, the middleware can split the version into: `mw-version`, `app-version`. It can do its negotiation logic on `mw-version`, and pass the `app-version` to the underlying application. +```json +{ + "": "", + "app_version": "" +} +``` + +The `` key in the JSON struct should be replaced by the actual name of the key for the corresponding middleware (e.g. `fee_version`). + +During the handshake callbacks, the middleware can unmarshal the version string and retrieve the middleware and application versions. It can do its negotiation logic on ``, and pass the `` to the underlying application. The middleware should simply pass the capability in the callback arguments along to the underlying application so that it may be claimed by the base application. The base application will then pass the capability up the stack in order to authenticate an outgoing packet/acknowledgement. @@ -71,8 +80,11 @@ In the case where the middleware wishes to send a packet or acknowledgment witho ### Handshake callbacks +#### `OnChanOpenInit` + ```go -func (im IBCModule) OnChanOpenInit(ctx sdk.Context, +func (im IBCModule) OnChanOpenInit( + ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, @@ -80,11 +92,41 @@ func (im IBCModule) OnChanOpenInit(ctx sdk.Context, channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { - // core/04-channel/types contains a helper function to split middleware and underlying app version - middlewareVersion, appVersion = channeltypes.SplitChannelVersion(version) +) (string, error) { + if version != "" { + // try to unmarshal JSON-encoded version string and pass + // the app-specific version to app callback. + // otherwise, pass version directly to app callback. + metadata, err := Unmarshal(version) + if err != nil { + // Since it is valid for fee version to not be specified, + // the above middleware version may be for another middleware. + // Pass the entire version string onto the underlying application. + return im.app.OnChanOpenInit( + ctx, + order, + connectionHops, + portID, + channelID, + channelCap, + counterparty, + version, + ) + } + else { + metadata = { + // set middleware version to default value + MiddlewareVersion: defaultMiddlewareVersion, + // allow application to return its default version + AppVersion: "", + } + } + doCustomLogic() - im.app.OnChanOpenInit( + + // if the version string is empty, OnChanOpenInit is expected to return + // a default version string representing the version(s) it supports + appVersion, err := im.app.OnChanOpenInit( ctx, order, connectionHops, @@ -92,10 +134,23 @@ func (im IBCModule) OnChanOpenInit(ctx sdk.Context, channelID, channelCap, counterparty, - appVersion, // note we only pass app version here + metadata.AppVersion, // note we only pass app version here ) + if err != nil { + return "", err + } + + version := constructVersion(metadata.MiddlewareVersion, appVersion) + + return version, nil } +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L34-L82) an example implementation of this callback for the ICS29 Fee Middleware module. + +#### `OnChanOpenTry` +```go func OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, @@ -106,12 +161,27 @@ func OnChanOpenTry( counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error) { - doCustomLogic() + // try to unmarshal JSON-encoded version string and pass + // the app-specific version to app callback. + // otherwise, pass version directly to app callback. + cpMetadata, err := Unmarshal(counterpartyVersion) + if err != nil { + return app.OnChanOpenTry( + ctx, + order, + connectionHops, + portID, + channelID, + channelCap, + counterparty, + counterpartyVersion, + ) + } - // core/04-channel/types contains a helper function to split middleware and underlying app version - cpMiddlewareVersion, cpAppVersion = channeltypes.SplitChannelVersion(counterpartyVersion) + doCustomLogic() - // call the underlying applications OnChanOpenTry callback + // Call the underlying application's OnChanOpenTry callback. + // The try callback must select the final app-specific version string and return it. appVersion, err := app.OnChanOpenTry( ctx, order, @@ -120,35 +190,55 @@ func OnChanOpenTry( channelID, channelCap, counterparty, - cpAppVersion, // note we only pass counterparty app version here + cpMetadata.AppVersion, // note we only pass counterparty app version here ) if err != nil { - return err + return "", err } - - middlewareVersion := negotiateMiddlewareVersion(cpMiddlewareVersion) + + // negotiate final middleware version + middlewareVersion := negotiateMiddlewareVersion(cpMetadata.MiddlewareVersion) version := constructVersion(middlewareVersion, appVersion) - return version + return version, nil } +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L84-L124) an example implementation of this callback for the ICS29 Fee Middleware module. +#### `OnChanOpenAck` + +```go func OnChanOpenAck( ctx sdk.Context, portID, channelID string, + counterpartyChannelID string, counterpartyVersion string, ) error { - // core/04-channel/types contains a helper function to split middleware and underlying app version - middlewareVersion, appVersion = channeltypes.SplitChannelVersion(version) - if !isCompatible(middlewareVersion) { + // try to unmarshal JSON-encoded version string and pass + // the app-specific version to app callback. + // otherwise, pass version directly to app callback. + cpMetadata, err = UnmarshalJSON(counterpartyVersion) + if err != nil { + return app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) + } + + if !isCompatible(cpMetadata.MiddlewareVersion) { return error } doCustomLogic() - - // call the underlying applications OnChanOpenTry callback - app.OnChanOpenAck(ctx, portID, channelID, appVersion) + + // call the underlying application's OnChanOpenTry callback + return app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, cpMetadata.AppVersion) } +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L126-L152) an example implementation of this callback for the ICS29 Fee Middleware module. + +### `OnChanOpenConfirm` +```go func OnChanOpenConfirm( ctx sdk.Context, portID, @@ -156,89 +246,167 @@ func OnChanOpenConfirm( ) error { doCustomLogic() - app.OnChanOpenConfirm(ctx, portID, channelID) + return app.OnChanOpenConfirm(ctx, portID, channelID) } +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L154-L162) an example implementation of this callback for the ICS29 Fee Middleware module. -OnChanCloseInit( +#### `OnChanCloseInit` + +```go +func OnChanCloseInit( ctx sdk.Context, portID, channelID string, ) error { doCustomLogic() - app.OnChanCloseInit(ctx, portID, channelID) + return app.OnChanCloseInit(ctx, portID, channelID) } +``` -OnChanCloseConfirm( +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L164-L187) an example implementation of this callback for the ICS29 Fee Middleware module. + +#### `OnChanCloseConfirm` + +```go +func OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, ) error { doCustomLogic() - app.OnChanCloseConfirm(ctx, portID, channelID) + return app.OnChanCloseConfirm(ctx, portID, channelID) } ``` -NOTE: Middleware that does not need to negotiate with a counterparty middleware on the remote stack will not implement the version splitting and negotiation, and will simply perform its own custom logic on the callbacks without relying on the counterparty behaving similarly. +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L189-L212) an example implementation of this callback for the ICS29 Fee Middleware module. + +**NOTE**: Middleware that does not need to negotiate with a counterparty middleware on the remote stack will not implement the version unmarshalling and negotiation, and will simply perform its own custom logic on the callbacks without relying on the counterparty behaving similarly. ### Packet callbacks The packet callbacks just like the handshake callbacks wrap the application's packet callbacks. The packet callbacks are where the middleware performs most of its custom logic. The middleware may read the packet flow data and perform some additional packet handling, or it may modify the incoming data before it reaches the underlying application. This enables a wide degree of usecases, as a simple base application like token-transfer can be transformed for a variety of usecases by combining it with custom middleware. +#### `OnRecvPacket` + ```go -OnRecvPacket( +func OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, + relayer sdk.AccAddress, ) ibcexported.Acknowledgement { doCustomLogic(packet) - ack := app.OnRecvPacket(ctx, packet) + ack := app.OnRecvPacket(ctx, packet, relayer) doCustomLogic(ack) // middleware may modify outgoing ack return ack } +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L214-L237) an example implementation of this callback for the ICS29 Fee Middleware module. + +#### `OnAcknowledgementPacket` -OnAcknowledgementPacket( +```go +func OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, -) (*sdk.Result, error) { + relayer sdk.AccAddress, +) error { doCustomLogic(packet, ack) - app.OnAcknowledgementPacket(ctx, packet, ack) + return app.OnAcknowledgementPacket(ctx, packet, ack, relayer) } +``` -OnTimeoutPacket( +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L239-L292) an example implementation of this callback for the ICS29 Fee Middleware module. + +#### `OnTimeoutPacket` + +```go +func OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, -) (*sdk.Result, error) { + relayer sdk.AccAddress, +) error { doCustomLogic(packet) - app.OnTimeoutPacket(ctx, packet) + return app.OnTimeoutPacket(ctx, packet, relayer) } ``` -### ICS-4 Wrappers +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L294-L334) an example implementation of this callback for the ICS29 Fee Middleware module. + +### ICS-4 wrappers + +Middleware must also wrap ICS-4 so that any communication from the application to the `channelKeeper` goes through the middleware first. Similar to the packet callbacks, the middleware may modify outgoing acknowledgements and packets in any way it wishes. -Middleware must also wrap ICS-4 so that any communication from the application to the channelKeeper goes through the middleware first. Similar to the packet callbacks, the middleware may modify outgoing acknowledgements and packets in any way it wishes. +#### `SendPacket` + +```go +func SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + appPacket exported.PacketI, +) { + // middleware may modify packet + packet = doCustomLogic(appPacket) + + return ics4Keeper.SendPacket(ctx, chanCap, packet) +} +``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L336-L343) an example implementation of this function for the ICS29 Fee Middleware module. + +#### `WriteAcknowledgement` ```go // only called for async acks func WriteAcknowledgement( - packet channeltypes.Packet, - acknowledgement []bytes) { + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet exported.PacketI, + ack exported.Acknowledgement, +) { // middleware may modify acknowledgement - ack_bytes = doCustomLogic(acknowledgement) + ack_bytes = doCustomLogic(ack) return ics4Keeper.WriteAcknowledgement(packet, ack_bytes) } +``` -func SendPacket(appPacket channeltypes.Packet) { - // middleware may modify packet - packet = doCustomLogic(app_packet) +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L345-L353) an example implementation of this function for the ICS29 Fee Middleware module. + +#### `GetAppVersion` + +```go +// middleware must return the underlying application version +func GetAppVersion( + ctx sdk.Context, + portID, + channelID string, +) (string, bool) { + version, found := ics4Keeper.GetAppVersion(ctx, portID, channelID) + if !found { + return "", false + } - return ics4Keeper.SendPacket(packet) + if !MiddlewareEnabled { + return version, true + } + + // unwrap channel version + metadata, err := Unmarshal(version) + if err != nil { + panic(fmt.Errof("unable to unmarshal version: %w", err)) + } + + return metadata.AppVersion, true } // middleware must return the underlying application version @@ -261,3 +429,5 @@ func GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { return metadata.AppVersion, true } ``` + +See [here](https://github.com/cosmos/ibc-go/blob/48a6ae512b4ea42c29fdf6c6f5363f50645591a2/modules/apps/29-fee/ibc_middleware.go#L355-L358) an example implementation of this function for the ICS29 Fee Middleware module. diff --git a/docs/ibc/middleware/integration.md b/docs/ibc/middleware/integration.md index 68a8de00899..12eb447f8ea 100644 --- a/docs/ibc/middleware/integration.md +++ b/docs/ibc/middleware/integration.md @@ -2,7 +2,7 @@ order: 2 --> -# Integrating IBC Middleware into a Chain +# Integrating IBC middleware into a chain Learn how to integrate IBC middleware(s) with a base application to your chain. The following document only applies for Cosmos SDK chains. @@ -46,18 +46,18 @@ scopedKeeperCustom2 := capabilityKeeper.NewScopedKeeper("custom2") // initialize base IBC applications // if you want to create two different stacks with the same base application, // they must be given different scopedKeepers and assigned different ports. -transferIBCModule := transfer.NewIBCModule(transferKeeper, scopedKeeperTransfer) -customIBCModule1 := custom.NewIBCModule(customKeeper, scopedKeeperCustom1, "portCustom1") -customIBCModule2 := custom.NewIBCModule(customKeeper, scopedKeeperCustom2, "portCustom2") +transferIBCModule := transfer.NewIBCModule(transferKeeper) +customIBCModule1 := custom.NewIBCModule(customKeeper, "portCustom1") +customIBCModule2 := custom.NewIBCModule(customKeeper, "portCustom2") // create IBC stacks by combining middleware with base application // NOTE: since middleware2 is stateless it does not require a Keeper // stack 1 contains mw1 -> mw3 -> transfer -stack1 := mw1.NewIBCModule(mw1Keeper, mw3.NewIBCModule(mw3Keeper, transferIBCModule)) +stack1 := mw1.NewIBCMiddleware(mw3.NewIBCMiddleware(transferIBCModule, mw3Keeper), mw1Keeper) // stack 2 contains mw3 -> mw2 -> custom1 -stack2 := mw3.NewIBCModule(mw3Keeper, mw3.NewIBCModule(customIBCModule1)) +stack2 := mw3.NewIBCMiddleware(mw2.NewIBCMiddleware(customIBCModule1), mw3Keeper) // stack 3 contains mw2 -> mw1 -> custom2 -stack3 := mw2.NewIBCModule(mw1.NewIBCModule(mw1Keeper, customIBCModule2)) +stack3 := mw2.NewIBCMiddleware(mw1.NewIBCMiddleware(customIBCModule2, mw1Keeper)) // associate each stack with the moduleName provided by the underlying scopedKeeper ibcRouter := porttypes.NewRouter() diff --git a/docs/ibc/overview.md b/docs/ibc/overview.md index 53ad64e08e8..f36b366a5e0 100644 --- a/docs/ibc/overview.md +++ b/docs/ibc/overview.md @@ -46,7 +46,7 @@ and the global client counter appended in the format: `{client-type}-{N}`. A `ClientState` should contain chain specific and light client specific information necessary for verifying updates and upgrades to the IBC client. The `ClientState` may contain information such as chain-id, latest height, proof specs, unbonding periods or the status of the light client. The `ClientState` should not contain information that -is specific to a given block at a certain height, this is the function of the `CosnensusState`. Each `ConsensusState` +is specific to a given block at a certain height, this is the function of the `ConsensusState`. Each `ConsensusState` should be associated with a unique block and should be referenced using a height. IBC clients are given a client identifier prefixed store to store their associated client state and consensus states along with any metadata associated with the consensus states. Consensus states are stored using their associated height. diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 4cde071460e..48219f3d66b 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -38,14 +38,15 @@ - [FeeEnabledChannel](#ibc.applications.fee.v1.FeeEnabledChannel) - [ForwardRelayerAddress](#ibc.applications.fee.v1.ForwardRelayerAddress) - [GenesisState](#ibc.applications.fee.v1.GenesisState) - - [RegisteredRelayerAddress](#ibc.applications.fee.v1.RegisteredRelayerAddress) + - [RegisteredCounterpartyPayee](#ibc.applications.fee.v1.RegisteredCounterpartyPayee) + - [RegisteredPayee](#ibc.applications.fee.v1.RegisteredPayee) - [ibc/applications/fee/v1/metadata.proto](#ibc/applications/fee/v1/metadata.proto) - [Metadata](#ibc.applications.fee.v1.Metadata) - [ibc/applications/fee/v1/query.proto](#ibc/applications/fee/v1/query.proto) - - [QueryCounterpartyAddressRequest](#ibc.applications.fee.v1.QueryCounterpartyAddressRequest) - - [QueryCounterpartyAddressResponse](#ibc.applications.fee.v1.QueryCounterpartyAddressResponse) + - [QueryCounterpartyPayeeRequest](#ibc.applications.fee.v1.QueryCounterpartyPayeeRequest) + - [QueryCounterpartyPayeeResponse](#ibc.applications.fee.v1.QueryCounterpartyPayeeResponse) - [QueryFeeEnabledChannelRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) - [QueryFeeEnabledChannelResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) - [QueryFeeEnabledChannelsRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest) @@ -56,6 +57,8 @@ - [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) - [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) - [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) + - [QueryPayeeRequest](#ibc.applications.fee.v1.QueryPayeeRequest) + - [QueryPayeeResponse](#ibc.applications.fee.v1.QueryPayeeResponse) - [QueryTotalAckFeesRequest](#ibc.applications.fee.v1.QueryTotalAckFeesRequest) - [QueryTotalAckFeesResponse](#ibc.applications.fee.v1.QueryTotalAckFeesResponse) - [QueryTotalRecvFeesRequest](#ibc.applications.fee.v1.QueryTotalRecvFeesRequest) @@ -70,8 +73,10 @@ - [MsgPayPacketFeeAsync](#ibc.applications.fee.v1.MsgPayPacketFeeAsync) - [MsgPayPacketFeeAsyncResponse](#ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) - [MsgPayPacketFeeResponse](#ibc.applications.fee.v1.MsgPayPacketFeeResponse) - - [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) - - [MsgRegisterCounterpartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse) + - [MsgRegisterCounterpartyPayee](#ibc.applications.fee.v1.MsgRegisterCounterpartyPayee) + - [MsgRegisterCounterpartyPayeeResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse) + - [MsgRegisterPayee](#ibc.applications.fee.v1.MsgRegisterPayee) + - [MsgRegisterPayeeResponse](#ibc.applications.fee.v1.MsgRegisterPayeeResponse) - [Msg](#ibc.applications.fee.v1.Msg) @@ -126,6 +131,8 @@ - [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) - [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) - [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) + - [QueryEscrowAddressRequest](#ibc.applications.transfer.v1.QueryEscrowAddressRequest) + - [QueryEscrowAddressResponse](#ibc.applications.transfer.v1.QueryEscrowAddressResponse) - [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) - [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) @@ -214,6 +221,8 @@ - [QueryClientStatesResponse](#ibc.core.client.v1.QueryClientStatesResponse) - [QueryClientStatusRequest](#ibc.core.client.v1.QueryClientStatusRequest) - [QueryClientStatusResponse](#ibc.core.client.v1.QueryClientStatusResponse) + - [QueryConsensusStateHeightsRequest](#ibc.core.client.v1.QueryConsensusStateHeightsRequest) + - [QueryConsensusStateHeightsResponse](#ibc.core.client.v1.QueryConsensusStateHeightsResponse) - [QueryConsensusStateRequest](#ibc.core.client.v1.QueryConsensusStateRequest) - [QueryConsensusStateResponse](#ibc.core.client.v1.QueryConsensusStateResponse) - [QueryConsensusStatesRequest](#ibc.core.client.v1.QueryConsensusStatesRequest) @@ -362,7 +371,7 @@ IncentivizedAcknowledgement is the acknowledgement format to be used by applicat | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `result` | [bytes](#bytes) | | the underlying app acknowledgement result bytes | +| `app_acknowledgement` | [bytes](#bytes) | | the underlying app acknowledgement bytes | | `forward_relayer_address` | [string](#string) | | the relayer address which submits the recv packet message | | `underlying_app_success` | [bool](#bool) | | success flag of the base application callback | @@ -845,7 +854,8 @@ GenesisState defines the ICS29 fee middleware genesis state | ----- | ---- | ----- | ----------- | | `identified_fees` | [IdentifiedPacketFees](#ibc.applications.fee.v1.IdentifiedPacketFees) | repeated | list of identified packet fees | | `fee_enabled_channels` | [FeeEnabledChannel](#ibc.applications.fee.v1.FeeEnabledChannel) | repeated | list of fee enabled channels | -| `registered_relayers` | [RegisteredRelayerAddress](#ibc.applications.fee.v1.RegisteredRelayerAddress) | repeated | list of registered relayer addresses | +| `registered_payees` | [RegisteredPayee](#ibc.applications.fee.v1.RegisteredPayee) | repeated | list of registered payees | +| `registered_counterparty_payees` | [RegisteredCounterpartyPayee](#ibc.applications.fee.v1.RegisteredCounterpartyPayee) | repeated | list of registered counterparty payees | | `forward_relayers` | [ForwardRelayerAddress](#ibc.applications.fee.v1.ForwardRelayerAddress) | repeated | list of forward relayer addresses | @@ -853,17 +863,35 @@ GenesisState defines the ICS29 fee middleware genesis state - + -### RegisteredRelayerAddress -RegisteredRelayerAddress contains the address and counterparty address for a specific relayer (for distributing fees) +### RegisteredCounterpartyPayee +RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +for recv fee distribution) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | the relayer address | -| `counterparty_address` | [string](#string) | | the counterparty relayer address | | `channel_id` | [string](#string) | | unique channel identifier | +| `relayer` | [string](#string) | | the relayer address | +| `counterparty_payee` | [string](#string) | | the counterparty payee address | + + + + + + + + +### RegisteredPayee +RegisteredPayee contains the relayer address and payee address for a specific channel + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channel_id` | [string](#string) | | unique channel identifier | +| `relayer` | [string](#string) | | the relayer address | +| `payee` | [string](#string) | | the payee address | @@ -919,31 +947,31 @@ See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel- - + -### QueryCounterpartyAddressRequest -QueryCounterpartyAddressRequest defines the request type for the CounterpartyAddress rpc +### QueryCounterpartyPayeeRequest +QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `channel_id` | [string](#string) | | unique channel identifier | -| `relayer_address` | [string](#string) | | the relayer address to which the counterparty is registered | +| `relayer` | [string](#string) | | the relayer address to which the counterparty is registered | - + -### QueryCounterpartyAddressResponse -QueryCounterpartyAddressResponse defines the response type for the CounterpartyAddress rpc +### QueryCounterpartyPayeeResponse +QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `counterparty_address` | [string](#string) | | the counterparty address used to compensate forward relaying | +| `counterparty_payee` | [string](#string) | | the counterparty payee address used to compensate forward relaying | @@ -1108,6 +1136,37 @@ QueryIncentivizedPacketsResponse defines the response type for the IncentivizedP + + +### QueryPayeeRequest +QueryPayeeRequest defines the request type for the Payee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channel_id` | [string](#string) | | unique channel identifier | +| `relayer` | [string](#string) | | the relayer address to which the distribution address is registered | + + + + + + + + +### QueryPayeeResponse +QueryPayeeResponse defines the response type for the Payee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `payee_address` | [string](#string) | | the payee address to which packet fees are paid out | + + + + + + ### QueryTotalAckFeesRequest @@ -1212,14 +1271,15 @@ Query defines the ICS29 gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `IncentivizedPackets` | [QueryIncentivizedPacketsRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) | [QueryIncentivizedPacketsResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) | IncentivizedPackets returns all incentivized packets and their associated fees | GET|/ibc/apps/fee/v1/incentivized_packets| -| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | IncentivizedPacket returns all packet fees for a packet given its identifier | GET|/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `IncentivizedPacketsForChannel` | [QueryIncentivizedPacketsForChannelRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) | [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) | Gets all incentivized packets for a specific channel | GET|/ibc/apps/fee/v1/incentivized_packets/port/{port_id}/channel/{channel_id}| -| `TotalRecvFees` | [QueryTotalRecvFeesRequest](#ibc.applications.fee.v1.QueryTotalRecvFeesRequest) | [QueryTotalRecvFeesResponse](#ibc.applications.fee.v1.QueryTotalRecvFeesResponse) | TotalRecvFees returns the total receive fees for a packet given its identifier | GET|/ibc/apps/fee/v1/total_recv_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `TotalAckFees` | [QueryTotalAckFeesRequest](#ibc.applications.fee.v1.QueryTotalAckFeesRequest) | [QueryTotalAckFeesResponse](#ibc.applications.fee.v1.QueryTotalAckFeesResponse) | TotalAckFees returns the total acknowledgement fees for a packet given its identifier | GET|/ibc/apps/fee/v1/total_ack_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `TotalTimeoutFees` | [QueryTotalTimeoutFeesRequest](#ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest) | [QueryTotalTimeoutFeesResponse](#ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) | TotalTimeoutFees returns the total timeout fees for a packet given its identifier | GET|/ibc/apps/fee/v1/total_timeout_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}| -| `CounterpartyAddress` | [QueryCounterpartyAddressRequest](#ibc.applications.fee.v1.QueryCounterpartyAddressRequest) | [QueryCounterpartyAddressResponse](#ibc.applications.fee.v1.QueryCounterpartyAddressResponse) | CounterpartyAddress returns the registered counterparty address for forward relaying | GET|/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}| +| `IncentivizedPacket` | [QueryIncentivizedPacketRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketRequest) | [QueryIncentivizedPacketResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketResponse) | IncentivizedPacket returns all packet fees for a packet given its identifier | GET|/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet| +| `IncentivizedPacketsForChannel` | [QueryIncentivizedPacketsForChannelRequest](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) | [QueryIncentivizedPacketsForChannelResponse](#ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) | Gets all incentivized packets for a specific channel | GET|/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets| +| `TotalRecvFees` | [QueryTotalRecvFeesRequest](#ibc.applications.fee.v1.QueryTotalRecvFeesRequest) | [QueryTotalRecvFeesResponse](#ibc.applications.fee.v1.QueryTotalRecvFeesResponse) | TotalRecvFees returns the total receive fees for a packet given its identifier | GET|/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees| +| `TotalAckFees` | [QueryTotalAckFeesRequest](#ibc.applications.fee.v1.QueryTotalAckFeesRequest) | [QueryTotalAckFeesResponse](#ibc.applications.fee.v1.QueryTotalAckFeesResponse) | TotalAckFees returns the total acknowledgement fees for a packet given its identifier | GET|/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees| +| `TotalTimeoutFees` | [QueryTotalTimeoutFeesRequest](#ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest) | [QueryTotalTimeoutFeesResponse](#ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) | TotalTimeoutFees returns the total timeout fees for a packet given its identifier | GET|/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees| +| `Payee` | [QueryPayeeRequest](#ibc.applications.fee.v1.QueryPayeeRequest) | [QueryPayeeResponse](#ibc.applications.fee.v1.QueryPayeeResponse) | Payee returns the registered payee address for a specific channel given the relayer address | GET|/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee| +| `CounterpartyPayee` | [QueryCounterpartyPayeeRequest](#ibc.applications.fee.v1.QueryCounterpartyPayeeRequest) | [QueryCounterpartyPayeeResponse](#ibc.applications.fee.v1.QueryCounterpartyPayeeResponse) | CounterpartyPayee returns the registered counterparty payee for forward relaying | GET|/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee| | `FeeEnabledChannels` | [QueryFeeEnabledChannelsRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest) | [QueryFeeEnabledChannelsResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse) | FeeEnabledChannels returns a list of all fee enabled channels | GET|/ibc/apps/fee/v1/fee_enabled| -| `FeeEnabledChannel` | [QueryFeeEnabledChannelRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) | [QueryFeeEnabledChannelResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) | FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel | GET|/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}| +| `FeeEnabledChannel` | [QueryFeeEnabledChannelRequest](#ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) | [QueryFeeEnabledChannelResponse](#ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) | FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel | GET|/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled| @@ -1290,27 +1350,56 @@ MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc - + -### MsgRegisterCounterpartyAddress -MsgRegisterCounterpartyAddress defines the request type for the RegisterCounterpartyAddress rpc +### MsgRegisterCounterpartyPayee +MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | the relayer address | -| `counterparty_address` | [string](#string) | | the counterparty relayer address | +| `port_id` | [string](#string) | | unique port identifier | | `channel_id` | [string](#string) | | unique channel identifier | +| `relayer` | [string](#string) | | the relayer address | +| `counterparty_payee` | [string](#string) | | the counterparty payee address | + + + + + + +### MsgRegisterCounterpartyPayeeResponse +MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc + + + + + + + + +### MsgRegisterPayee +MsgRegisterPayee defines the request type for the RegisterPayee rpc + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | unique port identifier | +| `channel_id` | [string](#string) | | unique channel identifier | +| `relayer` | [string](#string) | | the relayer address | +| `payee` | [string](#string) | | the payee address | - -### MsgRegisterCounterpartyAddressResponse -MsgRegisterCounterpartyAddressResponse defines the response type for the RegisterCounterpartyAddress rpc + + + +### MsgRegisterPayeeResponse +MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc @@ -1330,7 +1419,8 @@ Msg defines the ICS29 Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `RegisterCounterpartyAddress` | [MsgRegisterCounterpartyAddress](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddress) | [MsgRegisterCounterpartyAddressResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse) | RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying. This ensures they will be properly compensated for forward relaying since destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function may be called more than once by a relayer, in which case, latest counterparty address is always used. | | +| `RegisterPayee` | [MsgRegisterPayee](#ibc.applications.fee.v1.MsgRegisterPayee) | [MsgRegisterPayeeResponse](#ibc.applications.fee.v1.MsgRegisterPayeeResponse) | RegisterPayee defines a rpc handler method for MsgRegisterPayee RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on the source chain from which packets originate as this is where fee distribution takes place. This function may be called more than once by a relayer, in which case, the latest payee is always used. | | +| `RegisterCounterpartyPayee` | [MsgRegisterCounterpartyPayee](#ibc.applications.fee.v1.MsgRegisterCounterpartyPayee) | [MsgRegisterCounterpartyPayeeResponse](#ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse) | RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty payee address before relaying. This ensures they will be properly compensated for forward relaying since the destination chain must include the registered counterparty payee address in the acknowledgement. This function may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. | | | `PayPacketFee` | [MsgPayPacketFee](#ibc.applications.fee.v1.MsgPayPacketFee) | [MsgPayPacketFeeResponse](#ibc.applications.fee.v1.MsgPayPacketFeeResponse) | PayPacketFee defines a rpc handler method for MsgPayPacketFee PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of the packet at the next sequence NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows initiates the lifecycle of the incentivized packet | | | `PayPacketFeeAsync` | [MsgPayPacketFeeAsync](#ibc.applications.fee.v1.MsgPayPacketFeeAsync) | [MsgPayPacketFeeAsyncResponse](#ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) | PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to incentivize the relaying of a known packet (i.e. at a particular sequence) | | @@ -1870,7 +1960,7 @@ method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | +| `hash` | [string](#string) | | hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. | @@ -1926,6 +2016,37 @@ method. + + +### QueryEscrowAddressRequest +QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | unique port identifier | +| `channel_id` | [string](#string) | | unique channel identifier | + + + + + + + + +### QueryEscrowAddressResponse +QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `escrow_address` | [string](#string) | | the escrow account address | + + + + + + ### QueryParamsRequest @@ -1968,6 +2089,7 @@ Query provides defines the gRPC querier service. | `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/apps/transfer/v1/denom_traces| | `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/apps/transfer/v1/params| | `DenomHash` | [QueryDenomHashRequest](#ibc.applications.transfer.v1.QueryDenomHashRequest) | [QueryDenomHashResponse](#ibc.applications.transfer.v1.QueryDenomHashResponse) | DenomHash queries a denomination hash information. | GET|/ibc/apps/transfer/v1/denom_hashes/{trace}| +| `EscrowAddress` | [QueryEscrowAddressRequest](#ibc.applications.transfer.v1.QueryEscrowAddressRequest) | [QueryEscrowAddressResponse](#ibc.applications.transfer.v1.QueryEscrowAddressResponse) | EscrowAddress returns the escrow address for a particular port and channel id. | GET|/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address| @@ -2834,7 +2956,7 @@ value will be ignored by core IBC. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `port_id` | [string](#string) | | | -| `previous_channel_id` | [string](#string) | | in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier of the previous channel in state INIT | +| `previous_channel_id` | [string](#string) | | **Deprecated.** Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. | | `channel` | [Channel](#ibc.core.channel.v1.Channel) | | NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. | | `counterparty_version` | [string](#string) | | | | `proof_init` | [bytes](#bytes) | | | @@ -3208,6 +3330,40 @@ method. It returns the current status of the IBC client. + + +### QueryConsensusStateHeightsRequest +QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | + + + + + + + + +### QueryConsensusStateHeightsResponse +QueryConsensusStateHeightsResponse is the response type for the +Query/ConsensusStateHeights RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `consensus_state_heights` | [Height](#ibc.core.client.v1.Height) | repeated | consensus state heights | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | + + + + + + ### QueryConsensusStateRequest @@ -3351,6 +3507,7 @@ Query provides defines the gRPC querier service | `ClientStates` | [QueryClientStatesRequest](#ibc.core.client.v1.QueryClientStatesRequest) | [QueryClientStatesResponse](#ibc.core.client.v1.QueryClientStatesResponse) | ClientStates queries all the IBC light clients of a chain. | GET|/ibc/core/client/v1/client_states| | `ConsensusState` | [QueryConsensusStateRequest](#ibc.core.client.v1.QueryConsensusStateRequest) | [QueryConsensusStateResponse](#ibc.core.client.v1.QueryConsensusStateResponse) | ConsensusState queries a consensus state associated with a client state at a given height. | GET|/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}| | `ConsensusStates` | [QueryConsensusStatesRequest](#ibc.core.client.v1.QueryConsensusStatesRequest) | [QueryConsensusStatesResponse](#ibc.core.client.v1.QueryConsensusStatesResponse) | ConsensusStates queries all the consensus state associated with a given client. | GET|/ibc/core/client/v1/consensus_states/{client_id}| +| `ConsensusStateHeights` | [QueryConsensusStateHeightsRequest](#ibc.core.client.v1.QueryConsensusStateHeightsRequest) | [QueryConsensusStateHeightsResponse](#ibc.core.client.v1.QueryConsensusStateHeightsResponse) | ConsensusStateHeights queries the height of every consensus states associated with a given client. | GET|/ibc/core/client/v1/consensus_states/{client_id}/heights| | `ClientStatus` | [QueryClientStatusRequest](#ibc.core.client.v1.QueryClientStatusRequest) | [QueryClientStatusResponse](#ibc.core.client.v1.QueryClientStatusResponse) | Status queries the status of an IBC client. | GET|/ibc/core/client/v1/client_status/{client_id}| | `ClientParams` | [QueryClientParamsRequest](#ibc.core.client.v1.QueryClientParamsRequest) | [QueryClientParamsResponse](#ibc.core.client.v1.QueryClientParamsResponse) | ClientParams queries all parameters of the ibc client. | GET|/ibc/client/v1/params| | `UpgradedClientState` | [QueryUpgradedClientStateRequest](#ibc.core.client.v1.QueryUpgradedClientStateRequest) | [QueryUpgradedClientStateResponse](#ibc.core.client.v1.QueryUpgradedClientStateResponse) | UpgradedClientState queries an Upgraded IBC light client. | GET|/ibc/core/client/v1/upgraded_client_states| @@ -4095,7 +4252,7 @@ connection on Chain B. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `client_id` | [string](#string) | | | -| `previous_connection_id` | [string](#string) | | in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier of the previous connection in state INIT | +| `previous_connection_id` | [string](#string) | | **Deprecated.** Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. | | `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | | `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | | | `delay_period` | [uint64](#uint64) | | | diff --git a/docs/ibc/upgrades/developer-guide.md b/docs/ibc/upgrades/developer-guide.md index d41b3346d4f..73a19b93664 100644 --- a/docs/ibc/upgrades/developer-guide.md +++ b/docs/ibc/upgrades/developer-guide.md @@ -36,7 +36,7 @@ Developers must ensure that the new client adopts all of the new Client paramete Upgrades must adhere to the IBC Security Model. IBC does not rely on the assumption of honest relayers for correctness. Thus users should not have to rely on relayers to maintain client correctness and security (though honest relayers must exist to maintain relayer liveness). While relayers may choose any set of client parameters while creating a new `ClientState`, this still holds under the security model since users can always choose a relayer-created client that suits their security and correctness needs or create a Client with their desired parameters if no such client exists. -However, when upgrading an existing client, one must keep in mind that there are already many users who depend on this client's particular parameters. We cannot give the upgrading relayer free choice over these parameters once they have already been chosen. This would violate the security model since users who rely on the client would have to rely on the upgrading relayer to maintain the same level of security. Thus, developers must make sure that their upgrade mechanism allows clients to upgrade the chain-specified parameters whenever a chain upgrade changes these parameters (examples in the Tendermint client include `UnbondingPeriod`, `ChainID`, `UpgradePath`, etc.), while ensuring that the relayer submitting the `UpgradeClientMsg` cannot alter the client-chosen parameters that the users are relying upon (examples in Tendermint client include `TrustingPeriod`, `TrustLevel`, `MaxClockDrift`, etc). +However, when upgrading an existing client, one must keep in mind that there are already many users who depend on this client's particular parameters. We cannot give the upgrading relayer free choice over these parameters once they have already been chosen. This would violate the security model since users who rely on the client would have to rely on the upgrading relayer to maintain the same level of security. Thus, developers must make sure that their upgrade mechanism allows clients to upgrade the chain-specified parameters whenever a chain upgrade changes these parameters (examples in the Tendermint client include `UnbondingPeriod`, `TrustingPeriod`, `ChainID`, `UpgradePath`, etc.), while ensuring that the relayer submitting the `UpgradeClientMsg` cannot alter the client-chosen parameters that the users are relying upon (examples in Tendermint client include `TrustLevel`, `MaxClockDrift`, etc). Developers should maintain the distinction between Client parameters that are uniform across every valid light client of a chain (chain-chosen parameters), and Client parameters that are customizable by each individual client (client-chosen parameters); since this distinction is necessary to implement the `ZeroCustomFields` method in the `ClientState` interface: diff --git a/docs/middleware/ics29-fee/end-users.md b/docs/middleware/ics29-fee/end-users.md new file mode 100644 index 00000000000..0a2514e7722 --- /dev/null +++ b/docs/middleware/ics29-fee/end-users.md @@ -0,0 +1,30 @@ + + +# For end users + +Learn how to incentivize IBC packets using the ICS29 Fee Middleware module. {synopsis} + +## Pre-requisite readings + +- [Fee Middleware](overview.md) {prereq} + +## Summary + +Different types of end users: + +- CLI users who want to manually incentivize IBC packets +- Client developers + +The Fee Middleware module allows end users to add a 'tip' to each IBC packet which will incentivize relayer operators to relay packets between chains. gRPC endpoints are exposed for client developers as well as a simple CLI for manually incentivizing IBC packets. + +## CLI Users + +For an in depth guide on how to use the ICS29 Fee Middleware module using the CLI please take a look at the [wiki](https://github.com/cosmos/ibc-go/wiki/Fee-enabled-fungible-token-transfers#asynchronous-incentivization-of-a-fungible-token-transfer) on the `ibc-go` repo. + +## Client developers + +Client developers can read more about the relevant ICS29 message types in the [Fee messages section](../ics29-fee/msgs.md). + +[CosmJS](https://github.com/cosmos/cosmjs) is a useful client library for signing and broadcasting Cosmos SDK messages. diff --git a/docs/middleware/ics29-fee/events.md b/docs/middleware/ics29-fee/events.md new file mode 100644 index 00000000000..e0d2ccd471c --- /dev/null +++ b/docs/middleware/ics29-fee/events.md @@ -0,0 +1,37 @@ + + +# Events + +An overview of all events related to ICS-29 {synopsis} + +## `MsgPayPacketFee`, `MsgPayPacketFeeAsync` + +| Type | Attribute Key | Attribute Value | +| ----------------------- | --------------- | --------------- | +| incentivized_ibc_packet | port_id | {portID} | +| incentivized_ibc_packet | channel_id | {channelID} | +| incentivized_ibc_packet | packet_sequence | {sequence} | +| incentivized_ibc_packet | recv_fee | {recvFee} | +| incentivized_ibc_packet | ack_fee | {ackFee} | +| incentivized_ibc_packet | timeout_fee | {timeoutFee} | +| message | module | fee-ibc | + +## `RegisterPayee` + +| Type | Attribute Key | Attribute Value | +| -------------- | ------------- | --------------- | +| register_payee | relayer | {relayer} | +| register_payee | payee | {payee} | +| register_payee | channel_id | {channelID} | +| message | module | fee-ibc | + +## `RegisterCounterpartyPayee` + +| Type | Attribute Key | Attribute Value | +| --------------------------- | ------------------ | ------------------- | +| register_counterparty_payee | relayer | {relayer} | +| register_counterparty_payee | counterparty_payee | {counterpartyPayee} | +| register_counterparty_payee | channel_id | {channelID} | +| message | module | fee-ibc | diff --git a/docs/middleware/ics29-fee/fee-distribution.md b/docs/middleware/ics29-fee/fee-distribution.md new file mode 100644 index 00000000000..79f03792566 --- /dev/null +++ b/docs/middleware/ics29-fee/fee-distribution.md @@ -0,0 +1,108 @@ + + +# Fee distribution + +Learn about payee registration for the distribution of packet fees. The following document is intended for relayer operators. {synopsis} + +## Pre-requisite readings + +- [Fee Middleware](overview.md) {prereq} + +Packet fees are divided into 3 distinct amounts in order to compensate relayer operators for packet relaying on fee enabled IBC channels. + +- `RecvFee`: The sum of all packet receive fees distributed to a payee for successful execution of `MsgRecvPacket`. +- `AckFee`: The sum of all packet acknowledgement fees distributed to a payee for successful execution of `MsgAcknowledgement`. +- `TimeoutFee`: The sum of all packet timeout fees distributed to a payee for successful execution of `MsgTimeout`. + +## Register a counterparty payee address for forward relaying + +As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the forward relayer describes the actor who performs the submission of `MsgRecvPacket` on the destination chain. +Fee distribution for incentivized packet relays takes place on the packet source chain. + +> Relayer operators are expected to register a counterparty payee address, in order to be compensated accordingly with `RecvFee`s upon completion of a packet lifecycle. + +The counterparty payee address registered on the destination chain is encoded into the packet acknowledgement and communicated as such to the source chain for fee distribution. +**If a counterparty payee is not registered for the forward relayer on the destination chain, the escrowed fees will be refunded upon fee distribution.** + +### Relayer operator actions? + +A transaction must be submitted **to the destination chain** including a `CounterpartyPayee` address of an account on the source chain. +The transaction must be signed by the `Relayer`. + +Note: If a module account address is used as the `CounterpartyPayee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module. + +```go +type MsgRegisterCounterpartyPayee struct { + // unique port identifier + PortId string + // unique channel identifier + ChannelId string + // the relayer address + Relayer string + // the counterparty payee address + CounterpartyPayee string +} +``` + +> This message is expected to fail if: +> +> - `PortId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators). +> - `ChannelId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)). +> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)). +> - `CounterpartyPayee` is empty. + +See below for an example CLI command: + +```bash +simd tx ibc-fee register-counterparty-payee transfer channel-0 \ +cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \ +osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 \ +--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh +``` + +## Register an alternative payee address for reverse and timeout relaying + +As mentioned in [ICS29 Concepts](../ics29-fee/overview.md#concepts), the reverse relayer describes the actor who performs the submission of `MsgAcknowledgement` on the source chain. +Similarly the timeout relayer describes the actor who performs the submission of `MsgTimeout` (or `MsgTimeoutOnClose`) on the source chain. + +> Relayer operators **may choose** to register an optional payee address, in order to be compensated accordingly with `AckFee`s and `TimeoutFee`s upon completion of a packet life cycle. + +If a payee is not registered for the reverse or timeout relayer on the source chain, then fee distribution assumes the default behaviour, where fees are paid out to the relayer account which delivers `MsgAcknowledgement` or `MsgTimeout`/`MsgTimeoutOnClose`. + +### Relayer operator actions + +A transaction must be submitted **to the source chain** including a `Payee` address of an account on the source chain. +The transaction must be signed by the `Relayer`. + +Note: If a module account address is used as the `Payee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module. + +```go +type MsgRegisterPayee struct { + // unique port identifier + PortId string + // unique channel identifier + ChannelId string + // the relayer address + Relayer string + // the payee address + Payee string +} +``` + +> This message is expected to fail if: +> +> - `PortId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators). +> - `ChannelId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)). +> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)). +> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/basics/accounts.md#Addresses)). + +See below for an example CLI command: + +```bash +simd tx ibc-fee register-payee transfer channel-0 \ +cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh \ +cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5 \ +--from cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh +``` diff --git a/docs/middleware/ics29-fee/integration.md b/docs/middleware/ics29-fee/integration.md new file mode 100644 index 00000000000..f1d0158e702 --- /dev/null +++ b/docs/middleware/ics29-fee/integration.md @@ -0,0 +1,85 @@ + + +# Integration + +Learn how to configure the Fee Middleware module with IBC applications. The following document is intended for developers building on top of the Cosmos SDK and only applies for Cosmos SDK chains. {synopsis} + +## Pre-requisite Readings + +* [IBC middleware development](../../ibc/middleware/develop.md) {prereq} +* [IBC middleware integration](../../ibc/middleware/integration.md) {prereq} + +The Fee Middleware module, as the name suggests, plays the role of an IBC middleware and as such must be configured by chain developers to route and handle IBC messages correctly. +For Cosmos SDK chains this setup is done via the `app/app.go` file, where modules are constructed and configured in order to bootstrap the blockchain application. + +## Configuring an application stack with Fee Middleware + +As mentioned in [IBC middleware development](../../ibc/middleware/develop.md) an application stack may be composed of many or no middlewares that nest a base application. +These layers form the complete set of application logic that enable developers to build composable and flexible IBC application stacks. +For example, an application stack may be just a single base application like `transfer`, however, the same application stack composed with `29-fee` will nest the `transfer` base application +by wrapping it with the Fee Middleware module. + + +### Transfer + +See below for an example of how to create an application stack using `transfer` and `29-fee`. +The following `transferStack` is configured in `app/app.go` and added to the IBC `Router`. +The in-line comments describe the execution flow of packets between the application stack and IBC core. + +```go +// Create Transfer Stack +// SendPacket, since it is originating from the application to core IBC: +// transferKeeper.SendPacket -> fee.SendPacket -> channel.SendPacket + +// RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way +// channel.RecvPacket -> fee.OnRecvPacket -> transfer.OnRecvPacket + +// transfer stack contains (from top to bottom): +// - IBC Fee Middleware +// - Transfer + +// create IBC module from bottom to top of stack +var transferStack porttypes.IBCModule +transferStack = transfer.NewIBCModule(app.TransferKeeper) +transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) + +// Add transfer stack to IBC Router +ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) +``` + +### Interchain Accounts + +See below for an example of how to create an application stack using `27-interchain-accounts` and `29-fee`. +The following `icaControllerStack` and `icaHostStack` are configured in `app/app.go` and added to the IBC `Router` with the associated authentication module. +The in-line comments describe the execution flow of packets between the application stack and IBC core. + +```go +// Create Interchain Accounts Stack +// SendPacket, since it is originating from the application to core IBC: +// icaAuthModuleKeeper.SendTx -> icaController.SendPacket -> fee.SendPacket -> channel.SendPacket + +// initialize ICA module with mock module as the authentication module on the controller side +var icaControllerStack porttypes.IBCModule +icaControllerStack = ibcmock.NewIBCModule(&mockModule, ibcmock.NewMockIBCApp("", scopedICAMockKeeper)) +app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule) +icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper) +icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) + +// RecvPacket, message that originates from core IBC and goes down to app, the flow is: +// channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket + +var icaHostStack porttypes.IBCModule +icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper) +icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) + +// Add authentication module, controller and host to IBC router +ibcRouter. + // the ICA Controller middleware needs to be explicitly added to the IBC Router because the + // ICA controller module owns the port capability for ICA. The ICA authentication module + // owns the channel capability. + AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerStack) // ica with mock auth module stack route to ica (top level of middleware stack) + AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). + AddRoute(icahosttypes.SubModuleName, icaHostStack). +``` \ No newline at end of file diff --git a/docs/middleware/ics29-fee/msgs.md b/docs/middleware/ics29-fee/msgs.md new file mode 100644 index 00000000000..0003d5982ee --- /dev/null +++ b/docs/middleware/ics29-fee/msgs.md @@ -0,0 +1,90 @@ + + +# Fee messages + +Learn about the different ways to pay for fees, how the fees are paid out and what happens when not enough escrowed fees are available for payout {synopsis} + +## Escrowing fees + +The fee middleware module exposes two different ways to pay fees for relaying IBC packets: + +1. `MsgPayPacketFee`, which enables the escrowing of fees for a packet at the next sequence send and should be combined into one `MultiMsgTx` with the message that will be paid for. + + Note that the `Relayers` field has been set up to allow for an optional whitelist of relayers permitted to receive this fee, however, this feature has not yet been enabled at this time. + + ```go + type MsgPayPacketFee struct{ + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet + Fee Fee + // the source port unique identifier + SourcePortId string + // the source channel unique identifer + SourceChannelId string + // account address to refund fee if necessary + Signer string + // optional list of relayers permitted to the receive packet fee + Relayers []string + } + ``` + + The `Fee` message contained in this synchronous fee payment method configures different fees which will be paid out for `MsgRecvPacket`, `MsgAcknowledgement`, and `MsgTimeout`/`MsgTimeoutOnClose`. + + ```go + type Fee struct { + RecvFee types.Coins + AckFee types.Coins + TimeoutFee types.Coins + } + ``` + +The diagram below shows the `MultiMsgTx` with the `MsgTransfer` coming from a token transfer message, along with `MsgPayPacketFee`. + +![MsgPayPacketFee](../../assets/fee-mw/msgpaypacket.png) + +2. `MsgPayPacketFeeAsync`, which enables the asynchronous escrowing of fees for a specified packet: + + Note that a packet can be 'topped up' multiple times with additional fees of any coin denomination by broadcasting multiple `MsgPayPacketFeeAsync` messages. + + ```go + type MsgPayPacketFeeAsync struct { + // unique packet identifier comprised of the channel ID, port ID and sequence + PacketId channeltypes.PacketId + // the packet fee associated with a particular IBC packet + PacketFee PacketFee + } + ``` + + where the `PacketFee` also specifies the `Fee` to be paid as well as the refund address for fees which are not paid out + + ```go + type PacketFee struct { + Fee Fee + RefundAddress string + Relayers []string + } + ``` + +The diagram below shows how multiple `MsgPayPacketFeeAsync` can be broadcasted asynchronously. Escrowing of the fee associated with a packet can be carried out by any party because ICS-29 does not dictate a particular fee payer. In fact, chains can choose to simply not expose this fee payment to end users at all and rely on a different module account or even the community pool as the source of relayer incentives. + +![MsgPayPacketFeeAsync](../../assets/fee-mw/paypacketfeeasync.png) + +Please see our [wiki](https://github.com/cosmos/ibc-go/wiki/Fee-enabled-fungible-token-transfers) for example flows on how to use these messages to incentivise a token transfer channel using a CLI. + +## Paying out the escrowed fees + +Following diagram takes a look at the packet flow for an incentivized token transfer and investigates the several scenario's for paying out the escrowed fees. We assume that the relayers have registered their counterparty address, detailed in the [Fee distribution section](../ics29-fee/fee-distribution.md). + +![packet-flow-fee](../../assets/fee-mw/feeflow.png) + +- In the case of a successful transaction, `RecvFee` will be paid out to the designated counterparty payee address which has been registered on the receiver chain and sent back with the `MsgAcknowledgement`, `AckFee` will be paid out to the relayer address which has submitted the `MsgAcknowledgement` on the sending chain (or the registered payee in case one has been registered for the relayer address), and `TimeoutFee` will be reimbursed to the account which escrowed the fee. +- In case of a timeout transaction, `RecvFee` and `AckFee` will be reimbursed. The `TimeoutFee` will be paid to the `Timeout Relayer` (who submits the timeout message to the source chain). + +> Please note that fee payments are built on the assumption that sender chains are the source of incentives — the chain that sends the packets is the same chain where fee payments will occur -- please see the [Fee distribution section](../ics29-fee/fee-distribution.md) to understand the flow for registering payee and counterparty payee (fee receiving) addresses. + +## A locked fee middleware module + +The fee middleware module can become locked if the situation arises that the escrow account for the fees does not have sufficient funds to pay out the fees which have been escrowed for each packet. _This situation indicates a severe bug._ In this case, the fee module will be locked until manual intervention fixes the issue. + +> A locked fee module will simply skip fee logic and continue on to the underlying packet flow. A channel with a locked fee module will temporarily function as a fee disabled channel, and the locking of a fee module will not affect the continued flow of packets over the channel. diff --git a/docs/middleware/ics29-fee/overview.md b/docs/middleware/ics29-fee/overview.md new file mode 100644 index 00000000000..bf1e9ba6dc4 --- /dev/null +++ b/docs/middleware/ics29-fee/overview.md @@ -0,0 +1,49 @@ + + +# Overview + +Learn about what the Fee Middleware module is, and how to build custom modules that utilize the Fee Middleware functionality {synopsis} + +## What is the Fee Middleware module? + +IBC does not depend on relayer operators for transaction verification. However, the relayer infrastructure ensures liveness of the Interchain network — operators listen for packets sent through channels opened between chains, and perform the vital service of ferrying these packets (and proof of the transaction on the sending chain/receipt on the receiving chain) to the clients on each side of the channel. + +Though relaying is permissionless and completely decentralized and accessible, it does come with operational costs. Running full nodes to query transaction proofs and paying for transaction fees associated with IBC packets are two of the primary cost burdens which have driven the overall discussion on **a general, in-protocol incentivization mechanism for relayers**. + +Initially, a [simple proposal](https://github.com/cosmos/ibc/pull/577/files) was created to incentivize relaying on ICS20 token transfers on the destination chain. However, the proposal was specific to ICS20 token transfers and would have to be reimplemented in this format on every other IBC application module. + +After much discussion, the proposal was expanded to a [general incentivisation design](https://github.com/cosmos/ibc/tree/master/spec/app/ics-029-fee-payment) that can be adopted by any ICS application protocol as [middleware](../../ibc/middleware/develop.md). + +## Concepts + +ICS29 fee payments in this middleware design are built on the assumption that sender chains are the source of incentives — the chain on which packets are incentivized is the chain that distributes fees to relayer operators. However, as part of the IBC packet flow, messages have to be submitted on both sender and destination chains. This introduces the requirement of a mapping of relayer operator's addresses on both chains. + +> To achieve the stated requirements, the **fee middleware module has two main groups of functionality**: + +- Registering of relayer addresses associated with each party involved in relaying the packet on the source chain. This registration process can be automated on start up of relayer infrastructure and happens only once, not every packet flow. + + This is described in the [Fee distribution section](../ics29-fee/fee-distribution.md). + +- Escrowing fees by any party which will be paid out to each rightful party on completion of the packet lifecycle. + + This is described in the [Fee messages section](../ics29-fee/msgs.md). + +We complete the introduction by giving a list of definitions of relevant terminolgy. + +`Forward relayer`: The relayer that submits the `MsgRecvPacket` message for a given packet (on the destination chain). + +`Reverse relayer`: The relayer that submits the `MsgAcknowledgement` message for a given packet (on the source chain). + +`Timeout relayer`: The relayer that submits the `MsgTimeout` or `MsgTimeoutOnClose` messages for a given packet (on the source chain). + +`Payee`: The account address on the source chain to be paid on completion of the packet lifecycle. The packet lifecycle on the source chain completes with the receipt of a `MsgTimeout`/`MsgTimeoutOnClose` or a `MsgAcknowledgement`. + +`Counterparty payee`: The account address to be paid on completion of the packet lifecycle on the destination chain. The package lifecycle on the destination chain completes with a successful `MsgRecvPacket`. + +`Refund address`: The address of the account paying for the incentivization of packet relaying. The account is refunded timeout fees upon successful acknowledgement. In the event of a packet timeout, both acknowledgement and receive fees are refunded. + +## Known Limitations + +The first version of fee payments middleware will only support incentivisation of new channels, however, channel upgradeability will enable incentivisation of all existing channels. diff --git a/docs/migrations/support-denoms-with-slashes.md b/docs/migrations/support-denoms-with-slashes.md new file mode 100644 index 00000000000..3bc3d1b6b83 --- /dev/null +++ b/docs/migrations/support-denoms-with-slashes.md @@ -0,0 +1,81 @@ +# Migrating from not supporting base denoms with slashes to supporting base denoms with slashes + +This document is intended to highlight significant changes which may require more information than presented in the CHANGELOG. +Any changes that must be done by a user of ibc-go should be documented here. + +There are four sections based on the four potential user groups of this document: +- Chains +- IBC Apps +- Relayers +- IBC Light Clients + +This document is necessary when chains are upgrading from a version that does not support base denoms with slashes (e.g. v3.0.0) to a version that does (e.g. v3.2.0). All versions of ibc-go smaller than v1.5.0 for the v1.x release line, v2.3.0 for the v2.x release line, and v3.1.0 for the v3.x release line do **NOT** support IBC token transfers of coins whose base denoms contain slashes. Therefore the in-place of genesis migration described in this document are required when upgrading. + +If a chain receives coins of a base denom with slashes before it upgrades to supporting it, the receive may pass however the trace information will be incorrect. + +E.g. If a base denom of `testcoin/testcoin/testcoin` is sent to a chain that does not support slashes in the base denom, the receive will be successful. However, the trace information stored on the receiving chain will be: `Trace: "transfer/{channel-id}/testcoin/testcoin", BaseDenom: "testcoin"`. + +This incorrect trace information must be corrected when the chain does upgrade to fully supporting denominations with slashes. + +To do so, chain binaries should include a migration script that will run when the chain upgrades from not supporting base denominations with slashes to supporting base denominations with slashes. + +## Chains + +### ICS20 - Transfer + +The transfer module will now support slashes in base denoms, so we must iterate over current traces to check if any of them are incorrectly formed and correct the trace information. + +### Upgrade Proposal + +```go +app.UpgradeKeeper.SetUpgradeHandler("MigrateTraces", + func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // transfer module consensus version has been bumped to 2 + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + +``` + +This is only necessary if there are denom traces in the store with incorrect trace information from previously received coins that had a slash in the base denom. However, it is recommended that any chain upgrading to support base denominations with slashes runs this code for safety. + +For a more detailed sample, please check out the code changes in [this pull request](https://github.com/cosmos/ibc-go/pull/1680). + +### Genesis Migration + +If the chain chooses to add support for slashes in base denoms via genesis export, then the trace information must be corrected during genesis migration. + +The migration code required may look like: + +```go +func migrateGenesisSlashedDenomsUpgrade(appState genutiltypes.AppMap, clientCtx client.Context, genDoc *tmtypes.GenesisDoc) (genutiltypes.AppMap, error) { + if appState[ibctransfertypes.ModuleName] != nil { + transferGenState := &ibctransfertypes.GenesisState{} + clientCtx.Codec.MustUnmarshalJSON(appState[ibctransfertypes.ModuleName], transferGenState) + + substituteTraces := make([]ibctransfertypes.DenomTrace, len(transferGenState.DenomTraces)) + for i, dt := range transferGenState.DenomTraces { + // replace all previous traces with the latest trace if validation passes + // note most traces will have same value + newTrace := ibctransfertypes.ParseDenomTrace(dt.GetFullDenomPath()) + + if err := newTrace.Validate(); err != nil { + substituteTraces[i] = dt + } else { + substituteTraces[i] = newTrace + } + } + + transferGenState.DenomTraces = substituteTraces + + // delete old genesis state + delete(appState, ibctransfertypes.ModuleName) + + // set new ibc transfer genesis state + appState[ibctransfertypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(transferGenState) + } + + return appState, nil +} +``` + +For a more detailed sample, please check out the code changes in [this pull request](https://github.com/cosmos/ibc-go/pull/1528). diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md index a37f74cf420..b274c85fd05 100644 --- a/docs/migrations/v2-to-v3.md +++ b/docs/migrations/v2-to-v3.md @@ -103,7 +103,7 @@ The migration code required may look like: icaGenesisState := icatypes.NewGenesisState(controllerGenesisState, hostGenesisState) // set new ics27 genesis state - appState[icatypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(icaGenesisState) + appState[icatypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(icaGenesisState) ``` ### Ante decorator diff --git a/docs/migrations/v3-to-v4.md b/docs/migrations/v3-to-v4.md index df7dedabbae..1526b1642e0 100644 --- a/docs/migrations/v3-to-v4.md +++ b/docs/migrations/v3-to-v4.md @@ -18,9 +18,115 @@ No genesis or in-place migrations required when upgrading from v1 or v2 of ibc-g ## Chains -### IS04 - Channel +### Migration to fix support for base denoms with slashes -The `WriteAcknowledgement` API now takes the `exported.Acknowledgement` type instead of passing in the acknowledgement byte array directly. -This is an API breaking change and as such IBC application developers will have to update any calls to `WriteAcknowledgement`. +As part of [v1.5.0](https://github.com/cosmos/ibc-go/releases/tag/v1.5.0), [v2.3.0](https://github.com/cosmos/ibc-go/releases/tag/v2.3.0) and [v3.1.0](https://github.com/cosmos/ibc-go/releases/tag/v3.1.0) some [migration handler code sample was documented](https://github.com/cosmos/ibc-go/blob/main/docs/migrations/support-denoms-with-slashes.md#upgrade-proposal) that needs to run in order to correct the trace information of coins transferred using ICS20 whose base denom contains slashes. -## IBC Light Clients +Based on feedback from the community we add now an improved solution to run the same migration that does not require copying a large piece of code over from the migration document, but instead requires only adding a one-line upgrade handler. + +If the chain will migrate to supporting base denoms with slashes, it must set the appropriate params during the execution of the upgrade handler in `app.go`: +```go +app.UpgradeKeeper.SetUpgradeHandler("MigrateTraces", + func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // transfer module consensus version has been bumped to 2 + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + +``` + +If a chain receives coins of a base denom with slashes before it upgrades to supporting it, the receive may pass however the trace information will be incorrect. + +E.g. If a base denom of `testcoin/testcoin/testcoin` is sent to a chain that does not support slashes in the base denom, the receive will be successful. However, the trace information stored on the receiving chain will be: `Trace: "transfer/{channel-id}/testcoin/testcoin", BaseDenom: "testcoin"`. + +This incorrect trace information must be corrected when the chain does upgrade to fully supporting denominations with slashes. + +## IBC Apps + +### ICS03 - Connection + +Crossing hellos have been removed from 03-connection handshake negotiation. +`PreviousConnectionId` in `MsgConnectionOpenTry` has been deprecated and is no longer used by core IBC. + +`NewMsgConnectionOpenTry` no longer takes in the `PreviousConnectionId` as crossing hellos are no longer supported. A non-empty `PreviousConnectionId` will fail basic validation for this message. + +### ICS04 - Channel + +The `WriteAcknowledgement` API now takes the `exported.Acknowledgement` type instead of passing in the acknowledgement byte array directly. +This is an API breaking change and as such IBC application developers will have to update any calls to `WriteAcknowledgement`. + +The `OnChanOpenInit` application callback has been modified. +The return signature now includes the application version as detailed in the latest IBC [spec changes](https://github.com/cosmos/ibc/pull/629). + +The `NewErrorAcknowledgement` method signature has changed. +It now accepts an `error` rather than a `string`. This was done in order to prevent accidental state changes. +All error acknowledgements now contain a deterministic ABCI code and error message. It is the responsibility of the application developer to emit error details in events. + +Crossing hellos have been removed from 04-channel handshake negotiation. +IBC Applications no longer need to account from already claimed capabilities in the `OnChanOpenTry` callback. The capability provided by core IBC must be able to be claimed with error. +`PreviousChannelId` in `MsgChannelOpenTry` has been deprecated and is no longer used by core IBC. + +`NewMsgChannelOpenTry` no longer takes in the `PreviousChannelId` as crossing hellos are no longer supported. A non-empty `PreviousChannelId` will fail basic validation for this message. + +### ICS27 - Interchain Accounts + +The `RegisterInterchainAccount` API has been modified to include an additional `version` argument. This change has been made in order to support ICS29 fee middleware, for relayer incentivization of ICS27 packets. +Consumers of the `RegisterInterchainAccount` are now expected to build the appropriate JSON encoded version string themselves and pass it accordingly. +This should be constructed within the interchain accounts authentication module which leverages the APIs exposed via the interchain accounts `controllerKeeper`. If an empty string is passed in the `version` argument, then the version will be initialized to a default value in the `OnChanOpenInit` callback of the controller's handler, so that channel handshake can proceed. + +The following code snippet illustrates how to construct an appropriate interchain accounts `Metadata` and encode it as a JSON bytestring: + +```go +icaMetadata := icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: controllerConnectionID, + HostConnectionId: hostConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, +} + +appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata) +if err != nil { + return err +} + +if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, msg.Owner, string(appVersion)); err != nil { + return err +} +``` + +Similarly, if the application stack is configured to route through ICS29 fee middleware and a fee enabled channel is desired, construct the appropriate ICS29 `Metadata` type: + +```go +icaMetadata := icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: controllerConnectionID, + HostConnectionId: hostConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, +} + +appVersion, err := icatypes.ModuleCdc.MarshalJSON(&icaMetadata) +if err != nil { + return err +} + +feeMetadata := feetypes.Metadata{ + AppVersion: string(appVersion), + FeeVersion: feetypes.Version, +} + +feeEnabledVersion, err := feetypes.ModuleCdc.MarshalJSON(&feeMetadata) +if err != nil { + return err +} + +if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, msg.Owner, string(feeEnabledVersion)); err != nil { + return err +} +``` + +## Relayers + +When using the `DenomTrace` gRPC, the full IBC denomination with the `ibc/` prefix may now be passed in. + +Crossing hellos are no longer supported by core IBC for 03-connection and 04-channel. The handshake should be completed in the logical 4 step process (INIT, TRY, ACK, CONFIRM). diff --git a/docs/roadmap/roadmap.md b/docs/roadmap/roadmap.md index 3ddc67399c7..12414076e57 100644 --- a/docs/roadmap/roadmap.md +++ b/docs/roadmap/roadmap.md @@ -4,55 +4,54 @@ order: 1 # Roadmap ibc-go -_Lastest update: March 31, 2022_ +_Lastest update: July 7, 2022_ This document endeavours to inform the wider IBC community about plans and priorities for work on ibc-go by the team at Interchain GmbH. It is intended to broadly inform all users of ibc-go, including developers and operators of IBC, relayer, chain and wallet applications. This roadmap should be read as a high-level guide, rather than a commitment to schedules and deliverables. The degree of specificity is inversely proportional to the timeline. We will update this document periodically to reflect the status and plans. -## Q2 - 2022 +## Q3 - 2022 At a high level we will focus on: -- Finishing the implementation of [relayer incentivisation](https://github.com/orgs/cosmos/projects/7/views/8). -- Finishing the [refactoring of 02-client](https://github.com/cosmos/ibc-go/milestone/16). -- Finishing the upgrade to Cosmos SDK v0.46 and Tendermint v0.35. -- Implementing and testing the changes needed to support the [transtion to SMT storage](https://github.com/cosmos/ibc-go/milestone/21) in the Cosmos SDK. -- Desiging the implementation and scoping the engineering work for [channel upgradability](https://github.com/cosmos/ibc/blob/master/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md). -- Improving the project's documentation and writing guides for [light client](https://github.com/cosmos/ibc-go/issues/59) and middleware implementation. -- Working on [core backlog issues](https://github.com/cosmos/ibc-go/milestone/8). -- Spending time on expanding and deepening our knowledge of IBC, but also other parts of the Cosmos stack. -- And last, but not least, onboarding new members to the team. +At a high level we will focus on: -For a detail view of each iteration's planned work, please check out our [project board](https://github.com/orgs/cosmos/projects/7). +- Releasing [v4.0.0](https://github.com/cosmos/ibc-go/milestone/26), which includes the ICS-29 Fee Middleware module. +- Finishing and releasing the [refactoring of 02-client](https://github.com/cosmos/ibc-go/milestone/16). This refactor will make the development of light clients easier. +- Starting the implementation of channel upgradability (see [epic](https://github.com/cosmos/ibc-go/issues/1599) and [alpha milestone](https://github.com/cosmos/ibc-go/milestone/29)) with the goal of cutting an alpha1 pre-release by the end of the quarter. Channel upgradability will allow chains to renegotiate an existing channel to take advantage of new features without having to create a new channel, thus preserving all existing packet state processed on the channel. +- Implementing the new [`ORDERED_ALLOW_TIMEOUT` channel type](https://github.com/cosmos/ibc-go/milestone/31) and hopefully releasing it as well. This new channel type will allow packets on an ordered channel to timeout without causing the closure of the channel. -### Release schedule +### Testing and infrastructure -#### **April** +- Adding [automated e2e tests](https://github.com/cosmos/ibc-go/milestone/32) to the repo's CI. -In the first half of the month we will probably cut: +### Documentation and backlog -- Alpha/beta pre-releases with the upgrade to SDK 0.46 and Tendermint v0.35. -- [Alpha](https://github.com/cosmos/ibc-go/milestone/5) pre-release with the implementation of relayer incentivisation. +- Finishing and releasing the upgrade to Cosmos SDK v0.46. +- Writing the [light client implementation guide](https://github.com/cosmos/ibc-go/issues/59). +- Working on [core backlog issues](https://github.com/cosmos/ibc-go/milestone/28). +- Depending on the timeline of the Cosmos SDK, implementing and testing the changes needed to support the [transtion to SMT storage](https://github.com/cosmos/ibc-go/milestone/21). -In the second half, and depending on the date of the final release of Cosmos SDK 0.46, we will probably cut the final release with the upgrade to SDK 0.46 and Tendermint v0.35, and also a [beta](https://github.com/cosmos/ibc-go/milestone/23) pre-release with the implementation of relayer incentivisation. +We have also received a lot of feedback to improve Interchain Accounts and we might also work on a few things, but will depend on priorities and availability. -In the second half of the month we also plan to do a second internal audit of the implementation of relayer incentivisation, and issues will most likely will be created from the audit. Depending on the nature and type of the issues we create, those would be released in a second beta pre-release or in a [release candidate](https://github.com/cosmos/ibc-go/milestone/24). +For a detail view of each iteration's planned work, please check out our [project board](https://github.com/orgs/cosmos/projects/7). -#### **May** +### Release schedule -In the first half we will probably start cutting release candidates with relayer incentivisation and the 02-client refactor. Final release would most likely come out at the end of the month or beginning of June. +#### **July** -#### **June** +We will probably cut at least one more release candidate of v4.0.0 before the final release, which should happen around the end of the month. -We will probably cut at the end of the month or beginning of Q3 patch or minor releases on all the supported release lines with the [small features and core improvements](https://github.com/cosmos/ibc-go/milestone/8) that we work on during the quarter. +For the Rho upgrade of the Cosmos Hub we will also release a new minor version of v3 with SDK 0.46. -## Q3 - 2022 +#### **August** -We will most likely start the implementation of [channel upgradability](https://github.com/cosmos/ibc/blob/master/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md). At the end of Q2 or maybe beginning of Q3 we might also work on designing the implementation and scoping the engineering work to add support for [ordered channels that can timeout](https://github.com/cosmos/ibc/pull/636), and we could potentially work on this feature also in Q3. +In the first half we will probably start cutting release candidates for the 02-client refactor. Final release would most likely come out at the end of the month or beginning of September. -We will also probably do an audit of the implementation of the [CCV application](https://github.com/cosmos/interchain-security/tree/main/x/ccv) for Interchain Security. +#### **September** -### Release schedule +We might cut some pre-releases for the new channel type, and by the end of the month we expect to cut the first alpha pre-release for channel upgradability. + +## Q4 - 2022 -In this quarter we will make the final release to support the migration to SMT storage. \ No newline at end of file +We will continue the implementation and cut the final release of [channel upgradability](https://github.com/cosmos/ibc/blob/master/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md). At the end of Q3 or maybe beginning of Q4 we might also work on designing the implementation and scoping the engineering work to add support for [multihop channels](https://github.com/cosmos/ibc/pull/741/files), so that we could start the implementation of this feature during Q4 (but this is still be decided). diff --git a/docs/versions b/docs/versions index e568f9a716f..7771cabc308 100644 --- a/docs/versions +++ b/docs/versions @@ -1,7 +1,10 @@ +release/v3.1.x v3.1.0 release/v3.0.x v3.0.0 +release/v2.3.x v2.3.0 release/v2.2.x v2.2.0 release/v2.1.x v2.1.0 release/v2.0.x v2.0.0 +release/v1.5.x v1.5.0 release/v1.4.x v1.4.0 release/v1.3.x v1.3.0 release/v1.2.x v1.2.0 diff --git a/e2e/Makefile b/e2e/Makefile new file mode 100644 index 00000000000..95a0fa5b6a2 --- /dev/null +++ b/e2e/Makefile @@ -0,0 +1,13 @@ +DOCKER := $(shell which docker) +TEST_CONTAINERS=$(shell docker ps --filter "label=ibc-test" -a -q) + +cleanup-ibc-test-containers: + for id in $(TEST_CONTAINERS) ; do \ + $(DOCKER) stop $$id ; \ + $(DOCKER) rm $$id ; \ + done + +e2e-test: cleanup-ibc-test-containers + ./scripts/run-e2e.sh $(suite) $(test) + +.PHONY: cleanup-ibc-test-containers e2e-test diff --git a/e2e/README.md b/e2e/README.md new file mode 100644 index 00000000000..4475891db22 --- /dev/null +++ b/e2e/README.md @@ -0,0 +1,316 @@ + +## Table of Contents +1. [How to write tests](#how-to-write-tests) + - a. [Adding a new test](#adding-a-new-test) + - b. [Running tests locally](#running-tests-locally) + - b. [Code samples](#code-samples) + - [Setup](#setup) + - [Creating test users](#creating-test-users) + - [Waiting](#waiting) + - [Query wallet balances](#query-wallet-balances) + - [Broadcasting messages](#broadcasting-messages) + - [Starting the relayer](#starting-the-relayer) + - [Arbitrary commands](#arbitrary-commands) + - [IBC transfer](#ibc-transfer) +2. [Test design](#test-design) + - a. [ibctest](#ibctest) + - b. [CI configuration](#ci-configuration) +3. [Troubleshooting](#troubleshooting) + + +## How to write tests + +### Adding a new test + +All tests should go under the [e2e](https://github.com/cosmos/ibc-go/tree/main/e2e) directory. When adding a new test, either add a new test function +to an existing test suite **_in the same file_**, or create a new test suite in a new file and add test functions there. +New test files should follow the convention of `module_name_test.go`. + +New test suites should be composed of `testsuite.E2ETestSuite`. This type has lots of useful helper functionality that will +be quite common in most tests. + +> Note: see [here](#how-tests-are-run) for details about these requirements. + + +### Running tests locally + +Tests can be run using a Makefile target under the e2e directory. `e2e/Makefile` + +There are several envinronment variables that alter the behaviour of the make target. + +| Environment Variable | Description | Default Value| +| ----------- | ----------- | ----------- | +| SIMD_IMAGE | The image that will be used for simd | ibc-go-simd-e2e | +| SIMD_TAG | The tag used for simd | latest| +| RLY_TAG | The tag used for the go relayer | main| + + +> Note: when running tests locally, **no images are pushed** to the `ghcr.io/cosmos/ibc-go-simd-e2e` registry. +The images which are used only exist on your machine. + +These environment variables allow us to run tests with arbitrary verions (from branches or released) of simd +and the go relayer. + +Every time changes are pushed to a branch or to `main`, a new `simd` image is built and pushed [here](https://github.com/cosmos/ibc-go/pkgs/container/ibc-go-simd-e2e). + + +#### Example Command: + +```sh +export SIMD_IMAGE="ghcr.io/cosmos/ibc-go-simd-e2e" +export SIMD_TAG="pr-1650" +export RLY_TAG="v2.0.0-rc2" +make e2e-test suite=FeeMiddlewareTestSuite test=TestMultiMsg_MsgPayPacketFeeSingleSender +``` + + +> Note: sometimes it can be useful to make changes to [ibctest](https://github.com/strangelove-ventures/ibctest) when running tests locally. In order to do this, add the following line to +e2e/go.mod + +`replace github.com/strangelove-ventures/ibctest => ../ibctest` + +Or point it to any local checkout you have. + +### Code samples + +#### Setup + +Every standard test will start with this. This creates two chains and a relayer, +initializes relayer accounts on both chains, establishes a connection and a channel +between the chains. + +Both chains have started, but the relayer is not yet started. + +The relayer should be started as part of the test if required. See [Starting the Relayer](#starting-the-relayer) + +```go +relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, feeMiddlewareChannelOptions()) +chainA, chainB := s.GetChains() +``` + +#### Creating test users + +There are helper functions to easily create users on both chains. + +```go +chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) +chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) +``` + +#### Waiting + +We can wait for some number of blocks on the specified chains if required. + +```go +chainA, chainB := s.GetChains() +err := test.WaitForBlocks(ctx, 1, chainA, chainB) +s.Require().NoError(err) +``` + +#### Query wallet balances + +We can fetch balances of wallets on specific chains. + +```go +chainABalance, err := s.GetChainANativeBalance(ctx, chainAWallet) +s.Require().NoError(err) +``` + +#### Broadcasting messages + +We can broadcast arbitrary messages which are signed on behalf of users created in the test. + +This example shows a multi message transaction being broadcast on chainA and signed on behalf of chainAWallet. + +```go +relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, feeMiddlewareChannelOptions()) +chainA, chainB := s.GetChains() + +chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) +chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) + +t.Run("broadcast multi message transaction", func(t *testing.T){ + payPacketFeeMsg := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) + transferMsg := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), clienttypes.NewHeight(1, 1000), 0) + resp, err := s.BroadcastMessages(ctx, chainA, chainAWallet, payPacketFeeMsg, transferMsg) + + s.AssertValidTxResponse(resp) + s.Require().NoError(err) +}) +``` + +#### Starting the relayer + +The relayer can be started with the following. + +```go +t.Run("start relayer", func(t *testing.T) { + s.StartRelayer(relayer) +}) +``` + +#### Arbitrary commands + +Arbitrary commands can be executed on a given chain. + +> Note: these commands will be fully configured to run on the chain executed on (home directory, ports configured etc.) + +However, it is preferable to [broadcast messages](#broadcasting-messages) or use a gRPC query if possible. + +```go +stdout, stderr, err := chainA.Exec(ctx, []string{"tx", "..."}, nil) +``` + +#### IBC transfer + +It is possible to send an IBC transfer in two ways. + +Use the ibctest `Chain` interface (this ultimately does a docker exec) + +```go +t.Run("send IBC transfer", func(t *testing.T) { + chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName, walletAmount, nil) + s.Require().NoError(err) + s.Require().NoError(chainATx.Validate(), "chain-a ibc transfer tx is invalid") +}) +``` + +Broadcast a `MsgTransfer`. + +```go +t.Run("send IBC transfer", func(t *testing.T){ + transferMsg := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), clienttypes.NewHeight(1, 1000), 0) + resp, err := s.BroadcastMessages(ctx, chainA, chainAWallet, transferMsg) + s.AssertValidTxResponse(resp) + s.Require().NoError(err) +}) +``` + +## Test design + + +#### ibctest + +These E2E tests use the [ibctest framework](https://github.com/strangelove-ventures/ibctest). This framework creates chains and relayers in containers and allows for arbitrary commands to be executed in the chain containers, +as well as allowing us to broadcast arbitrary messages which are signed on behalf of a user created in the test. + + +#### CI configuration + +There are two main github actions for e2e tests. + +[e2e.yaml](https://github.com/cosmos/ibc-go/blob/main/.github/workflows/e2e.yaml) which runs when collaborators create branches. + +[e2e-fork.yaml](https://github.com/cosmos/ibc-go/blob/main/.github/workflows/e2e-fork.yml) which runs when forks are created. + +In `e2e.yaml`, the `simd` image is built and pushed to [a registry](https://github.com/cosmos/ibc-go/pkgs/container/ibc-go-simd-e2e) and every test +that is run uses the image that was built. + +In `e2e-fork.yaml`, images are not pushed to this registry, but instead remain local to the host runner. + + +### How tests are run + +The tests use the `matrix` feature of Github Actions. The matrix is +dynamically generated using [this command](https://github.com/cosmos/ibc-go/blob/main/cmd/build_test_matrix/main.go). + +> Note: there is currently a limitation that all tests belonging to a test suite must be in the same file. +In order to support test functions spread in different files, we would either need to manually maintain a matrix +or update the script to account for this. The script assumes there is a single test suite per test file to avoid an overly complex +generation process. + +Which looks under the `e2e` directory, and creates a task for each test suite function. + +#### Example + +```go +// e2e/file_one_test.go +package e2e + +func TestFeeMiddlewareTestSuite(t *testing.T) { + suite.Run(t, new(FeeMiddlewareTestSuite)) +} + +type FeeMiddlewareTestSuite struct { + testsuite.E2ETestSuite +} + +func (s *FeeMiddlewareTestSuite) TestA() {} +func (s *FeeMiddlewareTestSuite) TestB() {} +func (s *FeeMiddlewareTestSuite) TestC() {} + +``` + +```go +// e2e/file_two_test.go +package e2e + +func TestTransferTestSuite(t *testing.T) { + suite.Run(t, new(TransferTestSuite)) +} + +type TransferTestSuite struct { + testsuite.E2ETestSuite +} + +func (s *TransferTestSuite) TestD() {} +func (s *TransferTestSuite) TestE() {} +func (s *TransferTestSuite) TestF() {} + +``` + +In the above example, the following would be generated. + +```json +{ + "include": [ + { + "suite": "FeeMiddlewareTestSuite", + "test": "TestA" + }, + { + "suite": "FeeMiddlewareTestSuite", + "test": "TestB" + }, + { + "suite": "FeeMiddlewareTestSuite", + "test": "TestC" + }, + { + "suite": "TransferTestSuite", + "test": "TestD" + }, + { + "suite": "TransferTestSuite", + "test": "TestE" + }, + { + "suite": "TransferTestSuite", + "test": "TestF" + } + ] +} +``` + +This string is used to generate a test matrix in the Github Action that runs the E2E tests. + +All tests will be run on different hosts. + + +#### Misceleneous: + +* Gas fees are set to zero to simply calcuations when asserting account balances. +* When upgrading from e.g. v4 -> v5, in ibc-go, we cannot upgrade the go.mod under `e2e` since v5 will not yet exist. We need to upgrade it in a follow up PR. + +### Troubleshooting + +* On Mac, after running a lot of tests, it can happen that containers start failing. To fix this, you can try clearing existing containers and restarting the docker daemon. + + This generally manifests itself as relayer or simd containers timing out during setup stages of the test. This doesn't happen in CI. + ```bash + # delete all images + docker system prune -af + ``` + This issue doesn't seem to occur on other operating systems. + + diff --git a/e2e/fee_middleware_test.go b/e2e/fee_middleware_test.go new file mode 100644 index 00000000000..80cd7ac69f1 --- /dev/null +++ b/e2e/fee_middleware_test.go @@ -0,0 +1,436 @@ +package e2e + +import ( + "context" + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/strangelove-ventures/ibctest/broadcast" + "github.com/strangelove-ventures/ibctest/chain/cosmos" + "github.com/strangelove-ventures/ibctest/ibc" + "github.com/strangelove-ventures/ibctest/test" + "github.com/stretchr/testify/suite" + + "github.com/cosmos/ibc-go/e2e/testsuite" + "github.com/cosmos/ibc-go/e2e/testvalues" + feetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" + transfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" +) + +func TestFeeMiddlewareTestSuite(t *testing.T) { + suite.Run(t, new(FeeMiddlewareTestSuite)) +} + +type FeeMiddlewareTestSuite struct { + testsuite.E2ETestSuite +} + +// RegisterCounterPartyPayee broadcasts a MsgRegisterCounterpartyPayee message. +func (s *FeeMiddlewareTestSuite) RegisterCounterPartyPayee(ctx context.Context, chain *cosmos.CosmosChain, + user broadcast.User, portID, channelID, relayerAddr, counterpartyPayeeAddr string, +) (sdk.TxResponse, error) { + msg := feetypes.NewMsgRegisterCounterpartyPayee(portID, channelID, relayerAddr, counterpartyPayeeAddr) + return s.BroadcastMessages(ctx, chain, user, msg) +} + +// QueryCounterPartyPayee queries the counterparty payee of the given chain and relayer address on the specified channel. +func (s *FeeMiddlewareTestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Chain, relayerAddress, channelID string) (string, error) { + queryClient := s.GetChainGRCPClients(chain).FeeQueryClient + res, err := queryClient.CounterpartyPayee(ctx, &feetypes.QueryCounterpartyPayeeRequest{ + ChannelId: channelID, + Relayer: relayerAddress, + }) + if err != nil { + return "", err + } + return res.CounterpartyPayee, nil +} + +// PayPacketFeeAsync broadcasts a MsgPayPacketFeeAsync message. +func (s *FeeMiddlewareTestSuite) PayPacketFeeAsync( + ctx context.Context, + chain *cosmos.CosmosChain, + user broadcast.User, + packetID channeltypes.PacketId, + packetFee feetypes.PacketFee, +) (sdk.TxResponse, error) { + msg := feetypes.NewMsgPayPacketFeeAsync(packetID, packetFee) + return s.BroadcastMessages(ctx, chain, user, msg) +} + +// QueryIncentivizedPacketsForChannel queries the incentivized packets on the specified channel. +func (s *FeeMiddlewareTestSuite) QueryIncentivizedPacketsForChannel( + ctx context.Context, + chain *cosmos.CosmosChain, + portId, + channelId string, +) ([]*feetypes.IdentifiedPacketFees, error) { + queryClient := s.GetChainGRCPClients(chain).FeeQueryClient + res, err := queryClient.IncentivizedPacketsForChannel(ctx, &feetypes.QueryIncentivizedPacketsForChannelRequest{ + PortId: portId, + ChannelId: channelId, + }) + if err != nil { + return nil, err + } + return res.IncentivizedPackets, err +} + +func (s *FeeMiddlewareTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Succeeds() { + t := s.T() + ctx := context.TODO() + + relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, feeMiddlewareChannelOptions()) + chainA, chainB := s.GetChains() + + var ( + chainADenom = chainA.Config().Denom + testFee = testvalues.DefaultFee(chainADenom) + chainATx ibc.Tx + payPacketFeeTxResp sdk.TxResponse + ) + + chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) + + t.Run("relayer wallets recovered", func(t *testing.T) { + err := s.RecoverRelayerWallets(ctx, relayer) + s.Require().NoError(err) + }) + + chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(relayer) + t.Run("relayer wallets fetched", func(t *testing.T) { + s.Require().NoError(err) + }) + + s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") + + _, chainBRelayerUser := s.GetRelayerUsers(ctx) + + t.Run("register counter party payee", func(t *testing.T) { + resp, err := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.Address, chainARelayerWallet.Address) + s.Require().NoError(err) + s.AssertValidTxResponse(resp) + }) + + t.Run("verify counter party payee", func(t *testing.T) { + address, err := s.QueryCounterPartyPayee(ctx, chainB, chainBRelayerWallet.Address, channelA.Counterparty.ChannelID) + s.Require().NoError(err) + s.Require().Equal(chainARelayerWallet.Address, address) + }) + + walletAmount := ibc.WalletAmount{ + Address: chainAWallet.Bech32Address(chainB.Config().Bech32Prefix), // destination address + Denom: chainADenom, + Amount: testvalues.IBCTransferAmount, + } + + t.Run("send IBC transfer", func(t *testing.T) { + chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName, walletAmount, nil) + s.Require().NoError(err) + s.Require().NoError(chainATx.Validate(), "chain-a ibc transfer tx is invalid") + }) + + t.Run("tokens are escrowed", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - walletAmount.Amount + s.Require().Equal(expected, actualBalance) + }) + + t.Run("pay packet fee", func(t *testing.T) { + t.Run("no incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1) + packetFee := feetypes.NewPacketFee(testFee, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) + + t.Run("should succeed", func(t *testing.T) { + payPacketFeeTxResp, err = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + s.Require().NoError(err) + s.AssertValidTxResponse(payPacketFeeTxResp) + }) + + t.Run("there should be incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Len(packets, 1) + actualFee := packets[0].PacketFees[0].Fee + + s.Require().True(actualFee.RecvFee.IsEqual(testFee.RecvFee)) + s.Require().True(actualFee.AckFee.IsEqual(testFee.AckFee)) + s.Require().True(actualFee.TimeoutFee.IsEqual(testFee.TimeoutFee)) + }) + + t.Run("balance should be lowered by sum of recv ack and timeout", func(t *testing.T) { + // The balance should be lowered by the sum of the recv, ack and timeout fees. + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - walletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) + }) + + t.Run("start relayer", func(t *testing.T) { + s.StartRelayer(relayer) + }) + + t.Run("packets are relayed", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + t.Run("timeout fee is refunded", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + // once the relayer has relayed the packets, the timeout fee should be refunded. + expected := testvalues.StartingTokenAmount - walletAmount.Amount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) +} + +func (s *FeeMiddlewareTestSuite) TestMultiMsg_MsgPayPacketFeeSingleSender() { + t := s.T() + ctx := context.TODO() + + relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, feeMiddlewareChannelOptions()) + + chainA, chainB := s.GetChains() + + var ( + chainADenom = chainA.Config().Denom + testFee = testvalues.DefaultFee(chainADenom) + multiMsgTxResponse sdk.TxResponse + ) + + transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom) + + chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) + chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) + + t.Run("relayer wallets recovered", func(t *testing.T) { + err := s.RecoverRelayerWallets(ctx, relayer) + s.Require().NoError(err) + }) + + chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(relayer) + t.Run("relayer wallets fetched", func(t *testing.T) { + s.Require().NoError(err) + }) + + s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") + + chainARelayerUser, chainBRelayerUser := s.GetRelayerUsers(ctx) + + relayerAStartingBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) + s.Require().NoError(err) + t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) + + t.Run("register counter party payee", func(t *testing.T) { + multiMsgTxResponse, err = s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.Address, chainARelayerWallet.Address) + s.Require().NoError(err) + s.AssertValidTxResponse(multiMsgTxResponse) + }) + + t.Run("verify counter party payee", func(t *testing.T) { + address, err := s.QueryCounterPartyPayee(ctx, chainB, chainBRelayerWallet.Address, channelA.Counterparty.ChannelID) + s.Require().NoError(err) + s.Require().Equal(chainARelayerWallet.Address, address) + }) + + t.Run("no incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + payPacketFeeMsg := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) + transferMsg := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), clienttypes.NewHeight(1, 1000), 0) + resp, err := s.BroadcastMessages(ctx, chainA, chainAWallet, payPacketFeeMsg, transferMsg) + + t.Run("transfer successful", func(t *testing.T) { + s.AssertValidTxResponse(resp) + s.Require().NoError(err) + }) + + t.Run("there should be incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Len(packets, 1) + actualFee := packets[0].PacketFees[0].Fee + + s.Require().True(actualFee.RecvFee.IsEqual(testFee.RecvFee)) + s.Require().True(actualFee.AckFee.IsEqual(testFee.AckFee)) + s.Require().True(actualFee.TimeoutFee.IsEqual(testFee.TimeoutFee)) + }) + + t.Run("balance should be lowered by sum of recv ack and timeout", func(t *testing.T) { + // The balance should be lowered by the sum of the recv, ack and timeout fees. + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - testFee.Total().AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) + + t.Run("start relayer", func(t *testing.T) { + s.StartRelayer(relayer) + }) + + t.Run("packets are relayed", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + t.Run("timeout fee is refunded", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + // once the relayer has relayed the packets, the timeout fee should be refunded. + expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) + + t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) + s.Require().NoError(err) + expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) +} + +func (s *FeeMiddlewareTestSuite) TestMsgPayPacketFee_SingleSender_TimesOut() { + t := s.T() + ctx := context.TODO() + + relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, feeMiddlewareChannelOptions()) + chainA, chainB := s.GetChains() + + var ( + chainADenom = chainA.Config().Denom + testFee = testvalues.DefaultFee(chainADenom) + chainATx ibc.Tx + payPacketFeeTxResp sdk.TxResponse + ) + + chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) + chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) + + t.Run("relayer wallets recovered", func(t *testing.T) { + s.Require().NoError(s.RecoverRelayerWallets(ctx, relayer)) + }) + + chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(relayer) + t.Run("relayer wallets fetched", func(t *testing.T) { + s.Require().NoError(err) + }) + + _, chainBRelayerUser := s.GetRelayerUsers(ctx) + + t.Run("register counter party payee", func(t *testing.T) { + resp, err := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.Address, chainARelayerWallet.Address) + s.Require().NoError(err) + s.AssertValidTxResponse(resp) + }) + + t.Run("verify counter party payee", func(t *testing.T) { + address, err := s.QueryCounterPartyPayee(ctx, chainB, chainBRelayerWallet.Address, channelA.Counterparty.ChannelID) + s.Require().NoError(err) + s.Require().Equal(chainARelayerWallet.Address, address) + }) + + chainBWalletAmount := ibc.WalletAmount{ + Address: chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), // destination address + Denom: chainA.Config().Denom, + Amount: testvalues.IBCTransferAmount, + } + + t.Run("Send IBC transfer", func(t *testing.T) { + chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName, chainBWalletAmount, testvalues.ImmediatelyTimeout()) + s.Require().NoError(err) + s.Require().NoError(chainATx.Validate(), "source ibc transfer tx is invalid") + time.Sleep(time.Nanosecond * 1) // want it to timeout immediately + }) + + t.Run("tokens are escrowed", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount + s.Require().Equal(expected, actualBalance) + }) + + t.Run("pay packet fee", func(t *testing.T) { + packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1) + packetFee := feetypes.NewPacketFee(testFee, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) + + t.Run("no incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + t.Run("should succeed", func(t *testing.T) { + payPacketFeeTxResp, err = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + s.Require().NoError(err) + s.AssertValidTxResponse(payPacketFeeTxResp) + }) + + t.Run("there should be incentivized packets", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Len(packets, 1) + actualFee := packets[0].PacketFees[0].Fee + + s.Require().True(actualFee.RecvFee.IsEqual(testFee.RecvFee)) + s.Require().True(actualFee.AckFee.IsEqual(testFee.AckFee)) + s.Require().True(actualFee.TimeoutFee.IsEqual(testFee.TimeoutFee)) + }) + + t.Run("balance should be lowered by sum of recv ack and timeout", func(t *testing.T) { + // The balance should be lowered by the sum of the recv, ack and timeout fees. + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) + }) + + t.Run("start relayer", func(t *testing.T) { + s.StartRelayer(relayer) + }) + + t.Run("packets are relayed", func(t *testing.T) { + packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) + s.Require().NoError(err) + s.Require().Empty(packets) + }) + + t.Run("recv and ack should be refunded", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - testFee.TimeoutFee.AmountOf(chainADenom).Int64() + s.Require().Equal(expected, actualBalance) + }) +} + +// feeMiddlewareChannelOptions configures both of the chains to have fee middleware enabled. +func feeMiddlewareChannelOptions() func(options *ibc.CreateChannelOptions) { + return func(opts *ibc.CreateChannelOptions) { + opts.Version = "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}" + opts.DestPortName = "transfer" + opts.SourcePortName = "transfer" + } +} diff --git a/e2e/go.mod b/e2e/go.mod new file mode 100644 index 00000000000..4aad9e35668 --- /dev/null +++ b/e2e/go.mod @@ -0,0 +1,142 @@ +module github.com/cosmos/ibc-go/e2e + +go 1.18 + +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + +require ( + github.com/cosmos/cosmos-sdk v0.45.6 + github.com/cosmos/ibc-go/v4 v4.0.0-rc0 + github.com/docker/docker v20.10.17+incompatible + github.com/strangelove-ventures/ibctest v0.0.0-20220713213153-930886d8db30 + github.com/stretchr/testify v1.8.0 + go.uber.org/zap v1.21.0 + google.golang.org/grpc v1.47.0 +) + +require ( + filippo.io/edwards25519 v1.0.0-beta.2 // indirect + github.com/99designs/keyring v1.1.6 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/DataDog/zstd v1.4.5 // indirect + github.com/Microsoft/go-winio v0.5.1 // indirect + github.com/armon/go-metrics v0.4.0 // indirect + github.com/avast/retry-go/v4 v4.0.4 // indirect + github.com/benbjohnson/clock v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/btcsuite/btcd v0.22.0-beta // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/confio/ics23/go v0.7.0 // indirect + github.com/cosmos/btcutil v1.0.4 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/iavl v0.17.3 // indirect + github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect + github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/danieljoos/wincred v1.0.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgraph-io/badger/v2 v2.2007.2 // indirect + github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/felixge/httpsnoop v1.0.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/gateway v1.1.0 // indirect + github.com/gogo/protobuf v1.3.3 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/google/btree v1.0.0 // indirect + github.com/google/uuid v1.3.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 + github.com/grpc-ecosystem/go-grpc-middleware v1.3.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/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect + github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/rakyll/statik v0.1.7 // indirect + github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect + github.com/regen-network/cosmos-proto v0.3.1 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect + github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.5.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/subosito/gotenv v1.3.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect + github.com/tendermint/btcd v0.1.1 // indirect + github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tendermint/tendermint v0.34.19 // indirect + github.com/tendermint/tm-db v0.6.6 // indirect + github.com/zondax/hid v0.9.0 // indirect + go.etcd.io/bbolt v1.3.6 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.7.0 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect + golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/tools v0.1.10 // indirect + golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + lukechampine.com/uint128 v1.1.1 // indirect + modernc.org/cc/v3 v3.36.0 // indirect + modernc.org/ccgo/v3 v3.16.6 // indirect + modernc.org/libc v1.16.7 // indirect + modernc.org/mathutil v1.4.1 // indirect + modernc.org/memory v1.1.1 // indirect + modernc.org/opt v0.1.1 // indirect + modernc.org/sqlite v1.17.3 // indirect + modernc.org/strutil v1.1.1 // indirect + modernc.org/token v1.0.0 // indirect +) diff --git a/e2e/go.sum b/e2e/go.sum new file mode 100644 index 00000000000..6d00db2a409 --- /dev/null +++ b/e2e/go.sum @@ -0,0 +1,1556 @@ +bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +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 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= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +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/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/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= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= +filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= +github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= +github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +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/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/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= +github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= +github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +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.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/avast/retry-go/v4 v4.0.4 h1:38hLf0DsRXh+hOF6HbTni0+5QGTNdw9zbaMD7KAO830= +github.com/avast/retry-go/v4 v4.0.4/go.mod h1:HqmLvS2VLdStPCGDFjSuZ9pzlTqVRldCI4w2dO4m1Ms= +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 v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +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 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= +github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +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-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +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/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= +github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= +github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= +github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= +github.com/cosmos/cosmos-sdk v0.45.6 h1:bnYLOcDp0cKWMLeUTTJIttq6xxRep52ulPxXC3BCfuQ= +github.com/cosmos/cosmos-sdk v0.45.6/go.mod h1:bPeeVMEtVvH3y3xAGHVbK+/CZlpaazzh77hG8ZrcJpI= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= +github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= +github.com/cosmos/ibc-go/v4 v4.0.0-rc0 h1:zeMr6PNE7L300AcGkrMwRvtp62/RpGc7qU1LwhUcPKc= +github.com/cosmos/ibc-go/v4 v4.0.0-rc0/go.mod h1:4LK+uPycPhebJrJ8ebIqvsMEZ0lVRVNTiEyeI9zfB0U= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= +github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= +github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= +github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= +github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +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.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/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/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.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +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/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= +github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/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.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/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.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +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/martian/v3 v3.2.1/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= +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-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/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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/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.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/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/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.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/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-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-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 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.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/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/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= +github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/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/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +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/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/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/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +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.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +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.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0= +github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.2 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/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +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/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +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/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= +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 v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +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.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +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/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= +github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= +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 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= +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/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/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/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/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.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 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.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/strangelove-ventures/ibctest v0.0.0-20220713213153-930886d8db30 h1:pMhrxU1tY220nxDu6t/gb0H30NG+WYiSJFS5OrcxLFs= +github.com/strangelove-ventures/ibctest v0.0.0-20220713213153-930886d8db30/go.mod h1:aWBeEKU4lGfvJ9qO543zJbQGtB2fK2ffrJh6jbtowEM= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= +github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= +github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= +github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= +github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= +github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/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/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/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/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.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= +github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.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.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +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/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +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.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-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-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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-20190923162816-aa69164e4478/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-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-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-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/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/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/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-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20200124204421-9fbb57f87de9/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-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-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/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 h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +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-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-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-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-20190907020128-2ca718005c18/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-20191112195655-aa38f8e97acc/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-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/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.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +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 h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.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.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +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-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-20200324203455-a04cca1dde73/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-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +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.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.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.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.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/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= +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.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/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/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +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-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 v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +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= +lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.7 h1:qzQtHhsZNpVPpeCu+aMIQldXeV1P0vRhSqCL0nOIJOA= +modernc.org/libc v1.16.7/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.17.3 h1:iE+coC5g17LtByDYDWKpR6m2Z9022YrSh3bumwOnIrI= +modernc.org/sqlite v1.17.3/go.mod h1:10hPVYar9C0kfXuTWGz8s0XtB8uAGymUy51ZzStYe3k= +modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM= +modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/e2e/scripts/run-e2e.sh b/e2e/scripts/run-e2e.sh new file mode 100755 index 00000000000..1e0875c099f --- /dev/null +++ b/e2e/scripts/run-e2e.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -euo pipefail + +SUITE="${1}" +TEST="${2}" +export SIMD_TAG="${SIMD_TAG:-latest}" +export SIMD_IMAGE="${SIMD_IMAGE:-ibc-go-simd-e2e}" + +# In CI, the docker images will be built separately. +# context for building the image is one directory up. +if [ "${CI:-}" != "true" ] +then + (cd ..; docker build . -t "${SIMD_IMAGE}:${SIMD_TAG}") +fi + +go test -v ./ --run ${SUITE} -testify.m ^${TEST}$ diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go new file mode 100644 index 00000000000..46be84e1e58 --- /dev/null +++ b/e2e/testconfig/testconfig.go @@ -0,0 +1,93 @@ +package testconfig + +import ( + "fmt" + "os" + + "github.com/strangelove-ventures/ibctest/ibc" +) + +const ( + DefaultSimdImage = "ghcr.io/cosmos/ibc-go-simd-e2e" + SimdImageEnv = "SIMD_IMAGE" + SimdTagEnv = "SIMD_TAG" + GoRelayerTag = "RLY_TAG" + + defaultRlyTag = "main" +) + +// TestConfig holds various fields used in the E2E tests. +type TestConfig struct { + SimdImage string + SimdTag string + RlyTag string +} + +// FromEnv returns a TestConfig constructed from environment variables. +func FromEnv() TestConfig { + simdImage, ok := os.LookupEnv(SimdImageEnv) + if !ok { + simdImage = DefaultSimdImage + } + + simdTag, ok := os.LookupEnv(SimdTagEnv) + if !ok { + panic(fmt.Sprintf("must specify simd version for test with environment variable [%s]", SimdTagEnv)) + } + + rlyTag, ok := os.LookupEnv(GoRelayerTag) + if !ok { + rlyTag = defaultRlyTag + } + + return TestConfig{ + SimdImage: simdImage, + SimdTag: simdTag, + RlyTag: rlyTag, + } +} + +// ChainOptions stores chain configurations for the chains that will be +// created for the tests. They can be modified by passing ChainOptionConfiguration +// to E2ETestSuite.GetChains. +type ChainOptions struct { + ChainAConfig *ibc.ChainConfig + ChainBConfig *ibc.ChainConfig +} + +// ChainOptionConfiguration enables arbitrary configuration of ChainOptions. +type ChainOptionConfiguration func(options *ChainOptions) + +// DefaultChainOptions returns the default configuration for the chains. +// These options can be configured by passing configuration functions to E2ETestSuite.GetChains. +func DefaultChainOptions() ChainOptions { + tc := FromEnv() + chainACfg := newDefaultSimappConfig(tc, "simapp-a", "chain-a", "atoma") + chainBCfg := newDefaultSimappConfig(tc, "simapp-b", "chain-b", "atomb") + return ChainOptions{ + ChainAConfig: &chainACfg, + ChainBConfig: &chainBCfg, + } +} + +// newDefaultSimappConfig creates an ibc configuration for simd. +func newDefaultSimappConfig(tc TestConfig, name, chainID, denom string) ibc.ChainConfig { + return ibc.ChainConfig{ + Type: "cosmos", + Name: name, + ChainID: chainID, + Images: []ibc.DockerImage{ + { + Repository: tc.SimdImage, + Version: tc.SimdTag, + }, + }, + Bin: "simd", + Bech32Prefix: "cosmos", + Denom: denom, + GasPrices: fmt.Sprintf("0.00%s", denom), + GasAdjustment: 1.3, + TrustingPeriod: "508h", + NoHostMount: false, + } +} diff --git a/e2e/testsuite/relayer.go b/e2e/testsuite/relayer.go new file mode 100644 index 00000000000..9e9c5ccafe6 --- /dev/null +++ b/e2e/testsuite/relayer.go @@ -0,0 +1,24 @@ +package testsuite + +import ( + "testing" + + dockerclient "github.com/docker/docker/client" + "github.com/strangelove-ventures/ibctest" + "github.com/strangelove-ventures/ibctest/ibc" + "github.com/strangelove-ventures/ibctest/relayer" + "go.uber.org/zap" + + "github.com/cosmos/ibc-go/e2e/testconfig" +) + +const ( + cosmosRelayerRepository = "ghcr.io/cosmos/relayer" +) + +// newCosmosRelayer returns an instance of the go relayer. +func newCosmosRelayer(t *testing.T, tc testconfig.TestConfig, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { + return ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, relayer.CustomDockerImage(cosmosRelayerRepository, tc.RlyTag)).Build( + t, dockerClient, network, + ) +} diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go new file mode 100644 index 00000000000..952ef853fc6 --- /dev/null +++ b/e2e/testsuite/testsuite.go @@ -0,0 +1,340 @@ +package testsuite + +import ( + "context" + "fmt" + "io/ioutil" + + "strings" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + dockerclient "github.com/docker/docker/client" + "github.com/strangelove-ventures/ibctest" + "github.com/strangelove-ventures/ibctest/broadcast" + "github.com/strangelove-ventures/ibctest/chain/cosmos" + "github.com/strangelove-ventures/ibctest/ibc" + "github.com/strangelove-ventures/ibctest/test" + "github.com/strangelove-ventures/ibctest/testreporter" + "github.com/stretchr/testify/suite" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "github.com/cosmos/ibc-go/e2e/testconfig" + feetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" +) + +const ( + // ChainARelayerName is the name given to the relayer wallet on ChainA + ChainARelayerName = "rlyA" + // ChainBRelayerName is the name given to the relayer wallet on ChainB + ChainBRelayerName = "rlyB" +) + +// E2ETestSuite has methods and functionality which can be shared among all test suites. +type E2ETestSuite struct { + suite.Suite + + grpcClients map[string]GRPCClients + paths map[string]path + logger *zap.Logger + DockerClient *dockerclient.Client + network string + startRelayerFn func(relayer ibc.Relayer) +} + +// GRPCClients holds a reference to any GRPC clients that are needed by the tests. +// These should typically be used for query clients only. If we need to make changes, we should +// use E2ETestSuite.BroadcastMessages to broadcast transactions instead. +type GRPCClients struct { + FeeQueryClient feetypes.QueryClient +} + +// path is a pairing of two chains which will be used in a test. +type path struct { + chainA, chainB *cosmos.CosmosChain +} + +// newPath returns a path built from the given chains. +func newPath(chainA, chainB *cosmos.CosmosChain) path { + return path{ + chainA: chainA, + chainB: chainB, + } +} + +// GetRelayerUsers returns two ibctest.User instances which can be used for the relayer users +// on the two chains. +func (s *E2ETestSuite) GetRelayerUsers(ctx context.Context, chainOpts ...testconfig.ChainOptionConfiguration) (*ibctest.User, *ibctest.User) { + chainA, chainB := s.GetChains(chainOpts...) + chainAAccountBytes, err := chainA.GetAddress(ctx, ChainARelayerName) + s.Require().NoError(err) + + chainBAccountBytes, err := chainB.GetAddress(ctx, ChainBRelayerName) + s.Require().NoError(err) + + chainARelayerUser := ibctest.User{ + Address: chainAAccountBytes, + KeyName: ChainARelayerName, + } + + chainBRelayerUser := ibctest.User{ + Address: chainBAccountBytes, + KeyName: ChainBRelayerName, + } + return &chainARelayerUser, &chainBRelayerUser +} + +// SetupChainsRelayerAndChannel create two chains, a relayer, establishes a connection and creates a channel +// using the given channel options. The relayer returned by this function has not yet started. It should be started +// with E2ETestSuite.StartRelayer if needed. +// This should be called at the start of every test, unless fine grained control is required. +func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channelOpts ...func(*ibc.CreateChannelOptions)) (ibc.Relayer, ibc.ChannelOutput) { + chainA, chainB := s.GetChains() + home, err := ioutil.TempDir("", "") + s.Require().NoError(err) + + r := newCosmosRelayer(s.T(), testconfig.FromEnv(), s.logger, s.DockerClient, s.network) + + pathName := fmt.Sprintf("%s-path", s.T().Name()) + pathName = strings.ReplaceAll(pathName, "/", "-") + + ic := ibctest.NewInterchain(). + AddChain(chainA). + AddChain(chainB). + AddRelayer(r, "r"). + AddLink(ibctest.InterchainLink{ + Chain1: chainA, + Chain2: chainB, + Relayer: r, + Path: pathName, + }) + + channelOptions := ibc.DefaultChannelOpts() + for _, opt := range channelOpts { + opt(&channelOptions) + } + + eRep := s.getRelayerExecReporter() + s.Require().NoError(ic.Build(ctx, eRep, ibctest.InterchainBuildOptions{ + TestName: s.T().Name(), + HomeDir: home, + Client: s.DockerClient, + NetworkID: s.network, + CreateChannelOpts: channelOptions, + })) + + s.startRelayerFn = func(relayer ibc.Relayer) { + err := relayer.StartRelayer(ctx, eRep, pathName) + s.Require().NoError(err, fmt.Sprintf("failed to start relayer: %s", err)) + s.T().Cleanup(func() { + if !s.T().Failed() { + if err := relayer.StopRelayer(ctx, eRep); err != nil { + s.T().Logf("error stopping relayer: %v", err) + } + } + }) + // wait for relayer to start. + time.Sleep(time.Second * 10) + } + + s.initGRPCClients(chainA) + s.initGRPCClients(chainB) + + chainAChannels, err := r.GetChannels(ctx, eRep, chainA.Config().ChainID) + s.Require().NoError(err) + return r, chainAChannels[len(chainAChannels)-1] +} + +// GetChains returns two chains that can be used in a test. The pair returned +// is unique to the current test being run. Note: this function does not create containers. +func (s *E2ETestSuite) GetChains(chainOpts ...testconfig.ChainOptionConfiguration) (*cosmos.CosmosChain, *cosmos.CosmosChain) { + if s.paths == nil { + s.paths = map[string]path{} + } + + path, ok := s.paths[s.T().Name()] + if ok { + return path.chainA, path.chainB + } + + chainOptions := testconfig.DefaultChainOptions() + for _, opt := range chainOpts { + opt(&chainOptions) + } + + chainA, chainB := s.createCosmosChains(chainOptions) + path = newPath(chainA, chainB) + s.paths[s.T().Name()] = path + + return path.chainA, path.chainB +} + +// BroadcastMessages broadcasts the provided messages to the given chain and signs them on behalf of the provided user. +// Once the broadcast response is returned, we wait for a few blocks to be created on both chain A and chain B. +func (s *E2ETestSuite) BroadcastMessages(ctx context.Context, chain *cosmos.CosmosChain, user broadcast.User, msgs ...sdk.Msg) (sdk.TxResponse, error) { + broadcaster := cosmos.NewBroadcaster(s.T(), chain) + resp, err := ibctest.BroadcastTx(ctx, broadcaster, user, msgs...) + if err != nil { + return sdk.TxResponse{}, err + } + + chainA, chainB := s.GetChains() + err = test.WaitForBlocks(ctx, 2, chainA, chainB) + return resp, err +} + +// GetRelayerWallets returns the relayer wallets associated with the chains. +func (s *E2ETestSuite) GetRelayerWallets(relayer ibc.Relayer) (ibc.RelayerWallet, ibc.RelayerWallet, error) { + chainA, chainB := s.GetChains() + chainARelayerWallet, ok := relayer.GetWallet(chainA.Config().ChainID) + if !ok { + return ibc.RelayerWallet{}, ibc.RelayerWallet{}, fmt.Errorf("unable to find chain A relayer wallet") + } + + chainBRelayerWallet, ok := relayer.GetWallet(chainB.Config().ChainID) + if !ok { + return ibc.RelayerWallet{}, ibc.RelayerWallet{}, fmt.Errorf("unable to find chain B relayer wallet") + } + return chainARelayerWallet, chainBRelayerWallet, nil +} + +// RecoverRelayerWallets adds the corresponding relayer address to the keychain of the chain. +// This is useful if commands executed on the chains expect the relayer information to present in the keychain. +func (s *E2ETestSuite) RecoverRelayerWallets(ctx context.Context, relayer ibc.Relayer) error { + chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(relayer) + if err != nil { + return err + } + + chainA, chainB := s.GetChains() + + if err := chainA.RecoverKey(ctx, ChainARelayerName, chainARelayerWallet.Mnemonic); err != nil { + return fmt.Errorf("could not recover relayer wallet on chain A: %s", err) + } + if err := chainB.RecoverKey(ctx, ChainBRelayerName, chainBRelayerWallet.Mnemonic); err != nil { + return fmt.Errorf("could not recover relayer wallet on chain B: %s", err) + } + return nil +} + +// StartRelayer starts the given relayer. +func (s *E2ETestSuite) StartRelayer(relayer ibc.Relayer) { + if s.startRelayerFn == nil { + panic("cannot start relayer before it is created!") + } + + s.startRelayerFn(relayer) +} + +// CreateUserOnChainA creates a user with the given amount of funds on chain A. +func (s *E2ETestSuite) CreateUserOnChainA(ctx context.Context, amount int64) *ibctest.User { + chainA, _ := s.GetChains() + return ibctest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainA)[0] +} + +// CreateUserOnChainB creates a user with the given amount of funds on chain B. +func (s *E2ETestSuite) CreateUserOnChainB(ctx context.Context, amount int64) *ibctest.User { + _, chainB := s.GetChains() + return ibctest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainB)[0] +} + +// GetChainANativeBalance gets the balance of a given user on chain A. +func (s *E2ETestSuite) GetChainANativeBalance(ctx context.Context, user *ibctest.User) (int64, error) { + chainA, _ := s.GetChains() + return GetNativeChainBalance(ctx, chainA, user) +} + +// GetChainBNativeBalance gets the balance of a given user on chain B. +func (s *E2ETestSuite) GetChainBNativeBalance(ctx context.Context, user *ibctest.User) (int64, error) { + _, chainB := s.GetChains() + return GetNativeChainBalance(ctx, chainB, user) +} + +// GetChainGRCPClients gets the GRPC clients associated with the given chain. +func (s *E2ETestSuite) GetChainGRCPClients(chain ibc.Chain) GRPCClients { + cs, ok := s.grpcClients[chain.Config().ChainID] + s.Require().True(ok, "chain %s does not have GRPC clients", chain.Config().ChainID) + return cs +} + +// initGRPCClients establishes GRPC clients with the given chain. +// The created GRPCClients can be retrieved with GetChainGRCPClients. +func (s *E2ETestSuite) initGRPCClients(chain *cosmos.CosmosChain) { + // Create a connection to the gRPC server. + grpcConn, err := grpc.Dial( + chain.GetHostGRPCAddress(), + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + s.Require().NoError(err) + s.T().Cleanup(func() { + if err := grpcConn.Close(); err != nil { + s.T().Logf("failed closing GRPC connection to chain %s: %s", chain.Config().ChainID, err) + } + }) + + if s.grpcClients == nil { + s.grpcClients = make(map[string]GRPCClients) + } + + s.grpcClients[chain.Config().ChainID] = GRPCClients{ + FeeQueryClient: feetypes.NewQueryClient(grpcConn), + } +} + +// AssertValidTxResponse verifies that an sdk.TxResponse +// has non-empty values. +func (s *E2ETestSuite) AssertValidTxResponse(resp sdk.TxResponse) { + respLogsMsg := resp.Logs.String() + s.Require().NotEqual(int64(0), resp.GasUsed, respLogsMsg) + s.Require().NotEqual(int64(0), resp.GasWanted, respLogsMsg) + s.Require().NotEmpty(resp.Events, respLogsMsg) + s.Require().NotEmpty(resp.Data, respLogsMsg) +} + +// createCosmosChains creates two separate chains in docker containers. +// test and can be retrieved with GetChains. +func (s *E2ETestSuite) createCosmosChains(chainOptions testconfig.ChainOptions) (*cosmos.CosmosChain, *cosmos.CosmosChain) { + ctx := context.Background() + client, network := ibctest.DockerSetup(s.T()) + + s.logger = zap.NewExample() + s.DockerClient = client + s.network = network + + logger := zaptest.NewLogger(s.T()) + + // TODO(chatton): allow for controller over number of validators and full nodes. + chainA := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainAConfig, 1, 0, logger) + chainB := cosmos.NewCosmosChain(s.T().Name(), *chainOptions.ChainBConfig, 1, 0, logger) + + s.T().Cleanup(func() { + if !s.T().Failed() { + for _, c := range []*cosmos.CosmosChain{chainA, chainB} { + if err := c.Cleanup(ctx); err != nil { + s.T().Logf("Chain cleanup for %s failed: %v", c.Config().ChainID, err) + } + } + } + }) + + return chainA, chainB +} + +// getRelayerExecReporter returns a testreporter.RelayerExecReporter instances +// using the current test's testing.T. +func (s *E2ETestSuite) getRelayerExecReporter() *testreporter.RelayerExecReporter { + rep := testreporter.NewNopReporter() + return rep.RelayerExecReporter(s.T()) +} + +// GetNativeChainBalance returns the balance of a specific user on a chain using the native denom. +func GetNativeChainBalance(ctx context.Context, chain ibc.Chain, user *ibctest.User) (int64, error) { + bal, err := chain.GetBalance(ctx, user.Bech32Address(chain.Config().Bech32Prefix), chain.Config().Denom) + if err != nil { + return -1, err + } + return bal, nil +} diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go new file mode 100644 index 00000000000..ce11c09bc98 --- /dev/null +++ b/e2e/testvalues/values.go @@ -0,0 +1,32 @@ +package testvalues + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/strangelove-ventures/ibctest/ibc" + + feetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" +) + +const ( + StartingTokenAmount int64 = 10_000_000 + IBCTransferAmount int64 = 10_000 +) + +// ImmediatelyTimeout returns an ibc.IBCTimeout which will cause an IBC transfer to timeout immediately. +func ImmediatelyTimeout() *ibc.IBCTimeout { + return &ibc.IBCTimeout{ + NanoSeconds: 1, + } +} + +func DefaultFee(denom string) feetypes.Fee { + return feetypes.Fee{ + RecvFee: sdk.NewCoins(sdk.NewCoin(denom, sdk.NewInt(50))), + AckFee: sdk.NewCoins(sdk.NewCoin(denom, sdk.NewInt(25))), + TimeoutFee: sdk.NewCoins(sdk.NewCoin(denom, sdk.NewInt(10))), + } +} + +func DefaultTransferAmount(denom string) sdk.Coin { + return sdk.Coin{Denom: denom, Amount: sdk.NewInt(IBCTransferAmount)} +} diff --git a/go.mod b/go.mod index 225f608d60f..ff3aff1b5e5 100644 --- a/go.mod +++ b/go.mod @@ -1,122 +1,150 @@ -go 1.17 +go 1.18 -module github.com/cosmos/ibc-go/v3 +module github.com/cosmos/ibc-go/v5 replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 require ( - github.com/armon/go-metrics v0.3.10 + cosmossdk.io/math v1.0.0-beta.3 + github.com/armon/go-metrics v0.4.0 github.com/confio/ics23/go v0.7.0 - github.com/cosmos/cosmos-sdk v0.45.4 + github.com/cosmos/cosmos-sdk v0.46.0 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 - github.com/spf13/cast v1.4.1 - github.com/spf13/cobra v1.4.0 - github.com/spf13/viper v1.11.0 - github.com/stretchr/testify v1.7.1 - github.com/tendermint/tendermint v0.34.19 - github.com/tendermint/tm-db v0.6.6 - google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac - google.golang.org/grpc v1.45.0 - google.golang.org/protobuf v1.28.0 + github.com/spf13/cast v1.5.0 + github.com/spf13/cobra v1.5.0 + github.com/spf13/viper v1.12.0 + github.com/stretchr/testify v1.8.0 + github.com/tendermint/tendermint v0.34.20 + github.com/tendermint/tm-db v0.6.7 + google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 ) +require github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect + require ( - filippo.io/edwards25519 v1.0.0-beta.2 // indirect - github.com/99designs/keyring v1.1.6 // indirect + cloud.google.com/go v0.100.2 // indirect + cloud.google.com/go/compute v1.6.1 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/storage v1.14.0 // indirect + cosmossdk.io/errors v1.0.0-beta.7 // indirect + filippo.io/edwards25519 v1.0.0-rc.1 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/DataDog/zstd v1.4.5 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect + github.com/aws/aws-sdk-go v1.40.45 // 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.0 // indirect - github.com/btcsuite/btcd v0.22.0-beta // indirect + github.com/btcsuite/btcd v0.22.1 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cosmos/btcutil v1.0.4 // indirect + github.com/cosmos/cosmos-proto v1.0.0-alpha7 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/iavl v0.17.3 // indirect + github.com/cosmos/gorocksdb v1.2.0 // indirect + github.com/cosmos/iavl v0.19.0 // indirect github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect - github.com/danieljoos/wincred v1.0.2 // 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.2 // indirect - github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/gin-gonic/gin v1.7.0 // indirect github.com/go-kit/kit v0.12.0 // indirect - github.com/go-kit/log v0.2.0 // indirect + github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/gateway v1.1.0 // indirect - github.com/golang/snappy v0.0.3 // indirect - github.com/google/btree v1.0.0 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/googleapis/gax-go/v2 v2.4.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.6.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-version v1.4.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect - github.com/improbable-eng/grpc-web v0.14.1 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.13.6 // indirect - github.com/lib/pq v1.10.4 // indirect - github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/klauspost/compress v1.15.1 // indirect + github.com/lib/pq v1.10.6 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/go-testing-interface v1.0.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect - github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/common v0.34.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.23.0 // indirect + github.com/rs/zerolog v1.27.0 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/spf13/afero v1.8.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.2.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect + github.com/subosito/gotenv v1.4.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tendermint/btcd v0.1.1 // indirect github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/zondax/hid v0.9.0 // indirect + github.com/ulikunitz/xz v0.5.8 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect - golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect - golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect + golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect golang.org/x/text v0.3.7 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + google.golang.org/api v0.81.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 5a51d87749c..fd45281f132 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,22 @@ -bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= 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.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= 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.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -28,7 +32,9 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= @@ -36,81 +42,96 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf 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/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= +cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= +cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= +cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= +cosmossdk.io/math v1.0.0-beta.3/go.mod h1:3LYasri3Zna4XpbrTNdKsWmD5fHHkaNAod/mNT9XdE4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= -filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= -github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= -github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= +filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= +git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= +github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= 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/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= 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/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= -github.com/adlio/schema v1.3.0 h1:eSVYLxYWbm/6ReZBCkLw4Fz7uqC+ZNoPvA39bOwi52A= -github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -119,44 +140,77 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= 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/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= 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.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= +github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= +github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +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/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -171,11 +225,17 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/buf v1.4.0/go.mod h1:mwHG7klTHnX+rM/ym8LXGl7vYpVmnwT96xWoRB4H5QI= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= 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/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -184,17 +244,20 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= +github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= 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= @@ -205,37 +268,45 @@ 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/cncf/xds/go v0.0.0-20211130200136-a8f946100490/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/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= -github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= +github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= +github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.2.1 h1:/EeEo2EtN3umhbbgCveyjifoMYg0pS+nMMEemaYw634= -github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +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/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.45.4 h1:eStDAhJdMY8n5arbBRe+OwpNeBSunxSBHp1g55ulfdA= -github.com/cosmos/cosmos-sdk v0.45.4/go.mod h1:WOqtDxN3eCCmnYLVla10xG7lEXkFjpTaqm2a2WasgCc= +github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= +github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= +github.com/cosmos/cosmos-sdk v0.46.0 h1:TwifvVmAmqUNB70tN1clrqExryWyBU3RxbI2QZEJUJY= +github.com/cosmos/cosmos-sdk v0.46.0/go.mod h1:u6Ci6+V+srijJhzctEEPYBygUz3O2YXP5ZijPnV6mt0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= -github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= +github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= +github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= +github.com/cosmos/iavl v0.19.0 h1:sgyrjqOkycXiN7Tuupuo4QAldKFg7Sipyfeg/IL7cps= +github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -244,48 +315,67 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/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/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= +github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +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 v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -297,24 +387,29 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -322,17 +417,29 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= 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.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -342,14 +449,18 @@ github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgO 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.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +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.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -358,12 +469,26 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/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= @@ -373,19 +498,27 @@ github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/E 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/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/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= @@ -397,6 +530,7 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -418,12 +552,27 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= 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= @@ -436,15 +585,18 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz 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.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/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 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/martian/v3 v3.2.1/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= @@ -454,28 +606,40 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -484,23 +648,33 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z 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.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/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/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= 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= @@ -510,17 +684,20 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= 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-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.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= +github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= @@ -531,20 +708,28 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= 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.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= +github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.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.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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= @@ -558,36 +743,70 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= -github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= +github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= 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/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= -github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/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 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= -github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753 h1:uFlcJKZPLQd7rmOY/RrvBuUaYmAFnlFHKLivhO6cOy8= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 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= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -600,64 +819,100 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.2/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.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= +github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 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/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.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/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0/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.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= 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.5-0.20180830101745-3fb116b82035/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.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -666,13 +921,25 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -680,19 +947,28 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -701,13 +977,21 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb 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/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 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/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -723,48 +1007,55 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= +github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= -github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= 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.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= @@ -774,54 +1065,70 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= 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/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= 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 v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= 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 v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -831,30 +1138,39 @@ github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.19/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -864,44 +1180,66 @@ github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzy github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= +github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= +github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= 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/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +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/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -911,14 +1249,15 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -927,15 +1266,13 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn 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.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= -github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -943,22 +1280,31 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -966,63 +1312,109 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= -github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= -github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= +github.com/tendermint/tendermint v0.34.20 h1:/pmvJhO3IqOxhbi8iRXudTjA2YKpaMqrLwFNkyxDSzw= +github.com/tendermint/tendermint v0.34.20/go.mod h1:KtOwCLYJcsS1ymtAfnjjAtXfXClbqcqjdqzFt2Em1Ac= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= -github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= -github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= +github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -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 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= +github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= +github.com/valyala/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/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= +github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.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= @@ -1031,6 +1423,7 @@ 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.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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= @@ -1039,16 +1432,22 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1069,22 +1468,27 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-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-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= 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= @@ -1093,6 +1497,7 @@ 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/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1110,23 +1515,23 @@ golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPI 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/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= 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.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/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= @@ -1138,7 +1543,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1146,6 +1550,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1163,32 +1568,37 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R 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-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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-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-20210220033124-5f55cee0dc0d/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-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1208,11 +1618,13 @@ golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1220,6 +1632,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1241,10 +1654,11 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1254,10 +1668,10 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/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= @@ -1278,14 +1692,14 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1295,42 +1709,64 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/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-20210420205809-ac73e9fd8988/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-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 h1:CBpWXWQpIRjzmkkA+M7q9Fqnwd2mZr3AFqexg8YTfoM= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1346,6 +1782,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb 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-20200416051211-89c76fbcd5d1/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.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1353,33 +1791,44 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190228203856-589c23e65e65/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1389,40 +1838,71 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/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-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1430,6 +1910,7 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1457,33 +1938,45 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0 h1:o8WF5AvfidafWbFjsRyupxyEQJNUWxLZJCK5NXrxZZ8= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/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= @@ -1501,12 +1994,13 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1538,10 +2032,11 @@ google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= @@ -1549,8 +2044,15 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.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.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1561,11 +2063,13 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -1585,10 +2089,12 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1600,27 +2106,31 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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.25.1-0.20200805231151-a709e31e5d12/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.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/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-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= 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/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1634,14 +2144,19 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-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= @@ -1650,12 +2165,23 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= +pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= 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= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +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/modules/apps/27-interchain-accounts/client/cli/cli.go b/modules/apps/27-interchain-accounts/client/cli/cli.go index 95b49f29e2a..ef15f82c301 100644 --- a/modules/apps/27-interchain-accounts/client/cli/cli.go +++ b/modules/apps/27-interchain-accounts/client/cli/cli.go @@ -3,8 +3,8 @@ package cli import ( "github.com/spf13/cobra" - controllercli "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/client/cli" - hostcli "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/client/cli" + controllercli "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/client/cli" + hostcli "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/client/cli" ) // GetQueryCmd returns the query commands for the interchain-accounts submodule diff --git a/modules/apps/27-interchain-accounts/controller/client/cli/query.go b/modules/apps/27-interchain-accounts/controller/client/cli/query.go index 9a939906b90..4b53a21cae4 100644 --- a/modules/apps/27-interchain-accounts/controller/client/cli/query.go +++ b/modules/apps/27-interchain-accounts/controller/client/cli/query.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" ) // GetCmdParams returns the command handler for the controller submodule parameter querying. diff --git a/modules/apps/27-interchain-accounts/controller/ibc_module.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go similarity index 52% rename from modules/apps/27-interchain-accounts/controller/ibc_module.go rename to modules/apps/27-interchain-accounts/controller/ibc_middleware.go index 325ec70959b..ac95683a405 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_module.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -5,35 +5,38 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) -// IBCModule implements the ICS26 interface for interchain accounts controller chains -type IBCModule struct { - keeper keeper.Keeper +var _ porttypes.Middleware = &IBCMiddleware{} + +// IBCMiddleware implements the ICS26 callbacks for the fee middleware given the +// ICA controller keeper and the underlying application. +type IBCMiddleware struct { app porttypes.IBCModule + keeper keeper.Keeper } -// NewIBCModule creates a new IBCModule given the associated keeper and underlying application -func NewIBCModule(k keeper.Keeper, app porttypes.IBCModule) IBCModule { - return IBCModule{ - keeper: k, +// IBCMiddleware creates a new IBCMiddleware given the associated keeper and underlying application +func NewIBCMiddleware(app porttypes.IBCModule, k keeper.Keeper) IBCMiddleware { + return IBCMiddleware{ app: app, + keeper: k, } } -// OnChanOpenInit implements the IBCModule interface +// OnChanOpenInit implements the IBCMiddleware interface // // Interchain Accounts is implemented to act as middleware for connected authentication modules on // the controller side. The connected modules may not change the controller side portID or // version. They will be allowed to perform custom logic without changing // the parameters stored within a channel struct. -func (im IBCModule) OnChanOpenInit( +func (im IBCMiddleware) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -42,22 +45,28 @@ func (im IBCModule) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { if !im.keeper.IsControllerEnabled(ctx) { - return types.ErrControllerSubModuleDisabled + return "", types.ErrControllerSubModuleDisabled } - if err := im.keeper.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, version); err != nil { - return err + version, err := im.keeper.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, version) + if err != nil { + return "", err + } + + // call underlying app's OnChanOpenInit callback with the passed in version + // the version returned is discarded as the ica-auth module does not have permission to edit the version string. + // ics27 will always return the version string containing the Metadata struct which is created during the `RegisterInterchainAccount` call. + if _, err := im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, version); err != nil { + return "", err } - // call underlying app's OnChanOpenInit callback with the appVersion - return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, - chanCap, counterparty, version) + return version, nil } -// OnChanOpenTry implements the IBCModule interface -func (im IBCModule) OnChanOpenTry( +// OnChanOpenTry implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -70,13 +79,13 @@ func (im IBCModule) OnChanOpenTry( return "", sdkerrors.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } -// OnChanOpenAck implements the IBCModule interface +// OnChanOpenAck implements the IBCMiddleware interface // // Interchain Accounts is implemented to act as middleware for connected authentication modules on // the controller side. The connected modules may not change the portID or // version. They will be allowed to perform custom logic without changing // the parameters stored within a channel struct. -func (im IBCModule) OnChanOpenAck( +func (im IBCMiddleware) OnChanOpenAck( ctx sdk.Context, portID, channelID string, @@ -95,8 +104,8 @@ func (im IBCModule) OnChanOpenAck( return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) } -// OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenConfirm( +// OnChanOpenAck implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenConfirm( ctx sdk.Context, portID, channelID string, @@ -104,8 +113,8 @@ func (im IBCModule) OnChanOpenConfirm( return sdkerrors.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } -// OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( +// OnChanCloseInit implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -114,8 +123,8 @@ func (im IBCModule) OnChanCloseInit( return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "user cannot close channel") } -// OnChanCloseConfirm implements the IBCModule interface -func (im IBCModule) OnChanCloseConfirm( +// OnChanCloseConfirm implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, @@ -123,17 +132,20 @@ func (im IBCModule) OnChanCloseConfirm( return im.keeper.OnChanCloseConfirm(ctx, portID, channelID) } -// OnRecvPacket implements the IBCModule interface -func (im IBCModule) OnRecvPacket( +// OnRecvPacket implements the IBCMiddleware interface +func (im IBCMiddleware) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress, ) ibcexported.Acknowledgement { - return channeltypes.NewErrorAcknowledgement("cannot receive packet on controller chain") + err := sdkerrors.Wrapf(icatypes.ErrInvalidChannelFlow, "cannot receive packet on controller chain") + ack := channeltypes.NewErrorAcknowledgement(err) + keeper.EmitAcknowledgementEvent(ctx, packet, ack, err) + return ack } -// OnAcknowledgementPacket implements the IBCModule interface -func (im IBCModule) OnAcknowledgementPacket( +// OnAcknowledgementPacket implements the IBCMiddleware interface +func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, @@ -147,8 +159,8 @@ func (im IBCModule) OnAcknowledgementPacket( return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) } -// OnTimeoutPacket implements the IBCModule interface -func (im IBCModule) OnTimeoutPacket( +// OnTimeoutPacket implements the IBCMiddleware interface +func (im IBCMiddleware) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, @@ -164,7 +176,26 @@ func (im IBCModule) OnTimeoutPacket( return im.app.OnTimeoutPacket(ctx, packet, relayer) } +// SendPacket implements the ICS4 Wrapper interface +func (im IBCMiddleware) SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet ibcexported.PacketI, +) error { + panic("SendPacket not supported for ICA controller module. Please use SendTx") +} + +// WriteAcknowledgement implements the ICS4 Wrapper interface +func (im IBCMiddleware) WriteAcknowledgement( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet ibcexported.PacketI, + ack ibcexported.Acknowledgement, +) error { + panic("WriteAcknowledgement not supported for ICA controller module") +} + // GetAppVersion returns the interchain accounts metadata. -func (im IBCModule) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { +func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { return im.keeper.GetAppVersion(ctx, portID, channelID) } diff --git a/modules/apps/27-interchain-accounts/controller/ibc_module_test.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go similarity index 91% rename from modules/apps/27-interchain-accounts/controller/ibc_module_test.go rename to modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go index 608996515c1..4c7b46969bb 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go @@ -9,29 +9,29 @@ import ( "github.com/stretchr/testify/suite" "github.com/tendermint/tendermint/crypto" - icacontroller "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + fee "github.com/cosmos/ibc-go/v5/modules/apps/29-fee" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( // TODO: Cosmos-SDK ADR-28: Update crypto.AddressHash() when sdk uses address.Module() // https://github.com/cosmos/cosmos-sdk/issues/10225 // - // TestAccAddress defines a resuable bech32 address for testing purposes + // TestAccAddress defines a reusable bech32 address for testing purposes TestAccAddress = icatypes.GenerateAddress(sdk.AccAddress(crypto.AddressHash([]byte(icatypes.ModuleName))), ibctesting.FirstConnectionID, TestPortID) // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" - // TestPortID defines a resuable port identifier for testing purposes + // TestPortID defines a reusable port identifier for testing purposes TestPortID, _ = icatypes.NewControllerPortID(TestOwnerAddress) - // TestVersion defines a resuable interchainaccounts version string for testing purposes + // TestVersion defines a reusable interchainaccounts version string for testing purposes TestVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, @@ -83,7 +83,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { return err } @@ -120,9 +120,7 @@ func SetupICAPath(path *ibctesting.Path, owner string) error { } func (suite *InterchainAccountsTestSuite) TestOnChanOpenInit() { - var ( - channel *channeltypes.Channel - ) + var channel *channeltypes.Channel testCases := []struct { name string @@ -132,6 +130,18 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenInit() { { "success", func() {}, true, }, + { + "ICA auth module modification of channel version is ignored", func() { + // NOTE: explicitly modify the channel version via the auth module callback, + // ensuring the expected JSON encoded metadata is not modified upon return + suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnChanOpenInit = func(ctx sdk.Context, order channeltypes.Order, connectionHops []string, + portID, channelID string, chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, version string, + ) (string, error) { + return "invalid-version", nil + } + }, true, + }, { "controller submodule disabled", func() { suite.chainA.GetSimApp().ICAControllerKeeper.SetParams(suite.chainA.GetContext(), types.NewParams(false)) @@ -147,8 +157,8 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenInit() { suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnChanOpenInit = func(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, - ) error { - return fmt.Errorf("mock ica auth fails") + ) (string, error) { + return "", fmt.Errorf("mock ica auth fails") } }, false, }, @@ -197,11 +207,12 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenInit() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - err = cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), + version, err := cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, chanCap, channel.Counterparty, channel.GetVersion(), ) if tc.expPass { + suite.Require().Equal(icatypes.NewDefaultMetadataString(path.EndpointA.ConnectionID, path.EndpointB.ConnectionID), version) suite.Require().NoError(err) } else { suite.Require().Error(err) @@ -233,7 +244,7 @@ func (suite *InterchainAccountsTestSuite) TestChanOpenTry() { proofInit, proofHeight := path.EndpointB.Chain.QueryProof(channelKey) // use chainA (controller) for ChanOpenTry - msg := channeltypes.NewMsgChannelOpenTry(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, TestVersion, channeltypes.ORDERED, []string{path.EndpointA.ConnectionID}, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, TestVersion, proofInit, proofHeight, icatypes.ModuleName) + msg := channeltypes.NewMsgChannelOpenTry(path.EndpointA.ChannelConfig.PortID, TestVersion, channeltypes.ORDERED, []string{path.EndpointA.ConnectionID}, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, TestVersion, proofInit, proofHeight, icatypes.ModuleName) handler := suite.chainA.GetSimApp().MsgServiceRouter().Handler(msg) _, err = handler(suite.chainA.GetContext(), msg) @@ -260,9 +271,7 @@ func (suite *InterchainAccountsTestSuite) TestChanOpenTry() { } func (suite *InterchainAccountsTestSuite) TestOnChanOpenAck() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string @@ -323,10 +332,8 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenAck() { } else { suite.Require().Error(err) } - }) } - } // Test initiating a ChanOpenConfirm using the controller chain instead of the host chain @@ -376,7 +383,6 @@ func (suite *InterchainAccountsTestSuite) TestChanOpenConfirm() { suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ) suite.Require().Error(err) - } // OnChanCloseInit on controller (chainA) @@ -401,16 +407,13 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseInit() { } func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -441,13 +444,11 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { } else { suite.Require().Error(err) } - }) } } func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { - testCases := []struct { name string malleate func() @@ -496,9 +497,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { } func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { msg string @@ -567,9 +566,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { } func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { msg string @@ -717,9 +714,8 @@ func (suite *InterchainAccountsTestSuite) TestGetAppVersion() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - controllerModule := cbs.(icacontroller.IBCModule) - - appVersion, found := controllerModule.GetAppVersion(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) + controllerStack := cbs.(fee.IBCMiddleware) + appVersion, found := controllerStack.GetAppVersion(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) suite.Require().True(found) suite.Require().Equal(path.EndpointA.ChannelConfig.Version, appVersion) } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/account.go b/modules/apps/27-interchain-accounts/controller/keeper/account.go index 03eeef69f1f..020b477eaf2 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/account.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/account.go @@ -4,17 +4,19 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) -// RegisterInterchainAccount is the entry point to registering an interchain account. -// It generates a new port identifier using the owner address. It will bind to the -// port identifier and call 04-channel 'ChanOpenInit'. An error is returned if the port -// identifier is already in use. Gaining access to interchain accounts whose channels -// have closed cannot be done with this function. A regular MsgChanOpenInit must be used. -func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner string) error { +// RegisterInterchainAccount is the entry point to registering an interchain account: +// - It generates a new port identifier using the provided owner string, binds to the port identifier and claims the associated capability. +// - Callers are expected to provide the appropriate application version string. +// - For example, this could be an ICS27 encoded metadata type or an ICS29 encoded metadata type with a nested application version. +// - A new MsgChannelOpenInit is routed through the MsgServiceRouter, executing the OnOpenChanInit callback stack as configured. +// - An error is returned if the port identifier is already in use. Gaining access to interchain accounts whose channels +// have closed cannot be done with this function. A regular MsgChannelOpenInit must be used. +func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner, version string) error { portID, err := icatypes.NewControllerPortID(owner) if err != nil { return err @@ -36,27 +38,7 @@ func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner s } } - connectionEnd, err := k.channelKeeper.GetConnection(ctx, connectionID) - if err != nil { - return err - } - - // NOTE: An empty string is provided for accAddress, to be fulfilled upon OnChanOpenTry handshake step - metadata := icatypes.NewMetadata( - icatypes.Version, - connectionID, - connectionEnd.GetCounterparty().GetConnectionID(), - "", - icatypes.EncodingProtobuf, - icatypes.TxTypeSDKMultiMsg, - ) - - versionBytes, err := icatypes.ModuleCdc.MarshalJSON(&metadata) - if err != nil { - return err - } - - msg := channeltypes.NewMsgChannelOpenInit(portID, string(versionBytes), channeltypes.ORDERED, []string{connectionID}, icatypes.PortID, icatypes.ModuleName) + msg := channeltypes.NewMsgChannelOpenInit(portID, version, channeltypes.ORDERED, []string{connectionID}, icatypes.PortID, icatypes.ModuleName) handler := k.msgRouter.Handler(msg) res, err := handler(ctx, msg) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/account_test.go b/modules/apps/27-interchain-accounts/controller/keeper/account_test.go index 9387baa3936..27e40e46a67 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/account_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/account_test.go @@ -1,10 +1,10 @@ package keeper_test import ( - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestRegisterInterchainAccount() { @@ -72,7 +72,7 @@ func (suite *KeeperTestSuite) TestRegisterInterchainAccount() { tc.malleate() // malleate mutates test data - err = suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path.EndpointA.ConnectionID, owner) + err = suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path.EndpointA.ConnectionID, owner, TestVersion) if tc.expPass { suite.Require().NoError(err) @@ -88,15 +88,33 @@ func (suite *KeeperTestSuite) TestRegisterSameOwnerMultipleConnections() { owner := TestOwnerAddress - path := NewICAPath(suite.chainA, suite.chainB) - suite.coordinator.SetupConnections(path) + pathAToB := NewICAPath(suite.chainA, suite.chainB) + suite.coordinator.SetupConnections(pathAToB) - path2 := NewICAPath(suite.chainA, suite.chainC) - suite.coordinator.SetupConnections(path2) + pathAToC := NewICAPath(suite.chainA, suite.chainC) + suite.coordinator.SetupConnections(pathAToC) - err := suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path.EndpointA.ConnectionID, owner) + // build ICS27 metadata with connection identifiers for path A->B + metadata := &icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: pathAToB.EndpointA.ConnectionID, + HostConnectionId: pathAToB.EndpointB.ConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, + } + + err := suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), pathAToB.EndpointA.ConnectionID, owner, string(icatypes.ModuleCdc.MustMarshalJSON(metadata))) suite.Require().NoError(err) - err = suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), path2.EndpointA.ConnectionID, owner) + // build ICS27 metadata with connection identifiers for path A->C + metadata = &icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: pathAToC.EndpointA.ConnectionID, + HostConnectionId: pathAToC.EndpointB.ConnectionID, + Encoding: icatypes.EncodingProtobuf, + TxType: icatypes.TxTypeSDKMultiMsg, + } + + err = suite.chainA.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(suite.chainA.GetContext(), pathAToC.EndpointA.ConnectionID, owner, string(icatypes.ModuleCdc.MustMarshalJSON(metadata))) suite.Require().NoError(err) } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/events.go b/modules/apps/27-interchain-accounts/controller/keeper/events.go new file mode 100644 index 00000000000..5933fe424b9 --- /dev/null +++ b/modules/apps/27-interchain-accounts/controller/keeper/events.go @@ -0,0 +1,31 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" +) + +// EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error +// details if any. +func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, err error) { + attributes := []sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), + sdk.NewAttribute(icatypes.AttributeKeyControllerChannelID, packet.GetDestChannel()), + sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())), + } + + if err != nil { + attributes = append(attributes, sdk.NewAttribute(icatypes.AttributeKeyAckError, err.Error())) + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + icatypes.EventTypePacket, + attributes..., + ), + ) +} diff --git a/modules/apps/27-interchain-accounts/controller/keeper/genesis.go b/modules/apps/27-interchain-accounts/controller/keeper/genesis.go index eab7687236e..25acfc74a8a 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/genesis.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/genesis.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // InitGenesis initializes the interchain accounts controller application state from a provided genesis state diff --git a/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go b/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go index 7a41608d38f..ac4698cbc7f 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go @@ -1,10 +1,10 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestInitGenesis() { @@ -41,7 +41,6 @@ func (suite *KeeperTestSuite) TestInitGenesis() { expParams := types.NewParams(false) params := suite.chainA.GetSimApp().ICAControllerKeeper.GetParams(suite.chainA.GetContext()) suite.Require().Equal(expParams, params) - } func (suite *KeeperTestSuite) TestExportGenesis() { diff --git a/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go b/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go index dd1d04a96b3..c44e30018e4 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" ) var _ types.QueryServer = Keeper{} diff --git a/modules/apps/27-interchain-accounts/controller/keeper/grpc_query_test.go b/modules/apps/27-interchain-accounts/controller/keeper/grpc_query_test.go index e76cdac1fb4..f60d348bc34 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/grpc_query_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/grpc_query_test.go @@ -3,7 +3,7 @@ package keeper_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" ) func (suite *KeeperTestSuite) TestQueryParams() { diff --git a/modules/apps/27-interchain-accounts/controller/keeper/handshake.go b/modules/apps/27-interchain-accounts/controller/keeper/handshake.go index 26a90878abf..842857dc844 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/handshake.go @@ -8,8 +8,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // OnChanOpenInit performs basic validation of channel initialization. @@ -28,26 +28,35 @@ func (k Keeper) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { if order != channeltypes.ORDERED { - return sdkerrors.Wrapf(channeltypes.ErrInvalidChannelOrdering, "expected %s channel, got %s", channeltypes.ORDERED, order) + return "", sdkerrors.Wrapf(channeltypes.ErrInvalidChannelOrdering, "expected %s channel, got %s", channeltypes.ORDERED, order) } if !strings.HasPrefix(portID, icatypes.PortPrefix) { - return sdkerrors.Wrapf(icatypes.ErrInvalidControllerPort, "expected %s{owner-account-address}, got %s", icatypes.PortPrefix, portID) + return "", sdkerrors.Wrapf(icatypes.ErrInvalidControllerPort, "expected %s{owner-account-address}, got %s", icatypes.PortPrefix, portID) } if counterparty.PortId != icatypes.PortID { - return sdkerrors.Wrapf(icatypes.ErrInvalidHostPort, "expected %s, got %s", icatypes.PortID, counterparty.PortId) + return "", sdkerrors.Wrapf(icatypes.ErrInvalidHostPort, "expected %s, got %s", icatypes.PortID, counterparty.PortId) } var metadata icatypes.Metadata - if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(version), &metadata); err != nil { - return sdkerrors.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + if strings.TrimSpace(version) == "" { + connection, err := k.channelKeeper.GetConnection(ctx, connectionHops[0]) + if err != nil { + return "", err + } + + metadata = icatypes.NewDefaultMetadata(connectionHops[0], connection.GetCounterparty().GetConnectionID()) + } else { + if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(version), &metadata); err != nil { + return "", sdkerrors.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + } } if err := icatypes.ValidateControllerMetadata(ctx, k.channelKeeper, connectionHops, metadata); err != nil { - return err + return "", err } activeChannelID, found := k.GetActiveChannelID(ctx, connectionHops[0], portID) @@ -58,15 +67,15 @@ func (k Keeper) OnChanOpenInit( } if channel.State == channeltypes.OPEN { - return sdkerrors.Wrapf(icatypes.ErrActiveChannelAlreadySet, "existing active channel %s for portID %s is already OPEN", activeChannelID, portID) + return "", sdkerrors.Wrapf(icatypes.ErrActiveChannelAlreadySet, "existing active channel %s for portID %s is already OPEN", activeChannelID, portID) } if !icatypes.IsPreviousMetadataEqual(channel.Version, metadata) { - return sdkerrors.Wrap(icatypes.ErrInvalidVersion, "previous active channel metadata does not match provided version") + return "", sdkerrors.Wrap(icatypes.ErrInvalidVersion, "previous active channel metadata does not match provided version") } } - return nil + return string(icatypes.ModuleCdc.MustMarshalJSON(&metadata)), nil } // OnChanOpenAck sets the active channel for the interchain account/owner pair @@ -119,6 +128,5 @@ func (k Keeper) OnChanCloseConfirm( portID, channelID string, ) error { - return nil } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go b/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go index 61c8a092a81..ca2abab5975 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go @@ -3,10 +3,10 @@ package keeper_test import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestOnChanOpenInit() { @@ -22,7 +22,6 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { malleate func() expPass bool }{ - { "success", func() { @@ -31,7 +30,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { true, }, { - "success - previous active channel closed", + "success: previous active channel closed", func() { suite.chainA.GetSimApp().ICAControllerKeeper.SetActiveChannelID(suite.chainA.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) @@ -48,6 +47,13 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { }, true, }, + { + "success: empty channel version returns default metadata JSON string", + func() { + channel.Version = "" + }, + true, + }, { "invalid metadata - previous metadata is different", func() { @@ -139,6 +145,14 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { }, false, }, + { + "connection not found with default empty channel version", + func() { + channel.ConnectionHops = []string{"connection-10"} + channel.Version = "" + }, + false, + }, { "invalid controller connection ID", func() { @@ -215,7 +229,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { path.EndpointA.ChannelConfig.PortID = portID // default values - metadata = icatypes.NewMetadata(icatypes.Version, ibctesting.FirstConnectionID, ibctesting.FirstConnectionID, "", icatypes.EncodingProtobuf, icatypes.TxTypeSDKMultiMsg) + metadata = icatypes.NewMetadata(icatypes.Version, path.EndpointA.ConnectionID, path.EndpointB.ConnectionID, "", icatypes.EncodingProtobuf, icatypes.TxTypeSDKMultiMsg) versionBytes, err := icatypes.ModuleCdc.MarshalJSON(&metadata) suite.Require().NoError(err) @@ -233,16 +247,16 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { tc.malleate() // malleate mutates test data - err = suite.chainA.GetSimApp().ICAControllerKeeper.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), + version, err := suite.chainA.GetSimApp().ICAControllerKeeper.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, chanCap, channel.Counterparty, channel.Version, ) if tc.expPass { suite.Require().NoError(err) + suite.Require().Equal(string(versionBytes), version) } else { suite.Require().Error(err) } - }) } } @@ -402,16 +416,13 @@ func (suite *KeeperTestSuite) TestOnChanOpenAck() { } func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -441,7 +452,6 @@ func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { } else { suite.Require().Error(err) } - }) } } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 86099b954bd..6fa539a1533 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -6,21 +6,22 @@ import ( baseapp "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // Keeper defines the IBC interchain accounts controller keeper type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec paramSpace paramtypes.Subspace @@ -35,11 +36,10 @@ type Keeper struct { // NewKeeper creates a new interchain accounts controller Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper icatypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, ) Keeper { - // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go index a0772f1e648..21d58f0762c 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go @@ -7,25 +7,25 @@ import ( "github.com/stretchr/testify/suite" "github.com/tendermint/tendermint/crypto" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( // TODO: Cosmos-SDK ADR-28: Update crypto.AddressHash() when sdk uses address.Module() // https://github.com/cosmos/cosmos-sdk/issues/10225 // - // TestAccAddress defines a resuable bech32 address for testing purposes + // TestAccAddress defines a reusable bech32 address for testing purposes TestAccAddress = icatypes.GenerateAddress(sdk.AccAddress(crypto.AddressHash([]byte(icatypes.ModuleName))), ibctesting.FirstConnectionID, TestPortID) // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" - // TestPortID defines a resuable port identifier for testing purposes + // TestPortID defines a reusable port identifier for testing purposes TestPortID, _ = icatypes.NewControllerPortID(TestOwnerAddress) - // TestVersion defines a resuable interchainaccounts version string for testing purposes + // TestVersion defines a reusable interchainaccounts version string for testing purposes TestVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, @@ -95,7 +95,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { return err } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/params.go b/modules/apps/27-interchain-accounts/controller/keeper/params.go index dce72c0c491..c44687543cb 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/params.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" ) // IsControllerEnabled retrieves the controller enabled boolean from the paramstore. diff --git a/modules/apps/27-interchain-accounts/controller/keeper/params_test.go b/modules/apps/27-interchain-accounts/controller/keeper/params_test.go index ffd71f49268..6b74c4ef667 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/params_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/params_test.go @@ -1,6 +1,6 @@ package keeper_test -import "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" +import "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" func (suite *KeeperTestSuite) TestParams() { expParams := types.DefaultParams() diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay.go b/modules/apps/27-interchain-accounts/controller/keeper/relay.go index 4eaf26c52a6..57d92ebef99 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay.go @@ -5,9 +5,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // SendTx takes pre-built packet data containing messages to be executed on the host chain from an authentication module and attempts to send the packet. diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go index bb4d17b8232..96ce41b3e23 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go @@ -5,11 +5,11 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestSendTx() { @@ -183,9 +183,7 @@ func (suite *KeeperTestSuite) TestSendTx() { } func (suite *KeeperTestSuite) TestOnTimeoutPacket() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { msg string diff --git a/modules/apps/27-interchain-accounts/controller/types/controller.pb.go b/modules/apps/27-interchain-accounts/controller/types/controller.pb.go index dfa8bd31512..9c29e665694 100644 --- a/modules/apps/27-interchain-accounts/controller/types/controller.pb.go +++ b/modules/apps/27-interchain-accounts/controller/types/controller.pb.go @@ -93,9 +93,9 @@ var fileDescriptor_177fd0fec5eb3400 = []byte{ 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x15, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0xac, 0x9f, 0x99, 0x94, 0xac, 0x9b, 0x9e, 0xaf, 0x5f, 0x66, - 0xac, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0x5a, 0x0c, 0x0a, 0xa0, 0x62, 0x7d, 0x23, 0x73, 0x5d, + 0xaa, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0x5a, 0x0c, 0x0a, 0xa0, 0x62, 0x7d, 0x23, 0x73, 0x5d, 0x84, 0xb7, 0x74, 0xb1, 0x85, 0x4d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x2b, 0xc6, - 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x79, 0xfc, 0x19, 0x5b, 0x01, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x34, 0x46, 0x1b, 0x5b, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/27-interchain-accounts/controller/types/params.go b/modules/apps/27-interchain-accounts/controller/types/params.go index eb9c413bec0..d7b9cc83874 100644 --- a/modules/apps/27-interchain-accounts/controller/types/params.go +++ b/modules/apps/27-interchain-accounts/controller/types/params.go @@ -11,10 +11,8 @@ const ( DefaultControllerEnabled = true ) -var ( - // KeyControllerEnabled is the store key for ControllerEnabled Params - KeyControllerEnabled = []byte("ControllerEnabled") -) +// KeyControllerEnabled is the store key for ControllerEnabled Params +var KeyControllerEnabled = []byte("ControllerEnabled") // ParamKeyTable type declaration for parameters func ParamKeyTable() paramtypes.KeyTable { diff --git a/modules/apps/27-interchain-accounts/controller/types/params_test.go b/modules/apps/27-interchain-accounts/controller/types/params_test.go index 1b2b296c7d4..d399c37fb02 100644 --- a/modules/apps/27-interchain-accounts/controller/types/params_test.go +++ b/modules/apps/27-interchain-accounts/controller/types/params_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" ) func TestValidateParams(t *testing.T) { diff --git a/modules/apps/27-interchain-accounts/controller/types/query.pb.go b/modules/apps/27-interchain-accounts/controller/types/query.pb.go index dbbdfeec611..75d8a0667c3 100644 --- a/modules/apps/27-interchain-accounts/controller/types/query.pb.go +++ b/modules/apps/27-interchain-accounts/controller/types/query.pb.go @@ -124,24 +124,24 @@ var fileDescriptor_df0d8b259d72854e = []byte{ // 315 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x31, 0x4b, 0x33, 0x31, 0x1c, 0xc6, 0x9b, 0x17, 0xde, 0x0e, 0x71, 0x8b, 0x0e, 0x52, 0x24, 0x48, 0x27, 0x97, 0x26, 0xf4, - 0x2a, 0x08, 0x1d, 0x1c, 0x14, 0x74, 0xad, 0x1d, 0x5d, 0x24, 0x17, 0xc3, 0x35, 0x72, 0x97, 0x7f, - 0x9a, 0xe4, 0x0a, 0x5d, 0xfd, 0x04, 0x82, 0x5f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x0d, 0x9c, 0x2b, 0x84, 0x4a, 0xdc, 0xd9, 0x4b, 0x00, + 0x92, 0x54, 0x71, 0x61, 0x35, 0x17, 0xc6, 0x40, 0x68, 0xf4, 0xd5, 0xb5, 0xbb, 0x83, 0xc9, 0xd5, + 0xe2, 0x97, 0x43, 0xe1, 0x44, 0xe6, 0x47, 0x6a, 0x92, 0x2b, 0x1f, 0xba, 0x1a, 0x6f, 0x7f, 0x79, + 0xf5, 0x16, 0x8c, 0x57, 0x64, 0x84, 0xdb, 0xb6, 0x7a, 0xd9, 0x45, 0xfb, 0xe8, 0x60, 0x2b, 0x1a, + 0xb0, 0xdf, 0x97, 0x62, 0x0d, 0xb3, 0x21, 0x45, 0x6f, 0x08, 0xff, 0xaf, 0x5c, 0xe4, 0x05, 0xe1, + 0x76, 0x7d, 0x24, 0x17, 0x9b, 0x80, 0xbf, 0xf7, 0xe8, 0x5c, 0xfe, 0x99, 0x53, 0x37, 0xef, 0x0e, + 0xee, 0x9f, 0x3f, 0x1e, 0xff, 0x1d, 0x91, 0x88, 0x37, 0x93, 0xfc, 0x64, 0x8a, 0xba, 0xe1, 0xd9, + 0xdd, 0x53, 0x41, 0xd1, 0xbc, 0xa0, 0xe8, 0xbd, 0xa0, 0xe8, 0xa1, 0xa4, 0xad, 0x79, 0x49, 0x5b, + 0xaf, 0x25, 0x6d, 0x5d, 0x0f, 0x13, 0x1d, 0xc6, 0x79, 0xcc, 0x24, 0x64, 0x5c, 0x82, 0xcf, 0xc0, + 0x2f, 0xf0, 0xbd, 0x04, 0xf8, 0xf4, 0x98, 0x67, 0x70, 0x9b, 0xa7, 0xca, 0xd7, 0xb2, 0xe8, 0xa4, + 0xb7, 0xf4, 0xf5, 0xd6, 0xf9, 0xc2, 0xcc, 0x2a, 0x1f, 0xb7, 0xab, 0x55, 0x0f, 0x3f, 0x03, 0x00, + 0x00, 0xff, 0xff, 0xeb, 0xaf, 0xdb, 0x2b, 0xae, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/27-interchain-accounts/host/client/cli/query.go b/modules/apps/27-interchain-accounts/host/client/cli/query.go index c35e03baa16..c2b6489e683 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/query.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/query.go @@ -12,10 +12,10 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // GetCmdParams returns the command handler for the host submodule parameter querying. diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index fb403c71937..ecd9e2167ee 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -5,11 +5,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // IBCModule implements the ICS26 interface for interchain accounts host chains @@ -34,8 +34,8 @@ func (im IBCModule) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { - return sdkerrors.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") +) (string, error) { + return "", sdkerrors.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } // OnChanOpenTry implements the IBCModule interface @@ -106,19 +106,20 @@ func (im IBCModule) OnRecvPacket( _ sdk.AccAddress, ) ibcexported.Acknowledgement { if !im.keeper.IsHostEnabled(ctx) { - return types.NewErrorAcknowledgement(types.ErrHostSubModuleDisabled) + return channeltypes.NewErrorAcknowledgement(types.ErrHostSubModuleDisabled) } txResponse, err := im.keeper.OnRecvPacket(ctx, packet) + ack := channeltypes.NewResultAcknowledgement(txResponse) if err != nil { - // Emit an event including the error msg - keeper.EmitWriteErrorAcknowledgementEvent(ctx, packet, err) - - return types.NewErrorAcknowledgement(err) + ack = channeltypes.NewErrorAcknowledgement(err) } + // Emit an event indicating a successful or failed acknowledgement. + keeper.EmitAcknowledgementEvent(ctx, packet, ack, err) + // NOTE: acknowledgement will be written synchronously during IBC handler execution. - return channeltypes.NewResultAcknowledgement(txResponse) + return ack } // OnAcknowledgementPacket implements the IBCModule interface diff --git a/modules/apps/27-interchain-accounts/host/ibc_module_test.go b/modules/apps/27-interchain-accounts/host/ibc_module_test.go index 3fa45384104..5de70cc3fab 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -4,39 +4,37 @@ import ( "fmt" "testing" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" - tmprotostate "github.com/tendermint/tendermint/proto/tendermint/state" - tmstate "github.com/tendermint/tendermint/state" - - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( // TODO: Cosmos-SDK ADR-28: Update crypto.AddressHash() when sdk uses address.Module() // https://github.com/cosmos/cosmos-sdk/issues/10225 // - // TestAccAddress defines a resuable bech32 address for testing purposes + // TestAccAddress defines a reusable bech32 address for testing purposes TestAccAddress = icatypes.GenerateAddress(sdk.AccAddress(crypto.AddressHash([]byte(icatypes.ModuleName))), ibctesting.FirstConnectionID, TestPortID) // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" - // TestPortID defines a resuable port identifier for testing purposes + // TestPortID defines a reusable port identifier for testing purposes TestPortID, _ = icatypes.NewControllerPortID(TestOwnerAddress) - // TestVersion defines a resuable interchainaccounts version string for testing purposes + // TestVersion defines a reusable interchainaccounts version string for testing purposes TestVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, @@ -86,7 +84,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { return err } @@ -147,7 +145,6 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() { malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -165,7 +162,6 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() { ) (string, error) { return "", fmt.Errorf("mock ica auth fails") } - }, true, }, { @@ -222,10 +218,8 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() { suite.Require().Error(err) suite.Require().Equal("", version) } - }) } - } // Test initiating a ChanOpenAck using the host chain instead of the controller chain @@ -268,7 +262,6 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenConfirm() { malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -285,7 +278,6 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenConfirm() { ) error { return fmt.Errorf("mock ica auth fails") } - }, true, }, } @@ -322,10 +314,8 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenConfirm() { } else { suite.Require().Error(err) } - }) } - } // OnChanCloseInit on host (chainB) @@ -350,16 +340,13 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseInit() { } func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -390,15 +377,12 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { } else { suite.Require().Error(err) } - }) } } func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { - var ( - packetData []byte - ) + var packetData []byte testCases := []struct { name string malleate func() @@ -417,7 +401,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { suite.chainB.GetSimApp().ICAAuthModule.IBCApp.OnRecvPacket = func( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { - return channeltypes.NewErrorAcknowledgement("failed OnRecvPacket mock callback") + return channeltypes.NewErrorAcknowledgement(fmt.Errorf("failed OnRecvPacket mock callback")) } }, true, }, @@ -463,16 +447,11 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { packetData = icaPacketData.GetBytes() // build expected ack - msgResponseBz, err := proto.Marshal(&banktypes.MsgSendResponse{}) + any, err := codectypes.NewAnyWithValue(&banktypes.MsgSendResponse{}) suite.Require().NoError(err) - msgData := &sdk.MsgData{ - MsgType: sdk.MsgTypeURL(msg), - Data: msgResponseBz, - } - expectedTxResponse, err := proto.Marshal(&sdk.TxMsgData{ - Data: []*sdk.MsgData{msgData}, + MsgResponses: []*codectypes.Any{any}, }) suite.Require().NoError(err) @@ -502,14 +481,11 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { } else { suite.Require().False(ack.Success()) } - }) } - } func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { - testCases := []struct { name string malleate func() @@ -563,7 +539,6 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { } func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { - testCases := []struct { name string malleate func() @@ -710,63 +685,3 @@ func (suite *InterchainAccountsTestSuite) TestControlAccountAfterChannelClose() hasBalance = suite.chainB.GetSimApp().BankKeeper.HasBalance(suite.chainB.GetContext(), icaAddr, sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(0)}) suite.Require().True(hasBalance) } - -// The safety of including SDK MsgResponses in the acknowledgement rests -// on the inclusion of the abcitypes.ResponseDeliverTx.Data in the -// abcitypes.ResposneDeliverTx hash. If the abcitypes.ResponseDeliverTx.Data -// gets removed from consensus they must no longer be used in the packet -// acknowledgement. -// -// This test acts as an indicator that the abcitypes.ResponseDeliverTx.Data -// may no longer be deterministic. -func (suite *InterchainAccountsTestSuite) TestABCICodeDeterminism() { - msgResponseBz, err := proto.Marshal(&channeltypes.MsgChannelOpenInitResponse{}) - suite.Require().NoError(err) - - msgData := &sdk.MsgData{ - MsgType: sdk.MsgTypeURL(&channeltypes.MsgChannelOpenInit{}), - Data: msgResponseBz, - } - - txResponse, err := proto.Marshal(&sdk.TxMsgData{ - Data: []*sdk.MsgData{msgData}, - }) - suite.Require().NoError(err) - - deliverTx := abcitypes.ResponseDeliverTx{ - Data: txResponse, - } - responses := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTx, - }, - } - - differentMsgResponseBz, err := proto.Marshal(&channeltypes.MsgRecvPacketResponse{}) - suite.Require().NoError(err) - - differentMsgData := &sdk.MsgData{ - MsgType: sdk.MsgTypeURL(&channeltypes.MsgRecvPacket{}), - Data: differentMsgResponseBz, - } - - differentTxResponse, err := proto.Marshal(&sdk.TxMsgData{ - Data: []*sdk.MsgData{differentMsgData}, - }) - suite.Require().NoError(err) - - differentDeliverTx := abcitypes.ResponseDeliverTx{ - Data: differentTxResponse, - } - - differentResponses := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &differentDeliverTx, - }, - } - - hash := tmstate.ABCIResponsesResultsHash(&responses) - differentHash := tmstate.ABCIResponsesResultsHash(&differentResponses) - - suite.Require().NotEqual(hash, differentHash) -} diff --git a/modules/apps/27-interchain-accounts/host/keeper/account.go b/modules/apps/27-interchain-accounts/host/keeper/account.go index d37cc21f1c2..01ccb0f0883 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/account.go +++ b/modules/apps/27-interchain-accounts/host/keeper/account.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" ) // RegisterInterchainAccount attempts to create a new account using the provided address and diff --git a/modules/apps/27-interchain-accounts/host/keeper/account_test.go b/modules/apps/27-interchain-accounts/host/keeper/account_test.go index df1966277e4..ecd4f38228f 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/account_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/account_test.go @@ -3,8 +3,8 @@ package keeper_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestRegisterInterchainAccount() { @@ -13,7 +13,7 @@ func (suite *KeeperTestSuite) TestRegisterInterchainAccount() { path := NewICAPath(suite.chainA, suite.chainB) suite.coordinator.SetupConnections(path) - //RegisterInterchainAccount + // RegisterInterchainAccount err := SetupICAPath(path, TestOwnerAddress) suite.Require().NoError(err) diff --git a/modules/apps/27-interchain-accounts/host/keeper/events.go b/modules/apps/27-interchain-accounts/host/keeper/events.go index 5926781d5c2..0a969153753 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/events.go +++ b/modules/apps/27-interchain-accounts/host/keeper/events.go @@ -1,20 +1,31 @@ package keeper import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/v3/modules/core/exported" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) -// EmitWriteErrorAcknowledgementEvent emits an event signalling an error acknowledgement and including the error details -func EmitWriteErrorAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, err error) { +// EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error +// details if any. +func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, err error) { + attributes := []sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), + sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), + sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())), + } + + if err != nil { + attributes = append(attributes, sdk.NewAttribute(icatypes.AttributeKeyAckError, err.Error())) + } + ctx.EventManager().EmitEvent( sdk.NewEvent( icatypes.EventTypePacket, - sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), - sdk.NewAttribute(icatypes.AttributeKeyAckError, err.Error()), - sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), + attributes..., ), ) } diff --git a/modules/apps/27-interchain-accounts/host/keeper/genesis.go b/modules/apps/27-interchain-accounts/host/keeper/genesis.go index 2a9caa3948b..c4c66e88414 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // InitGenesis initializes the interchain accounts host application state from a provided genesis state diff --git a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go index 138d713cf67..9a39befbaee 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go @@ -1,10 +1,10 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestInitGenesis() { diff --git a/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go b/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go index c2727eab535..4e278afa7d9 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go +++ b/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" ) var _ types.QueryServer = Keeper{} diff --git a/modules/apps/27-interchain-accounts/host/keeper/grpc_query_test.go b/modules/apps/27-interchain-accounts/host/keeper/grpc_query_test.go index e0ca62e8c56..a54f238db5b 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/grpc_query_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/grpc_query_test.go @@ -3,7 +3,7 @@ package keeper_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" ) func (suite *KeeperTestSuite) TestQueryParams() { diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake.go b/modules/apps/27-interchain-accounts/host/keeper/handshake.go index 11a7c7a378e..c8a6914debe 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake.go @@ -8,9 +8,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // OnChanOpenTry performs basic validation of the ICA channel @@ -110,6 +110,5 @@ func (k Keeper) OnChanCloseConfirm( portID, channelID string, ) error { - return nil } diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go index 0cac2912ccb..458589c4a5c 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go @@ -3,10 +3,10 @@ package keeper_test import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestOnChanOpenTry() { @@ -22,7 +22,6 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { malleate func() expPass bool }{ - { "success", func() { @@ -228,16 +227,13 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { } func (suite *KeeperTestSuite) TestOnChanOpenConfirm() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -279,22 +275,18 @@ func (suite *KeeperTestSuite) TestOnChanOpenConfirm() { } else { suite.Require().Error(err) } - }) } } func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { - var ( - path *ibctesting.Path - ) + var path *ibctesting.Path testCases := []struct { name string malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -320,7 +312,6 @@ func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { } else { suite.Require().Error(err) } - }) } } diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index ea3f8205c87..13d3f387c94 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -6,21 +6,22 @@ import ( baseapp "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // Keeper defines the IBC interchain accounts host keeper type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec paramSpace paramtypes.Subspace @@ -35,11 +36,10 @@ type Keeper struct { // NewKeeper creates a new interchain accounts host Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, accountKeeper icatypes.AccountKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, ) Keeper { - // ensure ibc interchain accounts module account is set if addr := accountKeeper.GetModuleAddress(icatypes.ModuleName); addr == nil { panic("the Interchain Accounts module account has not been set") diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 609fb06884d..eb475cea6c8 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -7,25 +7,25 @@ import ( "github.com/stretchr/testify/suite" "github.com/tendermint/tendermint/crypto" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( // TODO: Cosmos-SDK ADR-28: Update crypto.AddressHash() when sdk uses address.Module() // https://github.com/cosmos/cosmos-sdk/issues/10225 // - // TestAccAddress defines a resuable bech32 address for testing purposes + // TestAccAddress defines a reusable bech32 address for testing purposes TestAccAddress = icatypes.GenerateAddress(sdk.AccAddress(crypto.AddressHash([]byte(icatypes.ModuleName))), ibctesting.FirstConnectionID, TestPortID) // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" - // TestPortID defines a resuable port identifier for testing purposes + // TestPortID defines a reusable port identifier for testing purposes TestPortID, _ = icatypes.NewControllerPortID(TestOwnerAddress) - // TestVersion defines a resuable interchainaccounts version string for testing purposes + // TestVersion defines a reusable interchainaccounts version string for testing purposes TestVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, @@ -95,7 +95,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { return err } diff --git a/modules/apps/27-interchain-accounts/host/keeper/params.go b/modules/apps/27-interchain-accounts/host/keeper/params.go index 1ecbd5b05f8..97f68fdb5de 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/params.go +++ b/modules/apps/27-interchain-accounts/host/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" ) // IsHostEnabled retrieves the host enabled boolean from the paramstore. diff --git a/modules/apps/27-interchain-accounts/host/keeper/params_test.go b/modules/apps/27-interchain-accounts/host/keeper/params_test.go index 529afecaecf..cc71a3a95c5 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/params_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/params_test.go @@ -1,6 +1,6 @@ package keeper_test -import "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" +import "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" func (suite *KeeperTestSuite) TestParams() { expParams := types.DefaultParams() diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index 8610a50f5e5..5aa767284c7 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -1,13 +1,14 @@ package keeper import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/gogo/protobuf/proto" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // OnRecvPacket handles a given interchain accounts packet on a destination host chain. @@ -53,7 +54,7 @@ func (k Keeper) executeTx(ctx sdk.Context, sourcePort, destPort, destChannel str } txMsgData := &sdk.TxMsgData{ - Data: make([]*sdk.MsgData, len(msgs)), + MsgResponses: make([]*codectypes.Any, len(msgs)), } // CacheContext returns a new context with the multi-store branched into a cached storage object @@ -64,16 +65,12 @@ func (k Keeper) executeTx(ctx sdk.Context, sourcePort, destPort, destChannel str return nil, err } - msgResponse, err := k.executeMsg(cacheCtx, msg) + any, err := k.executeMsg(cacheCtx, msg) if err != nil { return nil, err } - txMsgData.Data[i] = &sdk.MsgData{ - MsgType: sdk.MsgTypeURL(msg), - Data: msgResponse, - } - + txMsgData.MsgResponses[i] = any } // NOTE: The context returned by CacheContext() creates a new EventManager, so events must be correctly propagated back to the current context @@ -114,7 +111,7 @@ func (k Keeper) authenticateTx(ctx sdk.Context, msgs []sdk.Msg, connectionID, po // Attempts to get the message handler from the router and if found will then execute the message. // If the message execution is successful, the proto marshaled message response will be returned. -func (k Keeper) executeMsg(ctx sdk.Context, msg sdk.Msg) ([]byte, error) { +func (k Keeper) executeMsg(ctx sdk.Context, msg sdk.Msg) (*codectypes.Any, error) { handler := k.msgRouter.Handler(msg) if handler == nil { return nil, icatypes.ErrInvalidRoute @@ -128,5 +125,11 @@ func (k Keeper) executeMsg(ctx sdk.Context, msg sdk.Msg) ([]byte, error) { // NOTE: The sdk msg handler creates a new EventManager, so events must be correctly propagated back to the current context ctx.EventManager().EmitEvents(res.GetEvents()) - return res.Data, nil + // Each individual sdk.Result has exactly one Msg response. We aggregate here. + msgResponse := res.MsgResponses[0] + if msgResponse == nil { + return nil, sdkerrors.Wrapf(sdkerrors.ErrLogic, "got nil Msg response for msg %s", sdk.MsgTypeURL(msg)) + } + + return msgResponse, nil } diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 0b4e8161317..89058aad4e1 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -1,21 +1,20 @@ package keeper_test import ( - "time" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestOnRecvPacket() { @@ -29,6 +28,48 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { malleate func() expPass bool }{ + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func() { + interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + suite.Require().True(found) + + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, "test proposal", suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime()) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + msg := &govtypes.MsgVote{ + ProposalId: govtypes.DefaultStartingProposalID, + Voter: interchainAccountAddr, + Option: govtypes.OptionYes, + } + + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []sdk.Msg{msg}) + suite.Require().NoError(err) + + icaPacketData := icatypes.InterchainAccountPacketData{ + Type: icatypes.EXECUTE_TX, + Data: data, + } + + packetData = icaPacketData.GetBytes() + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, { "interchain account successfully executes banktypes.MsgSend", func() { @@ -165,7 +206,10 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Description: "tokens for all!", } - proposal, err := govtypes.NewProposal(testProposal, govtypes.DefaultStartingProposalID, time.Now(), time.Now().Add(time.Hour)) + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, "test proposal", suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime()) suite.Require().NoError(err) suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) diff --git a/modules/apps/27-interchain-accounts/host/types/ack.go b/modules/apps/27-interchain-accounts/host/types/ack.go deleted file mode 100644 index 202404fff3a..00000000000 --- a/modules/apps/27-interchain-accounts/host/types/ack.go +++ /dev/null @@ -1,27 +0,0 @@ -package types - -import ( - "fmt" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" -) - -const ( - // ackErrorString defines a string constant included in error acknowledgements - // NOTE: Changing this const is state machine breaking as acknowledgements are written into state - ackErrorString = "error handling packet on host chain: see events for details" -) - -// NewErrorAcknowledgement returns a deterministic error string which may be used in -// the packet acknowledgement. -func NewErrorAcknowledgement(err error) channeltypes.Acknowledgement { - // the ABCI code is included in the abcitypes.ResponseDeliverTx hash - // constructed in Tendermint and is therefore determinstic - _, code, _ := sdkerrors.ABCIInfo(err, false) // discard non-deterministic codespace and log values - - errorString := fmt.Sprintf("ABCI code: %d: %s", code, ackErrorString) - - return channeltypes.NewErrorAcknowledgement(errorString) -} diff --git a/modules/apps/27-interchain-accounts/host/types/ack_test.go b/modules/apps/27-interchain-accounts/host/types/ack_test.go deleted file mode 100644 index bc4e2d07afc..00000000000 --- a/modules/apps/27-interchain-accounts/host/types/ack_test.go +++ /dev/null @@ -1,101 +0,0 @@ -package types_test - -import ( - "testing" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/stretchr/testify/suite" - abcitypes "github.com/tendermint/tendermint/abci/types" - tmprotostate "github.com/tendermint/tendermint/proto/tendermint/state" - tmstate "github.com/tendermint/tendermint/state" - - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" -) - -const ( - gasUsed = uint64(100) - gasWanted = uint64(100) -) - -type TypesTestSuite struct { - suite.Suite - - coordinator *ibctesting.Coordinator - - chainA *ibctesting.TestChain - chainB *ibctesting.TestChain -} - -func (suite *TypesTestSuite) SetupTest() { - suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) - - suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) - suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) -} - -func TestTypesTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) -} - -// The safety of including ABCI error codes in the acknowledgement rests -// on the inclusion of these ABCI error codes in the abcitypes.ResposneDeliverTx -// hash. If the ABCI codes get removed from consensus they must no longer be used -// in the packet acknowledgement. -// -// This test acts as an indicator that the ABCI error codes may no longer be deterministic. -func (suite *TypesTestSuite) TestABCICodeDeterminism() { - // same ABCI error code used - err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") - errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") - - // different ABCI error code used - errDifferentABCICode := sdkerrors.ErrNotFound - - deliverTx := sdkerrors.ResponseDeliverTx(err, gasUsed, gasWanted, false) - responses := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTx, - }, - } - - deliverTxSameABCICode := sdkerrors.ResponseDeliverTx(errSameABCICode, gasUsed, gasWanted, false) - responsesSameABCICode := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTxSameABCICode, - }, - } - - deliverTxDifferentABCICode := sdkerrors.ResponseDeliverTx(errDifferentABCICode, gasUsed, gasWanted, false) - responsesDifferentABCICode := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTxDifferentABCICode, - }, - } - - hash := tmstate.ABCIResponsesResultsHash(&responses) - hashSameABCICode := tmstate.ABCIResponsesResultsHash(&responsesSameABCICode) - hashDifferentABCICode := tmstate.ABCIResponsesResultsHash(&responsesDifferentABCICode) - - suite.Require().Equal(hash, hashSameABCICode) - suite.Require().NotEqual(hash, hashDifferentABCICode) -} - -// TestAcknowledgementError will verify that only a constant string and -// ABCI error code are used in constructing the acknowledgement error string -func (suite *TypesTestSuite) TestAcknowledgementError() { - // same ABCI error code used - err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") - errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") - - // different ABCI error code used - errDifferentABCICode := sdkerrors.ErrNotFound - - ack := types.NewErrorAcknowledgement(err) - ackSameABCICode := types.NewErrorAcknowledgement(errSameABCICode) - ackDifferentABCICode := types.NewErrorAcknowledgement(errDifferentABCICode) - - suite.Require().Equal(ack, ackSameABCICode) - suite.Require().NotEqual(ack, ackDifferentABCICode) - -} diff --git a/modules/apps/27-interchain-accounts/host/types/host.pb.go b/modules/apps/27-interchain-accounts/host/types/host.pb.go index e944986eb4c..19bc84496be 100644 --- a/modules/apps/27-interchain-accounts/host/types/host.pb.go +++ b/modules/apps/27-interchain-accounts/host/types/host.pb.go @@ -104,9 +104,9 @@ var fileDescriptor_48e202774f13d08e = []byte{ 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xf2, 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0xcf, 0x4c, 0x4a, 0xd6, 0x4d, - 0xcf, 0xd7, 0x2f, 0x33, 0xd6, 0xcf, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0x2d, 0x06, 0x85, 0x5f, 0xb1, + 0xcf, 0xd7, 0x2f, 0x33, 0xd5, 0xcf, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0x2d, 0x06, 0x85, 0x5f, 0xb1, 0xbe, 0x91, 0xb9, 0x2e, 0x22, 0x04, 0x74, 0x51, 0x83, 0xae, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, - 0x0d, 0xec, 0x6b, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xc9, 0x05, 0x61, 0x74, 0x01, + 0x0d, 0xec, 0x6b, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0xa1, 0x7b, 0x2c, 0x74, 0x01, 0x00, 0x00, } diff --git a/modules/apps/27-interchain-accounts/host/types/keys.go b/modules/apps/27-interchain-accounts/host/types/keys.go index 74c93cdb605..7f1a04facb5 100644 --- a/modules/apps/27-interchain-accounts/host/types/keys.go +++ b/modules/apps/27-interchain-accounts/host/types/keys.go @@ -14,6 +14,11 @@ const ( // ContainsMsgType returns true if the sdk.Msg TypeURL is present in allowMsgs, otherwise false func ContainsMsgType(allowMsgs []string, msg sdk.Msg) bool { + // check that wildcard * option for allowing all message types is the only string in the array, if so, return true + if len(allowMsgs) == 1 && allowMsgs[0] == "*" { + return true + } + for _, v := range allowMsgs { if v == sdk.MsgTypeURL(msg) { return true diff --git a/modules/apps/27-interchain-accounts/host/types/params_test.go b/modules/apps/27-interchain-accounts/host/types/params_test.go index 2606f3fd2f5..7945097a975 100644 --- a/modules/apps/27-interchain-accounts/host/types/params_test.go +++ b/modules/apps/27-interchain-accounts/host/types/params_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" ) func TestValidateParams(t *testing.T) { diff --git a/modules/apps/27-interchain-accounts/host/types/query.pb.go b/modules/apps/27-interchain-accounts/host/types/query.pb.go index c468e841945..9e2e3098027 100644 --- a/modules/apps/27-interchain-accounts/host/types/query.pb.go +++ b/modules/apps/27-interchain-accounts/host/types/query.pb.go @@ -122,26 +122,26 @@ func init() { var fileDescriptor_e6b7e23fc90c353a = []byte{ // 312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x3f, 0x4b, 0x3b, 0x31, - 0x18, 0xc7, 0x9b, 0x1f, 0xfc, 0x3a, 0xc4, 0x2d, 0x3a, 0x48, 0x91, 0x20, 0x9d, 0x1c, 0xda, 0x84, - 0xfe, 0x81, 0x3a, 0xaa, 0xa3, 0x38, 0xa8, 0xa3, 0x8b, 0xe4, 0xd2, 0x70, 0x0d, 0xf4, 0xf2, 0xa4, - 0x97, 0xdc, 0x41, 0x57, 0x5f, 0x81, 0xe0, 0x4b, 0x72, 0x71, 0x11, 0x0a, 0x2e, 0x8e, 0x72, 0xe7, - 0x0b, 0x91, 0xcb, 0x1d, 0x68, 0x51, 0x84, 0xc3, 0xf5, 0x09, 0x9f, 0xcf, 0xf7, 0xf9, 0x3e, 0xc1, - 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 0x64, 0x11, 0x93, 0x90, 0x70, 0x09, 0x2e, 0x01, 0x57, 0x89, 0x87, - 0x31, 0xf0, 0x7c, 0xc2, 0x13, 0x98, 0x67, 0x4b, 0xe5, 0xea, 0x98, 0xf1, 0x6c, 0xf8, 0x99, 0x34, - 0xdc, 0x4e, 0xf2, 0x6b, 0xab, 0x5c, 0xd4, 0x0d, 0xff, 0x36, 0xf9, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x7d, 0xf5, 0x90, 0xb6, 0x78, 0x02, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0x31, 0x4b, 0x33, 0x31, + 0x18, 0xc7, 0x9b, 0x17, 0xde, 0x0e, 0x71, 0x8b, 0x0e, 0x52, 0x24, 0x48, 0x27, 0x87, 0x36, 0xa1, + 0xb5, 0x52, 0x47, 0x75, 0x14, 0x07, 0x75, 0x74, 0x91, 0x5c, 0x1a, 0xae, 0x81, 0x5e, 0x9e, 0xf4, + 0x92, 0x3b, 0xe8, 0xea, 0x27, 0x10, 0xfc, 0x48, 0x2e, 0x2e, 0x42, 0xc1, 0xc5, 0x51, 0xee, 0xfc, + 0x20, 0x72, 0xb9, 0x03, 0x2d, 0x8a, 0x70, 0xb8, 0x3e, 0xe1, 0xf7, 0xfb, 0x3f, 0xff, 0x27, 0xf8, + 0x58, 0x47, 0x92, 0x0b, 0x6b, 0x17, 0x5a, 0x0a, 0xaf, 0xc1, 0x38, 0xae, 0x8d, 0x57, 0xa9, 0x9c, + 0x0b, 0x6d, 0x6e, 0x85, 0x94, 0x90, 0x19, 0xef, 0xf8, 0x1c, 0x9c, 0xe7, 0xf9, 0x88, 0x2f, 0x33, + 0x95, 0xae, 0x98, 0x4d, 0xc1, 0x03, 0x19, 0xe8, 0x48, 0xb2, 0xaf, 0x24, 0xfb, 0x81, 0x64, 0x15, + 0xc9, 0xf2, 0x51, 0x6f, 0x2f, 0x06, 0x88, 0x17, 0x8a, 0x0b, 0xab, 0xb9, 0x30, 0x06, 0x7c, 0xc3, + 0x04, 0x57, 0x6f, 0xda, 0x6a, 0x8b, 0xe0, 0x0c, 0x60, 0x7f, 0x07, 0x93, 0xab, 0x6a, 0xa7, 0x4b, + 0x91, 0x8a, 0xc4, 0x5d, 0xab, 0x65, 0xa6, 0x9c, 0xef, 0x4b, 0xbc, 0xbd, 0x31, 0x75, 0x16, 0x8c, + 0x53, 0xe4, 0x02, 0x77, 0x6d, 0x98, 0xec, 0xa2, 0x7d, 0x74, 0xb0, 0x35, 0x9e, 0xb0, 0x36, 0x15, + 0x58, 0x63, 0x6b, 0x1c, 0xe3, 0x67, 0x84, 0xff, 0x87, 0x14, 0xf2, 0x88, 0x70, 0xb7, 0x7e, 0x24, + 0x27, 0xed, 0x94, 0xdf, 0x77, 0xef, 0x9d, 0xfe, 0xc1, 0x50, 0xf7, 0xec, 0x4f, 0xee, 0x5e, 0xde, + 0x1f, 0xfe, 0x31, 0x32, 0xe0, 0xcd, 0x59, 0x7f, 0x3f, 0x67, 0xdd, 0xe7, 0x6c, 0xf6, 0x54, 0x50, + 0xb4, 0x2e, 0x28, 0x7a, 0x2b, 0x28, 0xba, 0x2f, 0x69, 0x67, 0x5d, 0xd2, 0xce, 0x6b, 0x49, 0x3b, + 0x37, 0xe7, 0xb1, 0xf6, 0xf3, 0x2c, 0x62, 0x12, 0x12, 0x2e, 0xc1, 0x25, 0xe0, 0x2a, 0xf1, 0x30, + 0x06, 0x9e, 0x1f, 0xf1, 0x04, 0x66, 0xd9, 0x42, 0xb9, 0x3a, 0x66, 0x3c, 0x1d, 0x7e, 0x26, 0x0d, + 0x37, 0x93, 0xfc, 0xca, 0x2a, 0x17, 0x75, 0xc3, 0xbf, 0x1d, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x8f, 0x9d, 0xee, 0xfb, 0x78, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/27-interchain-accounts/module.go b/modules/apps/27-interchain-accounts/module.go index 1bb870fca5d..bb3a7f9b793 100644 --- a/modules/apps/27-interchain-accounts/module.go +++ b/modules/apps/27-interchain-accounts/module.go @@ -10,28 +10,25 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/client/cli" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller" - controllerkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper" - controllertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host" - hostkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper" - hosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/client/cli" + controllerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" + controllertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host" + hostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" + hosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} - _ porttypes.IBCModule = controller.IBCModule{} _ porttypes.IBCModule = host.IBCModule{} ) @@ -67,14 +64,16 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes implements AppModuleBasic interface -func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) { -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the interchain accounts module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - controllertypes.RegisterQueryHandlerClient(context.Background(), mux, controllertypes.NewQueryClient(clientCtx)) - hosttypes.RegisterQueryHandlerClient(context.Background(), mux, hosttypes.NewQueryClient(clientCtx)) + err := controllertypes.RegisterQueryHandlerClient(context.Background(), mux, controllertypes.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } + err = hosttypes.RegisterQueryHandlerClient(context.Background(), mux, hosttypes.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } } // GetTxCmd implements AppModuleBasic interface diff --git a/modules/apps/27-interchain-accounts/module_test.go b/modules/apps/27-interchain-accounts/module_test.go index f030eac9075..6fd6165737b 100644 --- a/modules/apps/27-interchain-accounts/module_test.go +++ b/modules/apps/27-interchain-accounts/module_test.go @@ -8,12 +8,12 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts" - controllertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - hosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" + controllertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + hosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) type InterchainAccountsTestSuite struct { @@ -125,7 +125,6 @@ func (suite *InterchainAccountsTestSuite) TestInitModule() { suite.Require().True(app.IBCKeeper.PortKeeper.IsBound(ctx, types.PortID)) } - }) } } diff --git a/modules/apps/27-interchain-accounts/types/account.go b/modules/apps/27-interchain-accounts/types/account.go index 9cd3fe4d327..38d7c4c5fe5 100644 --- a/modules/apps/27-interchain-accounts/types/account.go +++ b/modules/apps/27-interchain-accounts/types/account.go @@ -106,7 +106,6 @@ func (ia InterchainAccount) MarshalYAML() ([]byte, error) { Sequence: ia.Sequence, AccountOwner: ia.AccountOwner, }) - if err != nil { return nil, err } @@ -128,7 +127,6 @@ func (ia InterchainAccount) MarshalJSON() ([]byte, error) { Sequence: ia.Sequence, AccountOwner: ia.AccountOwner, }) - if err != nil { return nil, err } diff --git a/modules/apps/27-interchain-accounts/types/account.pb.go b/modules/apps/27-interchain-accounts/types/account.pb.go index da0a705399c..64c4b3cfb03 100644 --- a/modules/apps/27-interchain-accounts/types/account.pb.go +++ b/modules/apps/27-interchain-accounts/types/account.pb.go @@ -91,10 +91,10 @@ var fileDescriptor_5561bd92625bf7da = []byte{ 0x61, 0xb8, 0xdf, 0xd3, 0x29, 0xfe, 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, 0x5c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xa1, 0xe1, 0xa7, 0x9f, 0x99, - 0x94, 0xac, 0x9b, 0x9e, 0xaf, 0x5f, 0x66, 0xac, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0x5a, 0x0c, + 0x94, 0xac, 0x9b, 0x9e, 0xaf, 0x5f, 0x66, 0xaa, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0x5a, 0x0c, 0x8a, 0xc1, 0x62, 0x7d, 0x23, 0x73, 0x5d, 0x44, 0x2c, 0xe8, 0xc2, 0x23, 0xaf, 0xa4, 0xb2, 0x20, - 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x7c, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x07, 0x08, - 0x0e, 0xf1, 0x01, 0x00, 0x00, + 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x7c, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x24, 0x1d, + 0xdf, 0xf1, 0x01, 0x00, 0x00, } func (m *InterchainAccount) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/27-interchain-accounts/types/account_test.go b/modules/apps/27-interchain-accounts/types/account_test.go index 13acc610152..56abfc82c5e 100644 --- a/modules/apps/27-interchain-accounts/types/account_test.go +++ b/modules/apps/27-interchain-accounts/types/account_test.go @@ -10,15 +10,15 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" - // TestPortID defines a resuable port identifier for testing purposes + // TestPortID defines a reusable port identifier for testing purposes TestPortID, _ = types.NewControllerPortID(TestOwnerAddress) ) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index a5a0922cabd..033c264f9e7 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -8,14 +8,12 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) -var ( - // ModuleCdc references the global interchain accounts module codec. Note, the codec - // should ONLY be used in certain instances of tests and for JSON encoding. - // - // The actual codec used for serialization should be provided to interchain accounts and - // defined at the application level. - ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) -) +// ModuleCdc references the global interchain accounts module codec. Note, the codec +// should ONLY be used in certain instances of tests and for JSON encoding. +// +// The actual codec used for serialization should be provided to interchain accounts and +// defined at the application level. +var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) // RegisterInterfaces registers the concrete InterchainAccount implementation against the associated // x/auth AccountI and GenesisAccount interfaces diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index e027fda9346..d4055d20a25 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -4,10 +4,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) // caseRawBytes defines a helper struct, used for testing codec operations @@ -148,5 +148,4 @@ func (suite *TypesTestSuite) TestDeserializeAndSerializeCosmosTxWithAmino() { bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}) suite.Require().Error(err) suite.Require().Empty(bz) - } diff --git a/modules/apps/27-interchain-accounts/types/events.go b/modules/apps/27-interchain-accounts/types/events.go index 04882a6a644..3ca4b783b55 100644 --- a/modules/apps/27-interchain-accounts/types/events.go +++ b/modules/apps/27-interchain-accounts/types/events.go @@ -4,6 +4,8 @@ package types const ( EventTypePacket = "ics27_packet" - AttributeKeyAckError = "error" - AttributeKeyHostChannelID = "host_channel_id" + AttributeKeyAckError = "error" + AttributeKeyHostChannelID = "host_channel_id" + AttributeKeyControllerChannelID = "controller_channel_id" + AttributeKeyAckSuccess = "success" ) diff --git a/modules/apps/27-interchain-accounts/types/expected_keepers.go b/modules/apps/27-interchain-accounts/types/expected_keepers.go index 8fb0b743cda..00110df91cb 100644 --- a/modules/apps/27-interchain-accounts/types/expected_keepers.go +++ b/modules/apps/27-interchain-accounts/types/expected_keepers.go @@ -5,8 +5,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // AccountKeeper defines the expected account keeper diff --git a/modules/apps/27-interchain-accounts/types/genesis.go b/modules/apps/27-interchain-accounts/types/genesis.go index f4c5b15b6d2..38929c664b0 100644 --- a/modules/apps/27-interchain-accounts/types/genesis.go +++ b/modules/apps/27-interchain-accounts/types/genesis.go @@ -1,9 +1,9 @@ package types import ( - controllertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - hosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + controllertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + hosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // DefaultGenesis creates and returns the interchain accounts GenesisState diff --git a/modules/apps/27-interchain-accounts/types/genesis.pb.go b/modules/apps/27-interchain-accounts/types/genesis.pb.go index c73f5c395f0..7bac7e84f53 100644 --- a/modules/apps/27-interchain-accounts/types/genesis.pb.go +++ b/modules/apps/27-interchain-accounts/types/genesis.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - types1 "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" + types "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + types1 "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -354,45 +354,45 @@ var fileDescriptor_629b3ced0911516b = []byte{ // 645 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x95, 0x3f, 0x6f, 0x13, 0x3f, 0x18, 0xc7, 0xe3, 0xa4, 0xbf, 0xfe, 0x14, 0xf7, 0x0f, 0xc5, 0x94, 0xea, 0x08, 0xd2, 0x25, 0x78, - 0x69, 0x24, 0xd4, 0x3b, 0xf5, 0x0f, 0x54, 0x54, 0x42, 0xa8, 0x17, 0x10, 0x64, 0x43, 0x66, 0x41, + 0x69, 0x24, 0xd4, 0x3b, 0xb5, 0xb4, 0x54, 0x54, 0x42, 0xa8, 0x17, 0x10, 0x64, 0x43, 0x66, 0x41, 0x2c, 0x27, 0xc7, 0x67, 0x25, 0x96, 0x92, 0x73, 0x74, 0x76, 0x23, 0x75, 0x62, 0x67, 0x62, 0x43, 0xac, 0x48, 0xbc, 0x00, 0xde, 0x01, 0x63, 0x27, 0xd4, 0x91, 0x29, 0x42, 0xed, 0x3b, 0xc8, 0x2b, 0x40, 0xf6, 0x9d, 0x92, 0xf4, 0x48, 0xab, 0x9b, 0x98, 0x98, 0x62, 0xdf, 0xe3, 0xef, 0xf7, 0xf9, - 0x3c, 0x7e, 0x1c, 0x1b, 0x3e, 0x12, 0x1d, 0xe6, 0xd3, 0xe1, 0xb0, 0x2f, 0x18, 0xd5, 0x42, 0xc6, - 0xca, 0x17, 0xb1, 0xe6, 0x09, 0xeb, 0x51, 0x11, 0x87, 0x94, 0x31, 0x79, 0x12, 0x6b, 0xe5, 0x8f, - 0x76, 0xfd, 0x2e, 0x8f, 0xb9, 0x12, 0xca, 0x1b, 0x26, 0x52, 0x4b, 0xb4, 0x2d, 0x3a, 0xcc, 0x9b, - 0x97, 0x79, 0x0b, 0x64, 0xde, 0x68, 0xb7, 0xb6, 0xd9, 0x95, 0x5d, 0x69, 0x35, 0xbe, 0x19, 0xa5, - 0xf2, 0x5a, 0xab, 0x50, 0x56, 0x26, 0x63, 0x9d, 0xc8, 0x7e, 0x9f, 0x27, 0x06, 0x60, 0x36, 0xcb, - 0x4c, 0x0e, 0x0b, 0x99, 0xf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x4c, 0xa1, 0x4d, 0xf8, 0xdf, - 0x50, 0x26, 0x5a, 0x39, 0x95, 0x46, 0xa5, 0x59, 0x25, 0xe9, 0x04, 0xbd, 0x85, 0xcb, 0x43, 0x9a, - 0xd0, 0x81, 0x72, 0x96, 0x6c, 0x37, 0x8f, 0x8a, 0x31, 0xce, 0xfd, 0x23, 0x46, 0xbb, 0xde, 0x6b, - 0xeb, 0x10, 0x2c, 0x19, 0x32, 0x92, 0xf9, 0xe1, 0x4f, 0x15, 0xb8, 0x91, 0xef, 0xf8, 0xbf, 0x0e, - 0xdd, 0xd4, 0x21, 0x04, 0x97, 0x4c, 0x53, 0x9c, 0x4a, 0x03, 0x34, 0xab, 0xc4, 0x8e, 0x11, 0xc9, - 0xf5, 0xe7, 0xa0, 0x18, 0xa1, 0xbd, 0x72, 0xae, 0xeb, 0xcc, 0x37, 0x00, 0xd7, 0xae, 0xec, 0x22, - 0x7a, 0x0a, 0xd7, 0x98, 0x8c, 0x63, 0xce, 0x8c, 0x63, 0x28, 0x22, 0x7b, 0xf3, 0x54, 0x03, 0x67, - 0x32, 0xae, 0x6f, 0x4e, 0x2f, 0x8d, 0x59, 0x18, 0x93, 0xd5, 0xd9, 0xbc, 0x1d, 0xa1, 0x87, 0xf0, - 0x7f, 0x03, 0x6b, 0x84, 0x65, 0x2b, 0x44, 0x93, 0x71, 0x7d, 0x3d, 0x15, 0x66, 0x01, 0x4c, 0x96, - 0xcd, 0xa8, 0x1d, 0xa1, 0x03, 0x08, 0xb3, 0xf6, 0x98, 0xf5, 0xb6, 0xd6, 0xe0, 0xee, 0x64, 0x5c, - 0xbf, 0x9d, 0x25, 0x9a, 0xc6, 0x30, 0xa9, 0x66, 0x93, 0x76, 0x84, 0x7f, 0x00, 0x78, 0xff, 0x86, - 0x3d, 0xff, 0xab, 0x15, 0xb4, 0xcc, 0x21, 0xb6, 0x69, 0x43, 0x1a, 0x45, 0x09, 0x57, 0x2a, 0x2b, - 0xa3, 0x36, 0x7f, 0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51, 0x9b, 0x3f, 0x88, 0x57, 0x16, 0xd8, 0x83, 0x68, 0xbf, 0x1c, 0xa7, 0x1f, 0x82, 0xf0, 0xec, + 0xc2, 0x05, 0xe7, 0x17, 0x2e, 0xf8, 0x75, 0xe1, 0x82, 0x8f, 0x97, 0x6e, 0xe9, 0xfc, 0xd2, 0x2d, + 0xfd, 0xbc, 0x74, 0x4b, 0xef, 0x5e, 0x74, 0x85, 0xee, 0x9d, 0x74, 0x3c, 0x26, 0x07, 0x3e, 0x93, + 0x6a, 0x20, 0x95, 0x2f, 0x3a, 0x6c, 0xa7, 0x2b, 0xfd, 0xd1, 0x81, 0x3f, 0x90, 0xd1, 0x49, 0x9f, + 0x2b, 0xf3, 0xf8, 0x28, 0x7f, 0xef, 0x70, 0x67, 0xd6, 0xfc, 0x9d, 0xe9, 0xbb, 0xa3, 0x4f, 0x87, + 0x5c, 0x75, 0x96, 0xed, 0x8b, 0xf3, 0xe8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x2b, 0x9a, + 0xce, 0x67, 0x07, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/27-interchain-accounts/types/genesis_test.go b/modules/apps/27-interchain-accounts/types/genesis_test.go index 7e6ffdc280b..9adc1469564 100644 --- a/modules/apps/27-interchain-accounts/types/genesis_test.go +++ b/modules/apps/27-interchain-accounts/types/genesis_test.go @@ -1,16 +1,14 @@ package types_test import ( - controllertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - hosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + controllertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + hosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TypesTestSuite) TestValidateGenesisState() { - var ( - genesisState types.GenesisState - ) + var genesisState types.GenesisState testCases := []struct { name string @@ -63,9 +61,7 @@ func (suite *TypesTestSuite) TestValidateGenesisState() { } func (suite *TypesTestSuite) TestValidateControllerGenesisState() { - var ( - genesisState types.ControllerGenesisState - ) + var genesisState types.ControllerGenesisState testCases := []struct { name string @@ -188,9 +184,7 @@ func (suite *TypesTestSuite) TestValidateControllerGenesisState() { } func (suite *TypesTestSuite) TestValidateHostGenesisState() { - var ( - genesisState types.HostGenesisState - ) + var genesisState types.HostGenesisState testCases := []struct { name string diff --git a/modules/apps/27-interchain-accounts/types/keys_test.go b/modules/apps/27-interchain-accounts/types/keys_test.go index 94c7a3bed0d..45800573a12 100644 --- a/modules/apps/27-interchain-accounts/types/keys_test.go +++ b/modules/apps/27-interchain-accounts/types/keys_test.go @@ -1,7 +1,7 @@ package types_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" ) func (suite *TypesTestSuite) TestKeyActiveChannel() { diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index 3a7eae51cdf..1cbd9dbe640 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) const ( @@ -27,6 +27,28 @@ func NewMetadata(version, controllerConnectionID, hostConnectionID, accAddress, } } +// NewDefaultMetadata creates and returns a new ICS27 Metadata instance containing the default ICS27 Metadata values +// with the provided controller and host connection identifiers +func NewDefaultMetadata(controllerConnectionID, hostConnectionID string) Metadata { + metadata := Metadata{ + ControllerConnectionId: controllerConnectionID, + HostConnectionId: hostConnectionID, + Encoding: EncodingProtobuf, + TxType: TxTypeSDKMultiMsg, + Version: Version, + } + + return metadata +} + +// NewDefaultMetadataString creates and returns a new JSON encoded version string containing the default ICS27 Metadata values +// with the provided controller and host connection identifiers +func NewDefaultMetadataString(controllerConnectionID, hostConnectionID string) string { + metadata := NewDefaultMetadata(controllerConnectionID, hostConnectionID) + + return string(ModuleCdc.MustMarshalJSON(&metadata)) +} + // IsPreviousMetadataEqual compares a metadata to a previous version string set in a channel struct. // It ensures all fields are equal except the Address string func IsPreviousMetadataEqual(previousVersion string, metadata Metadata) bool { diff --git a/modules/apps/27-interchain-accounts/types/metadata.pb.go b/modules/apps/27-interchain-accounts/types/metadata.pb.go index 907e8c0c01d..309eac5d692 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.pb.go +++ b/modules/apps/27-interchain-accounts/types/metadata.pb.go @@ -128,26 +128,26 @@ var fileDescriptor_c29c32e397d1f21e = []byte{ // 349 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x4a, 0xeb, 0x40, 0x18, 0xc5, 0x9b, 0xde, 0x6b, 0x5b, 0x67, 0x25, 0x83, 0xe8, 0x58, 0x30, 0x95, 0xb8, 0xd0, 0x4d, - 0x33, 0xd4, 0x82, 0x82, 0xcb, 0x8a, 0x0b, 0x11, 0x37, 0xc5, 0x95, 0x20, 0x61, 0x32, 0x33, 0xa4, - 0x03, 0xc9, 0x7c, 0x21, 0x33, 0x0d, 0xed, 0x5b, 0xf8, 0x06, 0xbe, 0x8e, 0xcb, 0x2e, 0x5d, 0x15, - 0x69, 0xdf, 0xa0, 0x4f, 0x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, 0xf1, 0x3e, 0xaa, 0xdb, - 0x51, 0x60, 0xc7, 0xa9, 0x24, 0xb5, 0xd2, 0xaa, 0xd9, 0xd1, 0xfd, 0x38, 0x95, 0xbd, 0xe0, 0x65, - 0xe6, 0x3a, 0x93, 0x99, 0xeb, 0xbc, 0xcd, 0x5c, 0xe7, 0x69, 0xee, 0x56, 0x26, 0x73, 0xb7, 0xf2, - 0x3a, 0x77, 0x2b, 0x0f, 0xd7, 0x91, 0xb2, 0x83, 0x61, 0xe8, 0x73, 0x48, 0x28, 0x07, 0x93, 0x80, - 0xa1, 0x2a, 0xe4, 0xed, 0x08, 0x68, 0xde, 0xa5, 0x09, 0x88, 0x61, 0x2c, 0x4d, 0x31, 0xa9, 0xa1, - 0x67, 0x17, 0xed, 0xcd, 0x2a, 0xed, 0xf5, 0x9a, 0xc5, 0x35, 0x13, 0xd6, 0xca, 0x25, 0xba, 0xef, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x74, 0x28, 0x89, 0x02, 0x02, 0x00, 0x00, + 0x33, 0x54, 0x51, 0xc1, 0x65, 0xc5, 0x85, 0x88, 0x9b, 0xe2, 0x4a, 0x90, 0x30, 0x99, 0x19, 0xd2, + 0x81, 0x64, 0xbe, 0x90, 0x99, 0x86, 0xf6, 0x2d, 0x7c, 0x03, 0x5f, 0xc7, 0x65, 0x97, 0xae, 0x8a, + 0xb4, 0x6f, 0xd0, 0x27, 0x90, 0xa4, 0xb5, 0xf5, 0xef, 0x2e, 0x27, 0xe7, 0x9c, 0xdf, 0xc7, 0x70, + 0xd0, 0xb9, 0x0a, 0x39, 0x65, 0x69, 0x1a, 0x2b, 0xce, 0xac, 0x02, 0x6d, 0xa8, 0xd2, 0x56, 0x66, + 0xbc, 0xcf, 0x94, 0x0e, 0x18, 0xe7, 0x30, 0xd0, 0xd6, 0xd0, 0xbc, 0x43, 0x13, 0x69, 0x99, 0x60, + 0x96, 0xf9, 0x69, 0x06, 0x16, 0xf0, 0x91, 0x0a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, 0xc0, + 0x50, 0x15, 0xf2, 0x76, 0x04, 0x34, 0x3f, 0xa3, 0x09, 0x88, 0x41, 0x2c, 0x4d, 0x31, 0xa9, 0xa1, + 0x27, 0x17, 0xed, 0xf5, 0x2a, 0xed, 0xd5, 0x9a, 0xc5, 0x35, 0x13, 0xd6, 0xca, 0x25, 0x4e, 0xdf, + 0x03, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x57, 0x3d, 0x58, 0x02, 0x02, 0x00, 0x00, } func (m *Metadata) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/27-interchain-accounts/types/metadata_test.go b/modules/apps/27-interchain-accounts/types/metadata_test.go index 05a1b457c38..a3dd388ba43 100644 --- a/modules/apps/27-interchain-accounts/types/metadata_test.go +++ b/modules/apps/27-interchain-accounts/types/metadata_test.go @@ -1,13 +1,12 @@ package types_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) // use TestVersion as metadata being compared against func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { - var ( metadata types.Metadata previousVersion string @@ -127,7 +126,6 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { } func (suite *TypesTestSuite) TestValidateControllerMetadata() { - var metadata types.Metadata testCases := []struct { @@ -269,7 +267,6 @@ func (suite *TypesTestSuite) TestValidateControllerMetadata() { } func (suite *TypesTestSuite) TestValidateHostMetadata() { - var metadata types.Metadata testCases := []struct { diff --git a/modules/apps/27-interchain-accounts/types/packet.pb.go b/modules/apps/27-interchain-accounts/types/packet.pb.go index 98bc3e99ab0..2fdbc0ecbda 100644 --- a/modules/apps/27-interchain-accounts/types/packet.pb.go +++ b/modules/apps/27-interchain-accounts/types/packet.pb.go @@ -170,32 +170,32 @@ func init() { } var fileDescriptor_89a080d7401cd393 = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x41, 0x8b, 0xd3, 0x40, - 0x18, 0xcd, 0xb8, 0x41, 0xd6, 0x59, 0xd9, 0x2d, 0x61, 0x0f, 0x31, 0x42, 0x08, 0x2b, 0x62, 0x10, - 0x32, 0xe3, 0xb6, 0x82, 0x17, 0x2f, 0xb5, 0x8d, 0xd0, 0x8b, 0x94, 0x98, 0x42, 0xf5, 0x12, 0x26, - 0xd3, 0x31, 0x1d, 0x6c, 0x32, 0xa1, 0x33, 0x29, 0xe6, 0x1f, 0x94, 0x9e, 0xfc, 0x03, 0x3d, 0xf9, - 0x67, 0x3c, 0xf6, 0xe8, 0x51, 0xda, 0x3f, 0x22, 0x99, 0x60, 0xdb, 0x83, 0x07, 0x6f, 0x8f, 0xc7, - 0xf7, 0xde, 0xf7, 0xbd, 0xef, 0xc1, 0xd7, 0x3c, 0xa5, 0x98, 0x94, 0xe5, 0x82, 0x53, 0xa2, 0xb8, - 0x28, 0x24, 0xe6, 0x85, 0x62, 0x4b, 0x3a, 0x27, 0xbc, 0x48, 0x08, 0xa5, 0xa2, 0x2a, 0x94, 0xc4, - 0xab, 0x7b, 0x5c, 0x12, 0xfa, 0x95, 0x29, 0x54, 0x2e, 0x85, 0x12, 0xd6, 0x0b, 0x9e, 0x52, 0x74, - 0xae, 0x42, 0xff, 0x50, 0xa1, 0xd5, 0xbd, 0xf3, 0x24, 0x13, 0x22, 0x5b, 0x30, 0xac, 0x65, 0x69, - 0xf5, 0x05, 0x93, 0xa2, 0x6e, 0x3d, 0x9c, 0xdb, 0x4c, 0x64, 0x42, 0x43, 0xdc, 0xa0, 0x96, 0xbd, - 0x5b, 0x03, 0xf8, 0x74, 0x74, 0xf4, 0xea, 0xb7, 0x56, 0x63, 0xbd, 0x7b, 0x48, 0x14, 0xb1, 0xfa, - 0xd0, 0x54,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0x36, 0x65, 0x4b, 0xdc, 0x7d, 0x13, 0x9c, 0x1e, - 0x15, 0x1c, 0x7b, 0x6e, 0xfe, 0x23, 0xd3, 0x87, 0x3a, 0x52, 0xef, 0x4f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xdd, 0x25, 0x3e, 0xc6, 0x1c, 0x02, 0x00, 0x00, + // 392 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xc1, 0xaa, 0xd3, 0x40, + 0x14, 0xcd, 0xf8, 0x82, 0x3c, 0xe7, 0xc9, 0x7b, 0x25, 0xbc, 0x45, 0x8c, 0x10, 0xc2, 0x13, 0x31, + 0x08, 0x99, 0xb1, 0x55, 0x71, 0xe3, 0xa6, 0xb6, 0x11, 0xba, 0x91, 0x12, 0x53, 0xa8, 0x6e, 0xc2, + 0x64, 0x3a, 0xa6, 0x83, 0x4d, 0x26, 0x74, 0x26, 0xc5, 0xfc, 0x41, 0xe9, 0xca, 0x1f, 0xe8, 0xca, + 0x9f, 0x71, 0xd9, 0xa5, 0x4b, 0x69, 0x7f, 0x44, 0x32, 0xc1, 0xb6, 0x0b, 0x17, 0xee, 0x0e, 0x87, + 0x7b, 0xce, 0xbd, 0xe7, 0x1e, 0xf8, 0x8a, 0xa7, 0x14, 0x93, 0xb2, 0x5c, 0x70, 0x4a, 0x14, 0x17, + 0x85, 0xc4, 0xbc, 0x50, 0x6c, 0x49, 0xe7, 0x84, 0x17, 0x09, 0xa1, 0x54, 0x54, 0x85, 0x92, 0x78, + 0xd5, 0xc5, 0x25, 0xa1, 0x5f, 0x99, 0x42, 0xe5, 0x52, 0x28, 0x61, 0x3d, 0xe3, 0x29, 0x45, 0xe7, + 0x2a, 0xf4, 0x0f, 0x15, 0x5a, 0x75, 0x9d, 0x47, 0x99, 0x10, 0xd9, 0x82, 0x61, 0x2d, 0x4b, 0xab, + 0x2f, 0x98, 0x14, 0x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83, 0x6b, 0xfc, 0x3a, 0xb8, 0xc6, 0xe7, + 0x30, 0xe3, 0x6a, 0x5e, 0xa5, 0x88, 0x8a, 0x1c, 0x53, 0x7d, 0x3a, 0xe6, 0x29, 0x0d, 0x32, 0x81, + 0x57, 0xaf, 0x71, 0x2e, 0x66, 0xd5, 0x82, 0xc9, 0xa6, 0x6c, 0x89, 0x7b, 0x6f, 0x82, 0xd3, 0xa3, + 0x82, 0x63, 0xcf, 0xcd, 0x7f, 0x64, 0x7a, 0x5f, 0x47, 0x7a, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, + 0x74, 0x06, 0x2b, 0x17, 0x1c, 0x02, 0x00, 0x00, } func (m *InterchainAccountPacketData) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/27-interchain-accounts/types/packet_test.go b/modules/apps/27-interchain-accounts/types/packet_test.go index 840ca529851..3bf0d5bd572 100644 --- a/modules/apps/27-interchain-accounts/types/packet_test.go +++ b/modules/apps/27-interchain-accounts/types/packet_test.go @@ -1,7 +1,7 @@ package types_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" ) var largeMemo = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum" @@ -33,7 +33,7 @@ func (suite *TypesTestSuite) TestValidateBasic() { "type unspecified", types.InterchainAccountPacketData{ Type: types.UNSPECIFIED, - Data: []byte("data"), + Data: []byte("data"), Memo: "memo", }, false, diff --git a/modules/apps/27-interchain-accounts/types/port_test.go b/modules/apps/27-interchain-accounts/types/port_test.go index bdef740cd98..fa24b3eac1a 100644 --- a/modules/apps/27-interchain-accounts/types/port_test.go +++ b/modules/apps/27-interchain-accounts/types/port_test.go @@ -3,8 +3,8 @@ package types_test import ( "fmt" - "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TypesTestSuite) TestNewControllerPortID() { diff --git a/modules/apps/29-fee/client/cli/cli.go b/modules/apps/29-fee/client/cli/cli.go index a0141c20f9a..0fdeb0f398e 100644 --- a/modules/apps/29-fee/client/cli/cli.go +++ b/modules/apps/29-fee/client/cli/cli.go @@ -1,8 +1,9 @@ package cli import ( - "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" ) // GetQueryCmd returns the query commands for 29-fee @@ -21,7 +22,8 @@ func GetQueryCmd() *cobra.Command { GetCmdTotalAckFees(), GetCmdTotalTimeoutFees(), GetCmdIncentivizedPacketsForChannel(), - GetCmdCounterpartyAddress(), + GetCmdPayee(), + GetCmdCounterpartyPayee(), GetCmdFeeEnabledChannel(), GetCmdFeeEnabledChannels(), ) @@ -40,8 +42,9 @@ func NewTxCmd() *cobra.Command { } txCmd.AddCommand( + NewRegisterPayeeCmd(), + NewRegisterCounterpartyPayeeCmd(), NewPayPacketFeeAsyncTxCmd(), - NewRegisterCounterpartyAddress(), ) return txCmd diff --git a/modules/apps/29-fee/client/cli/query.go b/modules/apps/29-fee/client/cli/query.go index a183c8f89d3..365894c860f 100644 --- a/modules/apps/29-fee/client/cli/query.go +++ b/modules/apps/29-fee/client/cli/query.go @@ -8,9 +8,10 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" "github.com/spf13/cobra" + + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // GetCmdIncentivizedPacket returns the unrelayed incentivized packet for a given packetID @@ -20,22 +21,23 @@ func GetCmdIncentivizedPacket() *cobra.Command { Short: "Query for an unrelayed incentivized packet by port-id, channel-id and packet sequence.", Long: "Query for an unrelayed incentivized packet by port-id, channel-id and packet sequence.", Args: cobra.ExactArgs(3), - Example: fmt.Sprintf("%s query ibc-fee packet-by-id", version.AppName), + Example: fmt.Sprintf("%s query ibc-fee packet", version.AppName), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err } + portID, channelID := args[0], args[1] seq, err := strconv.ParseUint(args[2], 10, 64) if err != nil { return err } - packetID := channeltypes.PacketId{ - PortId: args[0], - ChannelId: args[1], - Sequence: seq, + packetID := channeltypes.NewPacketID(portID, channelID, seq) + + if err := packetID.Validate(); err != nil { + return err } req := &types.QueryIncentivizedPacketRequest{ @@ -120,7 +122,7 @@ func GetCmdTotalRecvFees() *cobra.Command { return err } - packetID := channeltypes.NewPacketId(portID, channelID, seq) + packetID := channeltypes.NewPacketID(portID, channelID, seq) if err := packetID.Validate(); err != nil { return err @@ -166,7 +168,7 @@ func GetCmdTotalAckFees() *cobra.Command { return err } - packetID := channeltypes.NewPacketId(portID, channelID, seq) + packetID := channeltypes.NewPacketID(portID, channelID, seq) if err := packetID.Validate(); err != nil { return err @@ -212,7 +214,7 @@ func GetCmdTotalTimeoutFees() *cobra.Command { return err } - packetID := channeltypes.NewPacketId(portID, channelID, seq) + packetID := channeltypes.NewPacketID(portID, channelID, seq) if err := packetID.Validate(); err != nil { return err @@ -238,14 +240,53 @@ func GetCmdTotalTimeoutFees() *cobra.Command { return cmd } -// GetCmdCounterpartyAddress returns the command handler for the Query/CounterpartyAddress rpc. -func GetCmdCounterpartyAddress() *cobra.Command { +// GetCmdPayee returns the command handler for the Query/Payee rpc. +func GetCmdPayee() *cobra.Command { + cmd := &cobra.Command{ + Use: "payee [channel-id] [relayer]", + Short: "Query the relayer payee address on a given channel", + Long: "Query the relayer payee address on a given channel", + Args: cobra.ExactArgs(2), + Example: fmt.Sprintf("%s query ibc-fee payee channel-5 cosmos1layxcsmyye0dc0har9sdfzwckaz8sjwlfsj8zs", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + if _, err := sdk.AccAddressFromBech32(args[1]); err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + req := &types.QueryPayeeRequest{ + ChannelId: args[0], + Relayer: args[1], + } + + res, err := queryClient.Payee(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetCmdCounterpartyPayee returns the command handler for the Query/CounterpartyPayee rpc. +func GetCmdCounterpartyPayee() *cobra.Command { cmd := &cobra.Command{ - Use: "counterparty-address [channel-id] [address]", - Short: "Query the relayer counterparty address on a given channel", - Long: "Query the relayer counterparty address on a given channel", + Use: "counterparty-payee [channel-id] [relayer]", + Short: "Query the relayer counterparty payee on a given channel", + Long: "Query the relayer counterparty payee on a given channel", Args: cobra.ExactArgs(2), - Example: fmt.Sprintf("%s query ibc-fee counterparty-address channel-5 cosmos1layxcsmyye0dc0har9sdfzwckaz8sjwlfsj8zs", version.AppName), + Example: fmt.Sprintf("%s query ibc-fee counterparty-payee channel-5 cosmos1layxcsmyye0dc0har9sdfzwckaz8sjwlfsj8zs", version.AppName), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -258,12 +299,12 @@ func GetCmdCounterpartyAddress() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - req := &types.QueryCounterpartyAddressRequest{ - ChannelId: args[0], - RelayerAddress: args[1], + req := &types.QueryCounterpartyPayeeRequest{ + ChannelId: args[0], + Relayer: args[1], } - res, err := queryClient.CounterpartyAddress(cmd.Context(), req) + res, err := queryClient.CounterpartyPayee(cmd.Context(), req) if err != nil { return err } @@ -272,6 +313,8 @@ func GetCmdCounterpartyAddress() *cobra.Command { }, } + flags.AddQueryFlagsToCmd(cmd) + return cmd } diff --git a/modules/apps/29-fee/client/cli/tx.go b/modules/apps/29-fee/client/cli/tx.go index f1f858b60cd..4768be0485a 100644 --- a/modules/apps/29-fee/client/cli/tx.go +++ b/modules/apps/29-fee/client/cli/tx.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) const ( @@ -22,6 +22,56 @@ const ( flagTimeoutFee = "timeout-fee" ) +// NewRegisterPayeeCmd returns the command to create a MsgRegisterPayee +func NewRegisterPayeeCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "register-payee [port-id] [channel-id] [relayer] [payee] ", + Short: "Register a payee on a given channel.", + Long: strings.TrimSpace(`Register a payee address on a given channel.`), + Example: fmt.Sprintf("%s tx ibc-fee register-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5", version.AppName), + Args: cobra.ExactArgs(4), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgRegisterPayee(args[0], args[1], args[2], args[3]) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +// NewRegisterCounterpartyPayeeCmd returns the command to create a MsgRegisterCounterpartyPayee +func NewRegisterCounterpartyPayeeCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "register-counterparty-payee [port-id] [channel-id] [relayer] [counterparty-payee] ", + Short: "Register a counterparty payee address on a given channel.", + Long: strings.TrimSpace(`Register a counterparty payee address on a given channel.`), + Example: fmt.Sprintf("%s tx ibc-fee register-counterparty-payee transfer channel-0 cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2", version.AppName), + Args: cobra.ExactArgs(4), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgRegisterCounterpartyPayee(args[0], args[1], args[2], args[3]) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + // NewPayPacketFeeAsyncTxCmd returns the command to create a MsgPayPacketFeeAsync func NewPayPacketFeeAsyncTxCmd() *cobra.Command { cmd := &cobra.Command{ @@ -45,7 +95,7 @@ func NewPayPacketFeeAsyncTxCmd() *cobra.Command { return err } - packetID := channeltypes.NewPacketId(args[0], args[1], seq) + packetID := channeltypes.NewPacketID(args[0], args[1], seq) recvFeeStr, err := cmd.Flags().GetString(flagRecvFee) if err != nil { @@ -97,28 +147,3 @@ func NewPayPacketFeeAsyncTxCmd() *cobra.Command { return cmd } - -// NewRegisterCounterpartyAddress returns the command to create a MsgRegisterCounterpartyAddress -func NewRegisterCounterpartyAddress() *cobra.Command { - cmd := &cobra.Command{ - Use: "register-counterparty [address] [counterparty-address] [channel-id]", - Short: "Register a counterparty relayer address on a given channel.", - Long: strings.TrimSpace(`Register a counterparty relayer address on a given channel.`), - Example: fmt.Sprintf("%s tx ibc-fee register-counterparty cosmos1rsp837a4kvtgp2m4uqzdge0zzu6efqgucm0qdh osmo1v5y0tz01llxzf4c2afml8s3awue0ymju22wxx2 channel-0", version.AppName), - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgRegisterCounterpartyAddress(args[0], args[1], args[2]) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/modules/apps/29-fee/fee_test.go b/modules/apps/29-fee/fee_test.go index d2445adef22..3c84f74e52c 100644 --- a/modules/apps/29-fee/fee_test.go +++ b/modules/apps/29-fee/fee_test.go @@ -5,11 +5,11 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) type FeeTestSuite struct { diff --git a/modules/apps/29-fee/ibc_module.go b/modules/apps/29-fee/ibc_middleware.go similarity index 54% rename from modules/apps/29-fee/ibc_module.go rename to modules/apps/29-fee/ibc_middleware.go index 6ed9faa1f34..9a3b7ff4611 100644 --- a/modules/apps/29-fee/ibc_module.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -1,33 +1,38 @@ package fee import ( + "strings" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) -// IBCModule implements the ICS26 callbacks for the fee middleware given the fee keeper and the underlying application. -type IBCModule struct { - keeper keeper.Keeper +var _ porttypes.Middleware = &IBCMiddleware{} + +// IBCMiddleware implements the ICS26 callbacks for the fee middleware given the +// fee keeper and the underlying application. +type IBCMiddleware struct { app porttypes.IBCModule + keeper keeper.Keeper } -// NewIBCModule creates a new IBCModule given the keeper and underlying application -func NewIBCModule(k keeper.Keeper, app porttypes.IBCModule) IBCModule { - return IBCModule{ - keeper: k, +// NewIBCMiddleware creates a new IBCMiddlware given the keeper and underlying application +func NewIBCMiddleware(app porttypes.IBCModule, k keeper.Keeper) IBCMiddleware { + return IBCMiddleware{ app: app, + keeper: k, } } -// OnChanOpenInit implements the IBCModule interface -func (im IBCModule) OnChanOpenInit( +// OnChanOpenInit implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -36,31 +41,50 @@ func (im IBCModule) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { var versionMetadata types.Metadata - if err := types.ModuleCdc.UnmarshalJSON([]byte(version), &versionMetadata); err != nil { - // Since it is valid for fee version to not be specified, the above middleware version may be for a middleware - // lower down in the stack. Thus, if it is not a fee version we pass the entire version string onto the underlying - // application. - return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, - chanCap, counterparty, version) + + if strings.TrimSpace(version) == "" { + // default version + versionMetadata = types.Metadata{ + FeeVersion: types.Version, + AppVersion: "", + } + } else { + if err := types.ModuleCdc.UnmarshalJSON([]byte(version), &versionMetadata); err != nil { + // Since it is valid for fee version to not be specified, the above middleware version may be for a middleware + // lower down in the stack. Thus, if it is not a fee version we pass the entire version string onto the underlying + // application. + return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, + chanCap, counterparty, version) + } } if versionMetadata.FeeVersion != types.Version { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "expected %s, got %s", types.Version, versionMetadata.FeeVersion) + return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "expected %s, got %s", types.Version, versionMetadata.FeeVersion) + } + + appVersion, err := im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, versionMetadata.AppVersion) + if err != nil { + return "", err + } + + versionMetadata.AppVersion = appVersion + versionBytes, err := types.ModuleCdc.MarshalJSON(&versionMetadata) + if err != nil { + return "", err } im.keeper.SetFeeEnabled(ctx, portID, channelID) // call underlying app's OnChanOpenInit callback with the appVersion - return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, - chanCap, counterparty, versionMetadata.AppVersion) + return string(versionBytes), nil } -// OnChanOpenTry implements the IBCModule interface +// OnChanOpenTry implements the IBCMiddleware interface // If the channel is not fee enabled the underlying application version will be returned // If the channel is fee enabled we merge the underlying application version with the ics29 version -func (im IBCModule) OnChanOpenTry( +func (im IBCMiddleware) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -91,7 +115,6 @@ func (im IBCModule) OnChanOpenTry( } versionMetadata.AppVersion = appVersion - versionBytes, err := types.ModuleCdc.MarshalJSON(&versionMetadata) if err != nil { return "", err @@ -100,8 +123,8 @@ func (im IBCModule) OnChanOpenTry( return string(versionBytes), nil } -// OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenAck( +// OnChanOpenAck implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenAck( ctx sdk.Context, portID, channelID string, @@ -113,7 +136,7 @@ func (im IBCModule) OnChanOpenAck( if im.keeper.IsFeeEnabled(ctx, portID, channelID) { var versionMetadata types.Metadata if err := types.ModuleCdc.UnmarshalJSON([]byte(counterpartyVersion), &versionMetadata); err != nil { - return sdkerrors.Wrap(types.ErrInvalidVersion, "failed to unmarshal ICS29 counterparty version metadata") + return sdkerrors.Wrapf(err, "failed to unmarshal ICS29 counterparty version metadata: %s", counterpartyVersion) } if versionMetadata.FeeVersion != types.Version { @@ -128,8 +151,8 @@ func (im IBCModule) OnChanOpenAck( return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) } -// OnChanOpenConfirm implements the IBCModule interface -func (im IBCModule) OnChanOpenConfirm( +// OnChanOpenConfirm implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenConfirm( ctx sdk.Context, portID, channelID string, @@ -138,8 +161,8 @@ func (im IBCModule) OnChanOpenConfirm( return im.app.OnChanOpenConfirm(ctx, portID, channelID) } -// OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( +// OnChanCloseInit implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -148,6 +171,14 @@ func (im IBCModule) OnChanCloseInit( return err } + if !im.keeper.IsFeeEnabled(ctx, portID, channelID) { + return nil + } + + if im.keeper.IsLocked(ctx) { + return types.ErrFeeModuleLocked + } + if err := im.keeper.RefundFeesOnChannelClosure(ctx, portID, channelID); err != nil { return err } @@ -155,8 +186,8 @@ func (im IBCModule) OnChanCloseInit( return nil } -// OnChanCloseConfirm implements the IBCModule interface -func (im IBCModule) OnChanCloseConfirm( +// OnChanCloseConfirm implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, @@ -165,6 +196,14 @@ func (im IBCModule) OnChanCloseConfirm( return err } + if !im.keeper.IsFeeEnabled(ctx, portID, channelID) { + return nil + } + + if im.keeper.IsLocked(ctx) { + return types.ErrFeeModuleLocked + } + if err := im.keeper.RefundFeesOnChannelClosure(ctx, portID, channelID); err != nil { return err } @@ -172,9 +211,9 @@ func (im IBCModule) OnChanCloseConfirm( return nil } -// OnRecvPacket implements the IBCModule interface. +// OnRecvPacket implements the IBCMiddleware interface. // If fees are not enabled, this callback will default to the ibc-core packet callback -func (im IBCModule) OnRecvPacket( +func (im IBCMiddleware) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, @@ -185,21 +224,21 @@ func (im IBCModule) OnRecvPacket( ack := im.app.OnRecvPacket(ctx, packet, relayer) - // incase of async aknowledgement (ack == nil) store the relayer address for use later during async WriteAcknowledgement + // in case of async aknowledgement (ack == nil) store the relayer address for use later during async WriteAcknowledgement if ack == nil { - im.keeper.SetRelayerAddressForAsyncAck(ctx, channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()), relayer.String()) + im.keeper.SetRelayerAddressForAsyncAck(ctx, channeltypes.NewPacketID(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()), relayer.String()) return nil } // if forwardRelayer is not found we refund recv_fee - forwardRelayer, _ := im.keeper.GetCounterpartyAddress(ctx, relayer.String(), packet.GetDestChannel()) + forwardRelayer, _ := im.keeper.GetCounterpartyPayeeAddress(ctx, relayer.String(), packet.GetDestChannel()) return types.NewIncentivizedAcknowledgement(forwardRelayer, ack.Acknowledgement(), ack.Success()) } -// OnAcknowledgementPacket implements the IBCModule interface +// OnAcknowledgementPacket implements the IBCMiddleware interface // If fees are not enabled, this callback will default to the ibc-core packet callback -func (im IBCModule) OnAcknowledgementPacket( +func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, @@ -209,8 +248,8 @@ func (im IBCModule) OnAcknowledgementPacket( return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) } - ack := new(types.IncentivizedAcknowledgement) - if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, ack); err != nil { + var ack types.IncentivizedAcknowledgement + if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil { return sdkerrors.Wrapf(err, "cannot unmarshal ICS-29 incentivized packet acknowledgement: %v", ack) } @@ -223,25 +262,38 @@ func (im IBCModule) OnAcknowledgementPacket( // for fee enabled channels // // Please see ADR 004 for more information. - return im.app.OnAcknowledgementPacket(ctx, packet, ack.Result, relayer) + return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) } - packetID := channeltypes.NewPacketId(packet.SourcePort, packet.SourceChannel, packet.Sequence) + packetID := channeltypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence) feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID) - if found { - im.keeper.DistributePacketFeesOnAcknowledgement(ctx, ack.ForwardRelayerAddress, relayer, feesInEscrow.PacketFees) + if !found { + // call underlying callback + return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) + } - // removes the fees from the store as fees are now paid - im.keeper.DeleteFeesInEscrow(ctx, packetID) + payee, found := im.keeper.GetPayeeAddress(ctx, relayer.String(), packet.SourceChannel) + if !found { + im.keeper.DistributePacketFeesOnAcknowledgement(ctx, ack.ForwardRelayerAddress, relayer, feesInEscrow.PacketFees, packetID) + + // call underlying callback + return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) + } + + payeeAddr, err := sdk.AccAddressFromBech32(payee) + if err != nil { + return sdkerrors.Wrapf(err, "failed to create sdk.Address from payee: %s", payee) } + im.keeper.DistributePacketFeesOnAcknowledgement(ctx, ack.ForwardRelayerAddress, payeeAddr, feesInEscrow.PacketFees, packetID) + // call underlying callback - return im.app.OnAcknowledgementPacket(ctx, packet, ack.Result, relayer) + return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) } -// OnTimeoutPacket implements the IBCModule interface +// OnTimeoutPacket implements the IBCMiddleware interface // If fees are not enabled, this callback will default to the ibc-core packet callback -func (im IBCModule) OnTimeoutPacket( +func (im IBCMiddleware) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, @@ -255,20 +307,52 @@ func (im IBCModule) OnTimeoutPacket( return im.app.OnTimeoutPacket(ctx, packet, relayer) } - packetID := channeltypes.NewPacketId(packet.SourcePort, packet.SourceChannel, packet.Sequence) + packetID := channeltypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence) feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID) - if found { - im.keeper.DistributePacketFeesOnTimeout(ctx, relayer, feesInEscrow.PacketFees) + if !found { + // call underlying callback + return im.app.OnTimeoutPacket(ctx, packet, relayer) + } + + payee, found := im.keeper.GetPayeeAddress(ctx, relayer.String(), packet.SourceChannel) + if !found { + im.keeper.DistributePacketFeesOnTimeout(ctx, relayer, feesInEscrow.PacketFees, packetID) - // removes the fee from the store as fee is now paid - im.keeper.DeleteFeesInEscrow(ctx, packetID) + // call underlying callback + return im.app.OnTimeoutPacket(ctx, packet, relayer) + } + + payeeAddr, err := sdk.AccAddressFromBech32(payee) + if err != nil { + return sdkerrors.Wrapf(err, "failed to create sdk.Address from payee: %s", payee) } + im.keeper.DistributePacketFeesOnTimeout(ctx, payeeAddr, feesInEscrow.PacketFees, packetID) + // call underlying callback return im.app.OnTimeoutPacket(ctx, packet, relayer) } +// SendPacket implements the ICS4 Wrapper interface +func (im IBCMiddleware) SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet exported.PacketI, +) error { + return im.keeper.SendPacket(ctx, chanCap, packet) +} + +// WriteAcknowledgement implements the ICS4 Wrapper interface +func (im IBCMiddleware) WriteAcknowledgement( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet exported.PacketI, + ack exported.Acknowledgement, +) error { + return im.keeper.WriteAcknowledgement(ctx, chanCap, packet, ack) +} + // GetAppVersion returns the application version of the underlying application -func (im IBCModule) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { +func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { return im.keeper.GetAppVersion(ctx, portID, channelID) } diff --git a/modules/apps/29-fee/ibc_module_test.go b/modules/apps/29-fee/ibc_middleware_test.go similarity index 56% rename from modules/apps/29-fee/ibc_module_test.go rename to modules/apps/29-fee/ibc_middleware_test.go index 3f5cf64635a..dd1ec0a6157 100644 --- a/modules/apps/29-fee/ibc_module_test.go +++ b/modules/apps/29-fee/ibc_middleware_test.go @@ -6,53 +6,66 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - fee "github.com/cosmos/ibc-go/v3/modules/apps/29-fee" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + fee "github.com/cosmos/ibc-go/v5/modules/apps/29-fee" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) var ( defaultRecvFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}} defaultAckFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(200)}} defaultTimeoutFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(300)}} + smallAmount = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(50)}} ) // Tests OnChanOpenInit on ChainA func (suite *FeeTestSuite) TestOnChanOpenInit() { testCases := []struct { - name string - version string - expPass bool + name string + version string + expPass bool + isFeeEnabled bool }{ { "success - valid fee middleware and mock version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: types.Version, AppVersion: ibcmock.Version})), true, + true, }, { "success - fee version not included, only perform mock logic", ibcmock.Version, true, + false, }, { "invalid fee middleware version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: "invalid-ics29-1", AppVersion: ibcmock.Version})), false, + false, }, { "invalid mock version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: types.Version, AppVersion: "invalid-mock-version"})), false, + false, }, { "mock version not wrapped", types.Version, false, + false, + }, + { + "passing an empty string returns default version", + "", + true, + true, }, } @@ -68,11 +81,11 @@ func (suite *FeeTestSuite) TestOnChanOpenInit() { suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnChanOpenInit = func(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, - ) error { + ) (string, error) { if version != ibcmock.Version { - return fmt.Errorf("incorrect mock version") + return "", fmt.Errorf("incorrect mock version") } - return nil + return ibcmock.Version, nil } suite.path.EndpointA.ChannelID = ibctesting.FirstChannelID @@ -95,13 +108,29 @@ func (suite *FeeTestSuite) TestOnChanOpenInit() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - err = cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), + version, err := cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, chanCap, counterparty, channel.Version) if tc.expPass { + // check if the channel is fee enabled. If so version string should include metaData + if tc.isFeeEnabled { + versionMetadata := types.Metadata{ + FeeVersion: types.Version, + AppVersion: ibcmock.Version, + } + + versionBytes, err := types.ModuleCdc.MarshalJSON(&versionMetadata) + suite.Require().NoError(err) + + suite.Require().Equal(version, string(versionBytes)) + } else { + suite.Require().Equal(ibcmock.Version, version) + } + suite.Require().NoError(err, "unexpected error from version: %s", tc.version) } else { suite.Require().Error(err, "error not returned for version: %s", tc.version) + suite.Require().Equal("", version) } }) } @@ -112,38 +141,27 @@ func (suite *FeeTestSuite) TestOnChanOpenTry() { testCases := []struct { name string cpVersion string - crossing bool expPass bool }{ { "success - valid fee middleware version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: types.Version, AppVersion: ibcmock.Version})), - false, true, }, { "success - valid mock version", ibcmock.Version, - false, - true, - }, - { - "success - crossing hellos: valid fee middleware", - string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: types.Version, AppVersion: ibcmock.Version})), - true, true, }, { "invalid fee middleware version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: "invalid-ics29-1", AppVersion: ibcmock.Version})), false, - false, }, { "invalid mock version", string(types.ModuleCdc.MustMarshalJSON(&types.Metadata{FeeVersion: types.Version, AppVersion: "invalid-mock-version"})), false, - false, }, } @@ -172,14 +190,9 @@ func (suite *FeeTestSuite) TestOnChanOpenTry() { ok bool err error ) - if tc.crossing { - suite.path.EndpointA.ChanOpenInit() - chanCap, ok = suite.chainA.GetSimApp().ScopedFeeMockKeeper.GetCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) - suite.Require().True(ok) - } else { - chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) - suite.Require().NoError(err) - } + + chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) + suite.Require().NoError(err) suite.path.EndpointA.ChannelID = ibctesting.FirstChannelID @@ -316,17 +329,29 @@ func (suite *FeeTestSuite) TestOnChanCloseInit() { }, false, }, { - "RefundFeesOnChannelClosure fails - invalid refund address", func() { + "RefundFeesOnChannelClosure continues - invalid refund address", func() { // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, "invalid refund address", nil)}) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, packetFees) err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), refundAcc, types.ModuleName, fee.Total()) suite.Require().NoError(err) }, + true, + }, + { + "fee module locked", func() { + lockFeeModule(suite.chainA) + }, false, }, + { + "fee module is not enabled", func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, + true, + }, } for _, tc := range testCases { @@ -335,7 +360,7 @@ func (suite *FeeTestSuite) TestOnChanCloseInit() { suite.SetupTest() suite.coordinator.Setup(suite.path) // setup channel - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) fee = types.Fee{ RecvFee: defaultRecvFee, AckFee: defaultAckFee, @@ -393,17 +418,29 @@ func (suite *FeeTestSuite) TestOnChanCloseConfirm() { }, false, }, { - "RefundChannelFeesOnClosure fails - refund address is invalid", func() { + "RefundChannelFeesOnClosure continues - refund address is invalid", func() { // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, "invalid refund address", nil)}) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, packetFees) err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), refundAcc, types.ModuleName, fee.Total()) suite.Require().NoError(err) }, + true, + }, + { + "fee module locked", func() { + lockFeeModule(suite.chainA) + }, false, }, + { + "fee module is not enabled", func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, + true, + }, } for _, tc := range testCases { @@ -413,7 +450,7 @@ func (suite *FeeTestSuite) TestOnChanCloseConfirm() { suite.SetupTest() suite.coordinator.Setup(suite.path) // setup channel - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) fee = types.Fee{ RecvFee: defaultRecvFee, AckFee: defaultAckFee, @@ -442,7 +479,6 @@ func (suite *FeeTestSuite) TestOnChanCloseConfirm() { } else { suite.Require().Error(err) } - }) } } @@ -487,7 +523,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { { "forward address is not found", func() { - suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), "", suite.path.EndpointB.ChannelID) + suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), "", suite.path.EndpointB.ChannelID) }, false, true, @@ -514,7 +550,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) + suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) // malleate test case tc.malleate() @@ -523,10 +559,10 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { switch { case tc.name == "success": - forwardAddr, _ := suite.chainB.GetSimApp().IBCFeeKeeper.GetCounterpartyAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) + forwardAddr, _ := suite.chainB.GetSimApp().IBCFeeKeeper.GetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) expectedAck := types.IncentivizedAcknowledgement{ - Result: ibcmock.MockAcknowledgement.Acknowledgement(), + AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(), ForwardRelayerAddress: forwardAddr, UnderlyingAppSuccess: true, } @@ -537,7 +573,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { case tc.forwardRelayer && result == nil: suite.Require().Equal(nil, result) - packetID := channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetID := channeltypes.NewPacketID(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // retrieve the forward relayer that was stored in `onRecvPacket` relayer, _ := suite.chainB.GetSimApp().IBCFeeKeeper.GetRelayerAddressForAsyncAck(suite.chainB.GetContext(), packetID) @@ -545,7 +581,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { case !tc.forwardRelayer: expectedAck := types.IncentivizedAcknowledgement{ - Result: ibcmock.MockAcknowledgement.Acknowledgement(), + AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(), ForwardRelayerAddress: "", UnderlyingAppSuccess: true, } @@ -555,85 +591,189 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { } } -// different channel than sending chain func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { var ( - ack []byte - packetFee types.PacketFee - originalBalance sdk.Coins - expectedBalance sdk.Coins - expectedRelayerBalance sdk.Coins + ack []byte + packetID channeltypes.PacketId + packetFee types.PacketFee + refundAddr sdk.AccAddress + relayerAddr sdk.AccAddress + expRefundAccBalance sdk.Coins + expPayeeAccBalance sdk.Coins ) testCases := []struct { - name string - malleate func() - expPass bool + name string + malleate func() + expPass bool + expResult func() }{ { "success", func() { - expectedRelayerBalance = packetFee.Fee.RecvFee.Add(packetFee.Fee.AckFee[0]) + // retrieve the relayer acc balance and add the expected recv and ack fees + relayerAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom)) + expPayeeAccBalance = relayerAccBalance.Add(packetFee.Fee.RecvFee...).Add(packetFee.Fee.AckFee...) + + // retrieve the refund acc balance and add the expected timeout fees + refundAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom)) + expRefundAccBalance = refundAccBalance.Add(packetFee.Fee.TimeoutFee...) }, true, + func() { + // assert that the packet fees have been distributed + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) + + relayerAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expPayeeAccBalance, sdk.NewCoins(relayerAccBalance)) + + refundAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expRefundAccBalance, sdk.NewCoins(refundAccBalance)) + }, }, { - "no op success without a packet fee", + "success: with registered payee address", func() { - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetSequence()) - suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID) + payeeAddr := suite.chainA.SenderAccounts[2].SenderAccount.GetAddress() + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + payeeAddr.String(), + suite.path.EndpointA.ChannelID, + ) + + // reassign ack.ForwardRelayerAddress to the registered payee address + ack = types.NewIncentivizedAcknowledgement(payeeAddr.String(), ibcmock.MockAcknowledgement.Acknowledgement(), true).Acknowledgement() + + // retrieve the payee acc balance and add the expected recv and ack fees + payeeAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), payeeAddr, sdk.DefaultBondDenom)) + expPayeeAccBalance = payeeAccBalance.Add(packetFee.Fee.RecvFee...).Add(packetFee.Fee.AckFee...) + + // retrieve the refund acc balance and add the expected timeout fees + refundAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom)) + expRefundAccBalance = refundAccBalance.Add(packetFee.Fee.TimeoutFee...) + }, + true, + func() { + // assert that the packet fees have been distributed + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) - ack = types.IncentivizedAcknowledgement{ - Result: ibcmock.MockAcknowledgement.Acknowledgement(), - ForwardRelayerAddress: suite.chainA.SenderAccount.GetAddress().String(), - }.Acknowledgement() + payeeAddr := suite.chainA.SenderAccounts[2].SenderAccount.GetAddress() + payeeAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), payeeAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expPayeeAccBalance, sdk.NewCoins(payeeAccBalance)) - expectedBalance = originalBalance + refundAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expRefundAccBalance, sdk.NewCoins(refundAccBalance)) }, - true, }, { - "ack wrong format", + "success: no op without a packet fee", func() { - ack = []byte("unsupported acknowledgement format") + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID) - expectedBalance = originalBalance + ack = types.IncentivizedAcknowledgement{ + AppAcknowledgement: ibcmock.MockAcknowledgement.Acknowledgement(), + ForwardRelayerAddress: "", + }.Acknowledgement() + }, + true, + func() { + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) }, - false, }, { - "channel is not fee not enabled, success", + "success: channel is not fee enabled", func() { suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) ack = ibcmock.MockAcknowledgement.Acknowledgement() - - expectedBalance = originalBalance }, true, + func() {}, }, { "success: fee module is disabled, skip fee logic", func() { lockFeeModule(suite.chainA) - - expectedBalance = originalBalance }, true, + func() { + suite.Require().Equal(true, suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + }, }, { - "fail on distribute receive fee (blocked address)", + "success: fail to distribute recv fee (blocked address), returned to refund account", func() { blockedAddr := suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress() - ack = types.IncentivizedAcknowledgement{ - Result: ibcmock.MockAcknowledgement.Acknowledgement(), - ForwardRelayerAddress: blockedAddr.String(), - }.Acknowledgement() + // reassign ack.ForwardRelayerAddress to a blocked address + ack = types.NewIncentivizedAcknowledgement(blockedAddr.String(), ibcmock.MockAcknowledgement.Acknowledgement(), true).Acknowledgement() - expectedRelayerBalance = packetFee.Fee.AckFee - expectedBalance = expectedBalance.Add(packetFee.Fee.RecvFee...) + // retrieve the relayer acc balance and add the expected ack fees + relayerAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom)) + expPayeeAccBalance = relayerAccBalance.Add(packetFee.Fee.AckFee...) + + // retrieve the refund acc balance and add the expected recv fees and timeout fees + refundAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom)) + expRefundAccBalance = refundAccBalance.Add(packetFee.Fee.RecvFee...).Add(packetFee.Fee.TimeoutFee...) + }, + true, + func() { + // assert that the packet fees have been distributed + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) + + relayerAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expPayeeAccBalance, sdk.NewCoins(relayerAccBalance)) + + refundAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expRefundAccBalance, sdk.NewCoins(refundAccBalance)) + }, + }, + { + "fail: fee distribution fails and fee module is locked when escrow account does not have sufficient funds", + func() { + err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromModuleToAccount(suite.chainA.GetContext(), types.ModuleName, suite.chainA.SenderAccount.GetAddress(), smallAmount) + suite.Require().NoError(err) }, true, + func() { + suite.Require().Equal(true, suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + }, + }, + { + "ack wrong format", + func() { + ack = []byte("unsupported acknowledgement format") + }, + false, + func() {}, + }, + { + "invalid registered payee address", + func() { + payeeAddr := "invalid-address" + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + payeeAddr, + suite.path.EndpointA.ChannelID, + ) + }, + false, + func() {}, + }, + { + "application callback fails", + func() { + suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnAcknowledgementPacket = func(_ sdk.Context, _ channeltypes.Packet, _ []byte, _ sdk.AccAddress) error { + return fmt.Errorf("mock fee app callback fails") + } + }, + false, + func() {}, }, } @@ -642,50 +782,29 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { suite.Run(tc.name, func() { suite.SetupTest() suite.coordinator.Setup(suite.path) - packet := suite.CreateMockPacket() - - expectedRelayerBalance = sdk.Coins{} // reset - - // set up module and callbacks - module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) - suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) - suite.Require().True(ok) + relayerAddr = suite.chainA.SenderAccounts[0].SenderAccount.GetAddress() + refundAddr = suite.chainA.SenderAccounts[1].SenderAccount.GetAddress() - // escrow the packet fee - packetID := channeltypes.NewPacketId(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) - packetFee = types.NewPacketFee( - types.Fee{ - RecvFee: defaultRecvFee, - AckFee: defaultAckFee, - TimeoutFee: defaultTimeoutFee, - }, - suite.chainA.SenderAccount.GetAddress().String(), - []string{}, - ) + packet := suite.CreateMockPacket() + packetID = channeltypes.NewPacketID(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetFee = types.NewPacketFee(types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee), refundAddr.String(), nil) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, types.NewPacketFees([]types.PacketFee{packetFee})) - err = suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), types.ModuleName, packetFee.Fee.Total()) - suite.Require().NoError(err) - relayerAddr := suite.chainB.SenderAccount.GetAddress() + err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), refundAddr, types.ModuleName, packetFee.Fee.Total()) + suite.Require().NoError(err) - // must be changed explicitly - ack = types.IncentivizedAcknowledgement{ - Result: ibcmock.MockAcknowledgement.Acknowledgement(), - ForwardRelayerAddress: relayerAddr.String(), - }.Acknowledgement() + ack = types.NewIncentivizedAcknowledgement(relayerAddr.String(), ibcmock.MockAcknowledgement.Acknowledgement(), true).Acknowledgement() - // log original sender balance - // NOTE: balance is logged after escrowing tokens - originalBalance = sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)) + tc.malleate() // malleate mutates test data - // default to success case - expectedBalance = originalBalance.Add(packetFee.Fee.TimeoutFee[0]) + // retrieve module callbacks + module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) + suite.Require().NoError(err) - // malleate test case - tc.malleate() + cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + suite.Require().True(ok) err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), packet, ack, relayerAddr) @@ -695,77 +814,152 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { suite.Require().Error(err) } - suite.Require().Equal( - expectedBalance, - sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)), - ) - - relayerBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, ibctesting.TestCoin.Denom)) - suite.Require().Equal( - expectedRelayerBalance, - relayerBalance, - ) + tc.expResult() }) } } func (suite *FeeTestSuite) TestOnTimeoutPacket() { var ( - relayerAddr sdk.AccAddress - packetFee types.PacketFee - originalBalance sdk.Coins - expectedBalance sdk.Coins + packetID channeltypes.PacketId + packetFee types.PacketFee + refundAddr sdk.AccAddress + relayerAddr sdk.AccAddress + expRefundAccBalance sdk.Coins + expPayeeAccBalance sdk.Coins ) + testCases := []struct { - name string - malleate func() - expFeeDistributed bool + name string + malleate func() + expPass bool + expResult func() }{ { "success", - func() {}, + func() { + // retrieve the relayer acc balance and add the expected timeout fees + relayerAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom)) + expPayeeAccBalance = relayerAccBalance.Add(packetFee.Fee.TimeoutFee...) + + // retrieve the refund acc balance and add the expected recv and ack fees + refundAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom)) + expRefundAccBalance = refundAccBalance.Add(packetFee.Fee.RecvFee...).Add(packetFee.Fee.AckFee...) + }, true, + func() { + // assert that the packet fees have been distributed + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) + + relayerAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expPayeeAccBalance, sdk.NewCoins(relayerAccBalance)) + + refundAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expRefundAccBalance, sdk.NewCoins(refundAccBalance)) + }, }, { - "fee not enabled", + "success: with registered payee address", func() { - suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + payeeAddr := suite.chainA.SenderAccounts[2].SenderAccount.GetAddress() + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + payeeAddr.String(), + suite.path.EndpointA.ChannelID, + ) + + // retrieve the relayer acc balance and add the expected timeout fees + payeeAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), payeeAddr, sdk.DefaultBondDenom)) + expPayeeAccBalance = payeeAccBalance.Add(packetFee.Fee.TimeoutFee...) + + // retrieve the refund acc balance and add the expected recv and ack fees + refundAccBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom)) + expRefundAccBalance = refundAccBalance.Add(packetFee.Fee.RecvFee...).Add(packetFee.Fee.AckFee...) + }, + true, + func() { + // assert that the packet fees have been distributed + found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) + + payeeAddr := suite.chainA.SenderAccounts[2].SenderAccount.GetAddress() + payeeAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), payeeAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expPayeeAccBalance, sdk.NewCoins(payeeAccBalance)) - expectedBalance = originalBalance + refundAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAddr, sdk.DefaultBondDenom) + suite.Require().Equal(expRefundAccBalance, sdk.NewCoins(refundAccBalance)) }, - false, }, { - "fee module is disabled, skip fee logic", + "success: channel is not fee enabled", + func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, + true, + func() {}, + }, + { + "success: fee module is disabled, skip fee logic", func() { lockFeeModule(suite.chainA) - - expectedBalance = originalBalance }, - false, + true, + func() { + suite.Require().Equal(true, suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + }, }, { - "no op if identified packet fee doesn't exist", + "success: no op if identified packet fee doesn't exist", func() { - // delete packet fee - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetSequence()) suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeesInEscrow(suite.chainA.GetContext(), packetID) - - expectedBalance = originalBalance }, - false, + true, + func() {}, }, { - "distribute fee fails for timeout fee (blocked address)", + "success: fail to distribute timeout fee (blocked address), returned to refund account", func() { relayerAddr = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress() - - expectedBalance = originalBalance. - Add(packetFee.Fee.RecvFee...). - Add(packetFee.Fee.AckFee...). - Add(packetFee.Fee.TimeoutFee...) + }, + true, + func() {}, + }, + { + "fee distribution fails and fee module is locked when escrow account does not have sufficient funds", + func() { + err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromModuleToAccount(suite.chainA.GetContext(), types.ModuleName, suite.chainA.SenderAccount.GetAddress(), smallAmount) + suite.Require().NoError(err) + }, + true, + func() { + suite.Require().Equal(true, suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + }, + }, + { + "invalid registered payee address", + func() { + payeeAddr := "invalid-address" + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + payeeAddr, + suite.path.EndpointA.ChannelID, + ) }, false, + func() {}, + }, + { + "application callback fails", + func() { + suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnTimeoutPacket = func(_ sdk.Context, _ channeltypes.Packet, _ sdk.AccAddress) error { + return fmt.Errorf("mock fee app callback fails") + } + }, + false, + func() {}, }, } @@ -774,64 +968,36 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { suite.Run(tc.name, func() { suite.SetupTest() suite.coordinator.Setup(suite.path) - packet := suite.CreateMockPacket() - // set up module and callbacks - module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) - suite.Require().NoError(err) + relayerAddr = suite.chainA.SenderAccounts[0].SenderAccount.GetAddress() + refundAddr = suite.chainA.SenderAccounts[1].SenderAccount.GetAddress() - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) - suite.Require().True(ok) - - packetID := channeltypes.NewPacketId(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) - - // must be explicitly changed - relayerAddr = suite.chainB.SenderAccount.GetAddress() - - packetFee = types.NewPacketFee( - types.Fee{ - RecvFee: defaultRecvFee, - AckFee: defaultAckFee, - TimeoutFee: defaultTimeoutFee, - }, - suite.chainA.SenderAccount.GetAddress().String(), - []string{}, - ) + packet := suite.CreateMockPacket() + packetID = channeltypes.NewPacketID(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + packetFee = types.NewPacketFee(types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee), refundAddr.String(), nil) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, types.NewPacketFees([]types.PacketFee{packetFee})) - err = suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), types.ModuleName, packetFee.Fee.Total()) + err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), types.ModuleName, packetFee.Fee.Total()) suite.Require().NoError(err) - // log original sender balance - // NOTE: balance is logged after escrowing tokens - originalBalance = sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)) - - // default to success case - expectedBalance = originalBalance. - Add(packetFee.Fee.RecvFee[0]). - Add(packetFee.Fee.AckFee[0]) + tc.malleate() // malleate mutates test data - // malleate test case - tc.malleate() - - err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, relayerAddr) + // retrieve module callbacks + module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - suite.Require().Equal( - expectedBalance, - sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)), - ) + cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + suite.Require().True(ok) - relayerBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), relayerAddr, ibctesting.TestCoin.Denom)) - if tc.expFeeDistributed { - // there should no longer be a fee in escrow for this packet - found := suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID) - suite.Require().False(found) + err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, relayerAddr) - suite.Require().Equal(packetFee.Fee.TimeoutFee, relayerBalance) + if tc.expPass { + suite.Require().NoError(err) } else { - suite.Require().Empty(relayerBalance) + suite.Require().Error(err) } + + tc.expResult() }) } } @@ -896,7 +1062,7 @@ func (suite *FeeTestSuite) TestGetAppVersion() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - feeModule := cbs.(fee.IBCModule) + feeModule := cbs.(fee.IBCMiddleware) appVersion, found := feeModule.GetAppVersion(suite.chainA.GetContext(), portID, channelID) diff --git a/modules/apps/29-fee/ica_test.go b/modules/apps/29-fee/ica_test.go new file mode 100644 index 00000000000..a1ab7ef6d03 --- /dev/null +++ b/modules/apps/29-fee/ica_test.go @@ -0,0 +1,197 @@ +package fee_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" +) + +var ( + // defaultOwnerAddress defines a reusable bech32 address for testing purposes + defaultOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" + + // defaultPortID defines a reusable port identifier for testing purposes + defaultPortID, _ = icatypes.NewControllerPortID(defaultOwnerAddress) + + // defaultICAVersion defines a reusable interchainaccounts version string for testing purposes + defaultICAVersion = icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) +) + +// NewIncentivizedICAPath creates and returns a new ibctesting path configured for a fee enabled interchain accounts channel +func NewIncentivizedICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { + path := ibctesting.NewPath(chainA, chainB) + + feeMetadata := types.Metadata{ + FeeVersion: types.Version, + AppVersion: defaultICAVersion, + } + + feeICAVersion := string(types.ModuleCdc.MustMarshalJSON(&feeMetadata)) + + path.SetChannelOrdered() + path.EndpointA.ChannelConfig.Version = feeICAVersion + path.EndpointB.ChannelConfig.Version = feeICAVersion + path.EndpointA.ChannelConfig.PortID = defaultPortID + path.EndpointB.ChannelConfig.PortID = icatypes.PortID + + return path +} + +// SetupPath performs the InterchainAccounts channel creation handshake using an ibctesting path +func SetupPath(path *ibctesting.Path, owner string) error { + if err := RegisterInterchainAccount(path.EndpointA, owner); err != nil { + return err + } + + if err := path.EndpointB.ChanOpenTry(); err != nil { + return err + } + + if err := path.EndpointA.ChanOpenAck(); err != nil { + return err + } + + if err := path.EndpointB.ChanOpenConfirm(); err != nil { + return err + } + + return nil +} + +// RegisterInterchainAccount invokes the the InterchainAccounts entrypoint, routes a new MsgChannelOpenInit to the appropriate handler, +// commits state changes and updates the testing endpoint accordingly +func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) error { + portID, err := icatypes.NewControllerPortID(owner) + if err != nil { + return err + } + + channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) + + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, endpoint.ChannelConfig.Version); err != nil { + return err + } + + // commit state changes for proof verification + endpoint.Chain.NextBlock() + + // update port/channel ids + endpoint.ChannelID = channeltypes.FormatChannelIdentifier(channelSequence) + endpoint.ChannelConfig.PortID = portID + + return nil +} + +// TestFeeInterchainAccounts Integration test to ensure ics29 works with ics27 +func (suite *FeeTestSuite) TestFeeInterchainAccounts() { + path := NewIncentivizedICAPath(suite.chainA, suite.chainB) + suite.coordinator.SetupConnections(path) + + err := SetupPath(path, defaultOwnerAddress) + suite.Require().NoError(err) + + // assert the newly established channel is fee enabled on both ends + suite.Require().True(suite.chainA.GetSimApp().IBCFeeKeeper.IsFeeEnabled(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)) + suite.Require().True(suite.chainB.GetSimApp().IBCFeeKeeper.IsFeeEnabled(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID)) + + // register counterparty address on destination chainB as chainA.SenderAccounts[1] for recv fee distribution + suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainB.SenderAccount.GetAddress().String(), suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), path.EndpointB.ChannelID) + + // escrow a packet fee for the next send sequence + expectedFee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + msgPayPacketFee := types.NewMsgPayPacketFee(expectedFee, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, suite.chainA.SenderAccount.GetAddress().String(), nil) + + // fetch the account balance before fees are escrowed and assert the difference below + preEscrowBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) + + res, err := suite.chainA.SendMsgs(msgPayPacketFee) + suite.Require().NotNil(res) + suite.Require().NoError(err) + + postEscrowBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) + suite.Require().Equal(postEscrowBalance.AddAmount(expectedFee.Total().AmountOf(sdk.DefaultBondDenom)), preEscrowBalance) + + packetID := channeltypes.NewPacketID(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, 1) + packetFees, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().True(found) + suite.Require().Equal(expectedFee, packetFees.PacketFees[0].Fee) + + interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) + suite.Require().True(found) + + // fund the interchain account on chainB + coins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000))) + msgBankSend := &banktypes.MsgSend{ + FromAddress: suite.chainB.SenderAccount.GetAddress().String(), + ToAddress: interchainAccountAddr, + Amount: coins, + } + + res, err = suite.chainB.SendMsgs(msgBankSend) + suite.Require().NotEmpty(res) + suite.Require().NoError(err) + + // prepare a simple stakingtypes.MsgDelegate to be used as the interchain account msg executed on chainB + validatorAddr := (sdk.ValAddress)(suite.chainB.Vals.Validators[0].Address) + msgDelegate := &stakingtypes.MsgDelegate{ + DelegatorAddress: interchainAccountAddr, + ValidatorAddress: validatorAddr.String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(5000)), + } + + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []sdk.Msg{msgDelegate}) + suite.Require().NoError(err) + + icaPacketData := icatypes.InterchainAccountPacketData{ + Type: icatypes.EXECUTE_TX, + Data: data, + } + + // ensure chainB is allowed to execute stakingtypes.MsgDelegate + params := icahosttypes.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate)}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + + // build the interchain accounts packet + packet := buildInterchainAccountsPacket(path, icaPacketData.GetBytes(), 1) + + // write packet commitment to state on chainA and commit state + commitment := channeltypes.CommitPacket(suite.chainA.GetSimApp().AppCodec(), packet) + suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, 1, commitment) + suite.chainA.NextBlock() + + err = path.RelayPacket(packet) + suite.Require().NoError(err) + + // ensure escrowed fees are cleaned up + packetFees, found = suite.chainA.GetSimApp().IBCFeeKeeper.GetFeesInEscrow(suite.chainA.GetContext(), packetID) + suite.Require().False(found) + suite.Require().Empty(packetFees) + + // assert the value of the account balance after fee distribution + // NOTE: the balance after fee distribution should be equal to the pre-escrow balance minus the recv fee + // as chainA.SenderAccount is used as the msg signer and refund address for msgPayPacketFee above as well as the relyer account for acknowledgements in path.RelayPacket() + postDistBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) + suite.Require().Equal(preEscrowBalance.SubAmount(defaultRecvFee.AmountOf(sdk.DefaultBondDenom)), postDistBalance) +} + +func buildInterchainAccountsPacket(path *ibctesting.Path, data []byte, seq uint64) channeltypes.Packet { + packet := channeltypes.NewPacket( + data, + 1, + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + clienttypes.NewHeight(1, 100), + 0, + ) + + return packet +} diff --git a/modules/apps/29-fee/keeper/escrow.go b/modules/apps/29-fee/keeper/escrow.go index 0ca84684440..95f79ee18d9 100644 --- a/modules/apps/29-fee/keeper/escrow.go +++ b/modules/apps/29-fee/keeper/escrow.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // escrowPacketFee sends the packet fee to the 29-fee module account to hold in escrow @@ -39,17 +39,18 @@ func (k Keeper) escrowPacketFee(ctx sdk.Context, packetID channeltypes.PacketId, packetFees := types.NewPacketFees(fees) k.SetFeesInEscrow(ctx, packetID, packetFees) - EmitIncentivizedPacket(ctx, packetID, packetFee) + EmitIncentivizedPacketEvent(ctx, packetID, packetFees) return nil } // DistributePacketFeesOnAcknowledgement pays all the acknowledgement & receive fees for a given packetID while refunding the timeout fees to the refund account. -func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx sdk.Context, forwardRelayer string, reverseRelayer sdk.AccAddress, packetFees []types.PacketFee) { +func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx sdk.Context, forwardRelayer string, reverseRelayer sdk.AccAddress, packetFees []types.PacketFee, packetID channeltypes.PacketId) { // cache context before trying to distribute fees // if the escrow account has insufficient balance then we want to avoid partially distributing fees cacheCtx, writeFn := ctx.CacheContext() + // forward relayer address will be empty if conversion fails forwardAddr, _ := sdk.AccAddressFromBech32(forwardRelayer) for _, packetFee := range packetFees { @@ -61,7 +62,6 @@ func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx sdk.Context, forwardRe // NOTE: we use the uncached context to lock the fee module so that the state changes from // locking the fee module are persisted k.lockFeeModule(ctx) - return } @@ -74,11 +74,14 @@ func (k Keeper) DistributePacketFeesOnAcknowledgement(ctx sdk.Context, forwardRe k.distributePacketFeeOnAcknowledgement(cacheCtx, refundAddr, forwardAddr, reverseRelayer, packetFee) } + // NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context. + ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events()) + // write the cache writeFn() - // NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context. - ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events()) + // removes the fees from the store as fees are now paid + k.DeleteFeesInEscrow(ctx, packetID) } // distributePacketFeeOnAcknowledgement pays the receive fee for a given packetID while refunding the timeout fee to the refund account associated with the Fee. @@ -98,11 +101,10 @@ func (k Keeper) distributePacketFeeOnAcknowledgement(ctx sdk.Context, refundAddr // refund timeout fee for unused timeout k.distributeFee(ctx, refundAddr, refundAddr, packetFee.Fee.TimeoutFee) - } // DistributePacketsFeesOnTimeout pays all the timeout fees for a given packetID while refunding the acknowledgement & receive fees to the refund account. -func (k Keeper) DistributePacketFeesOnTimeout(ctx sdk.Context, timeoutRelayer sdk.AccAddress, packetFees []types.PacketFee) { +func (k Keeper) DistributePacketFeesOnTimeout(ctx sdk.Context, timeoutRelayer sdk.AccAddress, packetFees []types.PacketFee, packetID channeltypes.PacketId) { // cache context before trying to distribute fees // if the escrow account has insufficient balance then we want to avoid partially distributing fees cacheCtx, writeFn := ctx.CacheContext() @@ -116,7 +118,6 @@ func (k Keeper) DistributePacketFeesOnTimeout(ctx sdk.Context, timeoutRelayer sd // NOTE: we use the uncached context to lock the fee module so that the state changes from // locking the fee module are persisted k.lockFeeModule(ctx) - return } @@ -129,11 +130,14 @@ func (k Keeper) DistributePacketFeesOnTimeout(ctx sdk.Context, timeoutRelayer sd k.distributePacketFeeOnTimeout(cacheCtx, refundAddr, timeoutRelayer, packetFee) } + // NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context. + ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events()) + // write the cache writeFn() - // NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context. - ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events()) + // removing the fee from the store as the fee is now paid + k.DeleteFeesInEscrow(ctx, packetID) } // distributePacketFeeOnTimeout pays the timeout fee to the timeout relayer and refunds the acknowledgement & receive fee. @@ -158,6 +162,7 @@ func (k Keeper) distributeFee(ctx sdk.Context, receiver, refundAccAddress sdk.Ac err := k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, receiver, fee) if err != nil { if bytes.Equal(receiver, refundAccAddress) { + k.Logger(ctx).Error("error distributing fee", "receiver address", receiver, "fee", fee) return // if sending to the refund address already failed, then return (no-op) } @@ -165,6 +170,7 @@ func (k Keeper) distributeFee(ctx sdk.Context, receiver, refundAccAddress sdk.Ac // then attempt to refund the fee to the original sender err := k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, refundAccAddress, fee) if err != nil { + k.Logger(ctx).Error("error refunding fee to the original sender", "refund address", refundAccAddress, "fee", fee) return // if sending to the refund address fails, no-op } } @@ -188,6 +194,7 @@ func (k Keeper) RefundFeesOnChannelClosure(ctx sdk.Context, portID, channelID st cacheCtx, writeFn := ctx.CacheContext() for _, identifiedPacketFee := range identifiedPacketFees { + var failedToSendCoins bool for _, packetFee := range identifiedPacketFee.PacketFees { if !k.EscrowAccountHasBalance(cacheCtx, packetFee.Fee.Total()) { @@ -205,26 +212,25 @@ func (k Keeper) RefundFeesOnChannelClosure(ctx sdk.Context, portID, channelID st refundAddr, err := sdk.AccAddressFromBech32(packetFee.RefundAddress) if err != nil { - return err - } - - // if the refund address is blocked, skip and continue distribution - if k.bankKeeper.BlockedAddr(refundAddr) { + failedToSendCoins = true continue } // refund all fees to refund address - // Use SendCoins rather than the module account send functions since refund address may be a user account or module address. - moduleAcc := k.GetFeeModuleAddress() - if err = k.bankKeeper.SendCoins(cacheCtx, moduleAcc, refundAddr, packetFee.Fee.Total()); err != nil { - return err + if err = k.bankKeeper.SendCoinsFromModuleToAccount(cacheCtx, types.ModuleName, refundAddr, packetFee.Fee.Total()); err != nil { + failedToSendCoins = true + continue } - } - k.DeleteFeesInEscrow(cacheCtx, identifiedPacketFee.PacketId) + if !failedToSendCoins { + k.DeleteFeesInEscrow(cacheCtx, identifiedPacketFee.PacketId) + } } + // NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context. + ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events()) + // write the cache writeFn() diff --git a/modules/apps/29-fee/keeper/escrow_test.go b/modules/apps/29-fee/keeper/escrow_test.go index e2a43afe586..1bc5608db4e 100644 --- a/modules/apps/29-fee/keeper/escrow_test.go +++ b/modules/apps/29-fee/keeper/escrow_test.go @@ -4,9 +4,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/testing/mock" ) func (suite *KeeperTestSuite) TestDistributeFee() { @@ -19,6 +20,7 @@ func (suite *KeeperTestSuite) TestDistributeFee() { refundAccBal sdk.Coin packetFee types.PacketFee packetFees []types.PacketFee + fee types.Fee ) testCases := []struct { @@ -28,8 +30,15 @@ func (suite *KeeperTestSuite) TestDistributeFee() { }{ { "success", - func() {}, func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + }, + func() { + // check if fees has been deleted + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + suite.Require().False(suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID)) + // check if the reverse relayer is paid expectedReverseAccBal := reverseRelayerBal.Add(defaultAckFee[0]).Add(defaultAckFee[0]) balance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), reverseRelayer, sdk.DefaultBondDenom) @@ -53,13 +62,38 @@ func (suite *KeeperTestSuite) TestDistributeFee() { suite.Require().Equal(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(0)), balance) }, }, + { + "success: refund account is module account", + func() { + refundAcc = suite.chainA.GetSimApp().AccountKeeper.GetModuleAddress(mock.ModuleName) + + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + + // fund mock account + err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), mock.ModuleName, packetFee.Fee.Total().Add(packetFee.Fee.Total()...)) + suite.Require().NoError(err) + }, + func() { + // check if the refund acc has been refunded the timeoutFee + expectedRefundAccBal := defaultTimeoutFee[0].Add(defaultTimeoutFee[0]) + balance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAcc, sdk.DefaultBondDenom) + suite.Require().Equal(expectedRefundAccBal, balance) + }, + }, { "escrow account out of balance, fee module becomes locked - no distribution", func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + // pass in an extra packet fee packetFees = append(packetFees, packetFee) }, func() { + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + suite.Require().True(suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + suite.Require().True(suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID)) // check if the module acc contains all the fees expectedModuleAccBal := packetFee.Fee.Total().Add(packetFee.Fee.Total()...) @@ -70,6 +104,9 @@ func (suite *KeeperTestSuite) TestDistributeFee() { { "invalid forward address", func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + forwardRelayer = "invalid address" }, func() { @@ -82,6 +119,9 @@ func (suite *KeeperTestSuite) TestDistributeFee() { { "invalid forward address: blocked address", func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + forwardRelayer = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress().String() }, func() { @@ -94,6 +134,9 @@ func (suite *KeeperTestSuite) TestDistributeFee() { { "invalid receiver address: ack fee returned to sender", func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + reverseRelayer = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress() }, func() { @@ -106,6 +149,9 @@ func (suite *KeeperTestSuite) TestDistributeFee() { { "invalid refund address: no-op, timeout fee remains in escrow", func() { + packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) + packetFees = []types.PacketFee{packetFee, packetFee} + packetFees[0].RefundAddress = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress().String() packetFees[1].RefundAddress = suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress().String() }, @@ -130,27 +176,23 @@ func (suite *KeeperTestSuite) TestDistributeFee() { reverseRelayer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) refundAcc = suite.chainA.SenderAccount.GetAddress() - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) - fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + fee = types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) - // escrow the packet fees & store the fees in state - packetFee = types.NewPacketFee(fee, refundAcc.String(), []string{}) - packetFees = []types.PacketFee{packetFee, packetFee} + tc.malleate() + // escrow the packet fees & store the fees in state suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, types.NewPacketFees(packetFees)) err := suite.chainA.GetSimApp().BankKeeper.SendCoinsFromAccountToModule(suite.chainA.GetContext(), refundAcc, types.ModuleName, packetFee.Fee.Total().Add(packetFee.Fee.Total()...)) suite.Require().NoError(err) - tc.malleate() - // fetch the account balances before fee distribution (forward, reverse, refund) forwardAccAddress, _ := sdk.AccAddressFromBech32(forwardRelayer) forwardRelayerBal = suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), forwardAccAddress, sdk.DefaultBondDenom) reverseRelayerBal = suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), reverseRelayer, sdk.DefaultBondDenom) refundAccBal = suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAcc, sdk.DefaultBondDenom) - suite.chainA.GetSimApp().IBCFeeKeeper.DistributePacketFeesOnAcknowledgement(suite.chainA.GetContext(), forwardRelayer, reverseRelayer, packetFees) - + suite.chainA.GetSimApp().IBCFeeKeeper.DistributePacketFeesOnAcknowledgement(suite.chainA.GetContext(), forwardRelayer, reverseRelayer, packetFees, packetID) tc.expResult() }) } @@ -196,7 +238,10 @@ func (suite *KeeperTestSuite) TestDistributePacketFeesOnTimeout() { packetFees = append(packetFees, packetFee) }, func() { + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + suite.Require().True(suite.chainA.GetSimApp().IBCFeeKeeper.IsLocked(suite.chainA.GetContext())) + suite.Require().True(suite.chainA.GetSimApp().IBCFeeKeeper.HasFeesInEscrow(suite.chainA.GetContext(), packetID)) // check if the module acc contains all the fees expectedModuleAccBal := packetFee.Fee.Total().Add(packetFee.Fee.Total()...) @@ -242,7 +287,7 @@ func (suite *KeeperTestSuite) TestDistributePacketFeesOnTimeout() { timeoutRelayer = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) refundAcc = suite.chainA.SenderAccount.GetAddress() - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) // escrow the packet fees & store the fees in state @@ -259,7 +304,7 @@ func (suite *KeeperTestSuite) TestDistributePacketFeesOnTimeout() { timeoutRelayerBal = suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), timeoutRelayer, sdk.DefaultBondDenom) refundAccBal = suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), refundAcc, sdk.DefaultBondDenom) - suite.chainA.GetSimApp().IBCFeeKeeper.DistributePacketFeesOnTimeout(suite.chainA.GetContext(), timeoutRelayer, packetFees) + suite.chainA.GetSimApp().IBCFeeKeeper.DistributePacketFeesOnTimeout(suite.chainA.GetContext(), timeoutRelayer, packetFees, packetID) tc.expResult() }) @@ -268,12 +313,13 @@ func (suite *KeeperTestSuite) TestDistributePacketFeesOnTimeout() { func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { var ( - expIdentifiedPacketFees []types.IdentifiedPacketFees - expEscrowBal sdk.Coins - expRefundBal sdk.Coins - refundAcc sdk.AccAddress - fee types.Fee - locked bool + expIdentifiedPacketFees []types.IdentifiedPacketFees + expEscrowBal sdk.Coins + expRefundBal sdk.Coins + refundAcc sdk.AccAddress + fee types.Fee + locked bool + expectEscrowFeesToBeDeleted bool ) testCases := []struct { @@ -285,7 +331,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { "success", func() { for i := 1; i < 6; i++ { // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(i)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(i)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, refundAcc.String(), nil)}) identifiedPacketFees := types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees) @@ -302,7 +348,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { "success with undistributed packet fees on a different channel", func() { for i := 1; i < 6; i++ { // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(i)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(i)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, refundAcc.String(), nil)}) identifiedPacketFees := types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees) @@ -315,7 +361,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { } // set packet fee for a different channel - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, "channel-1", uint64(1)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, "channel-1", uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, refundAcc.String(), nil)}) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, "channel-1") @@ -324,7 +370,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { suite.Require().NoError(err) expEscrowBal = fee.Total() - expRefundBal = expRefundBal.Sub(fee.Total()) + expRefundBal = expRefundBal.Sub(fee.Total()...) }, true, }, { @@ -332,7 +378,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { locked = true // store the fee in state without updating escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, refundAcc.String(), nil)}) identifiedPacketFees := types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees) @@ -347,8 +393,8 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { locked = true // store 2 fees in state - packetID1 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) - packetID2 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(2)) + packetID1 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + packetID2 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(2)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, refundAcc.String(), nil)}) identifiedPacketFee1 := types.NewIdentifiedPacketFees(packetID1, packetFees.PacketFees) identifiedPacketFee2 := types.NewIdentifiedPacketFees(packetID2, packetFees.PacketFees) @@ -366,7 +412,8 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { { "invalid refund acc address", func() { // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + expectEscrowFeesToBeDeleted = false + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, "invalid refund address", nil)}) identifiedPacketFees := types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees) @@ -376,14 +423,18 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { suite.Require().NoError(err) expIdentifiedPacketFees = []types.IdentifiedPacketFees{identifiedPacketFees} - }, false, + + expEscrowBal = fee.Total() + expRefundBal = expRefundBal.Sub(fee.Total()...) + }, true, }, { "distributing to blocked address is skipped", func() { + expectEscrowFeesToBeDeleted = false blockedAddr := suite.chainA.GetSimApp().AccountKeeper.GetModuleAccount(suite.chainA.GetContext(), transfertypes.ModuleName).GetAddress().String() // store the fee in state & update escrow account balance - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, uint64(1)) packetFees := types.NewPacketFees([]types.PacketFee{types.NewPacketFee(fee, blockedAddr, nil)}) identifiedPacketFees := types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees) @@ -395,7 +446,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { expIdentifiedPacketFees = []types.IdentifiedPacketFees{identifiedPacketFees} expEscrowBal = fee.Total() - expRefundBal = expRefundBal.Sub(fee.Total()) + expRefundBal = expRefundBal.Sub(fee.Total()...) }, true, }, } @@ -409,6 +460,7 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { expIdentifiedPacketFees = []types.IdentifiedPacketFees{} expEscrowBal = sdk.Coins{} locked = false + expectEscrowFeesToBeDeleted = true // setup refundAcc = suite.chainA.SenderAccount.GetAddress() @@ -455,10 +507,9 @@ func (suite *KeeperTestSuite) TestRefundFeesOnChannelClosure() { suite.Require().Equal(expEscrowBal, escrowBal) // escrow balance should be empty suite.Require().Equal(expRefundBal, refundBal) // all packets should have been refunded - // all fees in escrow should be deleted for this channel - suite.Require().Empty(suite.chainA.GetSimApp().IBCFeeKeeper.GetIdentifiedPacketFeesForChannel(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) + // all fees in escrow should be deleted if expected for this channel + suite.Require().Equal(expectEscrowFeesToBeDeleted, len(suite.chainA.GetSimApp().IBCFeeKeeper.GetIdentifiedPacketFeesForChannel(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) == 0) } - }) } } diff --git a/modules/apps/29-fee/keeper/events.go b/modules/apps/29-fee/keeper/events.go index 9ff6f320ffc..e4381106ac2 100644 --- a/modules/apps/29-fee/keeper/events.go +++ b/modules/apps/29-fee/keeper/events.go @@ -5,21 +5,73 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) -// EmitIncentivizedPacket emits an event so that relayers know an incentivized packet is ready to be relayed -func EmitIncentivizedPacket(ctx sdk.Context, packetID channeltypes.PacketId, packetFee types.PacketFee) { - ctx.EventManager().EmitEvent( +// EmitIncentivizedPacketEvent emits an event containing information on the total amount of fees incentivizing +// a specific packet. It should be emitted on every fee escrowed for the given packetID. +func EmitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId, packetFees types.PacketFees) { + var ( + totalRecvFees sdk.Coins + totalAckFees sdk.Coins + totalTimeoutFees sdk.Coins + ) + + for _, fee := range packetFees.PacketFees { + // only emit total fees for packet fees which allow any relayer to relay + if fee.Relayers == nil { + totalRecvFees = totalRecvFees.Add(fee.Fee.RecvFee...) + totalAckFees = totalAckFees.Add(fee.Fee.AckFee...) + totalTimeoutFees = totalTimeoutFees.Add(fee.Fee.TimeoutFee...) + } + } + + ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeIncentivizedPacket, sdk.NewAttribute(channeltypes.AttributeKeyPortID, packetID.PortId), sdk.NewAttribute(channeltypes.AttributeKeyChannelID, packetID.ChannelId), sdk.NewAttribute(channeltypes.AttributeKeySequence, fmt.Sprint(packetID.Sequence)), - sdk.NewAttribute(types.AttributeKeyRecvFee, packetFee.Fee.RecvFee.String()), - sdk.NewAttribute(types.AttributeKeyAckFee, packetFee.Fee.AckFee.String()), - sdk.NewAttribute(types.AttributeKeyTimeoutFee, packetFee.Fee.TimeoutFee.String()), + sdk.NewAttribute(types.AttributeKeyRecvFee, totalRecvFees.String()), + sdk.NewAttribute(types.AttributeKeyAckFee, totalAckFees.String()), + sdk.NewAttribute(types.AttributeKeyTimeoutFee, totalTimeoutFees.String()), ), - ) + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + ), + }) +} + +// EmitRegisterPayeeEvent emits an event containing information of a registered payee for a relayer on a particular channel +func EmitRegisterPayeeEvent(ctx sdk.Context, relayer, payee, channelID string) { + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeRegisterPayee, + sdk.NewAttribute(types.AttributeKeyRelayer, relayer), + sdk.NewAttribute(types.AttributeKeyPayee, payee), + sdk.NewAttribute(types.AttributeKeyChannelID, channelID), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + ), + }) +} + +// EmitRegisterCounterpartyPayeeEvent emits an event containing information of a registered counterparty payee for a relayer on a particular channel +func EmitRegisterCounterpartyPayeeEvent(ctx sdk.Context, relayer, counterpartyPayee, channelID string) { + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeRegisterCounterpartyPayee, + sdk.NewAttribute(types.AttributeKeyRelayer, relayer), + sdk.NewAttribute(types.AttributeKeyCounterpartyPayee, counterpartyPayee), + sdk.NewAttribute(types.AttributeKeyChannelID, channelID), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + ), + }) } diff --git a/modules/apps/29-fee/keeper/events_test.go b/modules/apps/29-fee/keeper/events_test.go new file mode 100644 index 00000000000..fc726f9d3c0 --- /dev/null +++ b/modules/apps/29-fee/keeper/events_test.go @@ -0,0 +1,83 @@ +package keeper_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + abcitypes "github.com/tendermint/tendermint/abci/types" + + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" +) + +func (suite *KeeperTestSuite) TestIncentivizePacketEvent() { + var ( + expRecvFees sdk.Coins + expAckFees sdk.Coins + expTimeoutFees sdk.Coins + ) + + suite.coordinator.Setup(suite.path) + + fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + msg := types.NewMsgPayPacketFee( + fee, + suite.path.EndpointA.ChannelConfig.PortID, + suite.path.EndpointA.ChannelID, + suite.chainA.SenderAccount.GetAddress().String(), + nil, + ) + + expRecvFees = expRecvFees.Add(fee.RecvFee...) + expAckFees = expAckFees.Add(fee.AckFee...) + expTimeoutFees = expTimeoutFees.Add(fee.TimeoutFee...) + + result, err := suite.chainA.SendMsgs(msg) + suite.Require().NoError(err) + + var incentivizedPacketEvent abcitypes.Event + for _, event := range result.Events { + if event.Type == types.EventTypeIncentivizedPacket { + incentivizedPacketEvent = event + } + } + + for _, attr := range incentivizedPacketEvent.Attributes { + switch string(attr.Key) { + case types.AttributeKeyRecvFee: + suite.Require().Equal(expRecvFees.String(), string(attr.Value)) + + case types.AttributeKeyAckFee: + suite.Require().Equal(expAckFees.String(), string(attr.Value)) + + case types.AttributeKeyTimeoutFee: + suite.Require().Equal(expTimeoutFees.String(), string(attr.Value)) + } + } + + // send the same messages again a few times + for i := 0; i < 3; i++ { + expRecvFees = expRecvFees.Add(fee.RecvFee...) + expAckFees = expAckFees.Add(fee.AckFee...) + expTimeoutFees = expTimeoutFees.Add(fee.TimeoutFee...) + + result, err = suite.chainA.SendMsgs(msg) + suite.Require().NoError(err) + } + + for _, event := range result.Events { + if event.Type == types.EventTypeIncentivizedPacket { + incentivizedPacketEvent = event + } + } + + for _, attr := range incentivizedPacketEvent.Attributes { + switch string(attr.Key) { + case types.AttributeKeyRecvFee: + suite.Require().Equal(expRecvFees.String(), string(attr.Value)) + + case types.AttributeKeyAckFee: + suite.Require().Equal(expAckFees.String(), string(attr.Value)) + + case types.AttributeKeyTimeoutFee: + suite.Require().Equal(expTimeoutFees.String(), string(attr.Value)) + } + } +} diff --git a/modules/apps/29-fee/keeper/genesis.go b/modules/apps/29-fee/keeper/genesis.go index 70b6a5012a2..9637daaa251 100644 --- a/modules/apps/29-fee/keeper/genesis.go +++ b/modules/apps/29-fee/keeper/genesis.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" ) // InitGenesis initializes the fee middleware application state from a provided genesis state @@ -12,8 +12,12 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { k.SetFeesInEscrow(ctx, identifiedFees.PacketId, types.NewPacketFees(identifiedFees.PacketFees)) } - for _, relayer := range state.RegisteredRelayers { - k.SetCounterpartyAddress(ctx, relayer.Address, relayer.CounterpartyAddress, relayer.ChannelId) + for _, registeredPayee := range state.RegisteredPayees { + k.SetPayeeAddress(ctx, registeredPayee.Relayer, registeredPayee.Payee, registeredPayee.ChannelId) + } + + for _, registeredCounterpartyPayee := range state.RegisteredCounterpartyPayees { + k.SetCounterpartyPayeeAddress(ctx, registeredCounterpartyPayee.Relayer, registeredCounterpartyPayee.CounterpartyPayee, registeredCounterpartyPayee.ChannelId) } for _, forwardAddr := range state.ForwardRelayers { @@ -28,9 +32,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState) { // ExportGenesis returns the fee middleware application exported genesis func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { return &types.GenesisState{ - IdentifiedFees: k.GetAllIdentifiedPacketFees(ctx), - FeeEnabledChannels: k.GetAllFeeEnabledChannels(ctx), - RegisteredRelayers: k.GetAllRelayerAddresses(ctx), - ForwardRelayers: k.GetAllForwardRelayerAddresses(ctx), + IdentifiedFees: k.GetAllIdentifiedPacketFees(ctx), + FeeEnabledChannels: k.GetAllFeeEnabledChannels(ctx), + RegisteredPayees: k.GetAllPayees(ctx), + RegisteredCounterpartyPayees: k.GetAllCounterpartyPayees(ctx), + ForwardRelayers: k.GetAllForwardRelayerAddresses(ctx), } } diff --git a/modules/apps/29-fee/keeper/genesis_test.go b/modules/apps/29-fee/keeper/genesis_test.go index 8aa30385e58..671830264ac 100644 --- a/modules/apps/29-fee/keeper/genesis_test.go +++ b/modules/apps/29-fee/keeper/genesis_test.go @@ -1,24 +1,13 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestInitGenesis() { - // build PacketId & Fee - refundAcc := suite.chainA.SenderAccount.GetAddress() - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) - fee := types.Fee{ - RecvFee: defaultRecvFee, - AckFee: defaultAckFee, - TimeoutFee: defaultTimeoutFee, - } - - // relayer addresses - sender := suite.chainA.SenderAccount.GetAddress().String() - counterparty := suite.chainB.SenderAccount.GetAddress().String() + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) genesisState := types.GenesisState{ IdentifiedFees: []types.IdentifiedPacketFees{ @@ -26,8 +15,8 @@ func (suite *KeeperTestSuite) TestInitGenesis() { PacketId: packetID, PacketFees: []types.PacketFee{ { - Fee: fee, - RefundAddress: refundAcc.String(), + Fee: types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee), + RefundAddress: suite.chainA.SenderAccount.GetAddress().String(), Relayers: nil, }, }, @@ -39,11 +28,18 @@ func (suite *KeeperTestSuite) TestInitGenesis() { ChannelId: ibctesting.FirstChannelID, }, }, - RegisteredRelayers: []types.RegisteredRelayerAddress{ + RegisteredPayees: []types.RegisteredPayee{ + { + Relayer: suite.chainA.SenderAccount.GetAddress().String(), + Payee: suite.chainB.SenderAccount.GetAddress().String(), + ChannelId: ibctesting.FirstChannelID, + }, + }, + RegisteredCounterpartyPayees: []types.RegisteredCounterpartyPayee{ { - Address: sender, - CounterpartyAddress: counterparty, - ChannelId: ibctesting.FirstChannelID, + Relayer: suite.chainA.SenderAccount.GetAddress().String(), + CounterpartyPayee: suite.chainB.SenderAccount.GetAddress().String(), + ChannelId: ibctesting.FirstChannelID, }, }, } @@ -59,10 +55,15 @@ func (suite *KeeperTestSuite) TestInitGenesis() { isEnabled := suite.chainA.GetSimApp().IBCFeeKeeper.IsFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID) suite.Require().True(isEnabled) + // check payee addresses + payeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), ibctesting.FirstChannelID) + suite.Require().True(found) + suite.Require().Equal(genesisState.RegisteredPayees[0].Payee, payeeAddr) + // check relayers - addr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetCounterpartyAddress(suite.chainA.GetContext(), sender, ibctesting.FirstChannelID) + counterpartyPayeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetCounterpartyPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), ibctesting.FirstChannelID) suite.Require().True(found) - suite.Require().Equal(genesisState.RegisteredRelayers[0].CounterpartyAddress, addr) + suite.Require().Equal(genesisState.RegisteredCounterpartyPayees[0].CounterpartyPayee, counterpartyPayeeAddr) } func (suite *KeeperTestSuite) TestExportGenesis() { @@ -71,24 +72,30 @@ func (suite *KeeperTestSuite) TestExportGenesis() { // setup & escrow the packet fee refundAcc := suite.chainA.SenderAccount.GetAddress() - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) - fee := types.Fee{ - RecvFee: defaultRecvFee, - AckFee: defaultAckFee, - TimeoutFee: defaultTimeoutFee, - } + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, refundAcc.String(), []string{}) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, types.NewPacketFees([]types.PacketFee{packetFee})) - // relayer addresses - sender := suite.chainA.SenderAccount.GetAddress().String() - counterparty := suite.chainB.SenderAccount.GetAddress().String() - // set counterparty address - suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress(suite.chainA.GetContext(), sender, counterparty, ibctesting.FirstChannelID) + // set payee address + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + suite.chainB.SenderAccount.GetAddress().String(), + ibctesting.FirstChannelID, + ) + + // set counterparty payee address + suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + suite.chainB.SenderAccount.GetAddress().String(), + ibctesting.FirstChannelID, + ) // set forward relayer address - suite.chainA.GetSimApp().IBCFeeKeeper.SetRelayerAddressForAsyncAck(suite.chainA.GetContext(), packetID, sender) + suite.chainA.GetSimApp().IBCFeeKeeper.SetRelayerAddressForAsyncAck(suite.chainA.GetContext(), packetID, suite.chainA.SenderAccount.GetAddress().String()) // export genesis genesisState := suite.chainA.GetSimApp().IBCFeeKeeper.ExportGenesis(suite.chainA.GetContext()) @@ -103,11 +110,17 @@ func (suite *KeeperTestSuite) TestExportGenesis() { suite.Require().Equal(refundAcc.String(), genesisState.IdentifiedFees[0].PacketFees[0].RefundAddress) suite.Require().Equal([]string(nil), genesisState.IdentifiedFees[0].PacketFees[0].Relayers) - // check registered relayer addresses - suite.Require().Equal(sender, genesisState.RegisteredRelayers[0].Address) - suite.Require().Equal(counterparty, genesisState.RegisteredRelayers[0].CounterpartyAddress) - - // check registered relayer addresses - suite.Require().Equal(sender, genesisState.ForwardRelayers[0].Address) + // check forward relayer addresses + suite.Require().Equal(suite.chainA.SenderAccount.GetAddress().String(), genesisState.ForwardRelayers[0].Address) suite.Require().Equal(packetID, genesisState.ForwardRelayers[0].PacketId) + + // check payee addresses + suite.Require().Equal(suite.chainA.SenderAccount.GetAddress().String(), genesisState.RegisteredPayees[0].Relayer) + suite.Require().Equal(suite.chainB.SenderAccount.GetAddress().String(), genesisState.RegisteredPayees[0].Payee) + suite.Require().Equal(ibctesting.FirstChannelID, genesisState.RegisteredPayees[0].ChannelId) + + // check registered counterparty payee addresses + suite.Require().Equal(suite.chainA.SenderAccount.GetAddress().String(), genesisState.RegisteredCounterpartyPayees[0].Relayer) + suite.Require().Equal(suite.chainB.SenderAccount.GetAddress().String(), genesisState.RegisteredCounterpartyPayees[0].CounterpartyPayee) + suite.Require().Equal(ibctesting.FirstChannelID, genesisState.RegisteredCounterpartyPayees[0].ChannelId) } diff --git a/modules/apps/29-fee/keeper/grpc_query.go b/modules/apps/29-fee/keeper/grpc_query.go index 10da5bc5595..086d10a8e04 100644 --- a/modules/apps/29-fee/keeper/grpc_query.go +++ b/modules/apps/29-fee/keeper/grpc_query.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" ) var _ types.QueryServer = Keeper{} @@ -35,7 +35,6 @@ func (k Keeper) IncentivizedPackets(goCtx context.Context, req *types.QueryIncen identifiedPackets = append(identifiedPackets, types.NewIdentifiedPacketFees(packetID, packetFees.PacketFees)) return nil }) - if err != nil { return nil, status.Error(codes.NotFound, err.Error()) } @@ -89,7 +88,6 @@ func (k Keeper) IncentivizedPacketsForChannel(goCtx context.Context, req *types. return nil }) - if err != nil { return nil, status.Error(codes.NotFound, err.Error()) } @@ -101,7 +99,6 @@ func (k Keeper) IncentivizedPacketsForChannel(goCtx context.Context, req *types. // TotalRecvFees implements the Query/TotalRecvFees gRPC method func (k Keeper) TotalRecvFees(goCtx context.Context, req *types.QueryTotalRecvFeesRequest) (*types.QueryTotalRecvFeesResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) feesInEscrow, found := k.GetFeesInEscrow(ctx, req.PacketId) @@ -174,21 +171,39 @@ func (k Keeper) TotalTimeoutFees(goCtx context.Context, req *types.QueryTotalTim }, nil } -// CounterpartyAddress implements the Query/CounterpartyAddress gRPC method and returns the registered counterparty address for forward relaying -func (k Keeper) CounterpartyAddress(goCtx context.Context, req *types.QueryCounterpartyAddressRequest) (*types.QueryCounterpartyAddressResponse, error) { +// Payee implements the Query/Payee gRPC method and returns the registered payee address to which packet fees are paid out +func (k Keeper) Payee(goCtx context.Context, req *types.QueryPayeeRequest) (*types.QueryPayeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + payeeAddr, found := k.GetPayeeAddress(ctx, req.Relayer, req.ChannelId) + if !found { + return nil, status.Errorf(codes.NotFound, "payee address not found for address: %s on channel: %s", req.Relayer, req.ChannelId) + } + + return &types.QueryPayeeResponse{ + PayeeAddress: payeeAddr, + }, nil +} + +// CounterpartyPayee implements the Query/CounterpartyPayee gRPC method and returns the registered counterparty payee address for forward relaying +func (k Keeper) CounterpartyPayee(goCtx context.Context, req *types.QueryCounterpartyPayeeRequest) (*types.QueryCounterpartyPayeeResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } ctx := sdk.UnwrapSDKContext(goCtx) - counterpartyAddr, found := k.GetCounterpartyAddress(ctx, req.RelayerAddress, req.ChannelId) + counterpartyPayeeAddr, found := k.GetCounterpartyPayeeAddress(ctx, req.Relayer, req.ChannelId) if !found { - return nil, status.Errorf(codes.NotFound, "counterparty address not found for address: %s on channel: %s", req.RelayerAddress, req.ChannelId) + return nil, status.Errorf(codes.NotFound, "counterparty payee address not found for address: %s on channel: %s", req.Relayer, req.ChannelId) } - return &types.QueryCounterpartyAddressResponse{ - CounterpartyAddress: counterpartyAddr, + return &types.QueryCounterpartyPayeeResponse{ + CounterpartyPayee: counterpartyPayeeAddr, }, nil } @@ -217,7 +232,6 @@ func (k Keeper) FeeEnabledChannels(goCtx context.Context, req *types.QueryFeeEna return nil }) - if err != nil { return nil, status.Error(codes.NotFound, err.Error()) } diff --git a/modules/apps/29-fee/keeper/grpc_query_test.go b/modules/apps/29-fee/keeper/grpc_query_test.go index d665c655ccf..a64a8c41ce1 100644 --- a/modules/apps/29-fee/keeper/grpc_query_test.go +++ b/modules/apps/29-fee/keeper/grpc_query_test.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() { @@ -33,7 +33,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() { for i := 0; i < 3; i++ { // escrow packet fees for three different packets - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, uint64(i+1)) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, uint64(i+1)) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), packetID, types.NewPacketFees([]types.PacketFee{packetFee})) expectedPackets = append(expectedPackets, types.NewIdentifiedPacketFees(packetID, []types.PacketFee{packetFee})) @@ -80,9 +80,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPackets() { } func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() { - var ( - req *types.QueryIncentivizedPacketRequest - ) + var req *types.QueryIncentivizedPacketRequest testCases := []struct { name string @@ -98,7 +96,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() { "fees not found for packet id", func() { req = &types.QueryIncentivizedPacketRequest{ - PacketId: channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100), + PacketId: channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100), QueryHeight: 0, } }, @@ -112,7 +110,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacket() { suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID) - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil)) @@ -207,9 +205,9 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacketsForChannel() { packetFee := types.NewPacketFee(fee, refundAcc.String(), nil) packetFees := types.NewPacketFees([]types.PacketFee{packetFee, packetFee, packetFee}) - identifiedFees1 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1), packetFees.PacketFees) - identifiedFees2 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 2), packetFees.PacketFees) - identifiedFees3 := types.NewIdentifiedPacketFees(channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 3), packetFees.PacketFees) + identifiedFees1 := types.NewIdentifiedPacketFees(channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1), packetFees.PacketFees) + identifiedFees2 := types.NewIdentifiedPacketFees(channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 2), packetFees.PacketFees) + identifiedFees3 := types.NewIdentifiedPacketFees(channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 3), packetFees.PacketFees) expIdentifiedPacketFees = append(expIdentifiedPacketFees, &identifiedFees1, &identifiedFees2, &identifiedFees3) @@ -235,9 +233,7 @@ func (suite *KeeperTestSuite) TestQueryIncentivizedPacketsForChannel() { } func (suite *KeeperTestSuite) TestQueryTotalRecvFees() { - var ( - req *types.QueryTotalRecvFeesRequest - ) + var req *types.QueryTotalRecvFeesRequest testCases := []struct { name string @@ -252,7 +248,7 @@ func (suite *KeeperTestSuite) TestQueryTotalRecvFees() { { "packet not found", func() { - req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) + req.PacketId = channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) }, false, }, @@ -264,7 +260,7 @@ func (suite *KeeperTestSuite) TestQueryTotalRecvFees() { suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID) - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil)) @@ -296,9 +292,7 @@ func (suite *KeeperTestSuite) TestQueryTotalRecvFees() { } func (suite *KeeperTestSuite) TestQueryTotalAckFees() { - var ( - req *types.QueryTotalAckFeesRequest - ) + var req *types.QueryTotalAckFeesRequest testCases := []struct { name string @@ -313,7 +307,7 @@ func (suite *KeeperTestSuite) TestQueryTotalAckFees() { { "packet not found", func() { - req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) + req.PacketId = channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) }, false, }, @@ -325,7 +319,7 @@ func (suite *KeeperTestSuite) TestQueryTotalAckFees() { suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID) - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil)) @@ -357,9 +351,7 @@ func (suite *KeeperTestSuite) TestQueryTotalAckFees() { } func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() { - var ( - req *types.QueryTotalTimeoutFeesRequest - ) + var req *types.QueryTotalTimeoutFeesRequest testCases := []struct { name string @@ -374,7 +366,7 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() { { "packet not found", func() { - req.PacketId = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) + req.PacketId = channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 100) }, false, }, @@ -386,7 +378,7 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() { suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), ibctesting.MockFeePort, ibctesting.FirstChannelID) - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), []string(nil)) @@ -417,10 +409,71 @@ func (suite *KeeperTestSuite) TestQueryTotalTimeoutFees() { } } -func (suite *KeeperTestSuite) TestQueryCounterpartyAddress() { - var ( - req *types.QueryCounterpartyAddressRequest - ) +func (suite *KeeperTestSuite) TestQueryPayee() { + var req *types.QueryPayeeRequest + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() {}, + true, + }, + { + "payee address not found: invalid channel", + func() { + req.ChannelId = "invalid-channel-id" + }, + false, + }, + { + "payee address not found: invalid relayer address", + func() { + req.Relayer = "invalid-addr" + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + suite.SetupTest() // reset + + pk := secp256k1.GenPrivKey().PubKey() + expPayeeAddr := sdk.AccAddress(pk.Address()) + + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + expPayeeAddr.String(), + suite.path.EndpointA.ChannelID, + ) + + req = &types.QueryPayeeRequest{ + ChannelId: suite.path.EndpointA.ChannelID, + Relayer: suite.chainA.SenderAccount.GetAddress().String(), + } + + tc.malleate() + + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + res, err := suite.queryClient.Payee(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expPayeeAddr.String(), res.PayeeAddress) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestQueryCounterpartyPayee() { + var req *types.QueryCounterpartyPayeeRequest testCases := []struct { name string @@ -442,7 +495,7 @@ func (suite *KeeperTestSuite) TestQueryCounterpartyAddress() { { "counterparty address not found: invalid address", func() { - req.RelayerAddress = "invalid-addr" + req.Relayer = "invalid-addr" }, false, }, @@ -453,28 +506,28 @@ func (suite *KeeperTestSuite) TestQueryCounterpartyAddress() { suite.SetupTest() // reset pk := secp256k1.GenPrivKey().PubKey() - expectedCounterpartyAddr := sdk.AccAddress(pk.Address()) + expCounterpartyPayeeAddr := sdk.AccAddress(pk.Address()) - suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress( + suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress( suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), - expectedCounterpartyAddr.String(), + expCounterpartyPayeeAddr.String(), suite.path.EndpointA.ChannelID, ) - req = &types.QueryCounterpartyAddressRequest{ - ChannelId: suite.path.EndpointA.ChannelID, - RelayerAddress: suite.chainA.SenderAccount.GetAddress().String(), + req = &types.QueryCounterpartyPayeeRequest{ + ChannelId: suite.path.EndpointA.ChannelID, + Relayer: suite.chainA.SenderAccount.GetAddress().String(), } tc.malleate() ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) - res, err := suite.queryClient.CounterpartyAddress(ctx, req) + res, err := suite.queryClient.CounterpartyPayee(ctx, req) if tc.expPass { suite.Require().NoError(err) - suite.Require().Equal(expectedCounterpartyAddr.String(), res.CounterpartyAddress) + suite.Require().Equal(expCounterpartyPayeeAddr.String(), res.CounterpartyPayee) } else { suite.Require().Error(err) } @@ -590,9 +643,7 @@ func (suite *KeeperTestSuite) TestQueryFeeEnabledChannels() { } func (suite *KeeperTestSuite) TestQueryFeeEnabledChannel() { - var ( - req *types.QueryFeeEnabledChannelRequest - ) + var req *types.QueryFeeEnabledChannelRequest testCases := []struct { name string diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index e0317d3660a..6136ad22229 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -2,14 +2,15 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // Middleware must implement types.ChannelKeeper and types.PortKeeper expected interfaces @@ -21,7 +22,7 @@ var ( // Keeper defines the IBC fungible transfer keeper type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec authKeeper types.AccountKeeper @@ -33,10 +34,9 @@ type Keeper struct { // NewKeeper creates a new 29-fee Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) Keeper { - return Keeper{ cdc: cdc, storeKey: key, @@ -64,6 +64,11 @@ func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channelty return k.channelKeeper.GetChannel(ctx, portID, channelID) } +// GetPacketCommitment wraps IBC ChannelKeeper's GetPacketCommitment function +func (k Keeper) GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte { + return k.channelKeeper.GetPacketCommitment(ctx, portID, channelID, sequence) +} + // GetNextSequenceSend wraps IBC ChannelKeeper's GetNextSequenceSend function func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) { return k.channelKeeper.GetNextSequenceSend(ctx, portID, channelID) @@ -143,17 +148,60 @@ func (k Keeper) GetAllFeeEnabledChannels(ctx sdk.Context) []types.FeeEnabledChan return enabledChArr } -// SetCounterpartyAddress maps the destination chain relayer address to the source relayer address -// The receiving chain must store the mapping from: address -> counterpartyAddress for the given channel -func (k Keeper) SetCounterpartyAddress(ctx sdk.Context, address, counterpartyAddress, channelID string) { +// GetPayeeAddress retrieves the fee payee address stored in state given the provided channel identifier and relayer address +func (k Keeper) GetPayeeAddress(ctx sdk.Context, relayerAddr, channelID string) (string, bool) { + store := ctx.KVStore(k.storeKey) + key := types.KeyPayee(relayerAddr, channelID) + + if !store.Has(key) { + return "", false + } + + return string(store.Get(key)), true +} + +// SetPayeeAddress stores the fee payee address in state keyed by the provided channel identifier and relayer address +func (k Keeper) SetPayeeAddress(ctx sdk.Context, relayerAddr, payeeAddr, channelID string) { + store := ctx.KVStore(k.storeKey) + store.Set(types.KeyPayee(relayerAddr, channelID), []byte(payeeAddr)) +} + +// GetAllPayees returns all registered payees addresses +func (k Keeper) GetAllPayees(ctx sdk.Context) []types.RegisteredPayee { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, []byte(types.PayeeKeyPrefix)) + defer iterator.Close() + + var registeredPayees []types.RegisteredPayee + for ; iterator.Valid(); iterator.Next() { + relayerAddr, channelID, err := types.ParseKeyPayeeAddress(string(iterator.Key())) + if err != nil { + panic(err) + } + + payee := types.RegisteredPayee{ + Relayer: relayerAddr, + Payee: string(iterator.Value()), + ChannelId: channelID, + } + + registeredPayees = append(registeredPayees, payee) + } + + return registeredPayees +} + +// SetCounterpartyPayeeAddress maps the destination chain counterparty payee address to the source relayer address +// The receiving chain must store the mapping from: address -> counterpartyPayeeAddress for the given channel +func (k Keeper) SetCounterpartyPayeeAddress(ctx sdk.Context, address, counterpartyAddress, channelID string) { store := ctx.KVStore(k.storeKey) - store.Set(types.KeyCounterpartyRelayer(address, channelID), []byte(counterpartyAddress)) + store.Set(types.KeyCounterpartyPayee(address, channelID), []byte(counterpartyAddress)) } -// GetCounterpartyAddress gets the relayer counterparty address given a destination relayer address -func (k Keeper) GetCounterpartyAddress(ctx sdk.Context, address, channelID string) (string, bool) { +// GetCounterpartyPayeeAddress gets the counterparty payee address given a destination relayer address +func (k Keeper) GetCounterpartyPayeeAddress(ctx sdk.Context, address, channelID string) (string, bool) { store := ctx.KVStore(k.storeKey) - key := types.KeyCounterpartyRelayer(address, channelID) + key := types.KeyCounterpartyPayee(address, channelID) if !store.Has(key) { return "", false @@ -163,41 +211,41 @@ func (k Keeper) GetCounterpartyAddress(ctx sdk.Context, address, channelID strin return addr, true } -// GetAllRelayerAddresses returns all registered relayer addresses -func (k Keeper) GetAllRelayerAddresses(ctx sdk.Context) []types.RegisteredRelayerAddress { +// GetAllCounterpartyPayees returns all registered counterparty payee addresses +func (k Keeper) GetAllCounterpartyPayees(ctx sdk.Context) []types.RegisteredCounterpartyPayee { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.CounterpartyRelayerAddressKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte(types.CounterpartyPayeeKeyPrefix)) defer iterator.Close() - var registeredAddrArr []types.RegisteredRelayerAddress + var registeredCounterpartyPayees []types.RegisteredCounterpartyPayee for ; iterator.Valid(); iterator.Next() { - address, channelID, err := types.ParseKeyCounterpartyRelayer(string(iterator.Key())) + relayerAddr, channelID, err := types.ParseKeyCounterpartyPayee(string(iterator.Key())) if err != nil { panic(err) } - addr := types.RegisteredRelayerAddress{ - Address: address, - CounterpartyAddress: string(iterator.Value()), - ChannelId: channelID, + counterpartyPayee := types.RegisteredCounterpartyPayee{ + Relayer: relayerAddr, + CounterpartyPayee: string(iterator.Value()), + ChannelId: channelID, } - registeredAddrArr = append(registeredAddrArr, addr) + registeredCounterpartyPayees = append(registeredCounterpartyPayees, counterpartyPayee) } - return registeredAddrArr + return registeredCounterpartyPayees } // SetRelayerAddressForAsyncAck sets the forward relayer address during OnRecvPacket in case of async acknowledgement func (k Keeper) SetRelayerAddressForAsyncAck(ctx sdk.Context, packetID channeltypes.PacketId, address string) { store := ctx.KVStore(k.storeKey) - store.Set(types.KeyForwardRelayerAddress(packetID), []byte(address)) + store.Set(types.KeyRelayerAddressForAsyncAck(packetID), []byte(address)) } // GetRelayerAddressForAsyncAck gets forward relayer address for a particular packet func (k Keeper) GetRelayerAddressForAsyncAck(ctx sdk.Context, packetID channeltypes.PacketId) (string, bool) { store := ctx.KVStore(k.storeKey) - key := types.KeyForwardRelayerAddress(packetID) + key := types.KeyRelayerAddressForAsyncAck(packetID) if !store.Has(key) { return "", false } @@ -214,7 +262,7 @@ func (k Keeper) GetAllForwardRelayerAddresses(ctx sdk.Context) []types.ForwardRe var forwardRelayerAddr []types.ForwardRelayerAddress for ; iterator.Valid(); iterator.Next() { - packetID, err := types.ParseKeyForwardRelayerAddress(string(iterator.Key())) + packetID, err := types.ParseKeyRelayerAddressForAsyncAck(string(iterator.Key())) if err != nil { panic(err) } @@ -233,7 +281,7 @@ func (k Keeper) GetAllForwardRelayerAddresses(ctx sdk.Context) []types.ForwardRe // Deletes the forwardRelayerAddr associated with the packetID func (k Keeper) DeleteForwardRelayerAddress(ctx sdk.Context, packetID channeltypes.PacketId) { store := ctx.KVStore(k.storeKey) - key := types.KeyForwardRelayerAddress(packetID) + key := types.KeyRelayerAddressForAsyncAck(packetID) store.Delete(key) } diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index 7446ecbab64..ed05a963ce6 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -8,10 +8,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) var ( @@ -91,11 +91,30 @@ func (suite *KeeperTestSuite) TestEscrowAccountHasBalance() { suite.Require().False(suite.chainA.GetSimApp().IBCFeeKeeper.EscrowAccountHasBalance(suite.chainA.GetContext(), fee.Total())) } +func (suite *KeeperTestSuite) TestGetSetPayeeAddress() { + suite.coordinator.Setup(suite.path) + + payeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointA.ChannelID) + suite.Require().False(found) + suite.Require().Empty(payeeAddr) + + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccounts[0].SenderAccount.GetAddress().String(), + suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), + suite.path.EndpointA.ChannelID, + ) + + payeeAddr, found = suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.path.EndpointA.ChannelID) + suite.Require().True(found) + suite.Require().Equal(suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), payeeAddr) +} + func (suite *KeeperTestSuite) TestFeesInEscrow() { suite.coordinator.Setup(suite.path) // escrow five fees for packet sequence 1 - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), nil) @@ -128,9 +147,9 @@ func (suite *KeeperTestSuite) TestGetIdentifiedPacketFeesForChannel() { // escrow a fee refundAcc := suite.chainA.SenderAccount.GetAddress() - packetID1 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) - packetID2 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 2) - packetID5 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 51) + packetID1 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID2 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 2) + packetID5 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 51) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) @@ -142,9 +161,9 @@ func (suite *KeeperTestSuite) TestGetIdentifiedPacketFeesForChannel() { // set fees in escrow for packetIDs on different channel diffChannel := "channel-1" - diffPacketID1 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 1) - diffPacketID2 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 2) - diffPacketID5 := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 5) + diffPacketID1 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 1) + diffPacketID2 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 2) + diffPacketID5 := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, diffChannel, 5) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), diffPacketID1, types.NewPacketFees([]types.PacketFee{packetFee})) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), diffPacketID2, types.NewPacketFees([]types.PacketFee{packetFee})) suite.chainA.GetSimApp().IBCFeeKeeper.SetFeesInEscrow(suite.chainA.GetContext(), diffPacketID5, types.NewPacketFees([]types.PacketFee{packetFee})) @@ -192,7 +211,7 @@ func (suite *KeeperTestSuite) TestGetAllIdentifiedPacketFees() { // escrow a fee refundAcc := suite.chainA.SenderAccount.GetAddress() - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) // escrow the packet fee @@ -239,21 +258,46 @@ func (suite *KeeperTestSuite) TestGetAllFeeEnabledChannels() { suite.Require().Equal(ch, expectedCh) } -func (suite *KeeperTestSuite) TestGetAllRelayerAddresses() { - sender := suite.chainA.SenderAccount.GetAddress().String() - counterparty := suite.chainB.SenderAccount.GetAddress().String() +func (suite *KeeperTestSuite) TestGetAllPayees() { + var expectedPayees []types.RegisteredPayee + + for i := 0; i < 3; i++ { + suite.chainA.GetSimApp().IBCFeeKeeper.SetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccounts[i].SenderAccount.GetAddress().String(), + suite.chainB.SenderAccounts[i].SenderAccount.GetAddress().String(), + ibctesting.FirstChannelID, + ) + + registeredPayee := types.RegisteredPayee{ + Relayer: suite.chainA.SenderAccounts[i].SenderAccount.GetAddress().String(), + Payee: suite.chainB.SenderAccounts[i].SenderAccount.GetAddress().String(), + ChannelId: ibctesting.FirstChannelID, + } + + expectedPayees = append(expectedPayees, registeredPayee) + } + + registeredPayees := suite.chainA.GetSimApp().IBCFeeKeeper.GetAllPayees(suite.chainA.GetContext()) + suite.Require().Len(registeredPayees, len(expectedPayees)) + suite.Require().ElementsMatch(expectedPayees, registeredPayees) +} + +func (suite *KeeperTestSuite) TestGetAllCounterpartyPayees() { + relayerAddr := suite.chainA.SenderAccount.GetAddress().String() + counterpartyPayee := suite.chainB.SenderAccount.GetAddress().String() - suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress(suite.chainA.GetContext(), sender, counterparty, ibctesting.FirstChannelID) + suite.chainA.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainA.GetContext(), relayerAddr, counterpartyPayee, ibctesting.FirstChannelID) - expectedAddr := []types.RegisteredRelayerAddress{ + expectedCounterpartyPayee := []types.RegisteredCounterpartyPayee{ { - Address: sender, - CounterpartyAddress: counterparty, - ChannelId: ibctesting.FirstChannelID, + Relayer: relayerAddr, + CounterpartyPayee: counterpartyPayee, + ChannelId: ibctesting.FirstChannelID, }, } - addr := suite.chainA.GetSimApp().IBCFeeKeeper.GetAllRelayerAddresses(suite.chainA.GetContext()) - suite.Require().Len(addr, len(expectedAddr)) - suite.Require().Equal(addr, expectedAddr) + counterpartyPayeeAddr := suite.chainA.GetSimApp().IBCFeeKeeper.GetAllCounterpartyPayees(suite.chainA.GetContext()) + suite.Require().Len(counterpartyPayeeAddr, len(expectedCounterpartyPayee)) + suite.Require().Equal(counterpartyPayeeAddr, expectedCounterpartyPayee) } diff --git a/modules/apps/29-fee/keeper/msg_server.go b/modules/apps/29-fee/keeper/msg_server.go index 69f6520c759..0b28ac8e1e5 100644 --- a/modules/apps/29-fee/keeper/msg_server.go +++ b/modules/apps/29-fee/keeper/msg_server.go @@ -4,26 +4,64 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) var _ types.MsgServer = Keeper{} -// RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their counterparty address before relaying -// This ensures they will be properly compensated for forward relaying on the source chain since the destination chain must send back relayer's source address (counterparty address) in acknowledgement -// This function may be called more than once by relayers, in which case, the previous counterparty address will be overwritten by the new counterparty address -func (k Keeper) RegisterCounterpartyAddress(goCtx context.Context, msg *types.MsgRegisterCounterpartyAddress) (*types.MsgRegisterCounterpartyAddressResponse, error) { +// RegisterPayee defines a rpc handler method for MsgRegisterPayee +// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional +// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on +// the source chain from which packets originate as this is where fee distribution takes place. This function may be +// called more than once by a relayer, in which case, the latest payee is always used. +func (k Keeper) RegisterPayee(goCtx context.Context, msg *types.MsgRegisterPayee) (*types.MsgRegisterPayeeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - k.SetCounterpartyAddress( - ctx, msg.Address, msg.CounterpartyAddress, msg.ChannelId, - ) + // only register payee address if the channel exists and is fee enabled + if _, found := k.channelKeeper.GetChannel(ctx, msg.PortId, msg.ChannelId); !found { + return nil, channeltypes.ErrChannelNotFound + } + + if !k.IsFeeEnabled(ctx, msg.PortId, msg.ChannelId) { + return nil, types.ErrFeeNotEnabled + } - k.Logger(ctx).Info("Registering counterparty address for relayer.", "Address:", msg.Address, "Counterparty Address:", msg.CounterpartyAddress) + k.SetPayeeAddress(ctx, msg.Relayer, msg.Payee, msg.ChannelId) - return &types.MsgRegisterCounterpartyAddressResponse{}, nil + k.Logger(ctx).Info("registering payee address for relayer", "relayer", msg.Relayer, "payee", msg.Payee, "channel", msg.ChannelId) + + EmitRegisterPayeeEvent(ctx, msg.Relayer, msg.Payee, msg.ChannelId) + + return &types.MsgRegisterPayeeResponse{}, nil +} + +// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee +// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty +// payee address before relaying. This ensures they will be properly compensated for forward relaying since +// the destination chain must include the registered counterparty payee address in the acknowledgement. This function +// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. +func (k Keeper) RegisterCounterpartyPayee(goCtx context.Context, msg *types.MsgRegisterCounterpartyPayee) (*types.MsgRegisterCounterpartyPayeeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // only register counterparty payee if the channel exists and is fee enabled + if _, found := k.channelKeeper.GetChannel(ctx, msg.PortId, msg.ChannelId); !found { + return nil, channeltypes.ErrChannelNotFound + } + + if !k.IsFeeEnabled(ctx, msg.PortId, msg.ChannelId) { + return nil, types.ErrFeeNotEnabled + } + + k.SetCounterpartyPayeeAddress(ctx, msg.Relayer, msg.CounterpartyPayee, msg.ChannelId) + + k.Logger(ctx).Info("registering counterparty payee for relayer", "relayer", msg.Relayer, "counterparty payee", msg.CounterpartyPayee, "channel", msg.ChannelId) + + EmitRegisterCounterpartyPayeeEvent(ctx, msg.Relayer, msg.CounterpartyPayee, msg.ChannelId) + + return &types.MsgRegisterCounterpartyPayeeResponse{}, nil } // PayPacketFee defines a rpc handler method for MsgPayPacketFee @@ -46,7 +84,7 @@ func (k Keeper) PayPacketFee(goCtx context.Context, msg *types.MsgPayPacketFee) return nil, channeltypes.ErrSequenceSendNotFound } - packetID := channeltypes.NewPacketId(msg.SourcePortId, msg.SourceChannelId, sequence) + packetID := channeltypes.NewPacketID(msg.SourcePortId, msg.SourceChannelId, sequence) packetFee := types.NewPacketFee(msg.Fee, msg.Signer, msg.Relayers) if err := k.escrowPacketFee(ctx, packetID, packetFee); err != nil { @@ -58,7 +96,8 @@ func (k Keeper) PayPacketFee(goCtx context.Context, msg *types.MsgPayPacketFee) // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to -// incentivize the relaying of a known packet +// incentivize the relaying of a known packet. Only packets which have been sent and have not gone through the +// packet life cycle may be incentivized. func (k Keeper) PayPacketFeeAsync(goCtx context.Context, msg *types.MsgPayPacketFeeAsync) (*types.MsgPayPacketFeeAsyncResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) @@ -71,6 +110,21 @@ func (k Keeper) PayPacketFeeAsync(goCtx context.Context, msg *types.MsgPayPacket return nil, types.ErrFeeModuleLocked } + nextSeqSend, found := k.GetNextSequenceSend(ctx, msg.PacketId.PortId, msg.PacketId.ChannelId) + if !found { + return nil, sdkerrors.Wrapf(channeltypes.ErrSequenceSendNotFound, "channel does not exist, portID: %s, channelID: %s", msg.PacketId.PortId, msg.PacketId.ChannelId) + } + + // only allow incentivizing of packets which have been sent + if msg.PacketId.Sequence >= nextSeqSend { + return nil, channeltypes.ErrPacketNotSent + } + + // only allow incentivizng of packets which have not completed the packet life cycle + if bz := k.GetPacketCommitment(ctx, msg.PacketId.PortId, msg.PacketId.ChannelId, msg.PacketId.Sequence); len(bz) == 0 { + return nil, sdkerrors.Wrapf(channeltypes.ErrPacketCommitmentNotFound, "packet has already been acknowledged or timed out") + } + if err := k.escrowPacketFee(ctx, msg.PacketId, msg.PacketFee); err != nil { return nil, err } diff --git a/modules/apps/29-fee/keeper/msg_server_test.go b/modules/apps/29-fee/keeper/msg_server_test.go index 8a927559a51..0261cecb59a 100644 --- a/modules/apps/29-fee/keeper/msg_server_test.go +++ b/modules/apps/29-fee/keeper/msg_server_test.go @@ -2,16 +2,80 @@ package keeper_test import ( sdk "github.com/cosmos/cosmos-sdk/types" + disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) -func (suite *KeeperTestSuite) TestRegisterCounterpartyAddress() { +func (suite *KeeperTestSuite) TestRegisterPayee() { + var msg *types.MsgRegisterPayee + + testCases := []struct { + name string + expPass bool + malleate func() + }{ + { + "success", + true, + func() {}, + }, + { + "channel does not exist", + false, + func() { + msg.ChannelId = "channel-100" + }, + }, + { + "channel is not fee enabled", + false, + func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, + }, + } + + for _, tc := range testCases { + suite.SetupTest() + suite.coordinator.Setup(suite.path) + + msg = types.NewMsgRegisterPayee( + suite.path.EndpointA.ChannelConfig.PortID, + suite.path.EndpointA.ChannelID, + suite.chainA.SenderAccounts[0].SenderAccount.GetAddress().String(), + suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), + ) + + tc.malleate() + + res, err := suite.chainA.GetSimApp().IBCFeeKeeper.RegisterPayee(sdk.WrapSDKContext(suite.chainA.GetContext()), msg) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + + payeeAddr, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + suite.path.EndpointA.ChannelID, + ) + + suite.Require().True(found) + suite.Require().Equal(suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String(), payeeAddr) + } else { + suite.Require().Error(err) + } + } +} + +func (suite *KeeperTestSuite) TestRegisterCounterpartyPayee() { var ( - sender string - counterparty string + msg *types.MsgRegisterCounterpartyPayee + expCounterpartyPayee string ) testCases := []struct { @@ -25,28 +89,57 @@ func (suite *KeeperTestSuite) TestRegisterCounterpartyAddress() { func() {}, }, { - "counterparty is an arbitrary string", + "counterparty payee is an arbitrary string", true, - func() { counterparty = "arbitrary-string" }, + func() { + msg.CounterpartyPayee = "arbitrary-string" + expCounterpartyPayee = "arbitrary-string" + }, + }, + { + "channel does not exist", + false, + func() { + msg.ChannelId = "channel-100" + }, + }, + { + "channel is not fee enabled", + false, + func() { + suite.chainA.GetSimApp().IBCFeeKeeper.DeleteFeeEnabled(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) + }, }, } for _, tc := range testCases { suite.SetupTest() - ctx := suite.chainA.GetContext() + suite.coordinator.Setup(suite.path) // setup channel + + expCounterpartyPayee = suite.chainA.SenderAccounts[1].SenderAccount.GetAddress().String() + msg = types.NewMsgRegisterCounterpartyPayee( + suite.path.EndpointA.ChannelConfig.PortID, + suite.path.EndpointA.ChannelID, + suite.chainA.SenderAccounts[0].SenderAccount.GetAddress().String(), + expCounterpartyPayee, + ) - sender = suite.chainA.SenderAccount.GetAddress().String() - counterparty = suite.chainB.SenderAccount.GetAddress().String() tc.malleate() - msg := types.NewMsgRegisterCounterpartyAddress(sender, counterparty, ibctesting.FirstChannelID) - _, err := suite.chainA.SendMsgs(msg) + res, err := suite.chainA.GetSimApp().IBCFeeKeeper.RegisterCounterpartyPayee(sdk.WrapSDKContext(suite.chainA.GetContext()), msg) if tc.expPass { - suite.Require().NoError(err) // message committed + suite.Require().NoError(err) + suite.Require().NotNil(res) + + counterpartyPayee, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetCounterpartyPayeeAddress( + suite.chainA.GetContext(), + suite.chainA.SenderAccount.GetAddress().String(), + ibctesting.FirstChannelID, + ) - counterpartyAddress, _ := suite.chainA.GetSimApp().IBCFeeKeeper.GetCounterpartyAddress(ctx, suite.chainA.SenderAccount.GetAddress().String(), ibctesting.FirstChannelID) - suite.Require().Equal(counterparty, counterpartyAddress) + suite.Require().True(found) + suite.Require().Equal(expCounterpartyPayee, counterpartyPayee) } else { suite.Require().Error(err) } @@ -58,6 +151,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { expEscrowBalance sdk.Coins expFeesInEscrow []types.PacketFee msg *types.MsgPayPacketFee + fee types.Fee ) testCases := []struct { @@ -75,7 +169,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { func() { fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), nil) feesInEscrow := types.NewPacketFees([]types.PacketFee{packetFee}) @@ -88,6 +182,15 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { }, true, }, + { + "refund account is module account", + func() { + msg.Signer = suite.chainA.GetSimApp().AccountKeeper.GetModuleAddress(disttypes.ModuleName).String() + expPacketFee := types.NewPacketFee(fee, msg.Signer, nil) + expFeesInEscrow = []types.PacketFee{expPacketFee} + }, + true, + }, { "fee module is locked", func() { @@ -147,7 +250,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { suite.SetupTest() suite.coordinator.Setup(suite.path) // setup channel - fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + fee = types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) msg = types.NewMsgPayPacketFee( fee, suite.path.EndpointA.ChannelConfig.PortID, @@ -167,7 +270,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { if tc.expPass { suite.Require().NoError(err) // message committed - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) feesInEscrow, found := suite.chainA.GetSimApp().IBCFeeKeeper.GetFeesInEscrow(suite.chainA.GetContext(), packetID) suite.Require().True(found) suite.Require().Equal(expFeesInEscrow, feesInEscrow.PacketFees) @@ -186,6 +289,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { var ( + packet channeltypes.Packet expEscrowBalance sdk.Coins expFeesInEscrow []types.PacketFee msg *types.MsgPayPacketFeeAsync @@ -206,7 +310,7 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { func() { fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), nil) feesInEscrow := types.NewPacketFees([]types.PacketFee{packetFee}) @@ -234,6 +338,53 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { }, false, }, + { + "channel does not exist", + func() { + msg.PacketId.ChannelId = "channel-100" + + // to test this functionality, we must set the fee to enabled for this non existent channel + // NOTE: the channel doesn't exist in 04-channel keeper, but we will add a mapping within ics29 anyways + suite.chainA.GetSimApp().IBCFeeKeeper.SetFeeEnabled(suite.chainA.GetContext(), msg.PacketId.PortId, msg.PacketId.ChannelId) + }, + false, + }, + { + "packet not sent", + func() { + msg.PacketId.Sequence = msg.PacketId.Sequence + 1 + }, + false, + }, + { + "packet already acknowledged", + func() { + err := suite.path.RelayPacket(packet) + suite.Require().NoError(err) + }, + false, + }, + { + "packet already timed out", + func() { + // try to incentivze a packet which is timed out + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, msg.PacketId.Sequence+1) + packet = channeltypes.NewPacket(ibctesting.MockPacketData, packetID.Sequence, packetID.PortId, packetID.ChannelId, suite.path.EndpointB.ChannelConfig.PortID, suite.path.EndpointB.ChannelID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), 0) + + err := suite.path.EndpointA.SendPacket(packet) + suite.Require().NoError(err) + + // need to update chainA's client representing chainB to prove missing ack + err = suite.path.EndpointA.UpdateClient() + suite.Require().NoError(err) + + err = suite.path.EndpointA.TimeoutPacket(packet) + suite.Require().NoError(err) + + msg.PacketId = packetID + }, + false, + }, { "invalid refund address", func() { @@ -278,7 +429,12 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { suite.SetupTest() suite.coordinator.Setup(suite.path) // setup channel - packetID := channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + // send a packet to incentivize + packetID := channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1) + packet = channeltypes.NewPacket(ibctesting.MockPacketData, packetID.Sequence, packetID.PortId, packetID.ChannelId, suite.path.EndpointB.ChannelConfig.PortID, suite.path.EndpointB.ChannelID, clienttypes.NewHeight(clienttypes.ParseChainID(suite.chainB.ChainID), 100), 0) + err := suite.path.EndpointA.SendPacket(packet) + suite.Require().NoError(err) + fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, suite.chainA.SenderAccount.GetAddress().String(), nil) @@ -288,7 +444,7 @@ func (suite *KeeperTestSuite) TestPayPacketFeeAsync() { tc.malleate() - _, err := suite.chainA.GetSimApp().IBCFeeKeeper.PayPacketFeeAsync(sdk.WrapSDKContext(suite.chainA.GetContext()), msg) + _, err = suite.chainA.GetSimApp().IBCFeeKeeper.PayPacketFeeAsync(sdk.WrapSDKContext(suite.chainA.GetContext()), msg) if tc.expPass { suite.Require().NoError(err) // message committed diff --git a/modules/apps/29-fee/keeper/relay.go b/modules/apps/29-fee/keeper/relay.go index 476497bfbbb..0e517e945a6 100644 --- a/modules/apps/29-fee/keeper/relay.go +++ b/modules/apps/29-fee/keeper/relay.go @@ -7,9 +7,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // SendPacket wraps IBC ChannelKeeper's SendPacket function @@ -25,7 +25,7 @@ func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.C return k.ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, acknowledgement) } - packetID := channeltypes.NewPacketId(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + packetID := channeltypes.NewPacketID(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // retrieve the forward relayer that was stored in `onRecvPacket` relayer, found := k.GetRelayerAddressForAsyncAck(ctx, packetID) @@ -35,7 +35,7 @@ func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.C // it is possible that a relayer has not registered a counterparty address. // if there is no registered counterparty address then write acknowledgement with empty relayer address and refund recv_fee. - forwardRelayer, _ := k.GetCounterpartyAddress(ctx, relayer, packet.GetDestChannel()) + forwardRelayer, _ := k.GetCounterpartyPayeeAddress(ctx, relayer, packet.GetDestChannel()) ack := types.NewIncentivizedAcknowledgement(forwardRelayer, acknowledgement.Acknowledgement(), acknowledgement.Success()) diff --git a/modules/apps/29-fee/keeper/relay_test.go b/modules/apps/29-fee/keeper/relay_test.go index d0a9e620f9d..b6a2b75c408 100644 --- a/modules/apps/29-fee/keeper/relay_test.go +++ b/modules/apps/29-fee/keeper/relay_test.go @@ -1,11 +1,11 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) func (suite *KeeperTestSuite) TestWriteAcknowledgementAsync() { @@ -17,8 +17,8 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgementAsync() { { "success", func() { - suite.chainB.GetSimApp().IBCFeeKeeper.SetRelayerAddressForAsyncAck(suite.chainB.GetContext(), channeltypes.NewPacketId(suite.path.EndpointB.ChannelConfig.PortID, suite.path.EndpointB.ChannelID, 1), suite.chainA.SenderAccount.GetAddress().String()) - suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) + suite.chainB.GetSimApp().IBCFeeKeeper.SetRelayerAddressForAsyncAck(suite.chainB.GetContext(), channeltypes.NewPacketID(suite.path.EndpointB.ChannelConfig.PortID, suite.path.EndpointB.ChannelID, 1), suite.chainA.SenderAccount.GetAddress().String()) + suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) }, true, }, @@ -63,7 +63,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgementAsync() { if tc.expPass { suite.Require().NoError(err) - _, found := suite.chainB.GetSimApp().IBCFeeKeeper.GetRelayerAddressForAsyncAck(suite.chainB.GetContext(), channeltypes.NewPacketId(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1)) + _, found := suite.chainB.GetSimApp().IBCFeeKeeper.GetRelayerAddressForAsyncAck(suite.chainB.GetContext(), channeltypes.NewPacketID(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, 1)) suite.Require().False(found) expectedAck := types.NewIncentivizedAcknowledgement(suite.chainB.SenderAccount.GetAddress().String(), ack.Acknowledgement(), ack.Success()) diff --git a/modules/apps/29-fee/module.go b/modules/apps/29-fee/module.go index e493e047837..ab150179b79 100644 --- a/modules/apps/29-fee/module.go +++ b/modules/apps/29-fee/module.go @@ -12,20 +12,17 @@ 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/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/client/cli" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/client/cli" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" ) var ( _ module.AppModule = AppModule{} - _ porttypes.IBCModule = IBCModule{} _ module.AppModuleBasic = AppModuleBasic{} ) @@ -61,13 +58,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes implements AppModuleBasic interface -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for ics29 fee module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } } // GetTxCmd implements AppModuleBasic interface diff --git a/modules/apps/29-fee/transfer_test.go b/modules/apps/29-fee/transfer_test.go index f26183797ed..8aeb6ffeac0 100644 --- a/modules/apps/29-fee/transfer_test.go +++ b/modules/apps/29-fee/transfer_test.go @@ -3,10 +3,10 @@ package fee_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) // Integration test to ensure ics29 works with ics20 @@ -46,7 +46,7 @@ func (suite *FeeTestSuite) TestFeeTransfer() { // to differentiate from the chainA.SenderAccount for checking successful relay payouts relayerAddress := suite.chainB.SenderAccount.GetAddress() - msgRegister := types.NewMsgRegisterCounterpartyAddress(suite.chainB.SenderAccount.GetAddress().String(), relayerAddress.String(), ibctesting.FirstChannelID) + msgRegister := types.NewMsgRegisterCounterpartyPayee(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, suite.chainB.SenderAccount.GetAddress().String(), relayerAddress.String()) _, err = suite.chainB.SendMsgs(msgRegister) suite.Require().NoError(err) // message committed @@ -66,7 +66,5 @@ func (suite *FeeTestSuite) TestFeeTransfer() { suite.Require().Equal( fee.AckFee.Add(fee.TimeoutFee...), // ack fee paid, timeout fee refunded - sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)).Sub(originalChainASenderAccountBalance), - ) - + sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)).Sub(originalChainASenderAccountBalance[0])) } diff --git a/modules/apps/29-fee/types/ack.go b/modules/apps/29-fee/types/ack.go index 229d8e4cc3f..d0fe4269868 100644 --- a/modules/apps/29-fee/types/ack.go +++ b/modules/apps/29-fee/types/ack.go @@ -7,7 +7,7 @@ import ( // NewIncentivizedAcknowledgement creates a new instance of IncentivizedAcknowledgement func NewIncentivizedAcknowledgement(relayer string, ack []byte, success bool) IncentivizedAcknowledgement { return IncentivizedAcknowledgement{ - Result: ack, + AppAcknowledgement: ack, ForwardRelayerAddress: relayer, UnderlyingAppSuccess: success, } diff --git a/modules/apps/29-fee/types/ack.pb.go b/modules/apps/29-fee/types/ack.pb.go index 4f6437da224..702bed3d65f 100644 --- a/modules/apps/29-fee/types/ack.pb.go +++ b/modules/apps/29-fee/types/ack.pb.go @@ -25,8 +25,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware type IncentivizedAcknowledgement struct { - // the underlying app acknowledgement result bytes - Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + // the underlying app acknowledgement bytes + AppAcknowledgement []byte `protobuf:"bytes,1,opt,name=app_acknowledgement,json=appAcknowledgement,proto3" json:"app_acknowledgement,omitempty" yaml:"app_acknowledgement"` // the relayer address which submits the recv packet message ForwardRelayerAddress string `protobuf:"bytes,2,opt,name=forward_relayer_address,json=forwardRelayerAddress,proto3" json:"forward_relayer_address,omitempty" yaml:"forward_relayer_address"` // success flag of the base application callback @@ -66,9 +66,9 @@ func (m *IncentivizedAcknowledgement) XXX_DiscardUnknown() { var xxx_messageInfo_IncentivizedAcknowledgement proto.InternalMessageInfo -func (m *IncentivizedAcknowledgement) GetResult() []byte { +func (m *IncentivizedAcknowledgement) GetAppAcknowledgement() []byte { if m != nil { - return m.Result + return m.AppAcknowledgement } return nil } @@ -94,27 +94,28 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/ack.proto", fileDescriptor_ab2834946fb65ea4) } var fileDescriptor_ab2834946fb65ea4 = []byte{ - // 315 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xb1, 0x4e, 0xf3, 0x30, - 0x14, 0x85, 0xeb, 0xff, 0x97, 0x2a, 0x88, 0x98, 0xa2, 0xd2, 0x56, 0x20, 0x85, 0x92, 0xa9, 0x4b, - 0x63, 0x95, 0x8a, 0x01, 0xb6, 0x76, 0x63, 0x42, 0x0a, 0x0b, 0xea, 0x12, 0x39, 0xf6, 0x6d, 0xb0, - 0xea, 0xd8, 0x96, 0xed, 0xa4, 0x0a, 0x4f, 0xc1, 0x63, 0x31, 0x76, 0x64, 0x42, 0xa8, 0x1d, 0xd9, - 0x78, 0x02, 0x94, 0xa6, 0x12, 0x1d, 0x60, 0xbb, 0xf7, 0x9c, 0x4f, 0x67, 0xf8, 0xbc, 0x4b, 0x9e, - 0x52, 0x4c, 0xb4, 0x16, 0x9c, 0x12, 0xc7, 0x95, 0xb4, 0x78, 0x01, 0x80, 0xcb, 0x31, 0x26, 0x74, - 0x19, 0x69, 0xa3, 0x9c, 0xf2, 0x7b, 0x3c, 0xa5, 0xd1, 0x21, 0x12, 0x2d, 0x00, 0xa2, 0x72, 0x7c, - 0xd6, 0xc9, 0x54, 0xa6, 0x76, 0x0c, 0xae, 0xaf, 0x06, 0x0f, 0x3f, 0x91, 0x77, 0x7e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0x5f, 0x80, 0x99, 0x01, 0x00, 0x00, + // 329 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0xc2, 0x40, + 0x1c, 0xc6, 0x29, 0x26, 0x46, 0x1b, 0xa7, 0x8a, 0x42, 0x30, 0x39, 0xb0, 0x13, 0x0b, 0xbd, 0xa0, + 0x61, 0xd0, 0x0d, 0x36, 0x27, 0x92, 0xba, 0x18, 0x96, 0xe6, 0x7a, 0xfd, 0x53, 0x2f, 0x5c, 0xef, + 0x2e, 0x77, 0x6d, 0x49, 0x7d, 0x0a, 0x1f, 0xc2, 0x87, 0x71, 0x64, 0x74, 0x22, 0x06, 0xde, 0x80, + 0x27, 0x30, 0xa5, 0x26, 0xa2, 0xc1, 0xed, 0xf2, 0x7d, 0xbf, 0xfc, 0x72, 0xf9, 0x7f, 0xf6, 0x35, + 0x0b, 0x29, 0x26, 0x4a, 0x71, 0x46, 0x49, 0xca, 0xa4, 0x30, 0x78, 0x06, 0x80, 0xf3, 0x01, 0x26, + 0x74, 0xee, 0x29, 0x2d, 0x53, 0xe9, 0x34, 0x59, 0x48, 0xbd, 0x7d, 0xc4, 0x9b, 0x01, 0x78, 0xf9, + 0xa0, 0xdd, 0x88, 0x65, 0x2c, 0x77, 0x0c, 0x2e, 0x5f, 0x15, 0xee, 0xbe, 0xd5, 0xed, 0xab, 0x07, + 0x41, 0x41, 0xa4, 0x2c, 0x67, 0x2f, 0x10, 0x8d, 0xe8, 0x5c, 0xc8, 0x05, 0x87, 0x28, 0x86, 0x04, + 0x44, 0xea, 0x4c, 0xec, 0x73, 0xa2, 0x54, 0x40, 0x7e, 0xc7, 0x2d, 0xab, 0x6b, 0xf5, 0xce, 0xc6, + 0x68, 0xbb, 0xea, 0xb4, 0x0b, 0x92, 0xf0, 0x7b, 0xf7, 0x00, 0xe4, 0xfa, 0x0e, 0x51, 0xea, 0xaf, + 0x70, 0x6a, 0x37, 0x67, 0x52, 0x2f, 0x88, 0x8e, 0x02, 0x0d, 0x9c, 0x14, 0xa0, 0x03, 0x12, 0x45, + 0x1a, 0x8c, 0x69, 0xd5, 0xbb, 0x56, 0xef, 0x74, 0xec, 0x6e, 0x57, 0x1d, 0x54, 0x49, 0xff, 0x01, + 0x5d, 0xff, 0xe2, 0xbb, 0xf1, 0xab, 0x62, 0x54, 0xe5, 0xce, 0x93, 0x7d, 0x99, 0x89, 0x08, 0x34, + 0x2f, 0x98, 0x88, 0x83, 0xf2, 0x4b, 0x26, 0xa3, 0xb4, 0x54, 0x1f, 0x75, 0xad, 0xde, 0xc9, 0xbe, + 0xfa, 0x30, 0xc7, 0x5d, 0xbf, 0xf1, 0xd3, 0x8c, 0x94, 0x7a, 0xac, 0xf2, 0xf1, 0xe4, 0x7d, 0x8d, + 0xac, 0xe5, 0x1a, 0x59, 0x9f, 0x6b, 0x64, 0xbd, 0x6e, 0x50, 0x6d, 0xb9, 0x41, 0xb5, 0x8f, 0x0d, + 0xaa, 0x4d, 0x87, 0x31, 0x4b, 0x9f, 0xb3, 0xd0, 0xa3, 0x32, 0xc1, 0x54, 0x9a, 0x44, 0x1a, 0xcc, + 0x42, 0xda, 0x8f, 0x25, 0xce, 0x87, 0x38, 0x91, 0x51, 0xc6, 0xc1, 0x94, 0x93, 0x19, 0x7c, 0x73, + 0xd7, 0x2f, 0xd7, 0x4a, 0x0b, 0x05, 0x26, 0x3c, 0xde, 0x9d, 0xff, 0xf6, 0x2b, 0x00, 0x00, 0xff, + 0xff, 0x7b, 0x92, 0x0d, 0x35, 0xd2, 0x01, 0x00, 0x00, } func (m *IncentivizedAcknowledgement) Marshal() (dAtA []byte, err error) { @@ -154,10 +155,10 @@ func (m *IncentivizedAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, er i-- dAtA[i] = 0x12 } - if len(m.Result) > 0 { - i -= len(m.Result) - copy(dAtA[i:], m.Result) - i = encodeVarintAck(dAtA, i, uint64(len(m.Result))) + if len(m.AppAcknowledgement) > 0 { + i -= len(m.AppAcknowledgement) + copy(dAtA[i:], m.AppAcknowledgement) + i = encodeVarintAck(dAtA, i, uint64(len(m.AppAcknowledgement))) i-- dAtA[i] = 0xa } @@ -181,7 +182,7 @@ func (m *IncentivizedAcknowledgement) Size() (n int) { } var l int _ = l - l = len(m.Result) + l = len(m.AppAcknowledgement) if l > 0 { n += 1 + l + sovAck(uint64(l)) } @@ -232,7 +233,7 @@ func (m *IncentivizedAcknowledgement) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AppAcknowledgement", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -259,9 +260,9 @@ func (m *IncentivizedAcknowledgement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Result = append(m.Result[:0], dAtA[iNdEx:postIndex]...) - if m.Result == nil { - m.Result = []byte{} + m.AppAcknowledgement = append(m.AppAcknowledgement[:0], dAtA[iNdEx:postIndex]...) + if m.AppAcknowledgement == nil { + m.AppAcknowledgement = []byte{} } iNdEx = postIndex case 2: diff --git a/modules/apps/29-fee/types/codec.go b/modules/apps/29-fee/types/codec.go index 871f148b043..272056d6f9f 100644 --- a/modules/apps/29-fee/types/codec.go +++ b/modules/apps/29-fee/types/codec.go @@ -10,9 +10,10 @@ import ( // RegisterLegacyAminoCodec registers the necessary x/ibc 29-fee interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgRegisterCounterpartyAddress{}, "cosmos-sdk/MsgRegisterCounterpartyAddress", nil) cdc.RegisterConcrete(&MsgPayPacketFee{}, "cosmos-sdk/MsgPayPacketFee", nil) cdc.RegisterConcrete(&MsgPayPacketFeeAsync{}, "cosmos-sdk/MsgPayPacketFeeAsync", nil) + cdc.RegisterConcrete(&MsgRegisterPayee{}, "cosmos-sdk/MsgRegisterPayee", nil) + cdc.RegisterConcrete(&MsgRegisterCounterpartyPayee{}, "cosmos-sdk/MsgRegisterCounterpartyPayee", nil) } // RegisterInterfaces register the 29-fee module interfaces to protobuf @@ -20,9 +21,10 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &MsgRegisterCounterpartyAddress{}, &MsgPayPacketFee{}, &MsgPayPacketFeeAsync{}, + &MsgRegisterPayee{}, + &MsgRegisterCounterpartyPayee{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/modules/apps/29-fee/types/errors.go b/modules/apps/29-fee/types/errors.go index 812db0a43a4..700864b9a33 100644 --- a/modules/apps/29-fee/types/errors.go +++ b/modules/apps/29-fee/types/errors.go @@ -10,8 +10,8 @@ var ( ErrRefundAccNotFound = sdkerrors.Register(ModuleName, 3, "no account found for given refund address") ErrBalanceNotFound = sdkerrors.Register(ModuleName, 4, "balance not found for given account address") ErrFeeNotFound = sdkerrors.Register(ModuleName, 5, "there is no fee escrowed for the given packetID") - ErrRelayersNotNil = sdkerrors.Register(ModuleName, 6, "relayers must be nil. This feature is not supported") - ErrCounterpartyAddressEmpty = sdkerrors.Register(ModuleName, 7, "counterparty address must not be empty") + ErrRelayersNotEmpty = sdkerrors.Register(ModuleName, 6, "relayers must not be set. This feature is not supported") + ErrCounterpartyPayeeEmpty = sdkerrors.Register(ModuleName, 7, "counterparty payee must not be empty") ErrForwardRelayerAddressNotFound = sdkerrors.Register(ModuleName, 8, "forward relayer address not found") ErrFeeNotEnabled = sdkerrors.Register(ModuleName, 9, "fee module is not enabled for this channel. If this error occurs after channel setup, fee module may not be enabled") ErrRelayerNotFoundForAsyncAck = sdkerrors.Register(ModuleName, 10, "relayer address must be stored for async WriteAcknowledgement") diff --git a/modules/apps/29-fee/types/events.go b/modules/apps/29-fee/types/events.go index cac882d98d3..cffca5dabdd 100644 --- a/modules/apps/29-fee/types/events.go +++ b/modules/apps/29-fee/types/events.go @@ -2,9 +2,15 @@ package types // 29-fee events const ( - EventTypeIncentivizedPacket = "incentivized_ibc_packet" + EventTypeIncentivizedPacket = "incentivized_ibc_packet" + EventTypeRegisterPayee = "register_payee" + EventTypeRegisterCounterpartyPayee = "register_counterparty_payee" - AttributeKeyRecvFee = "recv_fee" - AttributeKeyAckFee = "ack_fee" - AttributeKeyTimeoutFee = "timeout_fee" + AttributeKeyRecvFee = "recv_fee" + AttributeKeyAckFee = "ack_fee" + AttributeKeyTimeoutFee = "timeout_fee" + AttributeKeyChannelID = "channel_id" + AttributeKeyRelayer = "relayer" + AttributeKeyPayee = "payee" + AttributeKeyCounterpartyPayee = "counterparty_payee" ) diff --git a/modules/apps/29-fee/types/expected_keepers.go b/modules/apps/29-fee/types/expected_keepers.go index 1d9d3439b07..9373d24e920 100644 --- a/modules/apps/29-fee/types/expected_keepers.go +++ b/modules/apps/29-fee/types/expected_keepers.go @@ -4,8 +4,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // AccountKeeper defines the contract required for account APIs. @@ -24,6 +25,7 @@ type ICS4Wrapper interface { // ChannelKeeper defines the expected IBC channel keeper type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) + GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) } diff --git a/modules/apps/29-fee/types/fee.go b/modules/apps/29-fee/types/fee.go index 1f979c732d8..926b134e437 100644 --- a/modules/apps/29-fee/types/fee.go +++ b/modules/apps/29-fee/types/fee.go @@ -6,10 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) -// NewPacketFee creates and returns a new PacketFee struct including the incentivization fees, refund addres and relayers +// NewPacketFee creates and returns a new PacketFee struct including the incentivization fees, refund address and relayers func NewPacketFee(fee Fee, refundAddr string, relayers []string) PacketFee { return PacketFee{ Fee: fee, @@ -25,9 +25,9 @@ func (p PacketFee) Validate() error { return sdkerrors.Wrap(err, "failed to convert RefundAddress into sdk.AccAddress") } - // enforce relayer is nil - if p.Relayers != nil { - return ErrRelayersNotNil + // enforce relayers are not set + if len(p.Relayers) != 0 { + return ErrRelayersNotEmpty } if err := p.Fee.Validate(); err != nil { @@ -67,15 +67,15 @@ func (f Fee) Total() sdk.Coins { } // Validate asserts that each Fee is valid and all three Fees are not empty or zero -func (fee Fee) Validate() error { +func (f Fee) Validate() error { var errFees []string - if !fee.AckFee.IsValid() { + if !f.AckFee.IsValid() { errFees = append(errFees, "ack fee invalid") } - if !fee.RecvFee.IsValid() { + if !f.RecvFee.IsValid() { errFees = append(errFees, "recv fee invalid") } - if !fee.TimeoutFee.IsValid() { + if !f.TimeoutFee.IsValid() { errFees = append(errFees, "timeout fee invalid") } @@ -84,7 +84,7 @@ func (fee Fee) Validate() error { } // if all three fee's are zero or empty return an error - if fee.AckFee.IsZero() && fee.RecvFee.IsZero() && fee.TimeoutFee.IsZero() { + if f.AckFee.IsZero() && f.RecvFee.IsZero() && f.TimeoutFee.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "all fees are zero") } diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 1867eb351e5..eb6e907c9d3 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -268,7 +268,7 @@ var fileDescriptor_cb3319f1af2a53e5 = []byte{ // 525 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x31, 0x6f, 0x13, 0x31, 0x14, 0xc7, 0x73, 0x09, 0x6a, 0x1b, 0x47, 0x14, 0x74, 0x2a, 0x22, 0x8d, 0xe0, 0x52, 0x3c, 0x65, - 0x89, 0xad, 0xa4, 0x30, 0xc0, 0x04, 0x57, 0x29, 0x52, 0x27, 0xd0, 0x89, 0x89, 0x25, 0xf2, 0xd9, + 0x89, 0xad, 0x04, 0x3a, 0xc0, 0x04, 0x57, 0x29, 0x52, 0x27, 0xd0, 0x89, 0x89, 0x25, 0xf2, 0xd9, 0x2f, 0xa9, 0x95, 0xdc, 0xf9, 0x74, 0xbe, 0x44, 0xca, 0xca, 0x27, 0xe0, 0x1b, 0xb0, 0xf3, 0x49, 0xba, 0x20, 0x75, 0x64, 0x0a, 0x28, 0xf9, 0x06, 0xdd, 0x91, 0x90, 0x7d, 0x4e, 0x94, 0x82, 0xaa, 0xaa, 0x12, 0xd3, 0xf9, 0xd9, 0xef, 0xef, 0xdf, 0xb3, 0xdf, 0xff, 0x8c, 0x5e, 0xc8, 0x98, 0x53, @@ -285,7 +285,7 @@ var fileDescriptor_cb3319f1af2a53e5 = []byte{ 0x1d, 0xf9, 0xb0, 0x24, 0x3b, 0xdd, 0xfd, 0xc0, 0x7b, 0x8c, 0x4f, 0x0c, 0xf7, 0xb3, 0x87, 0x1a, 0x85, 0x4c, 0x40, 0xcd, 0x0a, 0x0b, 0xaf, 0xdd, 0x05, 0x1f, 0x38, 0xb8, 0x5f, 0xc2, 0x77, 0xb4, 0xf7, 0x2b, 0x00, 0x39, 0xe5, 0x00, 0x00, 0x7f, 0xf5, 0x50, 0xfd, 0x03, 0xe3, 0x13, 0x30, 0x91, - 0xff, 0x12, 0xd5, 0xca, 0x06, 0x78, 0x9d, 0x46, 0xff, 0x19, 0xb9, 0xc5, 0x0d, 0x64, 0x00, 0x10, + 0xff, 0x0a, 0xd5, 0xca, 0x06, 0x78, 0x9d, 0x46, 0xff, 0x19, 0xb9, 0xc5, 0x0d, 0x64, 0x00, 0x10, 0x3e, 0x30, 0xc5, 0x44, 0x26, 0xdd, 0x7f, 0x8b, 0x0e, 0x73, 0x18, 0xcd, 0x52, 0x31, 0x64, 0x42, 0xe4, 0xa0, 0x75, 0xb3, 0x7a, 0xe2, 0x75, 0xea, 0xe1, 0xf1, 0xf5, 0xb2, 0xfd, 0x64, 0xd3, 0xa2, 0xdd, 0x75, 0x1c, 0x3d, 0x2c, 0x27, 0xde, 0x95, 0xb1, 0xdf, 0x32, 0xdd, 0x9f, 0xb2, 0x05, 0xe4, @@ -295,10 +295,10 @@ var fileDescriptor_cb3319f1af2a53e5 = []byte{ 0x76, 0xc8, 0x1f, 0x51, 0xdd, 0x89, 0xa4, 0x70, 0x37, 0xf4, 0xdc, 0x72, 0x8d, 0xc1, 0xc9, 0xc6, 0xd5, 0x5b, 0xe6, 0xb9, 0x08, 0x9b, 0x0e, 0xf9, 0xf8, 0x06, 0x52, 0x0a, 0x1c, 0x1d, 0x64, 0x2e, 0xe7, 0xef, 0xf3, 0x54, 0xff, 0xf7, 0x79, 0xc2, 0xf7, 0x97, 0xab, 0xc0, 0xbb, 0x5a, 0x05, 0xde, - 0xaf, 0x55, 0xe0, 0x7d, 0x59, 0x07, 0x95, 0xab, 0x75, 0x50, 0xf9, 0xb1, 0x0e, 0x2a, 0x9f, 0x5e, - 0xfd, 0x6b, 0x18, 0x19, 0xf3, 0xee, 0x58, 0xd1, 0xf9, 0x29, 0x4d, 0x94, 0x98, 0x4d, 0x41, 0x9b, - 0xf7, 0x42, 0xd3, 0xfe, 0xeb, 0xae, 0x79, 0x2a, 0xac, 0x87, 0xe2, 0x3d, 0xfb, 0xe3, 0x9e, 0xfe, - 0x09, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x6c, 0xa2, 0x41, 0x4f, 0x04, 0x00, 0x00, + 0xaf, 0x55, 0xe0, 0x7d, 0x59, 0x07, 0x95, 0xab, 0x75, 0x50, 0xf9, 0xb1, 0x0e, 0x2a, 0x9f, 0x4e, + 0xff, 0x35, 0x8c, 0x8c, 0x79, 0x77, 0xac, 0xe8, 0xfc, 0x94, 0x26, 0x4a, 0xcc, 0xa6, 0xa0, 0xcd, + 0x7b, 0xa1, 0x69, 0xff, 0x75, 0xd7, 0x3c, 0x15, 0xd6, 0x43, 0xf1, 0x9e, 0xfd, 0x71, 0x5f, 0xfe, + 0x09, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x16, 0x75, 0x8d, 0x4f, 0x04, 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/fee_test.go b/modules/apps/29-fee/types/fee_test.go index 2b02e5b857b..b8772a942fa 100644 --- a/modules/apps/29-fee/types/fee_test.go +++ b/modules/apps/29-fee/types/fee_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" ) var ( @@ -35,9 +35,7 @@ func TestFeeTotal(t *testing.T) { } func TestPacketFeeValidation(t *testing.T) { - var ( - packetFee types.PacketFee - ) + var packetFee types.PacketFee testCases := []struct { name string @@ -49,6 +47,13 @@ func TestPacketFeeValidation(t *testing.T) { func() {}, true, }, + { + "success with empty slice for Relayers", + func() { + packetFee.Relayers = []string{} + }, + true, + }, { "should fail when refund address is invalid", func() { @@ -104,6 +109,13 @@ func TestPacketFeeValidation(t *testing.T) { }, false, }, + { + "should fail with non empty Relayers", + func() { + packetFee.Relayers = []string{"relayer"} + }, + false, + }, } for _, tc := range testCases { @@ -115,9 +127,9 @@ func TestPacketFeeValidation(t *testing.T) { err := packetFee.Validate() if tc.expPass { - require.NoError(t, err) + require.NoError(t, err, tc.name) } else { - require.Error(t, err) + require.Error(t, err, tc.name) } } } diff --git a/modules/apps/29-fee/types/genesis.go b/modules/apps/29-fee/types/genesis.go index be9299fcd94..1ccfbc6eb96 100644 --- a/modules/apps/29-fee/types/genesis.go +++ b/modules/apps/29-fee/types/genesis.go @@ -6,26 +6,34 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewGenesisState creates a 29-fee GenesisState instance. -func NewGenesisState(identifiedFees []IdentifiedPacketFees, feeEnabledChannels []FeeEnabledChannel, registeredRelayers []RegisteredRelayerAddress, forwardRelayers []ForwardRelayerAddress) *GenesisState { +func NewGenesisState( + identifiedFees []IdentifiedPacketFees, + feeEnabledChannels []FeeEnabledChannel, + registeredPayees []RegisteredPayee, + registeredCounterpartyPayees []RegisteredCounterpartyPayee, + forwardRelayers []ForwardRelayerAddress, +) *GenesisState { return &GenesisState{ - IdentifiedFees: identifiedFees, - FeeEnabledChannels: feeEnabledChannels, - RegisteredRelayers: registeredRelayers, - ForwardRelayers: forwardRelayers, + IdentifiedFees: identifiedFees, + FeeEnabledChannels: feeEnabledChannels, + RegisteredPayees: registeredPayees, + RegisteredCounterpartyPayees: registeredCounterpartyPayees, + ForwardRelayers: forwardRelayers, } } -// DefaultGenesisState returns a GenesisState with "transfer" as the default PortID. +// DefaultGenesisState returns a default instance of the 29-fee GenesisState. func DefaultGenesisState() *GenesisState { return &GenesisState{ - IdentifiedFees: []IdentifiedPacketFees{}, - ForwardRelayers: []ForwardRelayerAddress{}, - FeeEnabledChannels: []FeeEnabledChannel{}, - RegisteredRelayers: []RegisteredRelayerAddress{}, + IdentifiedFees: []IdentifiedPacketFees{}, + ForwardRelayers: []ForwardRelayerAddress{}, + FeeEnabledChannels: []FeeEnabledChannel{}, + RegisteredPayees: []RegisteredPayee{}, + RegisteredCounterpartyPayees: []RegisteredCounterpartyPayee{}, } } @@ -55,14 +63,37 @@ func (gs GenesisState) Validate() error { } } - // Validate RegisteredRelayers - for _, rel := range gs.RegisteredRelayers { - if _, err := sdk.AccAddressFromBech32(rel.Address); err != nil { - return sdkerrors.Wrap(err, "failed to convert source relayer address into sdk.AccAddress") + // Validate RegisteredPayees + for _, registeredPayee := range gs.RegisteredPayees { + if registeredPayee.Relayer == registeredPayee.Payee { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "relayer address and payee address must not be equal") + } + + if _, err := sdk.AccAddressFromBech32(registeredPayee.Relayer); err != nil { + return sdkerrors.Wrap(err, "failed to convert relayer address into sdk.AccAddress") + } + + if _, err := sdk.AccAddressFromBech32(registeredPayee.Payee); err != nil { + return sdkerrors.Wrap(err, "failed to convert payee address into sdk.AccAddress") + } + + if err := host.ChannelIdentifierValidator(registeredPayee.ChannelId); err != nil { + return sdkerrors.Wrapf(err, "invalid channel identifier: %s", registeredPayee.ChannelId) + } + } + + // Validate RegisteredCounterpartyPayees + for _, registeredCounterpartyPayee := range gs.RegisteredCounterpartyPayees { + if _, err := sdk.AccAddressFromBech32(registeredCounterpartyPayee.Relayer); err != nil { + return sdkerrors.Wrap(err, "failed to convert relayer address into sdk.AccAddress") + } + + if strings.TrimSpace(registeredCounterpartyPayee.CounterpartyPayee) == "" { + return ErrCounterpartyPayeeEmpty } - if strings.TrimSpace(rel.CounterpartyAddress) == "" { - return ErrCounterpartyAddressEmpty + if err := host.ChannelIdentifierValidator(registeredCounterpartyPayee.ChannelId); err != nil { + return sdkerrors.Wrapf(err, "invalid channel identifier: %s", registeredCounterpartyPayee.ChannelId) } } diff --git a/modules/apps/29-fee/types/genesis.pb.go b/modules/apps/29-fee/types/genesis.pb.go index af78add463e..b722a3b006d 100644 --- a/modules/apps/29-fee/types/genesis.pb.go +++ b/modules/apps/29-fee/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -30,10 +30,12 @@ type GenesisState struct { IdentifiedFees []IdentifiedPacketFees `protobuf:"bytes,1,rep,name=identified_fees,json=identifiedFees,proto3" json:"identified_fees" yaml:"identified_fees"` // list of fee enabled channels FeeEnabledChannels []FeeEnabledChannel `protobuf:"bytes,2,rep,name=fee_enabled_channels,json=feeEnabledChannels,proto3" json:"fee_enabled_channels" yaml:"fee_enabled_channels"` - // list of registered relayer addresses - RegisteredRelayers []RegisteredRelayerAddress `protobuf:"bytes,3,rep,name=registered_relayers,json=registeredRelayers,proto3" json:"registered_relayers" yaml:"registered_relayers"` + // list of registered payees + RegisteredPayees []RegisteredPayee `protobuf:"bytes,3,rep,name=registered_payees,json=registeredPayees,proto3" json:"registered_payees" yaml:"registered_payees"` + // list of registered counterparty payees + RegisteredCounterpartyPayees []RegisteredCounterpartyPayee `protobuf:"bytes,4,rep,name=registered_counterparty_payees,json=registeredCounterpartyPayees,proto3" json:"registered_counterparty_payees" yaml:"registered_counterparty_payees"` // list of forward relayer addresses - ForwardRelayers []ForwardRelayerAddress `protobuf:"bytes,4,rep,name=forward_relayers,json=forwardRelayers,proto3" json:"forward_relayers" yaml:"forward_relayers"` + ForwardRelayers []ForwardRelayerAddress `protobuf:"bytes,5,rep,name=forward_relayers,json=forwardRelayers,proto3" json:"forward_relayers" yaml:"forward_relayers"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -83,9 +85,16 @@ func (m *GenesisState) GetFeeEnabledChannels() []FeeEnabledChannel { return nil } -func (m *GenesisState) GetRegisteredRelayers() []RegisteredRelayerAddress { +func (m *GenesisState) GetRegisteredPayees() []RegisteredPayee { if m != nil { - return m.RegisteredRelayers + return m.RegisteredPayees + } + return nil +} + +func (m *GenesisState) GetRegisteredCounterpartyPayees() []RegisteredCounterpartyPayee { + if m != nil { + return m.RegisteredCounterpartyPayees } return nil } @@ -152,28 +161,28 @@ func (m *FeeEnabledChannel) GetChannelId() string { return "" } -// RegisteredRelayerAddress contains the address and counterparty address for a specific relayer (for distributing fees) -type RegisteredRelayerAddress struct { - // the relayer address - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // the counterparty relayer address - CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"counterparty_address"` +// RegisteredPayee contains the relayer address and payee address for a specific channel +type RegisteredPayee struct { // unique channel identifier - ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address + Relayer string `protobuf:"bytes,2,opt,name=relayer,proto3" json:"relayer,omitempty"` + // the payee address + Payee string `protobuf:"bytes,3,opt,name=payee,proto3" json:"payee,omitempty"` } -func (m *RegisteredRelayerAddress) Reset() { *m = RegisteredRelayerAddress{} } -func (m *RegisteredRelayerAddress) String() string { return proto.CompactTextString(m) } -func (*RegisteredRelayerAddress) ProtoMessage() {} -func (*RegisteredRelayerAddress) Descriptor() ([]byte, []int) { +func (m *RegisteredPayee) Reset() { *m = RegisteredPayee{} } +func (m *RegisteredPayee) String() string { return proto.CompactTextString(m) } +func (*RegisteredPayee) ProtoMessage() {} +func (*RegisteredPayee) Descriptor() ([]byte, []int) { return fileDescriptor_7191992e856dff95, []int{2} } -func (m *RegisteredRelayerAddress) XXX_Unmarshal(b []byte) error { +func (m *RegisteredPayee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RegisteredRelayerAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RegisteredPayee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RegisteredRelayerAddress.Marshal(b, m, deterministic) + return xxx_messageInfo_RegisteredPayee.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -183,39 +192,104 @@ func (m *RegisteredRelayerAddress) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *RegisteredRelayerAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisteredRelayerAddress.Merge(m, src) +func (m *RegisteredPayee) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisteredPayee.Merge(m, src) } -func (m *RegisteredRelayerAddress) XXX_Size() int { +func (m *RegisteredPayee) XXX_Size() int { return m.Size() } -func (m *RegisteredRelayerAddress) XXX_DiscardUnknown() { - xxx_messageInfo_RegisteredRelayerAddress.DiscardUnknown(m) +func (m *RegisteredPayee) XXX_DiscardUnknown() { + xxx_messageInfo_RegisteredPayee.DiscardUnknown(m) } -var xxx_messageInfo_RegisteredRelayerAddress proto.InternalMessageInfo +var xxx_messageInfo_RegisteredPayee proto.InternalMessageInfo -func (m *RegisteredRelayerAddress) GetAddress() string { +func (m *RegisteredPayee) GetChannelId() string { if m != nil { - return m.Address + return m.ChannelId } return "" } -func (m *RegisteredRelayerAddress) GetCounterpartyAddress() string { +func (m *RegisteredPayee) GetRelayer() string { if m != nil { - return m.CounterpartyAddress + return m.Relayer } return "" } -func (m *RegisteredRelayerAddress) GetChannelId() string { +func (m *RegisteredPayee) GetPayee() string { + if m != nil { + return m.Payee + } + return "" +} + +// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +// for recv fee distribution) +type RegisteredCounterpartyPayee struct { + // unique channel identifier + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address + Relayer string `protobuf:"bytes,2,opt,name=relayer,proto3" json:"relayer,omitempty"` + // the counterparty payee address + CounterpartyPayee string `protobuf:"bytes,3,opt,name=counterparty_payee,json=counterpartyPayee,proto3" json:"counterparty_payee,omitempty" yaml:"counterparty_payee"` +} + +func (m *RegisteredCounterpartyPayee) Reset() { *m = RegisteredCounterpartyPayee{} } +func (m *RegisteredCounterpartyPayee) String() string { return proto.CompactTextString(m) } +func (*RegisteredCounterpartyPayee) ProtoMessage() {} +func (*RegisteredCounterpartyPayee) Descriptor() ([]byte, []int) { + return fileDescriptor_7191992e856dff95, []int{3} +} +func (m *RegisteredCounterpartyPayee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegisteredCounterpartyPayee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegisteredCounterpartyPayee.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 *RegisteredCounterpartyPayee) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisteredCounterpartyPayee.Merge(m, src) +} +func (m *RegisteredCounterpartyPayee) XXX_Size() int { + return m.Size() +} +func (m *RegisteredCounterpartyPayee) XXX_DiscardUnknown() { + xxx_messageInfo_RegisteredCounterpartyPayee.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisteredCounterpartyPayee proto.InternalMessageInfo + +func (m *RegisteredCounterpartyPayee) GetChannelId() string { if m != nil { return m.ChannelId } return "" } +func (m *RegisteredCounterpartyPayee) GetRelayer() string { + if m != nil { + return m.Relayer + } + return "" +} + +func (m *RegisteredCounterpartyPayee) GetCounterpartyPayee() string { + if m != nil { + return m.CounterpartyPayee + } + return "" +} + // ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements type ForwardRelayerAddress struct { // the forward relayer address @@ -228,7 +302,7 @@ func (m *ForwardRelayerAddress) Reset() { *m = ForwardRelayerAddress{} } func (m *ForwardRelayerAddress) String() string { return proto.CompactTextString(m) } func (*ForwardRelayerAddress) ProtoMessage() {} func (*ForwardRelayerAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_7191992e856dff95, []int{3} + return fileDescriptor_7191992e856dff95, []int{4} } func (m *ForwardRelayerAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +348,8 @@ func (m *ForwardRelayerAddress) GetPacketId() types.PacketId { func init() { proto.RegisterType((*GenesisState)(nil), "ibc.applications.fee.v1.GenesisState") proto.RegisterType((*FeeEnabledChannel)(nil), "ibc.applications.fee.v1.FeeEnabledChannel") - proto.RegisterType((*RegisteredRelayerAddress)(nil), "ibc.applications.fee.v1.RegisteredRelayerAddress") + proto.RegisterType((*RegisteredPayee)(nil), "ibc.applications.fee.v1.RegisteredPayee") + proto.RegisterType((*RegisteredCounterpartyPayee)(nil), "ibc.applications.fee.v1.RegisteredCounterpartyPayee") proto.RegisterType((*ForwardRelayerAddress)(nil), "ibc.applications.fee.v1.ForwardRelayerAddress") } @@ -283,44 +358,48 @@ func init() { } var fileDescriptor_7191992e856dff95 = []byte{ - // 579 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xd4, 0x30, - 0x14, 0xdc, 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x1d, 0x03, 0xc8, 0x9e, 0x75, 0x36, 0xb2, 0x3b, 0x57, - 0x23, 0xfb, 0xce, 0xd0, 0x1f, 0xa4, 0xcf, 0xc9, 0x54, 0x4f, 0x42, 0x57, 0xc7, 0x2b, 0x25, 0x1e, - 0x7f, 0x31, 0xd0, 0x56, 0x0c, 0xe0, 0x41, 0xe6, 0x07, 0x29, 0x44, 0x5e, 0x6d, 0x53, 0x9a, 0x73, - 0x95, 0xfa, 0xa3, 0x56, 0xf5, 0x63, 0x80, 0x57, 0x9a, 0xf3, 0x52, 0x53, 0x7a, 0x0f, 0x6a, 0xe9, - 0xbb, 0x5a, 0x7a, 0x56, 0x57, 0x42, 0x71, 0x3c, 0xcd, 0x93, 0xf8, 0xab, 0x81, 0x36, 0x05, 0x24, - 0x4c, 0x2a, 0x10, 0x10, 0x79, 0x02, 0x52, 0x7f, 0x08, 0x42, 0x9a, 0xf3, 0x95, 0x85, 0x6e, 0xab, - 0x05, 0x7a, 0xcd, 0xa1, 0x9a, 0xf2, 0x22, 0x8a, 0x04, 0x48, 0xd9, 0x23, 0xb5, 0x93, 0x5d, 0xed, - 0x64, 0x46, 0x6f, 0x42, 0xb1, 0x98, 0x66, 0x4b, 0xfc, 0x19, 0xad, 0xc7, 0x5c, 0x7c, 0xf2, 0xc5, - 0x84, 0x89, 0x85, 0xca, 0x84, 0xd3, 0x9e, 0x83, 0x26, 0x4c, 0x39, 0xb0, 0x6b, 0x07, 0x3b, 0x75, - 0x16, 0x53, 0x5d, 0x09, 0x5d, 0x8b, 0x6f, 0xf0, 0x24, 0x29, 0xd0, 0xc6, 0x5f, 0x91, 0xe2, 0xc7, - 0x68, 0x29, 0xe7, 0x42, 0x79, 0x2c, 0x32, 0x8d, 0x3d, 0x63, 0x7f, 0xb9, 0x87, 0xaf, 0x46, 0xf6, - 0xaa, 0xee, 0x59, 0x6f, 0x10, 0xba, 0x58, 0x56, 0xfd, 0x08, 0x3f, 0x41, 0xa8, 0xce, 0xb9, 0x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xc5, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x33, 0x0f, 0x78, 0xca, - 0x04, 0x00, 0x00, + // 647 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x4e, 0xd4, 0x40, + 0x1c, 0xdf, 0x82, 0x80, 0x0c, 0x06, 0xd8, 0x09, 0x48, 0x05, 0xe9, 0xe2, 0x18, 0x12, 0xa2, 0xd9, + 0x36, 0x20, 0x1c, 0xf4, 0x66, 0x89, 0x98, 0x4d, 0x4c, 0x24, 0xa3, 0x27, 0x2f, 0x9b, 0x6e, 0xfb, + 0xef, 0xd2, 0xb8, 0xdb, 0x69, 0x66, 0x86, 0x25, 0xeb, 0xcd, 0x93, 0x57, 0x5f, 0xc3, 0xf8, 0x08, + 0xbe, 0x00, 0x47, 0x8e, 0x9e, 0x36, 0x06, 0xde, 0x60, 0x9f, 0xc0, 0x4c, 0x67, 0x0a, 0xcb, 0x7e, + 0x18, 0x0e, 0xde, 0x66, 0x3a, 0xbf, 0xaf, 0xe9, 0x6f, 0xf2, 0x47, 0xdb, 0x49, 0x23, 0xf4, 0x82, + 0x2c, 0x6b, 0x25, 0x61, 0x20, 0x13, 0x96, 0x0a, 0x2f, 0x06, 0xf0, 0x3a, 0xbb, 0x5e, 0x13, 0x52, + 0x10, 0x89, 0x70, 0x33, 0xce, 0x24, 0xc3, 0x6b, 0x49, 0x23, 0x74, 0x07, 0x61, 0x6e, 0x0c, 0xe0, + 0x76, 0x76, 0xd7, 0x57, 0x9a, 0xac, 0xc9, 0x72, 0x8c, 0xa7, 0x56, 0x1a, 0xbe, 0xfe, 0x64, 0x92, + 0xaa, 0x62, 0x0d, 0x40, 0x42, 0xc6, 0xc1, 0x0b, 0x4f, 0x82, 0x34, 0x85, 0x96, 0x3a, 0x36, 0x4b, + 0x0d, 0x21, 0x3f, 0x67, 0xd0, 0x83, 0xb7, 0x3a, 0xc6, 0x07, 0x19, 0x48, 0xc0, 0x1d, 0xb4, 0x94, + 0x44, 0x90, 0xca, 0x24, 0x4e, 0x20, 0xaa, 0xc7, 0x00, 0xc2, 0xb6, 0xb6, 0xa6, 0x77, 0x16, 0xf6, + 0xaa, 0xee, 0x84, 0x7c, 0x6e, 0xed, 0x1a, 0x7f, 0x1c, 0x84, 0x9f, 0x41, 0x1e, 0x01, 0x08, 0xdf, + 0x39, 0xef, 0x55, 0x4a, 0xfd, 0x5e, 0xe5, 0x61, 0x37, 0x68, 0xb7, 0x5e, 0x91, 0x21, 0x4d, 0x42, + 0x17, 0x6f, 0xbe, 0x28, 0x3c, 0xfe, 0x6a, 0xa1, 0x95, 0x18, 0xa0, 0x0e, 0x69, 0xd0, 0x68, 0x41, + 0x54, 0x37, 0x31, 0x85, 0x3d, 0x95, 0xbb, 0x3f, 0x9b, 0xe8, 0x7e, 0x04, 0xf0, 0x46, 0x73, 0x0e, + 0x35, 0xc5, 0x7f, 0x6a, 0xac, 0x37, 0xb4, 0xf5, 0x38, 0x55, 0x42, 0x71, 0x3c, 0xcc, 0x13, 0xf8, + 0x0c, 0x95, 0x39, 0x34, 0x13, 0x21, 0x81, 0x43, 0x54, 0xcf, 0x82, 0xae, 0xba, 0xfd, 0x74, 0xee, + 0xbf, 0x33, 0xd1, 0x9f, 0x5e, 0x33, 0x8e, 0x15, 0xc1, 0xdf, 0x32, 0xee, 0xb6, 0x76, 0x1f, 0x11, + 0x24, 0x74, 0x99, 0xdf, 0xa6, 0x08, 0xfc, 0xc3, 0x42, 0xce, 0x00, 0x30, 0x64, 0xa7, 0xa9, 0x04, + 0x9e, 0x05, 0x5c, 0x76, 0x8b, 0x18, 0xf7, 0xf2, 0x18, 0xfb, 0x77, 0x88, 0x71, 0x38, 0xc0, 0xd6, + 0x91, 0xaa, 0x26, 0xd2, 0xf6, 0x48, 0xa4, 0x31, 0x4e, 0x84, 0x3e, 0xe6, 0x93, 0xb5,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29, 0xfa, 0x59, 0xd8, 0xdb, 0xcc, 0xdf, 0x95, 0x9a, 0x63, 0x6e, 0x31, 0xbc, + 0x3a, 0xbb, 0xae, 0x9e, 0x35, 0xb5, 0xc8, 0xb7, 0xcd, 0x33, 0x5a, 0x36, 0x95, 0x17, 0x6c, 0x42, + 0xef, 0x67, 0x05, 0xe6, 0xfd, 0xf9, 0xa5, 0x63, 0x5d, 0x5c, 0x3a, 0xd6, 0x9f, 0x4b, 0xc7, 0xfa, + 0x7e, 0xe5, 0x94, 0x2e, 0xae, 0x9c, 0xd2, 0xef, 0x2b, 0xa7, 0xf4, 0xe9, 0xa0, 0x99, 0xc8, 0x93, + 0xd3, 0x86, 0x1b, 0xb2, 0xb6, 0x17, 0x32, 0xd1, 0x66, 0xc2, 0x4b, 0x1a, 0x61, 0xb5, 0xc9, 0xbc, + 0xce, 0x81, 0xd7, 0x66, 0xd1, 0x69, 0x0b, 0x84, 0x1a, 0xb3, 0xc2, 0xdb, 0x7b, 0x59, 0x55, 0x13, + 0x56, 0x76, 0x33, 0x10, 0x8d, 0xd9, 0x7c, 0x7c, 0xbe, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf4, + 0x0f, 0x0d, 0xd4, 0xdc, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -354,13 +433,27 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x2a + } + } + if len(m.RegisteredCounterpartyPayees) > 0 { + for iNdEx := len(m.RegisteredCounterpartyPayees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RegisteredCounterpartyPayees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x22 } } - if len(m.RegisteredRelayers) > 0 { - for iNdEx := len(m.RegisteredRelayers) - 1; iNdEx >= 0; iNdEx-- { + if len(m.RegisteredPayees) > 0 { + for iNdEx := len(m.RegisteredPayees) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.RegisteredRelayers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.RegisteredPayees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -439,7 +532,7 @@ func (m *FeeEnabledChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RegisteredRelayerAddress) Marshal() (dAtA []byte, err error) { +func (m *RegisteredPayee) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -449,34 +542,78 @@ func (m *RegisteredRelayerAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RegisteredRelayerAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *RegisteredPayee) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RegisteredRelayerAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RegisteredPayee) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Payee) > 0 { + i -= len(m.Payee) + copy(dAtA[i:], m.Payee) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Payee))) + i-- + dAtA[i] = 0x1a + } + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Relayer))) + i-- + dAtA[i] = 0x12 + } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChannelId))) i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RegisteredCounterpartyPayee) 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 *RegisteredCounterpartyPayee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisteredCounterpartyPayee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyPayee) > 0 { + i -= len(m.CounterpartyPayee) + copy(dAtA[i:], m.CounterpartyPayee) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.CounterpartyPayee))) + i-- dAtA[i] = 0x1a } - if len(m.CounterpartyAddress) > 0 { - i -= len(m.CounterpartyAddress) - copy(dAtA[i:], m.CounterpartyAddress) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CounterpartyAddress))) + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Relayer))) i-- dAtA[i] = 0x12 } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0xa } @@ -552,8 +689,14 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.RegisteredRelayers) > 0 { - for _, e := range m.RegisteredRelayers { + if len(m.RegisteredPayees) > 0 { + for _, e := range m.RegisteredPayees { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.RegisteredCounterpartyPayees) > 0 { + for _, e := range m.RegisteredCounterpartyPayees { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -584,24 +727,45 @@ func (m *FeeEnabledChannel) Size() (n int) { return n } -func (m *RegisteredRelayerAddress) Size() (n int) { +func (m *RegisteredPayee) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Relayer) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.CounterpartyAddress) + l = len(m.Payee) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } + return n +} + +func (m *RegisteredCounterpartyPayee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l l = len(m.ChannelId) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } + l = len(m.Relayer) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.CounterpartyPayee) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -725,7 +889,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RegisteredRelayers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RegisteredPayees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -752,12 +916,46 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RegisteredRelayers = append(m.RegisteredRelayers, RegisteredRelayerAddress{}) - if err := m.RegisteredRelayers[len(m.RegisteredRelayers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RegisteredPayees = append(m.RegisteredPayees, RegisteredPayee{}) + if err := m.RegisteredPayees[len(m.RegisteredPayees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisteredCounterpartyPayees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RegisteredCounterpartyPayees = append(m.RegisteredCounterpartyPayees, RegisteredCounterpartyPayee{}) + if err := m.RegisteredCounterpartyPayees[len(m.RegisteredCounterpartyPayees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ForwardRelayers", wireType) } @@ -926,7 +1124,7 @@ func (m *FeeEnabledChannel) Unmarshal(dAtA []byte) error { } return nil } -func (m *RegisteredRelayerAddress) Unmarshal(dAtA []byte) error { +func (m *RegisteredPayee) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -949,15 +1147,15 @@ func (m *RegisteredRelayerAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RegisteredRelayerAddress: wiretype end group for non-group") + return fmt.Errorf("proto: RegisteredPayee: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RegisteredRelayerAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RegisteredPayee: 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 ChannelId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -985,11 +1183,11 @@ func (m *RegisteredRelayerAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.ChannelId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1017,9 +1215,91 @@ func (m *RegisteredRelayerAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + m.Relayer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisteredCounterpartyPayee) 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 ErrIntOverflowGenesis + } + 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: RegisteredCounterpartyPayee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisteredCounterpartyPayee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) } @@ -1051,6 +1331,70 @@ func (m *RegisteredRelayerAddress) Unmarshal(dAtA []byte) error { } m.ChannelId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPayee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CounterpartyPayee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/modules/apps/29-fee/types/genesis_test.go b/modules/apps/29-fee/types/genesis_test.go index d574257e706..b677433c0b2 100644 --- a/modules/apps/29-fee/types/genesis_test.go +++ b/modules/apps/29-fee/types/genesis_test.go @@ -7,33 +7,18 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) -var ( - addr1 = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() - addr2 = sdk.AccAddress("testaddr2").String() - validCoins = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(100)}} - validCoins2 = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(200)}} - validCoins3 = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(300)}} -) +func TestValidateDefaultGenesis(t *testing.T) { + err := types.DefaultGenesisState().Validate() + require.NoError(t, err) +} func TestValidateGenesis(t *testing.T) { - var ( - packetID channeltypes.PacketId - fee types.Fee - refundAcc string - sender string - forwardAddr string - counterparty string - portID string - channelID string - packetChannelID string - seq uint64 - ) + var genState *types.GenesisState testCases := []struct { name string @@ -41,166 +26,150 @@ func TestValidateGenesis(t *testing.T) { expPass bool }{ { - "valid genesis", + "success - valid genesis", func() {}, true, }, { - "invalid packetID: invalid channel", + "invalid packetID: invalid port ID", func() { - packetID = channeltypes.NewPacketId( - portID, - "", - seq, - ) + genState.IdentifiedFees[0].PacketId = channeltypes.NewPacketID("", ibctesting.FirstChannelID, 1) }, false, }, { - "invalid packetID: invalid port", + "invalid packetID: invalid channel ID", func() { - packetID = channeltypes.NewPacketId( - "", - channelID, - seq, - ) + genState.IdentifiedFees[0].PacketId = channeltypes.NewPacketID(ibctesting.MockFeePort, "", 1) }, false, }, { "invalid packetID: invalid sequence", func() { - packetID = channeltypes.NewPacketId( - portID, - channelID, - 0, - ) + genState.IdentifiedFees[0].PacketId = channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 0) + }, + false, + }, + { + "invalid packet fee: invalid fee", + func() { + genState.IdentifiedFees[0].PacketFees[0].Fee = types.NewFee(sdk.Coins{}, sdk.Coins{}, sdk.Coins{}) + }, + false, + }, + { + "invalid packet fee: invalid refund address", + func() { + genState.IdentifiedFees[0].PacketFees[0].RefundAddress = "" + }, + false, + }, + { + "invalid fee enabled channel: invalid port ID", + func() { + genState.FeeEnabledChannels[0].PortId = "" }, false, }, { - "invalid packetID: invalid fee", + "invalid fee enabled channel: invalid channel ID", func() { - fee = types.Fee{ - sdk.Coins{}, - sdk.Coins{}, - sdk.Coins{}, - } + genState.FeeEnabledChannels[0].ChannelId = "" }, false, }, { - "invalid packetID: invalid refundAcc", + "invalid registered payee: invalid relayer address", func() { - refundAcc = "" + genState.RegisteredPayees[0].Relayer = "" }, false, }, { - "invalid FeeEnabledChannel: invalid ChannelID", + "invalid registered payee: invalid payee address", func() { - channelID = "" + genState.RegisteredPayees[0].Payee = "" }, false, }, { - "invalid FeeEnabledChannel: invalid PortID", + "invalid registered payee: invalid channel ID", func() { - portID = "" + genState.RegisteredPayees[0].ChannelId = "" }, false, }, { - "invalid RegisteredRelayers: invalid sender", + "invalid registered counterparty payees: invalid relayer address", func() { - sender = "" + genState.RegisteredCounterpartyPayees[0].Relayer = "" }, false, }, { - "invalid RegisteredRelayers: invalid counterparty", + "invalid registered counterparty payees: invalid counterparty payee", func() { - counterparty = " " + genState.RegisteredCounterpartyPayees[0].CounterpartyPayee = "" }, false, }, { - "invalid ForwardRelayerAddress: invalid forwardAddr", + "invalid forward relayer address: invalid forward address", func() { - forwardAddr = "" + genState.ForwardRelayers[0].Address = "" }, false, }, { - "invalid ForwardRelayerAddress: invalid packet", + "invalid forward relayer address: invalid packet", func() { - packetChannelID = "1" + genState.ForwardRelayers[0].PacketId = channeltypes.PacketId{} }, false, }, } for _, tc := range testCases { - portID = transfertypes.PortID - channelID = ibctesting.FirstChannelID - packetChannelID = ibctesting.FirstChannelID - seq = uint64(1) - - // build PacketId & Fee - packetID = channeltypes.NewPacketId( - portID, - channelID, - seq, - ) - fee = types.Fee{ - validCoins, - validCoins2, - validCoins3, - } - - refundAcc = addr1 - - // relayer addresses - sender = addr1 - counterparty = addr2 - forwardAddr = addr2 - - tc.malleate() - - genState := types.GenesisState{ + genState = &types.GenesisState{ IdentifiedFees: []types.IdentifiedPacketFees{ { - PacketId: packetID, - PacketFees: []types.PacketFee{ - { - Fee: fee, - RefundAddress: refundAcc, - Relayers: nil, - }, - }, + PacketId: channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1), + PacketFees: []types.PacketFee{types.NewPacketFee(types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee), defaultAccAddress, nil)}, }, }, FeeEnabledChannels: []types.FeeEnabledChannel{ { - PortId: portID, - ChannelId: channelID, + PortId: ibctesting.MockFeePort, + ChannelId: ibctesting.FirstChannelID, }, }, - RegisteredRelayers: []types.RegisteredRelayerAddress{ + RegisteredCounterpartyPayees: []types.RegisteredCounterpartyPayee{ { - Address: sender, - CounterpartyAddress: counterparty, + Relayer: defaultAccAddress, + CounterpartyPayee: defaultAccAddress, + ChannelId: ibctesting.FirstChannelID, }, }, ForwardRelayers: []types.ForwardRelayerAddress{ { - Address: forwardAddr, - PacketId: channeltypes.NewPacketId(portID, packetChannelID, 1), + Address: defaultAccAddress, + PacketId: channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1), + }, + }, + RegisteredPayees: []types.RegisteredPayee{ + { + Relayer: sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String(), + Payee: sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String(), + ChannelId: ibctesting.FirstChannelID, }, }, } + tc.malleate() + err := genState.Validate() + if tc.expPass { require.NoError(t, err, tc.name) } else { @@ -208,8 +177,3 @@ func TestValidateGenesis(t *testing.T) { } } } - -func TestValidateDefaultGenesis(t *testing.T) { - err := types.DefaultGenesisState().Validate() - require.NoError(t, err) -} diff --git a/modules/apps/29-fee/types/keys.go b/modules/apps/29-fee/types/keys.go index 188a75e7ac3..56a00ea5d8d 100644 --- a/modules/apps/29-fee/types/keys.go +++ b/modules/apps/29-fee/types/keys.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) const ( @@ -23,13 +23,16 @@ const ( // QuerierRoute is the querier route for IBC fee module QuerierRoute = ModuleName - Version = "fee29-1" + Version = "ics29-1" // FeeEnabledPrefix is the key prefix for storing fee enabled flag FeeEnabledKeyPrefix = "feeEnabled" - // CounterpartyRelayerAddressKeyPrefix is the key prefix for relayer address mapping - CounterpartyRelayerAddressKeyPrefix = "relayerAddress" + // PayeeKeyPrefix is the key prefix for the fee payee address stored in state + PayeeKeyPrefix = "payee" + + // CounterpartyPayeeKeyPrefix is the key prefix for the counterparty payee address mapping + CounterpartyPayeeKeyPrefix = "counterpartyPayee" // FeesInEscrowPrefix is the key prefix for fee in escrow mapping FeesInEscrowPrefix = "feesInEscrow" @@ -70,13 +73,30 @@ func ParseKeyFeeEnabled(key string) (portID, channelID string, err error) { return portID, channelID, nil } -// KeyCounterpartyRelayer returns the key for relayer address -> counterparty address mapping -func KeyCounterpartyRelayer(address, channelID string) []byte { - return []byte(fmt.Sprintf("%s/%s/%s", CounterpartyRelayerAddressKeyPrefix, address, channelID)) +// KeyPayee returns the key for relayer address -> payee address mapping +func KeyPayee(relayerAddr, channelID string) []byte { + return []byte(fmt.Sprintf("%s/%s/%s", PayeeKeyPrefix, relayerAddr, channelID)) +} + +// ParseKeyPayeeAddress returns the registered relayer addresss and channelID used to the store the fee payee address +func ParseKeyPayeeAddress(key string) (relayerAddr, channelID string, err error) { + keySplit := strings.Split(key, "/") + if len(keySplit) != 3 { + return "", "", sdkerrors.Wrapf( + sdkerrors.ErrLogic, "key provided is incorrect: the key split has incorrect length, expected %d, got %d", 3, len(keySplit), + ) + } + + return keySplit[1], keySplit[2], nil +} + +// KeyCounterpartyPayee returns the key for relayer address -> counterparty payee address mapping +func KeyCounterpartyPayee(address, channelID string) []byte { + return []byte(fmt.Sprintf("%s/%s/%s", CounterpartyPayeeKeyPrefix, address, channelID)) } -// ParseKeyCounterpartyRelayer returns the registered relayer address and channelID used to store the counterpartyrelayer address -func ParseKeyCounterpartyRelayer(key string) (address string, channelID string, error error) { +// ParseKeyCounterpartyPayee returns the registered relayer address and channelID used to store the counterparty payee address +func ParseKeyCounterpartyPayee(key string) (address string, channelID string, error error) { keySplit := strings.Split(key, "/") if len(keySplit) != 3 { return "", "", sdkerrors.Wrapf( @@ -87,13 +107,13 @@ func ParseKeyCounterpartyRelayer(key string) (address string, channelID string, return keySplit[1], keySplit[2], nil } -// KeyForwardRelayerAddress returns the key for packetID -> forwardAddress mapping -func KeyForwardRelayerAddress(packetID channeltypes.PacketId) []byte { +// KeyRelayerAddressForAsyncAck returns the key for packetID -> forwardAddress mapping +func KeyRelayerAddressForAsyncAck(packetID channeltypes.PacketId) []byte { return []byte(fmt.Sprintf("%s/%s/%s/%d", ForwardRelayerPrefix, packetID.PortId, packetID.ChannelId, packetID.Sequence)) } -// ParseKeyForwardRelayerAddress parses the key used to store the forward relayer address and returns the packetID -func ParseKeyForwardRelayerAddress(key string) (channeltypes.PacketId, error) { +// ParseKeyRelayerAddressForAsyncAck parses the key used to store the forward relayer address and returns the packetID +func ParseKeyRelayerAddressForAsyncAck(key string) (channeltypes.PacketId, error) { keySplit := strings.Split(key, "/") if len(keySplit) != 4 { return channeltypes.PacketId{}, sdkerrors.Wrapf( @@ -106,7 +126,7 @@ func ParseKeyForwardRelayerAddress(key string) (channeltypes.PacketId, error) { return channeltypes.PacketId{}, err } - packetID := channeltypes.NewPacketId(keySplit[1], keySplit[2], seq) + packetID := channeltypes.NewPacketID(keySplit[1], keySplit[2], seq) return packetID, nil } @@ -129,7 +149,7 @@ func ParseKeyFeesInEscrow(key string) (channeltypes.PacketId, error) { return channeltypes.PacketId{}, err } - packetID := channeltypes.NewPacketId(keySplit[1], keySplit[2], seq) + packetID := channeltypes.NewPacketID(keySplit[1], keySplit[2], seq) return packetID, nil } diff --git a/modules/apps/29-fee/types/keys_test.go b/modules/apps/29-fee/types/keys_test.go index 22dc91b6a57..415bfef9085 100644 --- a/modules/apps/29-fee/types/keys_test.go +++ b/modules/apps/29-fee/types/keys_test.go @@ -6,23 +6,57 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) -var ( - validPacketID = channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) -) +var validPacketID = channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + +func TestKeyPayee(t *testing.T) { + key := types.KeyPayee("relayer-address", ibctesting.FirstChannelID) + require.Equal(t, string(key), fmt.Sprintf("%s/%s/%s", types.PayeeKeyPrefix, "relayer-address", ibctesting.FirstChannelID)) +} + +func TestParseKeyPayee(t *testing.T) { + testCases := []struct { + name string + key string + expPass bool + }{ + { + "success", + string(types.KeyPayee("relayer-address", ibctesting.FirstChannelID)), + true, + }, + { + "incorrect key - key split has incorrect length", + "payeeAddress/relayer_address/transfer/channel-0", + false, + }, + } + + for _, tc := range testCases { + address, channelID, err := types.ParseKeyPayeeAddress(tc.key) -func TestKeyCounterpartyRelayer(t *testing.T) { + if tc.expPass { + require.NoError(t, err) + require.Equal(t, "relayer-address", address) + require.Equal(t, ibctesting.FirstChannelID, channelID) + } else { + require.Error(t, err) + } + } +} + +func TestKeyCounterpartyPayee(t *testing.T) { var ( relayerAddress = "relayer_address" channelID = "channel-0" ) - key := types.KeyCounterpartyRelayer(relayerAddress, channelID) - require.Equal(t, string(key), fmt.Sprintf("%s/%s/%s", types.CounterpartyRelayerAddressKeyPrefix, relayerAddress, channelID)) + key := types.KeyCounterpartyPayee(relayerAddress, channelID) + require.Equal(t, string(key), fmt.Sprintf("%s/%s/%s", types.CounterpartyPayeeKeyPrefix, relayerAddress, channelID)) } func TestKeyFeesInEscrow(t *testing.T) { @@ -69,7 +103,6 @@ func TestParseKeyFeeEnabled(t *testing.T) { } func TestParseKeyFeesInEscrow(t *testing.T) { - testCases := []struct { name string key string @@ -105,7 +138,6 @@ func TestParseKeyFeesInEscrow(t *testing.T) { } func TestParseKeyForwardRelayerAddress(t *testing.T) { - testCases := []struct { name string key string @@ -113,7 +145,7 @@ func TestParseKeyForwardRelayerAddress(t *testing.T) { }{ { "success", - string(types.KeyForwardRelayerAddress(validPacketID)), + string(types.KeyRelayerAddressForAsyncAck(validPacketID)), true, }, { @@ -129,7 +161,7 @@ func TestParseKeyForwardRelayerAddress(t *testing.T) { } for _, tc := range testCases { - packetID, err := types.ParseKeyForwardRelayerAddress(tc.key) + packetID, err := types.ParseKeyRelayerAddressForAsyncAck(tc.key) if tc.expPass { require.NoError(t, err) @@ -140,10 +172,8 @@ func TestParseKeyForwardRelayerAddress(t *testing.T) { } } -func TestParseKeyCounterpartyRelayer(t *testing.T) { - var ( - relayerAddress = "relayer_address" - ) +func TestParseKeyCounterpartyPayee(t *testing.T) { + relayerAddress := "relayer_address" testCases := []struct { name string @@ -152,7 +182,7 @@ func TestParseKeyCounterpartyRelayer(t *testing.T) { }{ { "success", - string(types.KeyCounterpartyRelayer(relayerAddress, ibctesting.FirstChannelID)), + string(types.KeyCounterpartyPayee(relayerAddress, ibctesting.FirstChannelID)), true, }, { @@ -163,7 +193,7 @@ func TestParseKeyCounterpartyRelayer(t *testing.T) { } for _, tc := range testCases { - address, channelID, err := types.ParseKeyCounterpartyRelayer(tc.key) + address, channelID, err := types.ParseKeyCounterpartyPayee(tc.key) if tc.expPass { require.NoError(t, err) diff --git a/modules/apps/29-fee/types/metadata.pb.go b/modules/apps/29-fee/types/metadata.pb.go index 95bb9244946..eb4c14798d2 100644 --- a/modules/apps/29-fee/types/metadata.pb.go +++ b/modules/apps/29-fee/types/metadata.pb.go @@ -101,10 +101,10 @@ var fileDescriptor_03d0f000eda681ce = []byte{ 0x95, 0x58, 0x50, 0x00, 0xd5, 0xe8, 0xe4, 0x7f, 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, 0xa6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xc9, 0xf9, - 0xc5, 0xb9, 0xf9, 0xc5, 0xfa, 0x99, 0x49, 0xc9, 0xba, 0xe9, 0xf9, 0xfa, 0x65, 0xc6, 0xfa, 0xb9, + 0xc5, 0xb9, 0xf9, 0xc5, 0xfa, 0x99, 0x49, 0xc9, 0xba, 0xe9, 0xf9, 0xfa, 0x65, 0xa6, 0xfa, 0xb9, 0xf9, 0x29, 0xa5, 0x39, 0xa9, 0xc5, 0xa0, 0xe0, 0x28, 0xd6, 0x37, 0xb2, 0xd4, 0x05, 0x85, 0x44, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x57, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x84, 0x58, 0xe0, 0x2e, 0x01, 0x00, 0x00, + 0x77, 0xfe, 0x8f, 0x2c, 0x2e, 0x01, 0x00, 0x00, } func (m *Metadata) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index d2fec3e542f..acdc8d108d0 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // msg types @@ -16,49 +16,101 @@ const ( TypeMsgPayPacketFeeAsync = "payPacketFeeAsync" ) -// NewMsgRegisterCounterpartyAddress creates a new instance of MsgRegisterCounterpartyAddress -func NewMsgRegisterCounterpartyAddress(address, counterpartyAddress, channelID string) *MsgRegisterCounterpartyAddress { - return &MsgRegisterCounterpartyAddress{ - Address: address, - CounterpartyAddress: counterpartyAddress, - ChannelId: channelID, +// NewMsgRegisterPayee creates a new instance of MsgRegisterPayee +func NewMsgRegisterPayee(portID, channelID, relayerAddr, payeeAddr string) *MsgRegisterPayee { + return &MsgRegisterPayee{ + PortId: portID, + ChannelId: channelID, + Relayer: relayerAddr, + Payee: payeeAddr, } } -// ValidateBasic performs a basic check of the MsgRegisterCounterpartyAddress fields -func (msg MsgRegisterCounterpartyAddress) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Address) +// ValidateBasic implements sdk.Msg and performs basic stateless validation +func (msg MsgRegisterPayee) ValidateBasic() error { + if err := host.PortIdentifierValidator(msg.PortId); err != nil { + return err + } + + if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { + return err + } + + if msg.Relayer == msg.Payee { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "relayer address and payee must not be equal") + } + + _, err := sdk.AccAddressFromBech32(msg.Relayer) if err != nil { - return sdkerrors.Wrap(err, "failed to convert msg.Address into sdk.AccAddress") + return sdkerrors.Wrap(err, "failed to create sdk.AccAddress from relayer address") } - if strings.TrimSpace(msg.CounterpartyAddress) == "" { - return ErrCounterpartyAddressEmpty + _, err = sdk.AccAddressFromBech32(msg.Payee) + if err != nil { + return sdkerrors.Wrap(err, "failed to create sdk.AccAddress from payee address") + } + + return nil +} + +// GetSigners implements sdk.Msg +func (msg MsgRegisterPayee) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(msg.Relayer) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{signer} +} + +// NewMsgRegisterCounterpartyPayee creates a new instance of MsgRegisterCounterpartyPayee +func NewMsgRegisterCounterpartyPayee(portID, channelID, relayerAddr, counterpartyPayeeAddr string) *MsgRegisterCounterpartyPayee { + return &MsgRegisterCounterpartyPayee{ + PortId: portID, + ChannelId: channelID, + Relayer: relayerAddr, + CounterpartyPayee: counterpartyPayeeAddr, + } +} + +// ValidateBasic performs a basic check of the MsgRegisterCounterpartyAddress fields +func (msg MsgRegisterCounterpartyPayee) ValidateBasic() error { + if err := host.PortIdentifierValidator(msg.PortId); err != nil { + return err } - // validate channelId if err := host.ChannelIdentifierValidator(msg.ChannelId); err != nil { return err } + _, err := sdk.AccAddressFromBech32(msg.Relayer) + if err != nil { + return sdkerrors.Wrap(err, "failed to create sdk.AccAddress from relayer address") + } + + if strings.TrimSpace(msg.CounterpartyPayee) == "" { + return ErrCounterpartyPayeeEmpty + } + return nil } // GetSigners implements sdk.Msg -func (msg MsgRegisterCounterpartyAddress) GetSigners() []sdk.AccAddress { - signer, err := sdk.AccAddressFromBech32(msg.Address) +func (msg MsgRegisterCounterpartyPayee) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(msg.Relayer) if err != nil { panic(err) } + return []sdk.AccAddress{signer} } // NewMsgPayPacketFee creates a new instance of MsgPayPacketFee -func NewMsgPayPacketFee(fee Fee, sourcePortId, sourceChannelId, signer string, relayers []string) *MsgPayPacketFee { +func NewMsgPayPacketFee(fee Fee, sourcePortID, sourceChannelID, signer string, relayers []string) *MsgPayPacketFee { return &MsgPayPacketFee{ Fee: fee, - SourcePortId: sourcePortId, - SourceChannelId: sourceChannelId, + SourcePortId: sourcePortID, + SourceChannelId: sourceChannelID, Signer: signer, Relayers: relayers, } @@ -81,9 +133,9 @@ func (msg MsgPayPacketFee) ValidateBasic() error { return sdkerrors.Wrap(err, "failed to convert msg.Signer into sdk.AccAddress") } - // enforce relayer is nil - if msg.Relayers != nil { - return ErrRelayersNotNil + // enforce relayer is not set + if len(msg.Relayers) != 0 { + return ErrRelayersNotEmpty } if err := msg.Fee.Validate(); err != nil { diff --git a/modules/apps/29-fee/types/msgs_test.go b/modules/apps/29-fee/types/msgs_test.go index d314a4f4193..d92e82732c1 100644 --- a/modules/apps/29-fee/types/msgs_test.go +++ b/modules/apps/29-fee/types/msgs_test.go @@ -4,18 +4,16 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/secp256k1" + + "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) -func TestMsgRegisterCountepartyAddressValidation(t *testing.T) { - var ( - msg *types.MsgRegisterCounterpartyAddress - ) +func TestMsgRegisterPayeeValidation(t *testing.T) { + var msg *types.MsgRegisterPayee testCases := []struct { name string @@ -28,23 +26,84 @@ func TestMsgRegisterCountepartyAddressValidation(t *testing.T) { true, }, { - "validate with incorrect destination relayer address", + "invalid portID", + func() { + msg.PortId = "" + }, + false, + }, + { + "invalid channelID", + func() { + msg.ChannelId = "" + }, + false, + }, + { + "invalid request relayer and payee are equal", + func() { + msg.Relayer = defaultAccAddress + msg.Payee = defaultAccAddress + }, + false, + }, + { + "invalid relayer address", func() { - msg.Address = "invalid-address" + msg.Relayer = "invalid-address" }, false, }, { - "invalid counterparty address", + "invalid payee address", func() { - msg.CounterpartyAddress = "" + msg.Payee = "invalid-address" }, false, }, + } + + for i, tc := range testCases { + relayerAddr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + payeeAddr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + + msg = types.NewMsgRegisterPayee(ibctesting.MockPort, ibctesting.FirstChannelID, relayerAddr.String(), payeeAddr.String()) + + tc.malleate() + + err := msg.ValidateBasic() + + if tc.expPass { + require.NoError(t, err, "valid test case %d failed: %s", i, tc.name) + } else { + require.Error(t, err, "invalid test case %d passed: %s", i, tc.name) + } + } +} + +func TestRegisterPayeeGetSigners(t *testing.T) { + accAddress := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) + msg := types.NewMsgRegisterPayee(ibctesting.MockPort, ibctesting.FirstChannelID, accAddress.String(), defaultAccAddress) + require.Equal(t, []sdk.AccAddress{sdk.AccAddress(accAddress)}, msg.GetSigners()) +} + +func TestMsgRegisterCountepartyPayeeValidation(t *testing.T) { + var msg *types.MsgRegisterCounterpartyPayee + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success", + func() {}, + true, + }, { - "invalid counterparty address: whitespaced empty string", + "invalid portID", func() { - msg.CounterpartyAddress = " " + msg.PortId = "" }, false, }, @@ -55,10 +114,31 @@ func TestMsgRegisterCountepartyAddressValidation(t *testing.T) { }, false, }, + { + "validate with incorrect destination relayer address", + func() { + msg.Relayer = "invalid-address" + }, + false, + }, + { + "invalid counterparty payee address", + func() { + msg.CounterpartyPayee = "" + }, + false, + }, + { + "invalid counterparty payee address: whitespaced empty string", + func() { + msg.CounterpartyPayee = " " + }, + false, + }, } for i, tc := range testCases { - msg = types.NewMsgRegisterCounterpartyAddress(defaultAccAddress, defaultAccAddress, ibctesting.FirstChannelID) + msg = types.NewMsgRegisterCounterpartyPayee(ibctesting.MockPort, ibctesting.FirstChannelID, defaultAccAddress, defaultAccAddress) tc.malleate() @@ -74,14 +154,12 @@ func TestMsgRegisterCountepartyAddressValidation(t *testing.T) { func TestRegisterCountepartyAddressGetSigners(t *testing.T) { accAddress := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - msg := types.NewMsgRegisterCounterpartyAddress(accAddress.String(), defaultAccAddress, ibctesting.FirstChannelID) + msg := types.NewMsgRegisterCounterpartyPayee(ibctesting.MockPort, ibctesting.FirstChannelID, accAddress.String(), defaultAccAddress) require.Equal(t, []sdk.AccAddress{sdk.AccAddress(accAddress)}, msg.GetSigners()) } func TestMsgPayPacketFeeValidation(t *testing.T) { - var ( - msg *types.MsgPayPacketFee - ) + var msg *types.MsgPayPacketFee testCases := []struct { name string @@ -93,6 +171,13 @@ func TestMsgPayPacketFeeValidation(t *testing.T) { func() {}, true, }, + { + "success with empty relayers", + func() { + msg.Relayers = []string{} + }, + true, + }, { "invalid channelID", func() { @@ -132,9 +217,9 @@ func TestMsgPayPacketFeeValidation(t *testing.T) { err := msg.ValidateBasic() if tc.expPass { - require.NoError(t, err) + require.NoError(t, err, tc.name) } else { - require.Error(t, err) + require.Error(t, err, tc.name) } } } @@ -167,9 +252,7 @@ func TestMsgPayPacketFeeGetSignBytes(t *testing.T) { } func TestMsgPayPacketFeeAsyncValidation(t *testing.T) { - var ( - msg *types.MsgPayPacketFeeAsync - ) + var msg *types.MsgPayPacketFeeAsync testCases := []struct { name string @@ -181,6 +264,13 @@ func TestMsgPayPacketFeeAsyncValidation(t *testing.T) { func() {}, true, }, + { + "success with empty relayers", + func() { + msg.PacketFee.Relayers = []string{} + }, + true, + }, { "invalid channelID", func() { @@ -267,7 +357,7 @@ func TestMsgPayPacketFeeAsyncValidation(t *testing.T) { } for _, tc := range testCases { - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, defaultAccAddress, nil) @@ -278,16 +368,16 @@ func TestMsgPayPacketFeeAsyncValidation(t *testing.T) { err := msg.ValidateBasic() if tc.expPass { - require.NoError(t, err) + require.NoError(t, err, tc.name) } else { - require.Error(t, err) + require.Error(t, err, tc.name) } } } func TestPayPacketFeeAsyncGetSigners(t *testing.T) { refundAddr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, refundAddr.String(), nil) @@ -307,7 +397,7 @@ func TestMsgPayPacketFeeAsyncType(t *testing.T) { } func TestMsgPayPacketFeeAsyncGetSignBytes(t *testing.T) { - packetID := channeltypes.NewPacketId(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) + packetID := channeltypes.NewPacketID(ibctesting.MockFeePort, ibctesting.FirstChannelID, 1) fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) packetFee := types.NewPacketFee(fee, defaultAccAddress, nil) diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 32677378fe3..ffd6bc38e59 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -9,7 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -637,26 +637,26 @@ func (m *QueryTotalTimeoutFeesResponse) GetTimeoutFees() github_com_cosmos_cosmo return nil } -// QueryCounterpartyAddressRequest defines the request type for the CounterpartyAddress rpc -type QueryCounterpartyAddressRequest struct { +// QueryPayeeRequest defines the request type for the Payee rpc +type QueryPayeeRequest struct { // unique channel identifier ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` - // the relayer address to which the counterparty is registered - RelayerAddress string `protobuf:"bytes,2,opt,name=relayer_address,json=relayerAddress,proto3" json:"relayer_address,omitempty" yaml:"relayer_address"` + // the relayer address to which the distribution address is registered + Relayer string `protobuf:"bytes,2,opt,name=relayer,proto3" json:"relayer,omitempty"` } -func (m *QueryCounterpartyAddressRequest) Reset() { *m = QueryCounterpartyAddressRequest{} } -func (m *QueryCounterpartyAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCounterpartyAddressRequest) ProtoMessage() {} -func (*QueryCounterpartyAddressRequest) Descriptor() ([]byte, []int) { +func (m *QueryPayeeRequest) Reset() { *m = QueryPayeeRequest{} } +func (m *QueryPayeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPayeeRequest) ProtoMessage() {} +func (*QueryPayeeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0638a8a78ca2503c, []int{12} } -func (m *QueryCounterpartyAddressRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryPayeeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCounterpartyAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryPayeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCounterpartyAddressRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryPayeeRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -666,50 +666,151 @@ func (m *QueryCounterpartyAddressRequest) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *QueryCounterpartyAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCounterpartyAddressRequest.Merge(m, src) +func (m *QueryPayeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPayeeRequest.Merge(m, src) } -func (m *QueryCounterpartyAddressRequest) XXX_Size() int { +func (m *QueryPayeeRequest) XXX_Size() int { return m.Size() } -func (m *QueryCounterpartyAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCounterpartyAddressRequest.DiscardUnknown(m) +func (m *QueryPayeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPayeeRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryCounterpartyAddressRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryPayeeRequest proto.InternalMessageInfo -func (m *QueryCounterpartyAddressRequest) GetChannelId() string { +func (m *QueryPayeeRequest) GetChannelId() string { if m != nil { return m.ChannelId } return "" } -func (m *QueryCounterpartyAddressRequest) GetRelayerAddress() string { +func (m *QueryPayeeRequest) GetRelayer() string { if m != nil { - return m.RelayerAddress + return m.Relayer } return "" } -// QueryCounterpartyAddressResponse defines the response type for the CounterpartyAddress rpc -type QueryCounterpartyAddressResponse struct { - // the counterparty address used to compensate forward relaying - CounterpartyAddress string `protobuf:"bytes,1,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"counterparty_address"` +// QueryPayeeResponse defines the response type for the Payee rpc +type QueryPayeeResponse struct { + // the payee address to which packet fees are paid out + PayeeAddress string `protobuf:"bytes,1,opt,name=payee_address,json=payeeAddress,proto3" json:"payee_address,omitempty" yaml:"payee_address"` } -func (m *QueryCounterpartyAddressResponse) Reset() { *m = QueryCounterpartyAddressResponse{} } -func (m *QueryCounterpartyAddressResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCounterpartyAddressResponse) ProtoMessage() {} -func (*QueryCounterpartyAddressResponse) Descriptor() ([]byte, []int) { +func (m *QueryPayeeResponse) Reset() { *m = QueryPayeeResponse{} } +func (m *QueryPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPayeeResponse) ProtoMessage() {} +func (*QueryPayeeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0638a8a78ca2503c, []int{13} } -func (m *QueryCounterpartyAddressResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryPayeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPayeeResponse.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 *QueryPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPayeeResponse.Merge(m, src) +} +func (m *QueryPayeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPayeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPayeeResponse proto.InternalMessageInfo + +func (m *QueryPayeeResponse) GetPayeeAddress() string { + if m != nil { + return m.PayeeAddress + } + return "" +} + +// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc +type QueryCounterpartyPayeeRequest struct { + // unique channel identifier + ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address to which the counterparty is registered + Relayer string `protobuf:"bytes,2,opt,name=relayer,proto3" json:"relayer,omitempty"` +} + +func (m *QueryCounterpartyPayeeRequest) Reset() { *m = QueryCounterpartyPayeeRequest{} } +func (m *QueryCounterpartyPayeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCounterpartyPayeeRequest) ProtoMessage() {} +func (*QueryCounterpartyPayeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{14} +} +func (m *QueryCounterpartyPayeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCounterpartyPayeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCounterpartyPayeeRequest.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 *QueryCounterpartyPayeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCounterpartyPayeeRequest.Merge(m, src) +} +func (m *QueryCounterpartyPayeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCounterpartyPayeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCounterpartyPayeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCounterpartyPayeeRequest proto.InternalMessageInfo + +func (m *QueryCounterpartyPayeeRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *QueryCounterpartyPayeeRequest) GetRelayer() string { + if m != nil { + return m.Relayer + } + return "" +} + +// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc +type QueryCounterpartyPayeeResponse struct { + // the counterparty payee address used to compensate forward relaying + CounterpartyPayee string `protobuf:"bytes,1,opt,name=counterparty_payee,json=counterpartyPayee,proto3" json:"counterparty_payee,omitempty" yaml:"counterparty_payee"` +} + +func (m *QueryCounterpartyPayeeResponse) Reset() { *m = QueryCounterpartyPayeeResponse{} } +func (m *QueryCounterpartyPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCounterpartyPayeeResponse) ProtoMessage() {} +func (*QueryCounterpartyPayeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0638a8a78ca2503c, []int{15} +} +func (m *QueryCounterpartyPayeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCounterpartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCounterpartyPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCounterpartyAddressResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCounterpartyPayeeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -719,21 +820,21 @@ func (m *QueryCounterpartyAddressResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryCounterpartyAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCounterpartyAddressResponse.Merge(m, src) +func (m *QueryCounterpartyPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCounterpartyPayeeResponse.Merge(m, src) } -func (m *QueryCounterpartyAddressResponse) XXX_Size() int { +func (m *QueryCounterpartyPayeeResponse) XXX_Size() int { return m.Size() } -func (m *QueryCounterpartyAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCounterpartyAddressResponse.DiscardUnknown(m) +func (m *QueryCounterpartyPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCounterpartyPayeeResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryCounterpartyAddressResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCounterpartyPayeeResponse proto.InternalMessageInfo -func (m *QueryCounterpartyAddressResponse) GetCounterpartyAddress() string { +func (m *QueryCounterpartyPayeeResponse) GetCounterpartyPayee() string { if m != nil { - return m.CounterpartyAddress + return m.CounterpartyPayee } return "" } @@ -750,7 +851,7 @@ func (m *QueryFeeEnabledChannelsRequest) Reset() { *m = QueryFeeEnabledC func (m *QueryFeeEnabledChannelsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelsRequest) ProtoMessage() {} func (*QueryFeeEnabledChannelsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{14} + return fileDescriptor_0638a8a78ca2503c, []int{16} } func (m *QueryFeeEnabledChannelsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +904,7 @@ func (m *QueryFeeEnabledChannelsResponse) Reset() { *m = QueryFeeEnabled func (m *QueryFeeEnabledChannelsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelsResponse) ProtoMessage() {} func (*QueryFeeEnabledChannelsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{15} + return fileDescriptor_0638a8a78ca2503c, []int{17} } func (m *QueryFeeEnabledChannelsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,7 +952,7 @@ func (m *QueryFeeEnabledChannelRequest) Reset() { *m = QueryFeeEnabledCh func (m *QueryFeeEnabledChannelRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelRequest) ProtoMessage() {} func (*QueryFeeEnabledChannelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{16} + return fileDescriptor_0638a8a78ca2503c, []int{18} } func (m *QueryFeeEnabledChannelRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -904,7 +1005,7 @@ func (m *QueryFeeEnabledChannelResponse) Reset() { *m = QueryFeeEnabledC func (m *QueryFeeEnabledChannelResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeeEnabledChannelResponse) ProtoMessage() {} func (*QueryFeeEnabledChannelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0638a8a78ca2503c, []int{17} + return fileDescriptor_0638a8a78ca2503c, []int{19} } func (m *QueryFeeEnabledChannelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -953,8 +1054,10 @@ func init() { proto.RegisterType((*QueryTotalAckFeesResponse)(nil), "ibc.applications.fee.v1.QueryTotalAckFeesResponse") proto.RegisterType((*QueryTotalTimeoutFeesRequest)(nil), "ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest") proto.RegisterType((*QueryTotalTimeoutFeesResponse)(nil), "ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse") - proto.RegisterType((*QueryCounterpartyAddressRequest)(nil), "ibc.applications.fee.v1.QueryCounterpartyAddressRequest") - proto.RegisterType((*QueryCounterpartyAddressResponse)(nil), "ibc.applications.fee.v1.QueryCounterpartyAddressResponse") + proto.RegisterType((*QueryPayeeRequest)(nil), "ibc.applications.fee.v1.QueryPayeeRequest") + proto.RegisterType((*QueryPayeeResponse)(nil), "ibc.applications.fee.v1.QueryPayeeResponse") + proto.RegisterType((*QueryCounterpartyPayeeRequest)(nil), "ibc.applications.fee.v1.QueryCounterpartyPayeeRequest") + proto.RegisterType((*QueryCounterpartyPayeeResponse)(nil), "ibc.applications.fee.v1.QueryCounterpartyPayeeResponse") proto.RegisterType((*QueryFeeEnabledChannelsRequest)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest") proto.RegisterType((*QueryFeeEnabledChannelsResponse)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse") proto.RegisterType((*QueryFeeEnabledChannelRequest)(nil), "ibc.applications.fee.v1.QueryFeeEnabledChannelRequest") @@ -966,88 +1069,91 @@ func init() { } var fileDescriptor_0638a8a78ca2503c = []byte{ - // 1281 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x1c, 0xcd, 0xa4, 0xa1, 0x4d, 0x26, 0xa1, 0x4d, 0xc7, 0xa1, 0x4d, 0x4d, 0x62, 0xa7, 0x53, 0x0a, - 0x21, 0x28, 0xbb, 0x8a, 0x43, 0x9b, 0x96, 0x53, 0x6b, 0x43, 0x68, 0x04, 0x82, 0x76, 0x95, 0x0b, - 0x08, 0xe4, 0xae, 0x77, 0xc7, 0xce, 0x2a, 0xce, 0xce, 0x76, 0x77, 0x6d, 0x70, 0xd3, 0x20, 0x35, - 0x52, 0x84, 0x04, 0x15, 0x42, 0x42, 0xe2, 0x80, 0xb8, 0x22, 0x24, 0x24, 0xb8, 0xf3, 0x0d, 0x7a, - 0xaa, 0x2a, 0x71, 0xe1, 0x64, 0xaa, 0x84, 0x4f, 0x60, 0x71, 0x40, 0xe2, 0x82, 0x76, 0x66, 0x76, - 0xbd, 0xee, 0xee, 0x26, 0xde, 0x92, 0x88, 0x53, 0xec, 0xf9, 0xfd, 0x99, 0xf7, 0xde, 0xfc, 0x3c, - 0xf3, 0x14, 0x78, 0xc1, 0xa8, 0x68, 0xb2, 0x6a, 0x59, 0x75, 0x43, 0x53, 0x5d, 0x83, 0x9a, 0x8e, - 0x5c, 0x25, 0x44, 0x6e, 0x2e, 0xc8, 0x77, 0x1a, 0xc4, 0x6e, 0x49, 0x96, 0x4d, 0x5d, 0x8a, 0xce, - 0x1a, 0x15, 0x4d, 0x0a, 0x27, 0x49, 0x55, 0x42, 0xa4, 0xe6, 0x42, 0x76, 0xa2, 0x46, 0x6b, 0x94, - 0xe5, 0xc8, 0xde, 0x27, 0x9e, 0x9e, 0x9d, 0xaa, 0x51, 0x5a, 0xab, 0x13, 0x59, 0xb5, 0x0c, 0x59, - 0x35, 0x4d, 0xea, 0x8a, 0x22, 0x1e, 0xc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 0x61, 0x8e, 0x05, 0x2f, 0x71, 0x13, 0x00, - 0x00, + // 1338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x5d, 0x6f, 0xdb, 0x54, + 0x18, 0xee, 0xe9, 0x3e, 0xda, 0x9e, 0x76, 0xb0, 0x9c, 0x16, 0x96, 0x86, 0x36, 0xe9, 0x3c, 0x06, + 0xa5, 0x53, 0x6d, 0x35, 0xa3, 0x74, 0x43, 0x42, 0xd0, 0x74, 0x74, 0x14, 0x06, 0x94, 0xac, 0x37, + 0x20, 0x50, 0xe6, 0x38, 0x27, 0xa9, 0xd5, 0xd4, 0xc7, 0xb3, 0x9d, 0x88, 0xac, 0x2b, 0xb0, 0x89, + 0x0a, 0x04, 0x08, 0x90, 0x90, 0xb8, 0xe0, 0x1e, 0x21, 0x90, 0xf8, 0x01, 0xfc, 0x83, 0x5d, 0xa1, + 0x4a, 0xdc, 0x20, 0x2e, 0x02, 0x6a, 0x11, 0x3f, 0x20, 0x57, 0x5c, 0x80, 0x84, 0x7c, 0xce, 0xeb, + 0xc4, 0x99, 0xed, 0x36, 0x29, 0xa5, 0x5c, 0xd5, 0xf6, 0x79, 0x3f, 0x9e, 0xe7, 0x39, 0xaf, 0x7d, + 0x9e, 0x14, 0x9f, 0xd3, 0xf3, 0x9a, 0xa2, 0x9a, 0x66, 0x59, 0xd7, 0x54, 0x47, 0x67, 0x86, 0xad, + 0x14, 0x29, 0x55, 0xaa, 0x33, 0xca, 0xcd, 0x0a, 0xb5, 0x6a, 0xb2, 0x69, 0x31, 0x87, 0x91, 0x33, + 0x7a, 0x5e, 0x93, 0xfd, 0x41, 0x72, 0x91, 0x52, 0xb9, 0x3a, 0x93, 0x18, 0x29, 0xb1, 0x12, 0xe3, + 0x31, 0x8a, 0x7b, 0x25, 0xc2, 0x13, 0x63, 0x25, 0xc6, 0x4a, 0x65, 0xaa, 0xa8, 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, 0x8d, 0x95, 0x97, 0x0a, 0x6e, 0x4e, 0x51, 0xf7, 0x2a, 0x2e, 0x52, 0x6a, + 0x67, 0x8e, 0xdf, 0xab, 0xa7, 0x7a, 0xb2, 0xc3, 0x7a, 0xb0, 0x9f, 0xb4, 0x85, 0x70, 0x32, 0x02, + 0x8c, 0x27, 0xcd, 0x73, 0x78, 0x40, 0x74, 0xcf, 0xe9, 0x05, 0x50, 0x66, 0x9c, 0xf7, 0x77, 0x55, + 0x97, 0x3d, 0xa9, 0xab, 0xae, 0x26, 0x6e, 0xd4, 0x52, 0x01, 0xfa, 0xf5, 0x9b, 0x70, 0xdf, 0x89, + 0x28, 0x1f, 0x44, 0xef, 0x51, 0x53, 0x93, 0x02, 0x1e, 0x0e, 0xd1, 0x04, 0x20, 0x1d, 0x48, 0x12, + 0x12, 0x94, 0x44, 0xfa, 0x11, 0xe1, 0x27, 0xa2, 0xb6, 0x67, 0x91, 0x59, 0x0b, 0x82, 0xef, 0x61, + 0xcf, 0xcd, 0x19, 0xdc, 0x67, 0x32, 0x8b, 0x4b, 0xec, 0xaa, 0x33, 0x90, 0x3d, 0xe9, 0xde, 0x2e, + 0x15, 0xc8, 0x38, 0xc6, 0x20, 0xb1, 0xbb, 0x76, 0x8c, 0xaf, 0x0d, 0xc0, 0x93, 0x10, 0x69, 0x8f, + 0x07, 0xa5, 0xfd, 0x14, 0xe1, 0xa9, 0x4e, 0x08, 0x81, 0xca, 0x37, 0x0e, 0x71, 0xf2, 0xc2, 0x67, + 0xee, 0x2d, 0x3c, 0xca, 0xf1, 0xac, 0x30, 0x47, 0x2d, 0x67, 0xa9, 0x56, 0xe5, 0xa1, 0x87, 0x35, + 0x6d, 0xd2, 0x57, 0x08, 0x27, 0xc2, 0xea, 0x03, 0xbf, 0xdb, 0x78, 0xc0, 0xa2, 0x5a, 0x35, 0x57, + 0xa4, 0xd4, 0x23, 0x35, 0xda, 0xb6, 0x61, 0xde, 0x56, 0x2d, 0x30, 0xdd, 0xc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, 0x7a, 0x6f, 0x27, 0x89, 0xb6, 0x77, 0x92, 0xe8, 0xb7, 0x9d, 0x24, 0xfa, 0x7c, 0x37, + 0xd9, 0xb3, 0xbd, 0x9b, 0xec, 0xf9, 0x79, 0x37, 0xd9, 0xf3, 0xc6, 0x6c, 0xf0, 0xa7, 0x8e, 0x9e, + 0xd7, 0xa6, 0x4b, 0x4c, 0xa9, 0xce, 0x2a, 0xeb, 0xac, 0x50, 0x29, 0x53, 0x5b, 0x34, 0x4f, 0x5f, + 0x9e, 0x76, 0xfb, 0xf3, 0x5f, 0x3f, 0xf9, 0x93, 0xfc, 0x1f, 0x70, 0x17, 0xff, 0x09, 0x00, 0x00, + 0xff, 0xff, 0x66, 0x81, 0xff, 0x3a, 0xad, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1074,8 +1180,10 @@ type QueryClient interface { TotalAckFees(ctx context.Context, in *QueryTotalAckFeesRequest, opts ...grpc.CallOption) (*QueryTotalAckFeesResponse, error) // TotalTimeoutFees returns the total timeout fees for a packet given its identifier TotalTimeoutFees(ctx context.Context, in *QueryTotalTimeoutFeesRequest, opts ...grpc.CallOption) (*QueryTotalTimeoutFeesResponse, error) - // CounterpartyAddress returns the registered counterparty address for forward relaying - CounterpartyAddress(ctx context.Context, in *QueryCounterpartyAddressRequest, opts ...grpc.CallOption) (*QueryCounterpartyAddressResponse, error) + // Payee returns the registered payee address for a specific channel given the relayer address + Payee(ctx context.Context, in *QueryPayeeRequest, opts ...grpc.CallOption) (*QueryPayeeResponse, error) + // CounterpartyPayee returns the registered counterparty payee for forward relaying + CounterpartyPayee(ctx context.Context, in *QueryCounterpartyPayeeRequest, opts ...grpc.CallOption) (*QueryCounterpartyPayeeResponse, error) // FeeEnabledChannels returns a list of all fee enabled channels FeeEnabledChannels(ctx context.Context, in *QueryFeeEnabledChannelsRequest, opts ...grpc.CallOption) (*QueryFeeEnabledChannelsResponse, error) // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel @@ -1144,9 +1252,18 @@ func (c *queryClient) TotalTimeoutFees(ctx context.Context, in *QueryTotalTimeou return out, nil } -func (c *queryClient) CounterpartyAddress(ctx context.Context, in *QueryCounterpartyAddressRequest, opts ...grpc.CallOption) (*QueryCounterpartyAddressResponse, error) { - out := new(QueryCounterpartyAddressResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/CounterpartyAddress", in, out, opts...) +func (c *queryClient) Payee(ctx context.Context, in *QueryPayeeRequest, opts ...grpc.CallOption) (*QueryPayeeResponse, error) { + out := new(QueryPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/Payee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CounterpartyPayee(ctx context.Context, in *QueryCounterpartyPayeeRequest, opts ...grpc.CallOption) (*QueryCounterpartyPayeeResponse, error) { + out := new(QueryCounterpartyPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Query/CounterpartyPayee", in, out, opts...) if err != nil { return nil, err } @@ -1185,8 +1302,10 @@ type QueryServer interface { TotalAckFees(context.Context, *QueryTotalAckFeesRequest) (*QueryTotalAckFeesResponse, error) // TotalTimeoutFees returns the total timeout fees for a packet given its identifier TotalTimeoutFees(context.Context, *QueryTotalTimeoutFeesRequest) (*QueryTotalTimeoutFeesResponse, error) - // CounterpartyAddress returns the registered counterparty address for forward relaying - CounterpartyAddress(context.Context, *QueryCounterpartyAddressRequest) (*QueryCounterpartyAddressResponse, error) + // Payee returns the registered payee address for a specific channel given the relayer address + Payee(context.Context, *QueryPayeeRequest) (*QueryPayeeResponse, error) + // CounterpartyPayee returns the registered counterparty payee for forward relaying + CounterpartyPayee(context.Context, *QueryCounterpartyPayeeRequest) (*QueryCounterpartyPayeeResponse, error) // FeeEnabledChannels returns a list of all fee enabled channels FeeEnabledChannels(context.Context, *QueryFeeEnabledChannelsRequest) (*QueryFeeEnabledChannelsResponse, error) // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel @@ -1215,8 +1334,11 @@ func (*UnimplementedQueryServer) TotalAckFees(ctx context.Context, req *QueryTot func (*UnimplementedQueryServer) TotalTimeoutFees(ctx context.Context, req *QueryTotalTimeoutFeesRequest) (*QueryTotalTimeoutFeesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalTimeoutFees not implemented") } -func (*UnimplementedQueryServer) CounterpartyAddress(ctx context.Context, req *QueryCounterpartyAddressRequest) (*QueryCounterpartyAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CounterpartyAddress not implemented") +func (*UnimplementedQueryServer) Payee(ctx context.Context, req *QueryPayeeRequest) (*QueryPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Payee not implemented") +} +func (*UnimplementedQueryServer) CounterpartyPayee(ctx context.Context, req *QueryCounterpartyPayeeRequest) (*QueryCounterpartyPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CounterpartyPayee not implemented") } func (*UnimplementedQueryServer) FeeEnabledChannels(ctx context.Context, req *QueryFeeEnabledChannelsRequest) (*QueryFeeEnabledChannelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FeeEnabledChannels not implemented") @@ -1337,20 +1459,38 @@ func _Query_TotalTimeoutFees_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Query_CounterpartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCounterpartyAddressRequest) +func _Query_Payee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPayeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Payee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.fee.v1.Query/Payee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Payee(ctx, req.(*QueryPayeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CounterpartyPayee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCounterpartyPayeeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).CounterpartyAddress(ctx, in) + return srv.(QueryServer).CounterpartyPayee(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.fee.v1.Query/CounterpartyAddress", + FullMethod: "/ibc.applications.fee.v1.Query/CounterpartyPayee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CounterpartyAddress(ctx, req.(*QueryCounterpartyAddressRequest)) + return srv.(QueryServer).CounterpartyPayee(ctx, req.(*QueryCounterpartyPayeeRequest)) } return interceptor(ctx, in, info, handler) } @@ -1420,8 +1560,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_TotalTimeoutFees_Handler, }, { - MethodName: "CounterpartyAddress", - Handler: _Query_CounterpartyAddress_Handler, + MethodName: "Payee", + Handler: _Query_Payee_Handler, + }, + { + MethodName: "CounterpartyPayee", + Handler: _Query_CounterpartyPayee_Handler, }, { MethodName: "FeeEnabledChannels", @@ -1885,7 +2029,7 @@ func (m *QueryTotalTimeoutFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryCounterpartyAddressRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryPayeeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1895,20 +2039,20 @@ func (m *QueryCounterpartyAddressRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCounterpartyAddressRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryPayeeRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCounterpartyAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryPayeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.RelayerAddress) > 0 { - i -= len(m.RelayerAddress) - copy(dAtA[i:], m.RelayerAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.RelayerAddress))) + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Relayer))) i-- dAtA[i] = 0x12 } @@ -1922,7 +2066,7 @@ func (m *QueryCounterpartyAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *QueryCounterpartyAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryPayeeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1932,20 +2076,87 @@ func (m *QueryCounterpartyAddressResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCounterpartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryPayeeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCounterpartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.CounterpartyAddress) > 0 { - i -= len(m.CounterpartyAddress) - copy(dAtA[i:], m.CounterpartyAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CounterpartyAddress))) + if len(m.PayeeAddress) > 0 { + i -= len(m.PayeeAddress) + copy(dAtA[i:], m.PayeeAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PayeeAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCounterpartyPayeeRequest) 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 *QueryCounterpartyPayeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCounterpartyPayeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Relayer))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCounterpartyPayeeResponse) 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 *QueryCounterpartyPayeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCounterpartyPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyPayee) > 0 { + i -= len(m.CounterpartyPayee) + copy(dAtA[i:], m.CounterpartyPayee) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CounterpartyPayee))) i-- dAtA[i] = 0xa } @@ -2283,7 +2494,37 @@ func (m *QueryTotalTimeoutFeesResponse) Size() (n int) { return n } -func (m *QueryCounterpartyAddressRequest) Size() (n int) { +func (m *QueryPayeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Relayer) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPayeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PayeeAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCounterpartyPayeeRequest) Size() (n int) { if m == nil { return 0 } @@ -2293,20 +2534,20 @@ func (m *QueryCounterpartyAddressRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.RelayerAddress) + l = len(m.Relayer) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryCounterpartyAddressResponse) Size() (n int) { +func (m *QueryCounterpartyPayeeResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.CounterpartyAddress) + l = len(m.CounterpartyPayee) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -3507,7 +3748,203 @@ func (m *QueryTotalTimeoutFeesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) error { +func (m *QueryPayeeRequest) 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: QueryPayeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPayeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", 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.Relayer = string(dAtA[iNdEx:postIndex]) + 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 *QueryPayeeResponse) 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: QueryPayeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPayeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PayeeAddress", 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.PayeeAddress = string(dAtA[iNdEx:postIndex]) + 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 *QueryCounterpartyPayeeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3530,10 +3967,10 @@ func (m *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCounterpartyAddressRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCounterpartyPayeeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCounterpartyAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCounterpartyPayeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3570,7 +4007,7 @@ func (m *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelayerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3598,7 +4035,7 @@ func (m *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RelayerAddress = string(dAtA[iNdEx:postIndex]) + m.Relayer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3621,7 +4058,7 @@ func (m *QueryCounterpartyAddressRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCounterpartyAddressResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCounterpartyPayeeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3644,15 +4081,15 @@ func (m *QueryCounterpartyAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCounterpartyAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCounterpartyPayeeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCounterpartyAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCounterpartyPayeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPayee", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3680,7 +4117,7 @@ func (m *QueryCounterpartyAddressResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + m.CounterpartyPayee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/modules/apps/29-fee/types/query.pb.gw.go b/modules/apps/29-fee/types/query.pb.gw.go index 9b9e47c5939..d6e723f9bdd 100644 --- a/modules/apps/29-fee/types/query.pb.gw.go +++ b/modules/apps/29-fee/types/query.pb.gw.go @@ -68,7 +68,7 @@ func local_request_Query_IncentivizedPackets_0(ctx context.Context, marshaler ru } var ( - filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_IncentivizedPacket_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,26 +82,26 @@ func request_Query_IncentivizedPacket_0(ctx context.Context, marshaler runtime.M _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -138,26 +138,26 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -184,7 +184,7 @@ func local_request_Query_IncentivizedPacket_0(ctx context.Context, marshaler run } var ( - filter_Query_IncentivizedPacketsForChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"port_id": 0, "channel_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} + filter_Query_IncentivizedPacketsForChannel_0 = &utilities.DoubleArray{Encoding: map[string]int{"channel_id": 0, "port_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,26 +198,26 @@ func request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, marshale _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } if err := req.ParseForm(); err != nil { @@ -243,26 +243,26 @@ func local_request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, ma _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } if err := req.ParseForm(); err != nil { @@ -278,7 +278,7 @@ func local_request_Query_IncentivizedPacketsForChannel_0(ctx context.Context, ma } var ( - filter_Query_TotalRecvFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalRecvFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -292,26 +292,26 @@ func request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -348,26 +348,26 @@ func local_request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -394,7 +394,7 @@ func local_request_Query_TotalRecvFees_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_TotalAckFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalAckFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -408,26 +408,26 @@ func request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.Marshal _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -464,26 +464,26 @@ func local_request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.M _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -510,7 +510,7 @@ func local_request_Query_TotalAckFees_0(ctx context.Context, marshaler runtime.M } var ( - filter_Query_TotalTimeoutFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "port_id": 1, "channel_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} + filter_Query_TotalTimeoutFees_0 = &utilities.DoubleArray{Encoding: map[string]int{"packet_id": 0, "channel_id": 1, "port_id": 2, "sequence": 3}, Base: []int{1, 1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 2, 2, 2, 3, 4, 5}} ) func request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -524,26 +524,26 @@ func request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runtime.Mar _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -580,26 +580,26 @@ func local_request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runti _ = err ) - val, ok = pathParams["packet_id.port_id"] + val, ok = pathParams["packet_id.channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) } - val, ok = pathParams["packet_id.channel_id"] + val, ok = pathParams["packet_id.port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "packet_id.port_id") } - err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.channel_id", val) + err = runtime.PopulateFieldFromPath(&protoReq, "packet_id.port_id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "packet_id.port_id", err) } val, ok = pathParams["packet_id.sequence"] @@ -625,8 +625,8 @@ func local_request_Query_TotalTimeoutFees_0(ctx context.Context, marshaler runti } -func request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCounterpartyAddressRequest +func request_Query_Payee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPayeeRequest var metadata runtime.ServerMetadata var ( @@ -636,17 +636,44 @@ func request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["relayer_address"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.RelayerAddress, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } + val, ok = pathParams["relayer"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer") + } + + protoReq.Relayer, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer", err) + } + + msg, err := client.Payee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Payee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPayeeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + val, ok = pathParams["channel_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") @@ -658,13 +685,24 @@ func request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime. return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - msg, err := client.CounterpartyAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + val, ok = pathParams["relayer"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer") + } + + protoReq.Relayer, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer", err) + } + + msg, err := server.Payee(ctx, &protoReq) return msg, metadata, err } -func local_request_Query_CounterpartyAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCounterpartyAddressRequest +func request_Query_CounterpartyPayee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCounterpartyPayeeRequest var metadata runtime.ServerMetadata var ( @@ -674,17 +712,44 @@ func local_request_Query_CounterpartyAddress_0(ctx context.Context, marshaler ru _ = err ) - val, ok = pathParams["relayer_address"] + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["relayer"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer") } - protoReq.RelayerAddress, err = runtime.String(val) + protoReq.Relayer, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer", err) } + msg, err := client.CounterpartyPayee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CounterpartyPayee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCounterpartyPayeeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + val, ok = pathParams["channel_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") @@ -696,7 +761,18 @@ func local_request_Query_CounterpartyAddress_0(ctx context.Context, marshaler ru return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - msg, err := server.CounterpartyAddress(ctx, &protoReq) + val, ok = pathParams["relayer"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "relayer") + } + + protoReq.Relayer, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "relayer", err) + } + + msg, err := server.CounterpartyPayee(ctx, &protoReq) return msg, metadata, err } @@ -748,26 +824,26 @@ func request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } msg, err := client.FeeEnabledChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -786,26 +862,26 @@ func local_request_Query_FeeEnabledChannel_0(ctx context.Context, marshaler runt _ = err ) - val, ok = pathParams["port_id"] + val, ok = pathParams["channel_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") } - protoReq.PortId, err = runtime.String(val) + protoReq.ChannelId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) } - val, ok = pathParams["channel_id"] + val, ok = pathParams["port_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") } - protoReq.ChannelId, err = runtime.String(val) + protoReq.PortId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } msg, err := server.FeeEnabledChannel(ctx, &protoReq) @@ -939,7 +1015,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_CounterpartyAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Payee_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) @@ -948,14 +1024,34 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_CounterpartyAddress_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Payee_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_CounterpartyAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CounterpartyPayee_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CounterpartyPayee_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CounterpartyPayee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1160,7 +1256,27 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_CounterpartyAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Payee_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_Payee_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_Payee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CounterpartyPayee_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) @@ -1169,14 +1285,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_CounterpartyAddress_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_CounterpartyPayee_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_CounterpartyAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CounterpartyPayee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1226,21 +1342,23 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_IncentivizedPackets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPacket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "apps", "fee", "v1", "incentivized_packet", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "apps", "fee", "v1", "channels", "packet_id.channel_id", "ports", "packet_id.port_id", "sequences", "packet_id.sequence", "incentivized_packet"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_IncentivizedPacketsForChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "apps", "fee", "v1", "incentivized_packets", "port", "port_id", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IncentivizedPacketsForChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "ports", "port_id", "incentivized_packets"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TotalRecvFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "apps", "fee", "v1", "total_recv_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TotalRecvFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "apps", "fee", "v1", "channels", "packet_id.channel_id", "ports", "packet_id.port_id", "sequences", "packet_id.sequence", "total_recv_fees"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TotalAckFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "apps", "fee", "v1", "total_ack_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TotalAckFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "apps", "fee", "v1", "channels", "packet_id.channel_id", "ports", "packet_id.port_id", "sequences", "packet_id.sequence", "total_ack_fees"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_TotalTimeoutFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10}, []string{"ibc", "apps", "fee", "v1", "total_timeout_fees", "port", "packet_id.port_id", "channel", "packet_id.channel_id", "sequence", "packet_id.sequence"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TotalTimeoutFees_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10}, []string{"ibc", "apps", "fee", "v1", "channels", "packet_id.channel_id", "ports", "packet_id.port_id", "sequences", "packet_id.sequence", "total_timeout_fees"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_CounterpartyAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"ibc", "apps", "fee", "v1", "counterparty_address", "relayer_address", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Payee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "relayers", "relayer", "payee"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_CounterpartyPayee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "relayers", "relayer", "counterparty_payee"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_FeeEnabledChannels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "fee", "v1", "fee_enabled"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_FeeEnabledChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "apps", "fee", "v1", "fee_enabled", "port", "port_id", "channel", "channel_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_FeeEnabledChannel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "fee", "v1", "channels", "channel_id", "ports", "port_id", "fee_enabled"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1256,7 +1374,9 @@ var ( forward_Query_TotalTimeoutFees_0 = runtime.ForwardResponseMessage - forward_Query_CounterpartyAddress_0 = runtime.ForwardResponseMessage + forward_Query_Payee_0 = runtime.ForwardResponseMessage + + forward_Query_CounterpartyPayee_0 = runtime.ForwardResponseMessage forward_Query_FeeEnabledChannels_0 = runtime.ForwardResponseMessage diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 1cecc607dc9..67e639a42b3 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -29,28 +29,30 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgRegisterCounterpartyAddress defines the request type for the RegisterCounterpartyAddress rpc -type MsgRegisterCounterpartyAddress struct { - // the relayer address - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // the counterparty relayer address - CounterpartyAddress string `protobuf:"bytes,2,opt,name=counterparty_address,json=counterpartyAddress,proto3" json:"counterparty_address,omitempty" yaml:"counterparty_address"` +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +type MsgRegisterPayee struct { + // unique port identifier + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` // unique channel identifier - ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address + Relayer string `protobuf:"bytes,3,opt,name=relayer,proto3" json:"relayer,omitempty"` + // the payee address + Payee string `protobuf:"bytes,4,opt,name=payee,proto3" json:"payee,omitempty"` } -func (m *MsgRegisterCounterpartyAddress) Reset() { *m = MsgRegisterCounterpartyAddress{} } -func (m *MsgRegisterCounterpartyAddress) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterpartyAddress) ProtoMessage() {} -func (*MsgRegisterCounterpartyAddress) Descriptor() ([]byte, []int) { +func (m *MsgRegisterPayee) Reset() { *m = MsgRegisterPayee{} } +func (m *MsgRegisterPayee) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterPayee) ProtoMessage() {} +func (*MsgRegisterPayee) Descriptor() ([]byte, []int) { return fileDescriptor_05c93128649f1b96, []int{0} } -func (m *MsgRegisterCounterpartyAddress) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterPayee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRegisterCounterpartyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterPayee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRegisterCounterpartyAddress.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterPayee.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -60,36 +62,116 @@ func (m *MsgRegisterCounterpartyAddress) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *MsgRegisterCounterpartyAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterpartyAddress.Merge(m, src) +func (m *MsgRegisterPayee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterPayee.Merge(m, src) } -func (m *MsgRegisterCounterpartyAddress) XXX_Size() int { +func (m *MsgRegisterPayee) XXX_Size() int { return m.Size() } -func (m *MsgRegisterCounterpartyAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterpartyAddress.DiscardUnknown(m) +func (m *MsgRegisterPayee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterPayee.DiscardUnknown(m) } -var xxx_messageInfo_MsgRegisterCounterpartyAddress proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterPayee proto.InternalMessageInfo -// MsgRegisterCounterpartyAddressResponse defines the response type for the RegisterCounterpartyAddress rpc -type MsgRegisterCounterpartyAddressResponse struct { +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +type MsgRegisterPayeeResponse struct { } -func (m *MsgRegisterCounterpartyAddressResponse) Reset() { - *m = MsgRegisterCounterpartyAddressResponse{} -} -func (m *MsgRegisterCounterpartyAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterCounterpartyAddressResponse) ProtoMessage() {} -func (*MsgRegisterCounterpartyAddressResponse) Descriptor() ([]byte, []int) { +func (m *MsgRegisterPayeeResponse) Reset() { *m = MsgRegisterPayeeResponse{} } +func (m *MsgRegisterPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterPayeeResponse) ProtoMessage() {} +func (*MsgRegisterPayeeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_05c93128649f1b96, []int{1} } -func (m *MsgRegisterCounterpartyAddressResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterPayeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterPayeeResponse.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 *MsgRegisterPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterPayeeResponse.Merge(m, src) +} +func (m *MsgRegisterPayeeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterPayeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterPayeeResponse proto.InternalMessageInfo + +// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +type MsgRegisterCounterpartyPayee struct { + // unique port identifier + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` + // unique channel identifier + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"` + // the relayer address + Relayer string `protobuf:"bytes,3,opt,name=relayer,proto3" json:"relayer,omitempty"` + // the counterparty payee address + CounterpartyPayee string `protobuf:"bytes,4,opt,name=counterparty_payee,json=counterpartyPayee,proto3" json:"counterparty_payee,omitempty" yaml:"counterparty_payee"` +} + +func (m *MsgRegisterCounterpartyPayee) Reset() { *m = MsgRegisterCounterpartyPayee{} } +func (m *MsgRegisterCounterpartyPayee) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterpartyPayee) ProtoMessage() {} +func (*MsgRegisterCounterpartyPayee) Descriptor() ([]byte, []int) { + return fileDescriptor_05c93128649f1b96, []int{2} +} +func (m *MsgRegisterCounterpartyPayee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterCounterpartyPayee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterCounterpartyPayee.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 *MsgRegisterCounterpartyPayee) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterpartyPayee.Merge(m, src) +} +func (m *MsgRegisterCounterpartyPayee) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterCounterpartyPayee) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterpartyPayee.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterCounterpartyPayee proto.InternalMessageInfo + +// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +type MsgRegisterCounterpartyPayeeResponse struct { +} + +func (m *MsgRegisterCounterpartyPayeeResponse) Reset() { *m = MsgRegisterCounterpartyPayeeResponse{} } +func (m *MsgRegisterCounterpartyPayeeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterCounterpartyPayeeResponse) ProtoMessage() {} +func (*MsgRegisterCounterpartyPayeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_05c93128649f1b96, []int{3} +} +func (m *MsgRegisterCounterpartyPayeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRegisterCounterpartyAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterCounterpartyPayeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRegisterCounterpartyAddressResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterCounterpartyPayeeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -99,17 +181,17 @@ func (m *MsgRegisterCounterpartyAddressResponse) XXX_Marshal(b []byte, determini return b[:n], nil } } -func (m *MsgRegisterCounterpartyAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterCounterpartyAddressResponse.Merge(m, src) +func (m *MsgRegisterCounterpartyPayeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterCounterpartyPayeeResponse.Merge(m, src) } -func (m *MsgRegisterCounterpartyAddressResponse) XXX_Size() int { +func (m *MsgRegisterCounterpartyPayeeResponse) XXX_Size() int { return m.Size() } -func (m *MsgRegisterCounterpartyAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterCounterpartyAddressResponse.DiscardUnknown(m) +func (m *MsgRegisterCounterpartyPayeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterCounterpartyPayeeResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgRegisterCounterpartyAddressResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterCounterpartyPayeeResponse proto.InternalMessageInfo // MsgPayPacketFee defines the request type for the PayPacketFee rpc // This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be @@ -131,7 +213,7 @@ func (m *MsgPayPacketFee) Reset() { *m = MsgPayPacketFee{} } func (m *MsgPayPacketFee) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFee) ProtoMessage() {} func (*MsgPayPacketFee) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{2} + return fileDescriptor_05c93128649f1b96, []int{4} } func (m *MsgPayPacketFee) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,7 +250,7 @@ func (m *MsgPayPacketFeeResponse) Reset() { *m = MsgPayPacketFeeResponse func (m *MsgPayPacketFeeResponse) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeResponse) ProtoMessage() {} func (*MsgPayPacketFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{3} + return fileDescriptor_05c93128649f1b96, []int{5} } func (m *MsgPayPacketFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -210,7 +292,7 @@ func (m *MsgPayPacketFeeAsync) Reset() { *m = MsgPayPacketFeeAsync{} } func (m *MsgPayPacketFeeAsync) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeAsync) ProtoMessage() {} func (*MsgPayPacketFeeAsync) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{4} + return fileDescriptor_05c93128649f1b96, []int{6} } func (m *MsgPayPacketFeeAsync) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +329,7 @@ func (m *MsgPayPacketFeeAsyncResponse) Reset() { *m = MsgPayPacketFeeAsy func (m *MsgPayPacketFeeAsyncResponse) String() string { return proto.CompactTextString(m) } func (*MsgPayPacketFeeAsyncResponse) ProtoMessage() {} func (*MsgPayPacketFeeAsyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_05c93128649f1b96, []int{5} + return fileDescriptor_05c93128649f1b96, []int{7} } func (m *MsgPayPacketFeeAsyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -277,8 +359,10 @@ func (m *MsgPayPacketFeeAsyncResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgPayPacketFeeAsyncResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterCounterpartyAddress)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyAddress") - proto.RegisterType((*MsgRegisterCounterpartyAddressResponse)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyAddressResponse") + proto.RegisterType((*MsgRegisterPayee)(nil), "ibc.applications.fee.v1.MsgRegisterPayee") + proto.RegisterType((*MsgRegisterPayeeResponse)(nil), "ibc.applications.fee.v1.MsgRegisterPayeeResponse") + proto.RegisterType((*MsgRegisterCounterpartyPayee)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyPayee") + proto.RegisterType((*MsgRegisterCounterpartyPayeeResponse)(nil), "ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse") proto.RegisterType((*MsgPayPacketFee)(nil), "ibc.applications.fee.v1.MsgPayPacketFee") proto.RegisterType((*MsgPayPacketFeeResponse)(nil), "ibc.applications.fee.v1.MsgPayPacketFeeResponse") proto.RegisterType((*MsgPayPacketFeeAsync)(nil), "ibc.applications.fee.v1.MsgPayPacketFeeAsync") @@ -288,47 +372,51 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/tx.proto", fileDescriptor_05c93128649f1b96) } var fileDescriptor_05c93128649f1b96 = []byte{ - // 630 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x4f, 0xdb, 0x40, - 0x10, 0x8d, 0x09, 0xa5, 0x64, 0x8b, 0x4a, 0xb3, 0x85, 0x62, 0x0c, 0xb5, 0xa9, 0x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6, 0x56, 0x22, 0xbb, 0xdb, 0xd9, 0xd5, 0x47, 0xa1, 0x74, 0xeb, 0x29, - 0x19, 0x71, 0xdb, 0x36, 0x42, 0x99, 0xc2, 0x53, 0xcf, 0x91, 0xab, 0x09, 0xd3, 0xe2, 0x20, 0xd6, - 0xea, 0x19, 0x53, 0x91, 0xd3, 0xad, 0x5a, 0x76, 0x38, 0x72, 0x76, 0x67, 0xbf, 0x5d, 0x68, 0x95, - 0x3f, 0x17, 0x5a, 0x45, 0x6f, 0xa0, 0x97, 0x93, 0xfb, 0xb1, 0x80, 0x07, 0xd4, 0xe7, 0xa0, 0x9f, - 0x4f, 0xa1, 0xf9, 0x63, 0xee, 0x9e, 0xd8, 0xd1, 0x89, 0x4d, 0x3e, 0x43, 0x78, 0x08, 0x80, 0xb7, - 0x51, 0xb5, 0x0d, 0x90, 0xf4, 0xf9, 0x68, 0x73, 0xd5, 0x18, 0x33, 0x11, 0xe3, 0x10, 0xa0, 0x39, - 0x7d, 0x19, 0x6b, 0x15, 0x4b, 0xc0, 0xf1, 0x1e, 0x7a, 0xcc, 0x69, 0x8f, 0x11, 0x38, 0x0d, 0x28, - 0x0b, 0x85, 0xee, 0xd4, 0x81, 0xe5, 0x41, 0xac, 0x2d, 0xa6, 0xba, 0x87, 0xf3, 0xba, 0x35, 0x97, - 0x06, 0x4e, 0x28, 0x0b, 0x8f, 0x1c, 0xfc, 0x16, 0xd5, 0x33, 0xc0, 0x9d, 0xde, 0x57, 0x07, 0xb1, - 0x26, 0x0f, 0x71, 0x94, 0x2d, 0x98, 0x4f, 0x63, 0x07, 0xb9, 0x11, 0xf8, 0x19, 0x9a, 0xe1, 0x9e, - 0xeb, 0x03, 0x93, 0xa7, 0x93, 0x59, 0x65, 0x27, 0xac, 0xa0, 0x59, 0x06, 0x1d, 0x3b, 0x02, 0xc6, - 0xe5, 0x07, 0x6b, 0xd5, 0x46, 0xcd, 0x2a, 0xce, 0x25, 0xf3, 0x96, 0xd1, 0xd2, 0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, 0x9a, 0x84, 0xf2, 0x2e, 0xe5, 0xa6, 0xd7, 0x22, 0xeb, 0x2e, 0x35, 0xfb, 0x5b, - 0x66, 0x97, 0x3a, 0xbd, 0x0e, 0x70, 0xf1, 0x50, 0x72, 0x73, 0xf3, 0xcd, 0xba, 0x78, 0x23, 0xc3, - 0x28, 0x00, 0xde, 0x9a, 0x49, 0x1e, 0xc0, 0xad, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xf7, - 0x58, 0xab, 0x99, 0x05, 0x00, 0x00, + // 695 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x9b, 0xfe, 0x65, 0x5a, 0xda, 0x66, 0xd5, 0x52, 0xc7, 0x6a, 0xe3, 0x62, 0x21, 0x54, + 0x84, 0x6a, 0x93, 0xd0, 0x1c, 0xa8, 0x84, 0x10, 0xa9, 0x54, 0x51, 0x89, 0x8a, 0xc8, 0xe2, 0x84, + 0x90, 0x2a, 0xc7, 0xd9, 0xb8, 0x86, 0xc4, 0x6b, 0x79, 0x9d, 0x08, 0xbf, 0x01, 0xc7, 0xf2, 0x06, + 0x7d, 0x03, 0x5e, 0xa3, 0xc7, 0x1e, 0x38, 0x70, 0xb2, 0x50, 0x7b, 0xe1, 0x86, 0x14, 0x5e, 0x00, + 0xad, 0xbd, 0x36, 0x4e, 0xa2, 0x54, 0x81, 0x13, 0xb7, 0x9d, 0x99, 0x6f, 0xbe, 0x9d, 0xf9, 0x3c, + 0xe3, 0x85, 0x1d, 0xbb, 0x69, 0x6a, 0x86, 0xeb, 0x76, 0x6c, 0xd3, 0xf0, 0x6d, 0xe2, 0x50, 0xad, + 0x8d, 0xb1, 0xd6, 0xaf, 0x68, 0xfe, 0x47, 0xd5, 0xf5, 0x88, 0x4f, 0xd0, 0xa6, 0xdd, 0x34, 0xd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8b, 0x69, 0x73, 0x3e, 0x7a, 0x5a, 0x9e, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x2a, + 0x83, 0xa4, 0x70, 0xf3, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -343,12 +431,18 @@ 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 { - // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterpartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterpartyAddressResponse, error) + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + // the source chain from which packets originate as this is where fee distribution takes place. This function may be + // called more than once by a relayer, in which case, the latest payee is always used. + RegisterPayee(ctx context.Context, in *MsgRegisterPayee, opts ...grpc.CallOption) (*MsgRegisterPayeeResponse, error) + // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + // payee address before relaying. This ensures they will be properly compensated for forward relaying since + // the destination chain must include the registered counterparty payee address in the acknowledgement. This function + // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + RegisterCounterpartyPayee(ctx context.Context, in *MsgRegisterCounterpartyPayee, opts ...grpc.CallOption) (*MsgRegisterCounterpartyPayeeResponse, error) // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the packet at the next sequence @@ -369,9 +463,18 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) RegisterCounterpartyAddress(ctx context.Context, in *MsgRegisterCounterpartyAddress, opts ...grpc.CallOption) (*MsgRegisterCounterpartyAddressResponse, error) { - out := new(MsgRegisterCounterpartyAddressResponse) - err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterCounterpartyAddress", in, out, opts...) +func (c *msgClient) RegisterPayee(ctx context.Context, in *MsgRegisterPayee, opts ...grpc.CallOption) (*MsgRegisterPayeeResponse, error) { + out := new(MsgRegisterPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterPayee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterCounterpartyPayee(ctx context.Context, in *MsgRegisterCounterpartyPayee, opts ...grpc.CallOption) (*MsgRegisterCounterpartyPayeeResponse, error) { + out := new(MsgRegisterCounterpartyPayeeResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", in, out, opts...) if err != nil { return nil, err } @@ -398,12 +501,18 @@ func (c *msgClient) PayPacketFeeAsync(ctx context.Context, in *MsgPayPacketFeeAs // MsgServer is the server API for Msg service. type MsgServer interface { - // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - RegisterCounterpartyAddress(context.Context, *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterpartyAddressResponse, error) + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + // the source chain from which packets originate as this is where fee distribution takes place. This function may be + // called more than once by a relayer, in which case, the latest payee is always used. + RegisterPayee(context.Context, *MsgRegisterPayee) (*MsgRegisterPayeeResponse, error) + // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + // payee address before relaying. This ensures they will be properly compensated for forward relaying since + // the destination chain must include the registered counterparty payee address in the acknowledgement. This function + // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + RegisterCounterpartyPayee(context.Context, *MsgRegisterCounterpartyPayee) (*MsgRegisterCounterpartyPayeeResponse, error) // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to // incentivize the relaying of the packet at the next sequence @@ -420,8 +529,11 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) RegisterCounterpartyAddress(ctx context.Context, req *MsgRegisterCounterpartyAddress) (*MsgRegisterCounterpartyAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterpartyAddress not implemented") +func (*UnimplementedMsgServer) RegisterPayee(ctx context.Context, req *MsgRegisterPayee) (*MsgRegisterPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterPayee not implemented") +} +func (*UnimplementedMsgServer) RegisterCounterpartyPayee(ctx context.Context, req *MsgRegisterCounterpartyPayee) (*MsgRegisterCounterpartyPayeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterCounterpartyPayee not implemented") } func (*UnimplementedMsgServer) PayPacketFee(ctx context.Context, req *MsgPayPacketFee) (*MsgPayPacketFeeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PayPacketFee not implemented") @@ -434,20 +546,38 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_RegisterCounterpartyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterCounterpartyAddress) +func _Msg_RegisterPayee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterPayee) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterPayee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.fee.v1.Msg/RegisterPayee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterPayee(ctx, req.(*MsgRegisterPayee)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterCounterpartyPayee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterCounterpartyPayee) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RegisterCounterpartyAddress(ctx, in) + return srv.(MsgServer).RegisterCounterpartyPayee(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ibc.applications.fee.v1.Msg/RegisterCounterpartyAddress", + FullMethod: "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterCounterpartyAddress(ctx, req.(*MsgRegisterCounterpartyAddress)) + return srv.(MsgServer).RegisterCounterpartyPayee(ctx, req.(*MsgRegisterCounterpartyPayee)) } return interceptor(ctx, in, info, handler) } @@ -493,8 +623,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "RegisterCounterpartyAddress", - Handler: _Msg_RegisterCounterpartyAddress_Handler, + MethodName: "RegisterPayee", + Handler: _Msg_RegisterPayee_Handler, + }, + { + MethodName: "RegisterCounterpartyPayee", + Handler: _Msg_RegisterCounterpartyPayee_Handler, }, { MethodName: "PayPacketFee", @@ -509,7 +643,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "ibc/applications/fee/v1/tx.proto", } -func (m *MsgRegisterCounterpartyAddress) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterPayee) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -519,41 +653,122 @@ func (m *MsgRegisterCounterpartyAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRegisterCounterpartyAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterPayee) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterCounterpartyAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterPayee) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Payee) > 0 { + i -= len(m.Payee) + copy(dAtA[i:], m.Payee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Payee))) + i-- + dAtA[i] = 0x22 + } + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayer))) + i-- + dAtA[i] = 0x1a + } if len(m.ChannelId) > 0 { i -= len(m.ChannelId) copy(dAtA[i:], m.ChannelId) i = encodeVarintTx(dAtA, i, uint64(len(m.ChannelId))) i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterPayeeResponse) 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 *MsgRegisterPayeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRegisterCounterpartyPayee) 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 *MsgRegisterCounterpartyPayee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterCounterpartyPayee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CounterpartyPayee) > 0 { + i -= len(m.CounterpartyPayee) + copy(dAtA[i:], m.CounterpartyPayee) + i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyPayee))) + i-- + dAtA[i] = 0x22 + } + if len(m.Relayer) > 0 { + i -= len(m.Relayer) + copy(dAtA[i:], m.Relayer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Relayer))) + i-- dAtA[i] = 0x1a } - if len(m.CounterpartyAddress) > 0 { - i -= len(m.CounterpartyAddress) - copy(dAtA[i:], m.CounterpartyAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CounterpartyAddress))) + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintTx(dAtA, i, uint64(len(m.PortId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgRegisterCounterpartyAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterCounterpartyPayeeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -563,12 +778,12 @@ func (m *MsgRegisterCounterpartyAddressResponse) Marshal() (dAtA []byte, err err return dAtA[:n], nil } -func (m *MsgRegisterCounterpartyAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyPayeeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterCounterpartyAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterCounterpartyPayeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -739,17 +954,47 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgRegisterCounterpartyAddress) Size() (n int) { +func (m *MsgRegisterPayee) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Relayer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.CounterpartyAddress) + l = len(m.Payee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterPayeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRegisterCounterpartyPayee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -757,10 +1002,18 @@ func (m *MsgRegisterCounterpartyAddress) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Relayer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.CounterpartyPayee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } -func (m *MsgRegisterCounterpartyAddressResponse) Size() (n int) { +func (m *MsgRegisterCounterpartyPayeeResponse) Size() (n int) { if m == nil { return 0 } @@ -835,7 +1088,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterPayee) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -858,15 +1111,15 @@ func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterCounterpartyAddress: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterPayee: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterpartyAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterPayee: 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 PortId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -894,11 +1147,11 @@ func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.PortId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -926,9 +1179,205 @@ func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CounterpartyAddress = string(dAtA[iNdEx:postIndex]) + m.ChannelId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", 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.Relayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payee", 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.Payee = 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 *MsgRegisterPayeeResponse) 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: MsgRegisterPayeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterPayeeResponse: 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 (m *MsgRegisterCounterpartyPayee) 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: MsgRegisterCounterpartyPayee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterCounterpartyPayee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) } @@ -960,6 +1409,70 @@ func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { } m.ChannelId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relayer", 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.Relayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyPayee", 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.CounterpartyPayee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -981,7 +1494,7 @@ func (m *MsgRegisterCounterpartyAddress) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRegisterCounterpartyAddressResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterCounterpartyPayeeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1004,10 +1517,10 @@ func (m *MsgRegisterCounterpartyAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterCounterpartyAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterCounterpartyPayeeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterCounterpartyAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterCounterpartyPayeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/modules/apps/transfer/client/cli/cli.go b/modules/apps/transfer/client/cli/cli.go index de83f4d4736..52102df81a1 100644 --- a/modules/apps/transfer/client/cli/cli.go +++ b/modules/apps/transfer/client/cli/cli.go @@ -1,9 +1,8 @@ package cli import ( - "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" ) // GetQueryCmd returns the query commands for IBC connections diff --git a/modules/apps/transfer/client/cli/query.go b/modules/apps/transfer/client/cli/query.go index 3239b154377..55908976b56 100644 --- a/modules/apps/transfer/client/cli/query.go +++ b/modules/apps/transfer/client/cli/query.go @@ -8,16 +8,16 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) -// GetCmdQueryDenomTrace defines the command to query a a denomination trace from a given hash. +// GetCmdQueryDenomTrace defines the command to query a a denomination trace from a given trace hash or ibc denom. func GetCmdQueryDenomTrace() *cobra.Command { cmd := &cobra.Command{ - Use: "denom-trace [hash]", - Short: "Query the denom trace info from a given trace hash", - Long: "Query the denom trace info from a given trace hash", - Example: fmt.Sprintf("%s query ibc-transfer denom-trace [hash]", version.AppName), + Use: "denom-trace [hash/denom]", + Short: "Query the denom trace info from a given trace hash or ibc denom", + Long: "Query the denom trace info from a given trace hash or ibc denom", + Example: fmt.Sprintf("%s query ibc-transfer denom-trace 27A6394C3F9FF9C9DCF5DFFADF9BB5FE9A37C7E92B006199894CF1824DF9AC7C", version.AppName), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -142,7 +142,7 @@ func GetCmdQueryDenomHash() *cobra.Command { Use: "denom-hash [trace]", Short: "Query the denom hash info from a given denom trace", Long: "Query the denom hash info from a given denom trace", - Example: fmt.Sprintf("%s query ibc-transfer denom-hash [denom_trace]", version.AppName), + Example: fmt.Sprintf("%s query ibc-transfer denom-hash transfer/channel-0/uatom", version.AppName), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) diff --git a/modules/apps/transfer/client/cli/tx.go b/modules/apps/transfer/client/cli/tx.go index 02e006be5eb..5d985cb94e7 100644 --- a/modules/apps/transfer/client/cli/tx.go +++ b/modules/apps/transfer/client/cli/tx.go @@ -13,9 +13,9 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channelutils "github.com/cosmos/ibc-go/v3/modules/core/04-channel/client/utils" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channelutils "github.com/cosmos/ibc-go/v5/modules/core/04-channel/client/utils" ) const ( diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index f5ed807d8b2..e2e5044f884 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -3,17 +3,18 @@ package transfer import ( "fmt" "math" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // IBCModule implements the ICS26 interface for transfer given the transfer keeper. @@ -70,21 +71,25 @@ func (im IBCModule) OnChanOpenInit( chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { if err := ValidateTransferChannelParams(ctx, im.keeper, order, portID, channelID); err != nil { - return err + return "", err + } + + if strings.TrimSpace(version) == "" { + version = types.Version } if version != types.Version { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.Version) + return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.Version) } // Claim channel capability passed back by IBC module if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err + return "", err } - return nil + return version, nil } // OnChanOpenTry implements the IBCModule interface. @@ -106,15 +111,9 @@ func (im IBCModule) OnChanOpenTry( return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version) } - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos - // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) - // If module can already authenticate the capability then module already owns it so we don't need to claim - // Otherwise, module does not have channel capability and we must claim it from IBC - if !im.keeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { - // Only claim channel capability passed back by IBC module if we do not already own it - if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", err - } + // OpenTry must claim the channelCapability that IBC passes into the callback + if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { + return "", err } return types.Version, nil @@ -173,8 +172,10 @@ func (im IBCModule) OnRecvPacket( ack := channeltypes.NewResultAcknowledgement([]byte{byte(1)}) var data types.FungibleTokenPacketData + var ackErr error if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { - ack = channeltypes.NewErrorAcknowledgement("cannot unmarshal ICS-20 transfer packet data") + ackErr = sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot unmarshal ICS-20 transfer packet data") + ack = channeltypes.NewErrorAcknowledgement(ackErr) } // only attempt the application logic if the packet data @@ -182,18 +183,28 @@ func (im IBCModule) OnRecvPacket( if ack.Success() { err := im.keeper.OnRecvPacket(ctx, packet, data) if err != nil { - ack = types.NewErrorAcknowledgement(err) + ack = channeltypes.NewErrorAcknowledgement(err) + ackErr = err } } + eventAttributes := []sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), + sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), + sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), + sdk.NewAttribute(types.AttributeKeyAmount, data.Amount), + sdk.NewAttribute(types.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())), + } + + if ackErr != nil { + eventAttributes = append(eventAttributes, sdk.NewAttribute(types.AttributeKeyAckError, ackErr.Error())) + } + ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypePacket, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), - sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), - sdk.NewAttribute(types.AttributeKeyAmount, data.Amount), - sdk.NewAttribute(types.AttributeKeyAckSuccess, fmt.Sprintf("%t", ack.Success())), + eventAttributes..., ), ) @@ -225,6 +236,7 @@ func (im IBCModule) OnAcknowledgementPacket( sdk.NewEvent( types.EventTypePacket, sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, data.Sender), sdk.NewAttribute(types.AttributeKeyReceiver, data.Receiver), sdk.NewAttribute(types.AttributeKeyDenom, data.Denom), sdk.NewAttribute(types.AttributeKeyAmount, data.Amount), diff --git a/modules/apps/transfer/ibc_module_test.go b/modules/apps/transfer/ibc_module_test.go index 3dcb5518cbb..0f741931780 100644 --- a/modules/apps/transfer/ibc_module_test.go +++ b/modules/apps/transfer/ibc_module_test.go @@ -5,10 +5,11 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TransferTestSuite) TestOnChanOpenInit() { @@ -24,10 +25,14 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() { malleate func() expPass bool }{ - { "success", func() {}, true, }, + { + "empty version string", func() { + channel.Version = "" + }, true, + }, { "max channels reached", func() { path.EndpointA.ChannelID = channeltypes.FormatChannelIdentifier(math.MaxUint32 + 1) @@ -74,27 +79,24 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() { Version: types.Version, } - module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.TransferPort) - suite.Require().NoError(err) - + var err error chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(ibctesting.TransferPort, path.EndpointA.ChannelID)) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) - suite.Require().True(ok) - tc.malleate() // explicitly change fields in channel and testChannel - err = cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), + transferModule := transfer.NewIBCModule(suite.chainA.GetSimApp().TransferKeeper) + version, err := transferModule.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.GetConnectionHops(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, chanCap, counterparty, channel.GetVersion(), ) if tc.expPass { suite.Require().NoError(err) + suite.Require().Equal(types.Version, version) } else { suite.Require().Error(err) + suite.Require().Equal(version, "") } - }) } } @@ -113,7 +115,6 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -123,10 +124,10 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { }, false, }, { - "capability already claimed in INIT should pass", func() { + "capability already claimed", func() { err := suite.chainA.GetSimApp().ScopedTransferKeeper.ClaimCapability(suite.chainA.GetContext(), chanCap, host.ChannelCapabilityPath(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)) suite.Require().NoError(err) - }, true, + }, false, }, { "invalid order - ORDERED", func() { @@ -187,7 +188,6 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { suite.Require().Error(err) suite.Require().Equal("", version) } - }) } } @@ -200,7 +200,6 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { malleate func() expPass bool }{ - { "success", func() {}, true, }, @@ -237,7 +236,6 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { } else { suite.Require().Error(err) } - }) } } diff --git a/modules/apps/transfer/keeper/MBT_README.md b/modules/apps/transfer/keeper/MBT_README.md index 3cad1e58993..c2a62599f36 100644 --- a/modules/apps/transfer/keeper/MBT_README.md +++ b/modules/apps/transfer/keeper/MBT_README.md @@ -36,7 +36,7 @@ and executed automatically. The easiest way to run Apalache is by -[using a Docker image](https://github.com/informalsystems/apalache/blob/master/docs/manual.md#useDocker); +[using a Docker image](https://apalache.informal.systems/docs/apalache/installation/docker.html); to run Jsonatr you need to locally clone the repository, and then, after building it, add the `target/debug` directory into your `PATH`. diff --git a/modules/apps/transfer/keeper/encoding.go b/modules/apps/transfer/keeper/encoding.go index 7e0333849d4..8e4bdf15c6c 100644 --- a/modules/apps/transfer/keeper/encoding.go +++ b/modules/apps/transfer/keeper/encoding.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // UnmarshalDenomTrace attempts to decode and return an DenomTrace object from diff --git a/modules/apps/transfer/keeper/genesis.go b/modules/apps/transfer/keeper/genesis.go index d4020508cc9..8a01fb45fb2 100644 --- a/modules/apps/transfer/keeper/genesis.go +++ b/modules/apps/transfer/keeper/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // InitGenesis initializes the ibc-transfer state and binds to PortID. diff --git a/modules/apps/transfer/keeper/genesis_test.go b/modules/apps/transfer/keeper/genesis_test.go index a8ded3f902d..f3a030a8ba4 100644 --- a/modules/apps/transfer/keeper/genesis_test.go +++ b/modules/apps/transfer/keeper/genesis_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "fmt" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) func (suite *KeeperTestSuite) TestGenesis() { diff --git a/modules/apps/transfer/keeper/grpc_query.go b/modules/apps/transfer/keeper/grpc_query.go index e0b16c6a761..6acfa42dd48 100644 --- a/modules/apps/transfer/keeper/grpc_query.go +++ b/modules/apps/transfer/keeper/grpc_query.go @@ -3,6 +3,7 @@ package keeper import ( "context" "fmt" + "strings" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,7 +12,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) var _ types.QueryServer = Keeper{} @@ -22,9 +23,9 @@ func (q Keeper) DenomTrace(c context.Context, req *types.QueryDenomTraceRequest) return nil, status.Error(codes.InvalidArgument, "empty request") } - hash, err := types.ParseHexHash(req.Hash) + hash, err := types.ParseHexHash(strings.TrimPrefix(req.Hash, "ibc/")) if err != nil { - return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid denom trace hash %s, %s", req.Hash, err)) + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid denom trace hash: %s, error: %s", hash.String(), err)) } ctx := sdk.UnwrapSDKContext(c) @@ -61,7 +62,6 @@ func (q Keeper) DenomTraces(c context.Context, req *types.QueryDenomTracesReques traces = append(traces, result) return nil }) - if err != nil { return nil, err } @@ -108,3 +108,16 @@ func (q Keeper) DenomHash(c context.Context, req *types.QueryDenomHashRequest) ( Hash: denomHash.String(), }, nil } + +// EscrowAddress implements the EscrowAddress gRPC method +func (q Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + addr := types.GetEscrowAddress(req.PortId, req.ChannelId) + + return &types.QueryEscrowAddressResponse{ + EscrowAddress: addr.String(), + }, nil +} diff --git a/modules/apps/transfer/keeper/grpc_query_test.go b/modules/apps/transfer/keeper/grpc_query_test.go index 34563447b5f..5a042444f0f 100644 --- a/modules/apps/transfer/keeper/grpc_query_test.go +++ b/modules/apps/transfer/keeper/grpc_query_test.go @@ -6,7 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestQueryDenomTrace() { @@ -21,37 +22,50 @@ func (suite *KeeperTestSuite) TestQueryDenomTrace() { expPass bool }{ { - "invalid hex hash", + "success: correct ibc denom", func() { + expTrace.Path = "transfer/channelToA/transfer/channelToB" + expTrace.BaseDenom = "uatom" + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace(suite.chainA.GetContext(), expTrace) + req = &types.QueryDenomTraceRequest{ - Hash: "!@#!@#!", + Hash: expTrace.IBCDenom(), } }, - false, + true, }, { - "not found denom trace", + "success: correct hex hash", func() { expTrace.Path = "transfer/channelToA/transfer/channelToB" expTrace.BaseDenom = "uatom" + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace(suite.chainA.GetContext(), expTrace) + req = &types.QueryDenomTraceRequest{ Hash: expTrace.Hash().String(), } }, + true, + }, + { + "failure: invalid hash", + func() { + req = &types.QueryDenomTraceRequest{ + Hash: "!@#!@#!", + } + }, false, }, { - "success", + "failure: not found denom trace", func() { expTrace.Path = "transfer/channelToA/transfer/channelToB" expTrace.BaseDenom = "uatom" - suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace(suite.chainA.GetContext(), expTrace) - req = &types.QueryDenomTraceRequest{ - Hash: expTrace.Hash().String(), + Hash: expTrace.IBCDenom(), } }, - true, + false, }, } @@ -143,7 +157,6 @@ func (suite *KeeperTestSuite) TestQueryParams() { } func (suite *KeeperTestSuite) TestQueryDenomHash() { - reqTrace := types.DenomTrace{ Path: "transfer/channelToA/transfer/channelToB", BaseDenom: "uatom", @@ -208,3 +221,43 @@ func (suite *KeeperTestSuite) TestQueryDenomHash() { }) } } + +func (suite *KeeperTestSuite) TestEscrowAddress() { + var req *types.QueryEscrowAddressRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "success", + func() { + req = &types.QueryEscrowAddressRequest{ + PortId: ibctesting.TransferPort, + ChannelId: ibctesting.FirstChannelID, + } + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + + res, err := suite.queryClient.EscrowAddress(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + expected := types.GetEscrowAddress(ibctesting.TransferPort, ibctesting.FirstChannelID).String() + suite.Require().Equal(expected, res.EscrowAddress) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/modules/apps/transfer/keeper/keeper.go b/modules/apps/transfer/keeper/keeper.go index d3f32d95df7..b5e0a9d9978 100644 --- a/modules/apps/transfer/keeper/keeper.go +++ b/modules/apps/transfer/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" @@ -10,13 +11,13 @@ import ( tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // Keeper defines the IBC fungible transfer keeper type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec paramSpace paramtypes.Subspace @@ -30,11 +31,10 @@ type Keeper struct { // NewKeeper creates a new IBC transfer Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) Keeper { - // ensure ibc transfer module account is set if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic("the IBC transfer module account has not been set") diff --git a/modules/apps/transfer/keeper/keeper_test.go b/modules/apps/transfer/keeper/keeper_test.go index 40ceb6d782f..82d6b511855 100644 --- a/modules/apps/transfer/keeper/keeper_test.go +++ b/modules/apps/transfer/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type KeeperTestSuite struct { diff --git a/modules/apps/transfer/keeper/mbt_relay_test.go b/modules/apps/transfer/keeper/mbt_relay_test.go index 3caef9aa5f9..6a4706f9f5a 100644 --- a/modules/apps/transfer/keeper/mbt_relay_test.go +++ b/modules/apps/transfer/keeper/mbt_relay_test.go @@ -11,14 +11,15 @@ import ( "strconv" "strings" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type TlaBalance struct { @@ -86,7 +87,7 @@ type Balance struct { Id string Address string Denom string - Amount sdk.Int + Amount math.Int } func AddressFromString(address string) string { @@ -163,12 +164,12 @@ func OnRecvPacketTestCaseFromTla(tc TlaOnRecvPacketTestCase) OnRecvPacketTestCas var addressMap = make(map[string]string) type Bank struct { - balances map[OwnedCoin]sdk.Int + balances map[OwnedCoin]math.Int } // Make an empty bank func MakeBank() Bank { - return Bank{balances: make(map[OwnedCoin]sdk.Int)} + return Bank{balances: make(map[OwnedCoin]math.Int)} } // Subtract other bank from this bank @@ -191,7 +192,7 @@ func (bank *Bank) Sub(other *Bank) Bank { } // Set specific bank balance -func (bank *Bank) SetBalance(address string, denom string, amount sdk.Int) { +func (bank *Bank) SetBalance(address string, denom string, amount math.Int) { bank.balances[OwnedCoin{address, denom}] = amount } @@ -280,7 +281,7 @@ func (suite *KeeperTestSuite) TestModelBasedRelay() { panic(fmt.Errorf("Failed to read model-based test files: %w", err)) } for _, file_info := range files { - var tlaTestCases = []TlaOnRecvPacketTestCase{} + tlaTestCases := []TlaOnRecvPacketTestCase{} if !strings.HasSuffix(file_info.Name(), ".json") { continue } @@ -360,7 +361,7 @@ func (suite *KeeperTestSuite) TestModelBasedRelay() { registerDenom() err = suite.chainB.GetSimApp().TransferKeeper.OnAcknowledgementPacket( suite.chainB.GetContext(), packet, tc.packet.Data, - channeltypes.NewErrorAcknowledgement("MBT Error Acknowledgement")) + channeltypes.NewErrorAcknowledgement(fmt.Errorf("MBT Error Acknowledgement"))) default: err = fmt.Errorf("Unknown handler: %s", tc.handler) } diff --git a/modules/apps/transfer/keeper/migrations.go b/modules/apps/transfer/keeper/migrations.go new file mode 100644 index 00000000000..0bd08cab2c2 --- /dev/null +++ b/modules/apps/transfer/keeper/migrations.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper Keeper +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper Keeper) Migrator { + return Migrator{keeper: keeper} +} + +// MigrateTraces migrates the DenomTraces to the correct format, accounting for slashes in the BaseDenom. +func (m Migrator) MigrateTraces(ctx sdk.Context) error { + // list of traces that must replace the old traces in store + var newTraces []types.DenomTrace + m.keeper.IterateDenomTraces(ctx, + func(dt types.DenomTrace) (stop bool) { + // check if the new way of splitting FullDenom + // is the same as the current DenomTrace. + // If it isn't then store the new DenomTrace in the list of new traces. + newTrace := types.ParseDenomTrace(dt.GetFullDenomPath()) + err := newTrace.Validate() + if err != nil { + panic(err) + } + + if dt.IBCDenom() != newTrace.IBCDenom() { + // The new form of parsing will result in a token denomination change. + // A bank migration is required. A panic should occur to prevent the + // chain from using corrupted state. + panic(fmt.Sprintf("migration will result in corrupted state. Previous IBC token (%s) requires a bank migration. Expected denom trace (%s)", dt, newTrace)) + } + + if !equalTraces(newTrace, dt) { + newTraces = append(newTraces, newTrace) + } + return false + }) + + // replace the outdated traces with the new trace information + for _, nt := range newTraces { + m.keeper.SetDenomTrace(ctx, nt) + } + return nil +} + +func equalTraces(dtA, dtB types.DenomTrace) bool { + return dtA.BaseDenom == dtB.BaseDenom && dtA.Path == dtB.Path +} diff --git a/modules/apps/transfer/keeper/migrations_test.go b/modules/apps/transfer/keeper/migrations_test.go new file mode 100644 index 00000000000..71532a4a37c --- /dev/null +++ b/modules/apps/transfer/keeper/migrations_test.go @@ -0,0 +1,121 @@ +package keeper_test + +import ( + "fmt" + + transferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" +) + +func (suite *KeeperTestSuite) TestMigratorMigrateTraces() { + testCases := []struct { + msg string + malleate func() + expectedTraces transfertypes.Traces + }{ + { + "success: two slashes in base denom", + func() { + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace( + suite.chainA.GetContext(), + transfertypes.DenomTrace{ + BaseDenom: "pool/1", Path: "transfer/channel-0/gamm", + }) + }, + transfertypes.Traces{ + { + BaseDenom: "gamm/pool/1", Path: "transfer/channel-0", + }, + }, + }, + { + "success: one slash in base denom", + func() { + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace( + suite.chainA.GetContext(), + transfertypes.DenomTrace{ + BaseDenom: "0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA", Path: "transfer/channel-149/erc", + }) + }, + transfertypes.Traces{ + { + BaseDenom: "erc/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA", Path: "transfer/channel-149", + }, + }, + }, + { + "success: multiple slashes in a row in base denom", + func() { + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace( + suite.chainA.GetContext(), + transfertypes.DenomTrace{ + BaseDenom: "1", Path: "transfer/channel-5/gamm//pool", + }) + }, + transfertypes.Traces{ + { + BaseDenom: "gamm//pool/1", Path: "transfer/channel-5", + }, + }, + }, + { + "success: multihop base denom", + func() { + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace( + suite.chainA.GetContext(), + transfertypes.DenomTrace{ + BaseDenom: "transfer/channel-1/uatom", Path: "transfer/channel-0", + }) + }, + transfertypes.Traces{ + { + BaseDenom: "uatom", Path: "transfer/channel-0/transfer/channel-1", + }, + }, + }, + { + "success: non-standard port", + func() { + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace( + suite.chainA.GetContext(), + transfertypes.DenomTrace{ + BaseDenom: "customport/channel-7/uatom", Path: "transfer/channel-0/transfer/channel-1", + }) + }, + transfertypes.Traces{ + { + BaseDenom: "uatom", Path: "transfer/channel-0/transfer/channel-1/customport/channel-7", + }, + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() // explicitly set up denom traces + + migrator := transferkeeper.NewMigrator(suite.chainA.GetSimApp().TransferKeeper) + err := migrator.MigrateTraces(suite.chainA.GetContext()) + suite.Require().NoError(err) + + traces := suite.chainA.GetSimApp().TransferKeeper.GetAllDenomTraces(suite.chainA.GetContext()) + suite.Require().Equal(tc.expectedTraces, traces) + }) + } +} + +func (suite *KeeperTestSuite) TestMigratorMigrateTracesCorruptionDetection() { + // IBCDenom() previously would return "customport/channel-0/uatom", but now should return ibc/{hash} + corruptedDenomTrace := transfertypes.DenomTrace{ + BaseDenom: "customport/channel-0/uatom", + Path: "", + } + suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace(suite.chainA.GetContext(), corruptedDenomTrace) + + migrator := transferkeeper.NewMigrator(suite.chainA.GetSimApp().TransferKeeper) + suite.Panics(func() { + migrator.MigrateTraces(suite.chainA.GetContext()) + }) +} diff --git a/modules/apps/transfer/keeper/msg_server.go b/modules/apps/transfer/keeper/msg_server.go index 5d8e5682200..219990c957d 100644 --- a/modules/apps/transfer/keeper/msg_server.go +++ b/modules/apps/transfer/keeper/msg_server.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) var _ types.MsgServer = Keeper{} diff --git a/modules/apps/transfer/keeper/params.go b/modules/apps/transfer/keeper/params.go index b88a1b93b69..e618316cfb1 100644 --- a/modules/apps/transfer/keeper/params.go +++ b/modules/apps/transfer/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // GetSendEnabled retrieves the send enabled boolean from the paramstore diff --git a/modules/apps/transfer/keeper/params_test.go b/modules/apps/transfer/keeper/params_test.go index c0c7ff62af0..6c26b606305 100644 --- a/modules/apps/transfer/keeper/params_test.go +++ b/modules/apps/transfer/keeper/params_test.go @@ -1,6 +1,6 @@ package keeper_test -import "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" +import "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" func (suite *KeeperTestSuite) TestParams() { expParams := types.DefaultParams() diff --git a/modules/apps/transfer/keeper/relay.go b/modules/apps/transfer/keeper/relay.go index 3c3a5aa6690..6747ac5cbd7 100644 --- a/modules/apps/transfer/keeper/relay.go +++ b/modules/apps/transfer/keeper/relay.go @@ -4,16 +4,16 @@ import ( "fmt" "strings" - "github.com/armon/go-metrics" + metrics "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" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - coretypes "github.com/cosmos/ibc-go/v3/modules/core/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + coretypes "github.com/cosmos/ibc-go/v5/modules/core/types" ) // SendTransfer handles transfer sending logic. There are 2 possible cases: @@ -58,7 +58,6 @@ func (k Keeper) SendTransfer( timeoutHeight clienttypes.Height, timeoutTimestamp uint64, ) error { - if !k.GetSendEnabled(ctx) { return types.ErrSendDisabled } @@ -205,7 +204,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t // parse the transfer amount transferAmount, ok := sdk.NewIntFromString(data.Amount) if !ok { - return sdkerrors.Wrapf(types.ErrInvalidAmount, "unable to parse transfer amount (%s) into sdk.Int", data.Amount) + return sdkerrors.Wrapf(types.ErrInvalidAmount, "unable to parse transfer amount (%s) into math.Int", data.Amount) } labels := []metrics.Label{ @@ -368,7 +367,7 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d // parse the transfer amount transferAmount, ok := sdk.NewIntFromString(data.Amount) if !ok { - return sdkerrors.Wrapf(types.ErrInvalidAmount, "unable to parse transfer amount (%s) into sdk.Int", data.Amount) + return sdkerrors.Wrapf(types.ErrInvalidAmount, "unable to parse transfer amount (%s) into math.Int", data.Amount) } token := sdk.NewCoin(trace.IBCDenom(), transferAmount) diff --git a/modules/apps/transfer/keeper/relay_test.go b/modules/apps/transfer/keeper/relay_test.go index e76c1c1fb29..1e57e3f2236 100644 --- a/modules/apps/transfer/keeper/relay_test.go +++ b/modules/apps/transfer/keeper/relay_test.go @@ -3,14 +3,15 @@ package keeper_test import ( "fmt" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) // test sending from chainA to chainB using both coin that orignate on @@ -28,25 +29,32 @@ func (suite *KeeperTestSuite) TestSendTransfer() { sendFromSource bool expPass bool }{ - {"successful transfer from source chain", + { + "successful transfer from source chain", func() { suite.coordinator.CreateTransferChannels(path) amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) - }, true, true}, - {"successful transfer with coin from counterparty chain", + }, true, true, + }, + { + "successful transfer with coin from counterparty chain", func() { // send coin from chainA back to chainB suite.coordinator.CreateTransferChannels(path) amount = types.GetTransferCoin(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, sdk.DefaultBondDenom, sdk.NewInt(100)) - }, false, true}, - {"source channel not found", + }, false, true, + }, + { + "source channel not found", func() { // channel references wrong ID suite.coordinator.CreateTransferChannels(path) path.EndpointA.ChannelID = ibctesting.InvalidID amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) - }, true, false}, - {"next seq send not found", + }, true, false, + }, + { + "next seq send not found", func() { path.EndpointA.ChannelID = "channel-0" path.EndpointB.ChannelID = "channel-0" @@ -58,22 +66,28 @@ func (suite *KeeperTestSuite) TestSendTransfer() { ) suite.chainA.CreateChannelCapability(suite.chainA.GetSimApp().ScopedIBCMockKeeper, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) - }, true, false}, + }, true, false, + }, // createOutgoingPacket tests // - source chain - {"send coin failed", + { + "send coin failed", func() { suite.coordinator.CreateTransferChannels(path) amount = sdk.NewCoin("randomdenom", sdk.NewInt(100)) - }, true, false}, + }, true, false, + }, // - receiving chain - {"send from module account failed", + { + "send from module account failed", func() { suite.coordinator.CreateTransferChannels(path) amount = types.GetTransferCoin(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, " randomdenom", sdk.NewInt(100)) - }, false, false}, - {"channel capability not found", + }, false, false, + }, + { + "channel capability not found", func() { suite.coordinator.CreateTransferChannels(path) cap := suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) @@ -81,7 +95,8 @@ func (suite *KeeperTestSuite) TestSendTransfer() { // Release channel capability suite.chainA.GetSimApp().ScopedTransferKeeper.ReleaseCapability(suite.chainA.GetContext(), cap) amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) - }, true, false}, + }, true, false, + }, } for _, tc := range testCases { @@ -137,7 +152,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() { func (suite *KeeperTestSuite) TestOnRecvPacket() { var ( trace types.DenomTrace - amount sdk.Int + amount math.Int receiver string ) @@ -241,9 +256,9 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { func (suite *KeeperTestSuite) TestOnAcknowledgementPacket() { var ( successAck = channeltypes.NewResultAcknowledgement([]byte{byte(1)}) - failedAck = channeltypes.NewErrorAcknowledgement("failed packet transfer") + failedAck = channeltypes.NewErrorAcknowledgement(fmt.Errorf("failed packet transfer")) trace types.DenomTrace - amount sdk.Int + amount math.Int path *ibctesting.Path ) @@ -264,18 +279,22 @@ func (suite *KeeperTestSuite) TestOnAcknowledgementPacket() { suite.Require().NoError(simapp.FundAccount(suite.chainA.GetSimApp(), suite.chainA.GetContext(), escrow, sdk.NewCoins(coin))) }, false, true}, - {"unsuccessful refund from source", failedAck, + { + "unsuccessful refund from source", failedAck, func() { trace = types.ParseDenomTrace(sdk.DefaultBondDenom) - }, false, false}, - {"successful refund from with coin from external chain", failedAck, + }, false, false, + }, + { + "successful refund from with coin from external chain", failedAck, func() { escrow := types.GetEscrowAddress(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) trace = types.ParseDenomTrace(types.GetPrefixedDenom(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, sdk.DefaultBondDenom)) coin := sdk.NewCoin(trace.IBCDenom(), amount) suite.Require().NoError(simapp.FundAccount(suite.chainA.GetSimApp(), suite.chainA.GetContext(), escrow, sdk.NewCoins(coin))) - }, false, true}, + }, false, true, + }, } for _, tc := range testCases { @@ -321,7 +340,7 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacket() { var ( trace types.DenomTrace path *ibctesting.Path - amount sdk.Int + amount math.Int sender string ) @@ -330,36 +349,46 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacket() { malleate func() expPass bool }{ - {"successful timeout from sender as source chain", + { + "successful timeout from sender as source chain", func() { escrow := types.GetEscrowAddress(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) trace = types.ParseDenomTrace(sdk.DefaultBondDenom) coin := sdk.NewCoin(trace.IBCDenom(), amount) suite.Require().NoError(simapp.FundAccount(suite.chainA.GetSimApp(), suite.chainA.GetContext(), escrow, sdk.NewCoins(coin))) - }, true}, - {"successful timeout from external chain", + }, true, + }, + { + "successful timeout from external chain", func() { escrow := types.GetEscrowAddress(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) trace = types.ParseDenomTrace(types.GetPrefixedDenom(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, sdk.DefaultBondDenom)) coin := sdk.NewCoin(trace.IBCDenom(), amount) suite.Require().NoError(simapp.FundAccount(suite.chainA.GetSimApp(), suite.chainA.GetContext(), escrow, sdk.NewCoins(coin))) - }, true}, - {"no balance for coin denom", + }, true, + }, + { + "no balance for coin denom", func() { trace = types.ParseDenomTrace("bitcoin") - }, false}, - {"unescrow failed", + }, false, + }, + { + "unescrow failed", func() { trace = types.ParseDenomTrace(sdk.DefaultBondDenom) - }, false}, - {"mint failed", + }, false, + }, + { + "mint failed", func() { trace = types.ParseDenomTrace(types.GetPrefixedDenom(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, sdk.DefaultBondDenom)) amount = sdk.OneInt() sender = "invalid address" - }, false}, + }, false, + }, } for _, tc := range testCases { diff --git a/modules/apps/transfer/module.go b/modules/apps/transfer/module.go index 0daa6dc3bf0..00e3870290c 100644 --- a/modules/apps/transfer/module.go +++ b/modules/apps/transfer/module.go @@ -12,16 +12,15 @@ 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/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/client/cli" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/client/cli" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/simulation" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" ) var ( @@ -64,13 +63,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes implements AppModuleBasic interface -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-transfer module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } } // GetTxCmd implements AppModuleBasic interface @@ -120,6 +118,11 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + m := keeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, m.MigrateTraces); err != nil { + panic(fmt.Sprintf("failed to migrate transfer app from version 1 to 2: %v", err)) + } } // InitGenesis performs genesis initialization for the ibc-transfer module. It returns @@ -139,7 +142,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return 2 } // BeginBlock implements the AppModule interface func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { diff --git a/modules/apps/transfer/simulation/decoder.go b/modules/apps/transfer/simulation/decoder.go index 8758d904544..7ad36527885 100644 --- a/modules/apps/transfer/simulation/decoder.go +++ b/modules/apps/transfer/simulation/decoder.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // TransferUnmarshaler defines the expected encoding store functions. diff --git a/modules/apps/transfer/simulation/decoder_test.go b/modules/apps/transfer/simulation/decoder_test.go index a505dffb15d..e8598ffa611 100644 --- a/modules/apps/transfer/simulation/decoder_test.go +++ b/modules/apps/transfer/simulation/decoder_test.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/simulation" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/apps/transfer/simulation/genesis.go b/modules/apps/transfer/simulation/genesis.go index a74277d1671..bd097eff49d 100644 --- a/modules/apps/transfer/simulation/genesis.go +++ b/modules/apps/transfer/simulation/genesis.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // Simulation parameter constants diff --git a/modules/apps/transfer/simulation/genesis_test.go b/modules/apps/transfer/simulation/genesis_test.go index c869d1c7b25..7cd06d1fd65 100644 --- a/modules/apps/transfer/simulation/genesis_test.go +++ b/modules/apps/transfer/simulation/genesis_test.go @@ -5,20 +5,23 @@ import ( "math/rand" "testing" + "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" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/simulation" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. // Abonormal scenarios are not tested here. func TestRandomizedGenState(t *testing.T) { interfaceRegistry := codectypes.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(interfaceRegistry) cdc := codec.NewProtoCodec(interfaceRegistry) s := rand.NewSource(1) @@ -30,7 +33,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: math.NewInt(1000), GenState: make(map[string]json.RawMessage), } @@ -43,7 +46,6 @@ func TestRandomizedGenState(t *testing.T) { require.True(t, ibcTransferGenesis.Params.SendEnabled) require.True(t, ibcTransferGenesis.Params.ReceiveEnabled) require.Len(t, ibcTransferGenesis.DenomTraces, 0) - } // TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState. diff --git a/modules/apps/transfer/simulation/params.go b/modules/apps/transfer/simulation/params.go index c7193b47193..49dd829f1e1 100644 --- a/modules/apps/transfer/simulation/params.go +++ b/modules/apps/transfer/simulation/params.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" gogotypes "github.com/gogo/protobuf/types" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // ParamChanges defines the parameters that can be modified by param change proposals @@ -18,13 +18,13 @@ func ParamChanges(r *rand.Rand) []simtypes.ParamChange { simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled), func(r *rand.Rand) string { sendEnabled := RadomEnabled(r) - return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) + return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) //nolint:gosimple }, ), simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled), func(r *rand.Rand) string { receiveEnabled := RadomEnabled(r) - return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) + return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) //nolint:gosimple }, ), } diff --git a/modules/apps/transfer/simulation/params_test.go b/modules/apps/transfer/simulation/params_test.go index 491fee0d3f3..b50c297e750 100644 --- a/modules/apps/transfer/simulation/params_test.go +++ b/modules/apps/transfer/simulation/params_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/simulation" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/simulation" ) func TestParamChanges(t *testing.T) { diff --git a/modules/apps/transfer/spec/04_messages.md b/modules/apps/transfer/spec/04_messages.md deleted file mode 100644 index 611e2423da7..00000000000 --- a/modules/apps/transfer/spec/04_messages.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# Messages - -## MsgTransfer - -A fungible token cross chain transfer is achieved by using the `MsgTransfer`: - -```go -type MsgTransfer struct { - SourcePort string - SourceChannel string - Token sdk.Coin - Sender string - Receiver string - TimeoutHeight ibcexported.Height - TimeoutTimestamp uint64 -} -``` - -This message is expected to fail if: - -- `SourcePort` is invalid (see 24-host naming requirements) -- `SourceChannel` is invalid (see 24-host naming requirements) -- `Token` is invalid (denom is invalid or amount is negative) -- `Token.Amount` is not positive -- `Sender` is empty -- `Receiver` is empty -- `TimeoutHeight` and `TimeoutTimestamp` are both zero -- `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](./../../../../docs/architecture/adr-001-coin-source-tracing.md). - -This message will send a fungible token to the counterparty chain represented -by the counterparty Channel End connected to the Channel End with the identifiers -`SourcePort` and `SourceChannel`. - -The denomination provided for transfer should correspond to the same denomination -represented on this chain. The prefixes will be added as necessary upon by the -receiving chain. diff --git a/modules/apps/transfer/spec/07_params.md b/modules/apps/transfer/spec/07_params.md deleted file mode 100644 index 142091a9433..00000000000 --- a/modules/apps/transfer/spec/07_params.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# Parameters - -The ibc-transfer module contains the following parameters: - -| Key | Type | Default Value | -|------------------|------|---------------| -| `SendEnabled` | bool | `true` | -| `ReceiveEnabled` | bool | `true` | - -## SendEnabled - -The transfers enabled parameter controls send cross-chain transfer capabilities for all fungible -tokens. - -To prevent a single token from being transferred from the chain, set the `SendEnabled` parameter to `true` and -then set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/master/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`. - -## ReceiveEnabled - -The transfers enabled parameter controls receive cross-chain transfer capabilities for all fungible -tokens. - -To prevent a single token from being transferred to the chain, set the `ReceiveEnabled` parameter to `true` and -then set the bank module's [`SendEnabled` parameter](https://github.com/cosmos/cosmos-sdk/blob/master/x/bank/spec/05_params.md#sendenabled) for the denomination to `false`. diff --git a/modules/apps/transfer/spec/README.md b/modules/apps/transfer/spec/README.md deleted file mode 100644 index 05d1cc156d0..00000000000 --- a/modules/apps/transfer/spec/README.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# `ibc-transfer` - -## Abstract - -This paper defines the implementation of the ICS20 protocol on the Cosmos SDK. - -For the general specification please refer to the [ICS20 Specification](https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer). - -## Contents - -1. **[Concepts](01_concepts.md)** -2. **[State](02_state.md)** -3. **[State Transitions](03_state_transitions.md)** -4. **[Messages](04_messages.md)** -5. **[Events](05_events.md)** -6. **[Metrics](06_metrics.md)** -7. **[Parameters](07_params.md)** diff --git a/modules/apps/transfer/transfer_test.go b/modules/apps/transfer/transfer_test.go index 5402f0573bb..b6a88f7e651 100644 --- a/modules/apps/transfer/transfer_test.go +++ b/modules/apps/transfer/transfer_test.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type TransferTestSuite struct { diff --git a/modules/apps/transfer/types/ack.go b/modules/apps/transfer/types/ack.go deleted file mode 100644 index 6512f2e8371..00000000000 --- a/modules/apps/transfer/types/ack.go +++ /dev/null @@ -1,27 +0,0 @@ -package types - -import ( - "fmt" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" -) - -const ( - // ackErrorString defines a string constant included in error acknowledgements - // NOTE: Changing this const is state machine breaking as acknowledgements are written into state - ackErrorString = "error handling packet on destination chain: see events for details" -) - -// NewErrorAcknowledgement returns a deterministic error string which may be used in -// the packet acknowledgement. -func NewErrorAcknowledgement(err error) channeltypes.Acknowledgement { - // the ABCI code is included in the abcitypes.ResponseDeliverTx hash - // constructed in Tendermint and is therefore deterministic - _, code, _ := sdkerrors.ABCIInfo(err, false) // discard non-determinstic codespace and log values - - errorString := fmt.Sprintf("ABCI code: %d: %s", code, ackErrorString) - - return channeltypes.NewErrorAcknowledgement(errorString) -} diff --git a/modules/apps/transfer/types/ack_test.go b/modules/apps/transfer/types/ack_test.go index 4f4c3a874d7..ffef886eb9b 100644 --- a/modules/apps/transfer/types/ack_test.go +++ b/modules/apps/transfer/types/ack_test.go @@ -3,19 +3,9 @@ package types_test import ( "testing" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/stretchr/testify/suite" - abcitypes "github.com/tendermint/tendermint/abci/types" - tmprotostate "github.com/tendermint/tendermint/proto/tendermint/state" - tmstate "github.com/tendermint/tendermint/state" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" -) - -const ( - gasUsed = uint64(100) - gasWanted = uint64(100) + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type TypesTestSuite struct { @@ -37,65 +27,3 @@ func (suite *TypesTestSuite) SetupTest() { func TestTypesTestSuite(t *testing.T) { suite.Run(t, new(TypesTestSuite)) } - -// The safety of including ABCI error codes in the acknowledgement rests -// on the inclusion of these ABCI error codes in the abcitypes.ResposneDeliverTx -// hash. If the ABCI codes get removed from consensus they must no longer be used -// in the packet acknowledgement. -// -// This test acts as an indicator that the ABCI error codes may no longer be deterministic. -func (suite *TypesTestSuite) TestABCICodeDeterminism() { - // same ABCI error code used - err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") - errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") - - // different ABCI error code used - errDifferentABCICode := sdkerrors.ErrNotFound - - deliverTx := sdkerrors.ResponseDeliverTx(err, gasUsed, gasWanted, false) - responses := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTx, - }, - } - - deliverTxSameABCICode := sdkerrors.ResponseDeliverTx(errSameABCICode, gasUsed, gasWanted, false) - responsesSameABCICode := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTxSameABCICode, - }, - } - - deliverTxDifferentABCICode := sdkerrors.ResponseDeliverTx(errDifferentABCICode, gasUsed, gasWanted, false) - responsesDifferentABCICode := tmprotostate.ABCIResponses{ - DeliverTxs: []*abcitypes.ResponseDeliverTx{ - &deliverTxDifferentABCICode, - }, - } - - hash := tmstate.ABCIResponsesResultsHash(&responses) - hashSameABCICode := tmstate.ABCIResponsesResultsHash(&responsesSameABCICode) - hashDifferentABCICode := tmstate.ABCIResponsesResultsHash(&responsesDifferentABCICode) - - suite.Require().Equal(hash, hashSameABCICode) - suite.Require().NotEqual(hash, hashDifferentABCICode) -} - -// TestAcknowledgementError will verify that only a constant string and -// ABCI error code are used in constructing the acknowledgement error string -func (suite *TypesTestSuite) TestAcknowledgementError() { - // same ABCI error code used - err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") - errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") - - // different ABCI error code used - errDifferentABCICode := sdkerrors.ErrNotFound - - ack := types.NewErrorAcknowledgement(err) - ackSameABCICode := types.NewErrorAcknowledgement(errSameABCICode) - ackDifferentABCICode := types.NewErrorAcknowledgement(errDifferentABCICode) - - suite.Require().Equal(ack, ackSameABCICode) - suite.Require().NotEqual(ack, ackDifferentABCICode) - -} diff --git a/modules/apps/transfer/types/coin.go b/modules/apps/transfer/types/coin.go index a3491e2bf09..6abc5367cbe 100644 --- a/modules/apps/transfer/types/coin.go +++ b/modules/apps/transfer/types/coin.go @@ -4,6 +4,7 @@ import ( "fmt" "strings" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -27,7 +28,6 @@ func ReceiverChainIsSource(sourcePort, sourceChannel, denom string) bool { voucherPrefix := GetDenomPrefix(sourcePort, sourceChannel) return strings.HasPrefix(denom, voucherPrefix) - } // GetDenomPrefix returns the receiving denomination prefix @@ -42,7 +42,7 @@ func GetPrefixedDenom(portID, channelID, baseDenom string) string { // GetTransferCoin creates a transfer coin with the port ID and channel ID // prefixed to the base denom. -func GetTransferCoin(portID, channelID, baseDenom string, amount sdk.Int) sdk.Coin { +func GetTransferCoin(portID, channelID, baseDenom string, amount math.Int) sdk.Coin { denomTrace := ParseDenomTrace(GetPrefixedDenom(portID, channelID, baseDenom)) return sdk.NewCoin(denomTrace.IBCDenom(), amount) } diff --git a/modules/apps/transfer/types/expected_keepers.go b/modules/apps/transfer/types/expected_keepers.go index 22ad54b9e62..bf73bf2c66c 100644 --- a/modules/apps/transfer/types/expected_keepers.go +++ b/modules/apps/transfer/types/expected_keepers.go @@ -5,9 +5,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // AccountKeeper defines the contract required for account APIs. diff --git a/modules/apps/transfer/types/genesis.go b/modules/apps/transfer/types/genesis.go index 73dbe111a2e..21aed7d1f47 100644 --- a/modules/apps/transfer/types/genesis.go +++ b/modules/apps/transfer/types/genesis.go @@ -1,7 +1,7 @@ package types import ( - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewGenesisState creates a new ibc-transfer GenesisState instance. diff --git a/modules/apps/transfer/types/genesis.pb.go b/modules/apps/transfer/types/genesis.pb.go index 6c40ef48a3d..16f26c118ed 100644 --- a/modules/apps/transfer/types/genesis.pb.go +++ b/modules/apps/transfer/types/genesis.pb.go @@ -96,24 +96,24 @@ var fileDescriptor_a4f788affd5bea89 = []byte{ // 324 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xc1, 0x4a, 0xc3, 0x30, 0x1c, 0xc6, 0x1b, 0x27, 0x15, 0xbb, 0xe1, 0xa1, 0x7a, 0x18, 0x43, 0xda, 0x51, 0x14, 0x8a, 0xc3, - 0x84, 0x6d, 0x07, 0xc1, 0x63, 0x11, 0xc4, 0x9b, 0x4e, 0x4f, 0x5e, 0x46, 0x9a, 0xc6, 0x1a, 0x58, - 0x9b, 0x92, 0x7f, 0x36, 0xd8, 0x5b, 0xf8, 0x1c, 0x3e, 0xc9, 0x8e, 0x3b, 0x7a, 0x9a, 0xb2, 0xbd, - 0xc1, 0x7c, 0x01, 0x49, 0x37, 0xc7, 0x4e, 0xbd, 0x7d, 0x24, 0xbf, 0xef, 0xfb, 0xfe, 0x7c, 0xce, - 0x95, 0x88, 0x19, 0xa1, 0x45, 0x31, 0x12, 0x8c, 0x6a, 0x21, 0x73, 0x20, 0x5a, 0xd1, 0x1c, 0xde, - 0xb8, 0x22, 0x93, 0x2e, 0x49, 0x79, 0xce, 0x41, 0x00, 0x2e, 0x94, 0xd4, 0xd2, 0x3d, 0x17, 0x31, - 0xc3, 0xfb, 0x2c, 0xfe, 0x67, 0x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0x88, 0xab, 0xae, 0xc6, 0x77, 0xc6, 0xf1, 0x62, 0x0c, 0xd1, 0xf9, 0x74, 0xee, 0x5b, + 0xab, 0xb9, 0x7f, 0xbc, 0xce, 0xdf, 0xcd, 0x0a, 0x3e, 0xbf, 0x7d, 0xbb, 0xa4, 0xa0, 0x5f, 0x4f, + 0xb6, 0x16, 0x70, 0x23, 0xc7, 0x2e, 0xa8, 0xa2, 0x19, 0x34, 0x6b, 0x6d, 0x14, 0xd6, 0x7b, 0x67, + 0xd5, 0x6d, 0x8f, 0x25, 0x1b, 0xed, 0x9b, 0xa6, 0xfe, 0xc6, 0x19, 0x3d, 0x4d, 0x17, 0x1e, 0x9a, + 0x2d, 0x3c, 0xf4, 0xb3, 0xf0, 0xd0, 0xc7, 0xd2, 0xb3, 0x66, 0x4b, 0xcf, 0xfa, 0x5a, 0x7a, 0xd6, + 0xeb, 0x4d, 0x2a, 0xf4, 0xfb, 0x28, 0xc6, 0x4c, 0x66, 0x84, 0x49, 0xc8, 0x24, 0x10, 0x11, 0xb3, + 0xcb, 0x54, 0x92, 0xf1, 0x35, 0xc9, 0x64, 0x32, 0x1a, 0x72, 0x30, 0x93, 0xef, 0x4c, 0xad, 0x27, + 0x05, 0x87, 0xd8, 0x2e, 0xf7, 0xbc, 0xfa, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x89, 0x65, 0xb3, 0x13, 0xde, 0x01, 0x00, 0x00, } diff --git a/modules/apps/transfer/types/genesis_test.go b/modules/apps/transfer/types/genesis_test.go index 534eefba7ab..6ba8de4502d 100644 --- a/modules/apps/transfer/types/genesis_test.go +++ b/modules/apps/transfer/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) func TestValidateGenesis(t *testing.T) { diff --git a/modules/apps/transfer/types/keys_test.go b/modules/apps/transfer/types/keys_test.go index 3270dba55be..40bc07868bd 100644 --- a/modules/apps/transfer/types/keys_test.go +++ b/modules/apps/transfer/types/keys_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" ) // Test that there is domain separation between the port id and the channel id otherwise an diff --git a/modules/apps/transfer/types/msgs.go b/modules/apps/transfer/types/msgs.go index dab9fb21d46..50177d4b378 100644 --- a/modules/apps/transfer/types/msgs.go +++ b/modules/apps/transfer/types/msgs.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // msg types diff --git a/modules/apps/transfer/types/msgs_test.go b/modules/apps/transfer/types/msgs_test.go index 00570ac15ed..939de03a1cc 100644 --- a/modules/apps/transfer/types/msgs_test.go +++ b/modules/apps/transfer/types/msgs_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // define constants used for testing diff --git a/modules/apps/transfer/types/packet.go b/modules/apps/transfer/types/packet.go index a7384c47486..6203cdbfa05 100644 --- a/modules/apps/transfer/types/packet.go +++ b/modules/apps/transfer/types/packet.go @@ -40,7 +40,7 @@ func NewFungibleTokenPacketData( func (ftpd FungibleTokenPacketData) ValidateBasic() error { amount, ok := sdk.NewIntFromString(ftpd.Amount) if !ok { - return sdkerrors.Wrapf(ErrInvalidAmount, "unable to parse transfer amount (%s) into sdk.Int", ftpd.Amount) + return sdkerrors.Wrapf(ErrInvalidAmount, "unable to parse transfer amount (%s) into math.Int", ftpd.Amount) } if !amount.IsPositive() { return sdkerrors.Wrapf(ErrInvalidAmount, "amount must be strictly positive: got %d", amount) diff --git a/modules/apps/transfer/types/packet.pb.go b/modules/apps/transfer/types/packet.pb.go index 3ebd1106f66..e78a36d978a 100644 --- a/modules/apps/transfer/types/packet.pb.go +++ b/modules/apps/transfer/types/packet.pb.go @@ -108,20 +108,20 @@ func init() { var fileDescriptor_653ca2ce9a5ca313 = []byte{ // 242 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xbd, 0x4a, 0x04, 0x31, - 0x14, 0x46, 0x27, 0xfe, 0x2c, 0x9a, 0x72, 0x10, 0x1d, 0x44, 0x82, 0x58, 0x69, 0x61, 0x02, 0xbb, - 0x85, 0xbd, 0x88, 0xb5, 0x8a, 0x95, 0x5d, 0x92, 0xb9, 0x8e, 0x61, 0x27, 0xb9, 0x21, 0xc9, 0x0c, - 0x88, 0x2f, 0xe1, 0x63, 0x59, 0x6e, 0x69, 0x29, 0x33, 0x2f, 0x22, 0x9b, 0xd1, 0x65, 0xcb, 0x73, - 0xee, 0x77, 0x8b, 0x43, 0xaf, 0x8c, 0xd2, 0x42, 0x7a, 0xdf, 0x1a, 0x2d, 0x93, 0x41, 0x17, 0x45, - 0x0a, 0xd2, 0xc5, 0x57, 0x08, 0xa2, 0x9f, 0x0b, 0x2f, 0xf5, 0x12, 0x12, 0xf7, 0x01, 0x13, 0x96, - 0x67, 0x46, 0x69, 0xbe, 0x3d, 0xe5, 0xff, 0x53, 0xde, 0xcf, 0x2f, 0x3e, 0xe8, 0xc9, 0x7d, 0xe7, - 0x1a, 0xa3, 0x5a, 0x78, 0xc6, 0x25, 0xb8, 0x87, 0xfc, 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91, + 0x82, 0x74, 0xf1, 0x15, 0x82, 0xe8, 0xe7, 0xc2, 0x4b, 0xbd, 0x80, 0xc4, 0x7d, 0xc0, 0x84, 0xe5, + 0x89, 0x51, 0x9a, 0x6f, 0x4e, 0xf9, 0xff, 0x94, 0xf7, 0xf3, 0xb3, 0x0f, 0x7a, 0x74, 0xdf, 0xb9, + 0xc6, 0xa8, 0x16, 0x9e, 0x71, 0x01, 0xee, 0x21, 0xbf, 0xde, 0xc9, 0x24, 0xcb, 0x03, 0xba, 0x5b, + 0x83, 0x43, 0x5b, 0x91, 0x53, 0x72, 0xbe, 0xff, 0x34, 0x41, 0x79, 0x48, 0x67, 0xd2, 0x62, 0xe7, + 0x52, 0xb5, 0x95, 0xf5, 0x1f, 0xad, 0x7c, 0x04, 0x57, 0x43, 0xa8, 0xb6, 0x27, 0x3f, 0x51, 0x79, + 0x4c, 0xf7, 0x02, 0x68, 0x30, 0x3d, 0x84, 0x6a, 0x27, 0x5f, 0xd6, 0x7c, 0xfb, 0xf8, 0x35, 0x30, + 0xb2, 0x1c, 0x18, 0xf9, 0x19, 0x18, 0xf9, 0x1c, 0x59, 0xb1, 0x1c, 0x59, 0xf1, 0x3d, 0xb2, 0xe2, + 0xe5, 0xa6, 0x31, 0xe9, 0xad, 0x53, 0x5c, 0xa3, 0x15, 0x1a, 0xa3, 0xc5, 0x28, 0x8c, 0xd2, 0x97, + 0x0d, 0x8a, 0xfe, 0x5a, 0x58, 0xac, 0xbb, 0x16, 0xe2, 0xaa, 0x7f, 0xa3, 0x3b, 0xbd, 0x7b, 0x88, + 0x6a, 0x96, 0xa3, 0xaf, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x42, 0x1c, 0xc0, 0x72, 0x21, 0x01, 0x00, 0x00, } diff --git a/modules/apps/transfer/types/query.pb.go b/modules/apps/transfer/types/query.pb.go index 024da758162..ed2fdc99145 100644 --- a/modules/apps/transfer/types/query.pb.go +++ b/modules/apps/transfer/types/query.pb.go @@ -33,7 +33,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC // method type QueryDenomTraceRequest struct { - // hash (in hex format) of the denomination trace information. + // hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` } @@ -404,6 +404,107 @@ func (m *QueryDenomHashResponse) GetHash() string { return "" } +// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. +type QueryEscrowAddressRequest struct { + // unique port identifier + PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + // unique channel identifier + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (m *QueryEscrowAddressRequest) Reset() { *m = QueryEscrowAddressRequest{} } +func (m *QueryEscrowAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryEscrowAddressRequest) ProtoMessage() {} +func (*QueryEscrowAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a638e2800a01538c, []int{8} +} +func (m *QueryEscrowAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEscrowAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEscrowAddressRequest.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 *QueryEscrowAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEscrowAddressRequest.Merge(m, src) +} +func (m *QueryEscrowAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryEscrowAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEscrowAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEscrowAddressRequest proto.InternalMessageInfo + +func (m *QueryEscrowAddressRequest) GetPortId() string { + if m != nil { + return m.PortId + } + return "" +} + +func (m *QueryEscrowAddressRequest) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. +type QueryEscrowAddressResponse struct { + // the escrow account address + EscrowAddress string `protobuf:"bytes,1,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"` +} + +func (m *QueryEscrowAddressResponse) Reset() { *m = QueryEscrowAddressResponse{} } +func (m *QueryEscrowAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryEscrowAddressResponse) ProtoMessage() {} +func (*QueryEscrowAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a638e2800a01538c, []int{9} +} +func (m *QueryEscrowAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEscrowAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEscrowAddressResponse.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 *QueryEscrowAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEscrowAddressResponse.Merge(m, src) +} +func (m *QueryEscrowAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryEscrowAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEscrowAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEscrowAddressResponse proto.InternalMessageInfo + +func (m *QueryEscrowAddressResponse) GetEscrowAddress() string { + if m != nil { + return m.EscrowAddress + } + return "" +} + func init() { proto.RegisterType((*QueryDenomTraceRequest)(nil), "ibc.applications.transfer.v1.QueryDenomTraceRequest") proto.RegisterType((*QueryDenomTraceResponse)(nil), "ibc.applications.transfer.v1.QueryDenomTraceResponse") @@ -413,6 +514,8 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "ibc.applications.transfer.v1.QueryParamsResponse") proto.RegisterType((*QueryDenomHashRequest)(nil), "ibc.applications.transfer.v1.QueryDenomHashRequest") proto.RegisterType((*QueryDenomHashResponse)(nil), "ibc.applications.transfer.v1.QueryDenomHashResponse") + proto.RegisterType((*QueryEscrowAddressRequest)(nil), "ibc.applications.transfer.v1.QueryEscrowAddressRequest") + proto.RegisterType((*QueryEscrowAddressResponse)(nil), "ibc.applications.transfer.v1.QueryEscrowAddressResponse") } func init() { @@ -420,45 +523,52 @@ func init() { } var fileDescriptor_a638e2800a01538c = []byte{ - // 595 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x30, - 0x1c, 0xad, 0x07, 0xab, 0x34, 0x17, 0x71, 0x30, 0x05, 0xaa, 0xa8, 0xca, 0xa6, 0xa8, 0x82, 0xd2, - 0x6d, 0x36, 0x69, 0x07, 0x5c, 0x38, 0x4d, 0x88, 0x3f, 0xb7, 0xad, 0x70, 0x82, 0x03, 0x72, 0x52, - 0x93, 0x46, 0x6a, 0xe3, 0x2c, 0x4e, 0x2b, 0x4d, 0x68, 0x17, 0x3e, 0x01, 0xd2, 0xbe, 0x02, 0x07, - 0x34, 0xf1, 0x21, 0x38, 0xee, 0x38, 0x89, 0x0b, 0x27, 0x40, 0x2d, 0x1f, 0x04, 0xc5, 0x76, 0xda, - 0x84, 0x56, 0xdd, 0x72, 0x73, 0xdd, 0xdf, 0xfb, 0xfd, 0xde, 0x7b, 0xbf, 0x17, 0xc3, 0xa6, 0xef, - 0xb8, 0x84, 0x86, 0xe1, 0xc0, 0x77, 0x69, 0xec, 0xf3, 0x40, 0x90, 0x38, 0xa2, 0x81, 0xf8, 0xc0, - 0x22, 0x32, 0xb6, 0xc9, 0xd1, 0x88, 0x45, 0xc7, 0x38, 0x8c, 0x78, 0xcc, 0x51, 0xdd, 0x77, 0x5c, - 0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, 0xcc, 0x32, 0x82, - 0x3a, 0x57, 0xf5, 0x21, 0x13, 0x40, 0x63, 0xaf, 0x18, 0x48, 0xd3, 0x6b, 0x4b, 0x7a, 0x3b, 0xa8, - 0xb5, 0xca, 0xba, 0x64, 0xc9, 0xc9, 0xb2, 0xa5, 0x85, 0x27, 0xfb, 0x87, 0xe7, 0x13, 0x13, 0x5c, - 0x4c, 0x4c, 0xf0, 0x67, 0x62, 0x82, 0xcf, 0x53, 0xb3, 0x74, 0x31, 0x35, 0x4b, 0x3f, 0xa7, 0x66, - 0xe9, 0xed, 0x13, 0xcf, 0x8f, 0xfb, 0x23, 0x07, 0xbb, 0x7c, 0x48, 0xf4, 0x23, 0xee, 0x3b, 0xee, - 0xae, 0xc7, 0xc9, 0xb8, 0x43, 0x86, 0xbc, 0x37, 0x1a, 0x30, 0xf1, 0xdf, 0x90, 0xf8, 0x38, 0x64, - 0xc2, 0x29, 0xcb, 0x27, 0xb8, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x16, 0x01, 0x88, 0xe2, 0x59, - 0x06, 0x00, 0x00, + // 714 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x0b, 0x0d, 0xca, 0x84, 0xf6, 0xb0, 0x14, 0x5a, 0xac, 0xe2, 0x56, 0x56, 0x81, 0xd2, + 0x1f, 0x2f, 0xe9, 0x0f, 0xe5, 0xc0, 0x85, 0xf2, 0x5b, 0xc4, 0xa1, 0x4d, 0x39, 0xc1, 0xa1, 0x5a, + 0xdb, 0x8b, 0x63, 0x29, 0xf1, 0xba, 0x5e, 0x27, 0xa8, 0xaa, 0x72, 0xe1, 0x09, 0x90, 0xfa, 0x12, + 0xa8, 0xe2, 0x21, 0x38, 0xf6, 0x58, 0x09, 0x09, 0x71, 0x02, 0xd4, 0xf2, 0x1a, 0x48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 0xdb, 0xda, 0x36, 0x4e, 0x76, 0x99, 0xe3, 0x7d, 0xb5, 0xe1, 0x6d, 0x9c, 0x5d, 0xca, 0xf5, + 0xad, 0xa3, 0x13, 0x43, 0x3b, 0x3e, 0x31, 0xb4, 0xdf, 0x27, 0x86, 0xf6, 0xe9, 0xd4, 0x28, 0x1c, + 0x9f, 0x1a, 0x85, 0x1f, 0xa7, 0x46, 0xe1, 0xed, 0x9a, 0xe7, 0xc7, 0xb5, 0xa6, 0x6d, 0x39, 0xac, + 0x81, 0xd5, 0x7f, 0xd3, 0xb7, 0x9d, 0x45, 0x8f, 0xe1, 0xd6, 0x2a, 0x6e, 0x30, 0xb7, 0x59, 0xa7, + 0xfc, 0x3f, 0x12, 0xf1, 0x5e, 0x48, 0xb9, 0x5d, 0x14, 0x7f, 0xbd, 0xe5, 0x7f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xf2, 0xc5, 0x80, 0x56, 0xcc, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -481,6 +591,8 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // DenomHash queries a denomination hash information. DenomHash(ctx context.Context, in *QueryDenomHashRequest, opts ...grpc.CallOption) (*QueryDenomHashResponse, error) + // EscrowAddress returns the escrow address for a particular port and channel id. + EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error) } type queryClient struct { @@ -527,6 +639,15 @@ func (c *queryClient) DenomHash(ctx context.Context, in *QueryDenomHashRequest, return out, nil } +func (c *queryClient) EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error) { + out := new(QueryEscrowAddressResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.transfer.v1.Query/EscrowAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // DenomTrace queries a denomination trace information. @@ -537,6 +658,8 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // DenomHash queries a denomination hash information. DenomHash(context.Context, *QueryDenomHashRequest) (*QueryDenomHashResponse, error) + // EscrowAddress returns the escrow address for a particular port and channel id. + EscrowAddress(context.Context, *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -555,6 +678,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) DenomHash(ctx context.Context, req *QueryDenomHashRequest) (*QueryDenomHashResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DenomHash not implemented") } +func (*UnimplementedQueryServer) EscrowAddress(ctx context.Context, req *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EscrowAddress not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -632,6 +758,24 @@ func _Query_DenomHash_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Query_EscrowAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEscrowAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EscrowAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.transfer.v1.Query/EscrowAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EscrowAddress(ctx, req.(*QueryEscrowAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ibc.applications.transfer.v1.Query", HandlerType: (*QueryServer)(nil), @@ -652,6 +796,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DenomHash", Handler: _Query_DenomHash_Handler, }, + { + MethodName: "EscrowAddress", + Handler: _Query_EscrowAddress_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/applications/transfer/v1/query.proto", @@ -924,6 +1072,73 @@ func (m *QueryDenomHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryEscrowAddressRequest) 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 *QueryEscrowAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEscrowAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x12 + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryEscrowAddressResponse) 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 *QueryEscrowAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEscrowAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EscrowAddress) > 0 { + i -= len(m.EscrowAddress) + copy(dAtA[i:], m.EscrowAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EscrowAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1041,6 +1256,36 @@ func (m *QueryDenomHashResponse) Size() (n int) { return n } +func (m *QueryEscrowAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEscrowAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EscrowAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1721,6 +1966,202 @@ func (m *QueryDenomHashResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryEscrowAddressRequest) 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: QueryEscrowAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEscrowAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortId", 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.PortId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", 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.ChannelId = string(dAtA[iNdEx:postIndex]) + 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 *QueryEscrowAddressResponse) 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: QueryEscrowAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEscrowAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", 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.EscrowAddress = string(dAtA[iNdEx:postIndex]) + 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/transfer/types/query.pb.gw.go b/modules/apps/transfer/types/query.pb.gw.go index 6f17d4dc055..71474a1b2fc 100644 --- a/modules/apps/transfer/types/query.pb.gw.go +++ b/modules/apps/transfer/types/query.pb.gw.go @@ -193,6 +193,82 @@ func local_request_Query_DenomHash_0(ctx context.Context, marshaler runtime.Mars } +func request_Query_EscrowAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEscrowAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + msg, err := client.EscrowAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EscrowAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEscrowAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["channel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") + } + + protoReq.ChannelId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) + } + + val, ok = pathParams["port_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") + } + + protoReq.PortId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) + } + + msg, err := server.EscrowAddress(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -279,6 +355,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_EscrowAddress_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_EscrowAddress_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_EscrowAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -400,6 +496,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_EscrowAddress_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_EscrowAddress_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_EscrowAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -411,6 +527,8 @@ var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "transfer", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_DenomHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_hashes", "trace"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_EscrowAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "transfer", "v1", "channels", "channel_id", "ports", "port_id", "escrow_address"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -421,4 +539,6 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_DenomHash_0 = runtime.ForwardResponseMessage + + forward_Query_EscrowAddress_0 = runtime.ForwardResponseMessage ) diff --git a/modules/apps/transfer/types/trace.go b/modules/apps/transfer/types/trace.go index 303ddd3769e..ce0312401fc 100644 --- a/modules/apps/transfer/types/trace.go +++ b/modules/apps/transfer/types/trace.go @@ -12,7 +12,8 @@ import ( tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // ParseDenomTrace parses a string with the ibc prefix (denom trace) and the base denomination @@ -20,8 +21,11 @@ import ( // // Examples: // -// - "portidone/channelidone/uatom" => DenomTrace{Path: "portidone/channelidone", BaseDenom: "uatom"} -// - "uatom" => DenomTrace{Path: "", BaseDenom: "uatom"} +// - "portidone/channel-0/uatom" => DenomTrace{Path: "portidone/channel-0", BaseDenom: "uatom"} +// - "portidone/channel-0/portidtwo/channel-1/uatom" => DenomTrace{Path: "portidone/channel-0/portidtwo/channel-1", BaseDenom: "uatom"} +// - "portidone/channel-0/gamm/pool/1" => DenomTrace{Path: "portidone/channel-0", BaseDenom: "gamm/pool/1"} +// - "gamm/pool/1" => DenomTrace{Path: "", BaseDenom: "gamm/pool/1"} +// - "uatom" => DenomTrace{Path: "", BaseDenom: "uatom"} func ParseDenomTrace(rawDenom string) DenomTrace { denomSplit := strings.Split(rawDenom, "/") @@ -32,9 +36,10 @@ func ParseDenomTrace(rawDenom string) DenomTrace { } } + path, baseDenom := extractPathAndBaseFromFullDenom(denomSplit) return DenomTrace{ - Path: strings.Join(denomSplit[:len(denomSplit)-1], "/"), - BaseDenom: denomSplit[len(denomSplit)-1], + Path: path, + BaseDenom: baseDenom, } } @@ -70,6 +75,36 @@ func (dt DenomTrace) GetFullDenomPath() string { return dt.GetPrefix() + dt.BaseDenom } +// extractPathAndBaseFromFullDenom returns the trace path and the base denom from +// the elements that constitute the complete denom. +func extractPathAndBaseFromFullDenom(fullDenomItems []string) (string, string) { + var ( + path []string + baseDenom []string + ) + + length := len(fullDenomItems) + for i := 0; i < length; i += 2 { + // The IBC specification does not guarantee the expected format of the + // destination port or destination channel identifier. A short term solution + // to determine base denomination is to expect the channel identifier to be the + // one ibc-go specifies. A longer term solution is to separate the path and base + // denomination in the ICS20 packet. If an intermediate hop prefixes the full denom + // with a channel identifier format different from our own, the base denomination + // will be incorrectly parsed, but the token will continue to be treated correctly + // as an IBC denomination. The hash used to store the token internally on our chain + // will be the same value as the base denomination being correctly parsed. + if i < length-1 && length > 2 && channeltypes.IsValidChannelID(fullDenomItems[i+1]) { + path = append(path, fullDenomItems[i], fullDenomItems[i+1]) + } else { + baseDenom = fullDenomItems[i:] + break + } + } + + return strings.Join(path, "/"), strings.Join(baseDenom, "/") +} + func validateTraceIdentifiers(identifiers []string) error { if len(identifiers) == 0 || len(identifiers)%2 != 0 { return fmt.Errorf("trace info must come in pairs of port and channel identifiers '{portID}/{channelID}', got the identifiers: %s", identifiers) @@ -145,6 +180,8 @@ func (t Traces) Sort() Traces { // // - Prefixed denomination: '{portIDN}/{channelIDN}/.../{portID0}/{channelID0}/baseDenom' // - Unprefixed denomination: 'baseDenom' +// +// 'baseDenom' may or may not contain '/'s func ValidatePrefixedDenom(denom string) error { denomSplit := strings.Split(denom, "/") if denomSplit[0] == denom && strings.TrimSpace(denom) != "" { @@ -156,7 +193,13 @@ func ValidatePrefixedDenom(denom string) error { return sdkerrors.Wrap(ErrInvalidDenomForTransfer, "base denomination cannot be blank") } - identifiers := denomSplit[:len(denomSplit)-1] + path, _ := extractPathAndBaseFromFullDenom(denomSplit) + if path == "" { + // NOTE: base denom contains slashes, so no base denomination validation + return nil + } + + identifiers := strings.Split(path, "/") return validateTraceIdentifiers(identifiers) } diff --git a/modules/apps/transfer/types/trace_test.go b/modules/apps/transfer/types/trace_test.go index e35fd33317b..ba0690423bd 100644 --- a/modules/apps/transfer/types/trace_test.go +++ b/modules/apps/transfer/types/trace_test.go @@ -14,10 +14,26 @@ func TestParseDenomTrace(t *testing.T) { }{ {"empty denom", "", DenomTrace{}}, {"base denom", "uatom", DenomTrace{BaseDenom: "uatom"}}, - {"trace info", "transfer/channelToA/uatom", DenomTrace{BaseDenom: "uatom", Path: "transfer/channelToA"}}, - {"incomplete path", "transfer/uatom", DenomTrace{BaseDenom: "uatom", Path: "transfer"}}, - {"invalid path (1)", "transfer//uatom", DenomTrace{BaseDenom: "uatom", Path: "transfer/"}}, - {"invalid path (2)", "transfer/channelToA/uatom/", DenomTrace{BaseDenom: "", Path: "transfer/channelToA/uatom"}}, + {"base denom ending with '/'", "uatom/", DenomTrace{BaseDenom: "uatom/"}}, + {"base denom with single '/'s", "gamm/pool/1", DenomTrace{BaseDenom: "gamm/pool/1"}}, + {"base denom with double '/'s", "gamm//pool//1", DenomTrace{BaseDenom: "gamm//pool//1"}}, + {"trace info", "transfer/channel-1/uatom", DenomTrace{BaseDenom: "uatom", Path: "transfer/channel-1"}}, + {"trace info with custom port", "customtransfer/channel-1/uatom", DenomTrace{BaseDenom: "uatom", Path: "customtransfer/channel-1"}}, + {"trace info with base denom ending in '/'", "transfer/channel-1/uatom/", DenomTrace{BaseDenom: "uatom/", Path: "transfer/channel-1"}}, + {"trace info with single '/' in base denom", "transfer/channel-1/erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA", DenomTrace{BaseDenom: "erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA", Path: "transfer/channel-1"}}, + {"trace info with multiple '/'s in base denom", "transfer/channel-1/gamm/pool/1", DenomTrace{BaseDenom: "gamm/pool/1", Path: "transfer/channel-1"}}, + {"trace info with multiple double '/'s in base denom", "transfer/channel-1/gamm//pool//1", DenomTrace{BaseDenom: "gamm//pool//1", Path: "transfer/channel-1"}}, + {"trace info with multiple port/channel pairs", "transfer/channel-1/transfer/channel-2/uatom", DenomTrace{BaseDenom: "uatom", Path: "transfer/channel-1/transfer/channel-2"}}, + {"trace info with multiple custom ports", "customtransfer/channel-1/alternativetransfer/channel-2/uatom", DenomTrace{BaseDenom: "uatom", Path: "customtransfer/channel-1/alternativetransfer/channel-2"}}, + {"incomplete path", "transfer/uatom", DenomTrace{BaseDenom: "transfer/uatom"}}, + {"invalid path (1)", "transfer//uatom", DenomTrace{BaseDenom: "transfer//uatom", Path: ""}}, + {"invalid path (2)", "channel-1/transfer/uatom", DenomTrace{BaseDenom: "channel-1/transfer/uatom"}}, + {"invalid path (3)", "uatom/transfer", DenomTrace{BaseDenom: "uatom/transfer"}}, + {"invalid path (4)", "transfer/channel-1", DenomTrace{BaseDenom: "transfer/channel-1"}}, + {"invalid path (5)", "transfer/channel-1/", DenomTrace{Path: "transfer/channel-1"}}, + {"invalid path (6)", "transfer/channel-1/transfer", DenomTrace{BaseDenom: "transfer", Path: "transfer/channel-1"}}, + {"invalid path (7)", "transfer/channel-1/transfer/channel-2", DenomTrace{Path: "transfer/channel-1/transfer/channel-2"}}, + {"invalid path (8)", "transfer/channelToA/uatom", DenomTrace{BaseDenom: "transfer/channelToA/uatom", Path: ""}}, } for _, tc := range testCases { @@ -33,7 +49,7 @@ func TestDenomTrace_IBCDenom(t *testing.T) { expDenom string }{ {"base denom", DenomTrace{BaseDenom: "uatom"}, "uatom"}, - {"trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channelToA"}, "ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2"}, + {"trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channel-1"}, "ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9"}, } for _, tc := range testCases { @@ -49,13 +65,15 @@ func TestDenomTrace_Validate(t *testing.T) { expError bool }{ {"base denom only", DenomTrace{BaseDenom: "uatom"}, false}, + {"base denom only with single '/'", DenomTrace{BaseDenom: "erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA"}, false}, + {"base denom only with multiple '/'s", DenomTrace{BaseDenom: "gamm/pool/1"}, false}, {"empty DenomTrace", DenomTrace{}, true}, - {"valid single trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channelToA"}, false}, - {"valid multiple trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channelToA/transfer/channelToB"}, false}, + {"valid single trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channel-1"}, false}, + {"valid multiple trace info", DenomTrace{BaseDenom: "uatom", Path: "transfer/channel-1/transfer/channel-2"}, false}, {"single trace identifier", DenomTrace{BaseDenom: "uatom", Path: "transfer"}, true}, - {"invalid port ID", DenomTrace{BaseDenom: "uatom", Path: "(transfer)/channelToA"}, true}, - {"invalid channel ID", DenomTrace{BaseDenom: "uatom", Path: "transfer/(channelToA)"}, true}, - {"empty base denom with trace", DenomTrace{BaseDenom: "", Path: "transfer/channelToA"}, true}, + {"invalid port ID", DenomTrace{BaseDenom: "uatom", Path: "(transfer)/channel-1"}, true}, + {"invalid channel ID", DenomTrace{BaseDenom: "uatom", Path: "transfer/(channel-1)"}, true}, + {"empty base denom with trace", DenomTrace{BaseDenom: "", Path: "transfer/channel-1"}, true}, } for _, tc := range testCases { @@ -75,16 +93,16 @@ func TestTraces_Validate(t *testing.T) { expError bool }{ {"empty Traces", Traces{}, false}, - {"valid multiple trace info", Traces{{BaseDenom: "uatom", Path: "transfer/channelToA/transfer/channelToB"}}, false}, + {"valid multiple trace info", Traces{{BaseDenom: "uatom", Path: "transfer/channel-1/transfer/channel-2"}}, false}, { "valid multiple trace info", Traces{ - {BaseDenom: "uatom", Path: "transfer/channelToA/transfer/channelToB"}, - {BaseDenom: "uatom", Path: "transfer/channelToA/transfer/channelToB"}, + {BaseDenom: "uatom", Path: "transfer/channel-1/transfer/channel-2"}, + {BaseDenom: "uatom", Path: "transfer/channel-1/transfer/channel-2"}, }, true, }, - {"empty base denom with trace", Traces{{BaseDenom: "", Path: "transfer/channelToA"}}, true}, + {"empty base denom with trace", Traces{{BaseDenom: "", Path: "transfer/channel-1"}}, true}, } for _, tc := range testCases { @@ -103,23 +121,25 @@ func TestValidatePrefixedDenom(t *testing.T) { denom string expError bool }{ - {"prefixed denom", "transfer/channelToA/uatom", false}, + {"prefixed denom", "transfer/channel-1/uatom", false}, + {"prefixed denom with '/'", "transfer/channel-1/gamm/pool/1", false}, + {"empty prefix", "/uatom", false}, + {"empty identifiers", "//uatom", false}, {"base denom", "uatom", false}, + {"base denom with single '/'", "erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA", false}, + {"base denom with multiple '/'s", "gamm/pool/1", false}, + {"invalid port ID", "(transfer)/channel-1/uatom", true}, {"empty denom", "", true}, - {"empty prefix", "/uatom", true}, - {"empty identifiers", "//uatom", true}, {"single trace identifier", "transfer/", true}, - {"invalid port ID", "(transfer)/channelToA/uatom", true}, - {"invalid channel ID", "transfer/(channelToA)/uatom", true}, } for _, tc := range testCases { err := ValidatePrefixedDenom(tc.denom) if tc.expError { require.Error(t, err, tc.name) - continue + } else { + require.NoError(t, err, tc.name) } - require.NoError(t, err, tc.name) } } @@ -131,6 +151,7 @@ func TestValidateIBCDenom(t *testing.T) { }{ {"denom with trace hash", "ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2", false}, {"base denom", "uatom", false}, + {"base denom ending with '/'", "uatom/", false}, {"base denom with single '/'s", "gamm/pool/1", false}, {"base denom with double '/'s", "gamm//pool//1", false}, {"non-ibc prefix with hash", "notibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2", false}, diff --git a/modules/apps/transfer/types/transfer.pb.go b/modules/apps/transfer/types/transfer.pb.go index 5ed7c9bd835..02d3d8e7e02 100644 --- a/modules/apps/transfer/types/transfer.pb.go +++ b/modules/apps/transfer/types/transfer.pb.go @@ -153,23 +153,23 @@ var fileDescriptor_5041673e96e97901 = []byte{ // 300 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xc1, 0x4a, 0x2b, 0x31, 0x14, 0x86, 0x9b, 0x72, 0x29, 0xb7, 0x51, 0x14, 0xa2, 0x68, 0x29, 0x9a, 0xca, 0xac, 0x04, 0x71, - 0x42, 0xe9, 0x42, 0xe8, 0x46, 0xa8, 0xba, 0xd7, 0xe2, 0xca, 0x4d, 0x49, 0x32, 0xc7, 0x69, 0x60, - 0x32, 0x19, 0x92, 0x74, 0xa0, 0x8f, 0xe0, 0xce, 0xc7, 0x72, 0xd9, 0xa5, 0xab, 0x22, 0xed, 0x1b, - 0xf4, 0x09, 0x64, 0xd2, 0x52, 0x06, 0x77, 0xff, 0x39, 0xe7, 0xfb, 0xce, 0xe2, 0xc7, 0x37, 0x4a, - 0x48, 0xc6, 0x8b, 0x22, 0x53, 0x92, 0x7b, 0x65, 0x72, 0xc7, 0xbc, 0xe5, 0xb9, 0x7b, 0x07, 0xcb, - 0xca, 0xfe, 0x3e, 0xc7, 0x85, 0x35, 0xde, 0x90, 0x0b, 0x25, 0x64, 0x5c, 0x87, 0xe3, 0x3d, 0x50, - 0xf6, 0xbb, 0xa7, 0xa9, 0x49, 0x4d, 0x00, 0x59, 0x95, 0xb6, 0x4e, 0x74, 0x8f, 0xf1, 0x23, 0xe4, - 0x46, 0xbf, 0x5a, 0x2e, 0x81, 0x10, 0xfc, 0xaf, 0xe0, 0x7e, 0xda, 0x41, 0x57, 0xe8, 0xba, 0x3d, - 0x0e, 0x99, 0x5c, 0x62, 0x2c, 0xb8, 0x83, 0x49, 0x52, 0x61, 0x9d, 0x66, 0xb8, 0xb4, 0xab, 0x4d, - 0xf0, 0xa2, 0x0f, 0x84, 0x5b, 0xcf, 0xdc, 0x72, 0xed, 0xc8, 0x10, 0x1f, 0x3a, 0xc8, 0x93, 0x09, - 0xe4, 0x5c, 0x64, 0x90, 0x84, 0x2f, 0xff, 0x47, 0xe7, 0x9b, 0x65, 0xef, 0x64, 0xce, 0x75, 0x36, - 0x8c, 0xea, 0xd7, 0x68, 0x7c, 0x50, 0x8d, 0x4f, 0xdb, 0x89, 0x3c, 0xe0, 0x63, 0x0b, 0x12, 0x54, - 0x09, 0x7b, 0xbd, 0x19, 0xf4, 0xee, 0x66, 0xd9, 0x3b, 0xdb, 0xea, 0x7f, 0x80, 0x68, 0x7c, 0xb4, - 0xdb, 0xec, 0x9e, 0x8c, 0x5e, 0xbe, 0x56, 0x14, 0x2d, 0x56, 0x14, 0xfd, 0xac, 0x28, 0xfa, 0x5c, - 0xd3, 0xc6, 0x62, 0x4d, 0x1b, 0xdf, 0x6b, 0xda, 0x78, 0xbb, 0x4b, 0x95, 0x9f, 0xce, 0x44, 0x2c, - 0x8d, 0x66, 0xd2, 0x38, 0x6d, 0x1c, 0x53, 0x42, 0xde, 0xa6, 0x86, 0x95, 0x03, 0xa6, 0x4d, 0x32, - 0xcb, 0xc0, 0x55, 0x3d, 0xd7, 0xfa, 0xf5, 0xf3, 0x02, 0x9c, 0x68, 0x85, 0x9a, 0x06, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xae, 0xdf, 0x93, 0x8e, 0x89, 0x01, 0x00, 0x00, + 0x42, 0x11, 0x11, 0xba, 0x11, 0xaa, 0xee, 0xb5, 0xb8, 0x72, 0x53, 0x92, 0xcc, 0x71, 0x1a, 0x98, + 0x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0x25, 0x45, 0xf3, 0x25, 0x45, 0x3f, 0x4b, 0x8a, 0x3e, 0x57, + 0xb4, 0x31, 0x5f, 0xd1, 0xc6, 0xf7, 0x8a, 0x36, 0xde, 0xee, 0x52, 0xe5, 0x27, 0x53, 0x11, 0x4b, + 0xa3, 0x99, 0x34, 0x4e, 0x1b, 0xc7, 0x94, 0x90, 0xd7, 0xa9, 0x61, 0xe5, 0x2d, 0xd3, 0x26, 0x99, + 0x66, 0xe0, 0xaa, 0x9e, 0x6b, 0xfd, 0xfa, 0x59, 0x01, 0x4e, 0xb4, 0x42, 0x4d, 0x37, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x6e, 0xa1, 0x51, 0x3a, 0x89, 0x01, 0x00, 0x00, } func (m *DenomTrace) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/transfer/types/tx.pb.go b/modules/apps/transfer/types/tx.pb.go index f240ba7368e..61f0e847741 100644 --- a/modules/apps/transfer/types/tx.pb.go +++ b/modules/apps/transfer/types/tx.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -135,7 +135,7 @@ var fileDescriptor_7401ed9bed2f8e09 = []byte{ // 494 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40, 0x14, 0xc7, 0x6d, 0x92, 0x86, 0x70, 0x51, 0x2b, 0x30, 0xb4, 0x72, 0xa3, 0x62, 0x47, 0x96, 0x90, - 0xc2, 0xc0, 0x9d, 0xdc, 0x0a, 0x55, 0xea, 0x84, 0xd2, 0x05, 0x86, 0x4a, 0x60, 0x75, 0x62, 0x29, + 0xc2, 0xc0, 0x9d, 0x5c, 0x54, 0x55, 0xea, 0x84, 0xd2, 0x05, 0x86, 0x4a, 0x60, 0x75, 0x62, 0x29, 0xf6, 0xf5, 0x70, 0x4e, 0xc4, 0xf7, 0xac, 0xbb, 0x8b, 0x45, 0xbf, 0x01, 0x23, 0x1f, 0xa1, 0x33, 0x9f, 0xa4, 0x63, 0x47, 0xa6, 0x08, 0x25, 0x0b, 0x73, 0x3e, 0x01, 0x3a, 0xfb, 0x12, 0x92, 0x05, 0x31, 0xd9, 0xef, 0xfd, 0x7f, 0xef, 0xfe, 0x7a, 0xf7, 0xde, 0xa1, 0x17, 0x3c, 0xa3, 0x24, 0x2d, @@ -148,22 +148,22 @@ var fileDescriptor_7401ed9bed2f8e09 = []byte{ 0x81, 0x3b, 0x7c, 0x34, 0x3a, 0x58, 0xce, 0x42, 0xef, 0x26, 0x2d, 0x26, 0x67, 0xd1, 0x86, 0x18, 0x25, 0xa8, 0x89, 0xde, 0x83, 0xd4, 0xde, 0x1b, 0xb4, 0x67, 0x35, 0x3a, 0x4e, 0x85, 0x60, 0x13, 0xff, 0x41, 0x5d, 0x7b, 0xb8, 0x9c, 0x85, 0xfb, 0x5b, 0xb5, 0x56, 0x8f, 0x92, 0xdd, 0x26, 0x71, - 0xde, 0xc4, 0xde, 0x6b, 0xb4, 0xa3, 0xe1, 0x0b, 0x13, 0x7e, 0x6b, 0xe0, 0x0e, 0x7b, 0xc7, 0x87, - 0xb8, 0xe9, 0x0d, 0x9b, 0xde, 0xb0, 0xed, 0x0d, 0x9f, 0x03, 0x17, 0xa3, 0xf6, 0xdd, 0x2c, 0x74, - 0x92, 0x86, 0xf6, 0x0e, 0x50, 0x47, 0x31, 0x71, 0xcd, 0xa4, 0xdf, 0x36, 0x86, 0x89, 0x8d, 0xbc, - 0x3e, 0xea, 0x4a, 0x46, 0x19, 0xaf, 0x98, 0xf4, 0x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d, 0x51, 0x77, 0x3d, 0xc6, 0x97, 0xf8, 0x5f, 0xcb, 0x84, 0x37, 0x4e, 0xe9, 0xc7, 0xff, + 0x8d, 0xae, 0x0c, 0x47, 0x1f, 0xee, 0xe6, 0x81, 0x7b, 0x3f, 0x0f, 0xdc, 0x5f, 0xf3, 0xc0, 0xfd, + 0xbe, 0x08, 0x9c, 0xfb, 0x45, 0xe0, 0xfc, 0x5c, 0x04, 0xce, 0xc7, 0xd3, 0x9c, 0xeb, 0xf1, 0x34, + 0xc3, 0x14, 0x0a, 0x62, 0x57, 0x93, 0x67, 0xf4, 0x55, 0x0e, 0xa4, 0x3a, 0x21, 0x05, 0x5c, 0x4f, + 0x27, 0x4c, 0x99, 0xa7, 0xb0, 0xf1, 0x04, 0xf4, 0x4d, 0xc9, 0x54, 0xd6, 0xa9, 0xd7, 0xf1, 0xf5, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x79, 0xfe, 0x8d, 0x2c, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/02-client/abci.go b/modules/core/02-client/abci.go index 0fb1cb5233a..09e2e366c84 100644 --- a/modules/core/02-client/abci.go +++ b/modules/core/02-client/abci.go @@ -3,8 +3,8 @@ package client import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // BeginBlocker is used to perform IBC client upgrades @@ -25,7 +25,9 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } bz := k.MustMarshalConsensusState(upgradedConsState) - k.SetUpgradedConsensusState(ctx, plan.Height, bz) + // SetUpgradedConsensusState always returns nil, hence the blank here. + _ = k.SetUpgradedConsensusState(ctx, plan.Height, bz) + keeper.EmitUpgradeChainEvent(ctx, plan.Height) } } diff --git a/modules/core/02-client/abci_test.go b/modules/core/02-client/abci_test.go index 72e9fbe44dd..1fb212497bb 100644 --- a/modules/core/02-client/abci_test.go +++ b/modules/core/02-client/abci_test.go @@ -10,10 +10,10 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - client "github.com/cosmos/ibc-go/v3/modules/core/02-client" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + client "github.com/cosmos/ibc-go/v5/modules/core/02-client" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type ClientTestSuite struct { diff --git a/modules/core/02-client/client/cli/cli.go b/modules/core/02-client/client/cli/cli.go index 2a2546f1ab1..bdf42460573 100644 --- a/modules/core/02-client/client/cli/cli.go +++ b/modules/core/02-client/client/cli/cli.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // GetQueryCmd returns the query commands for IBC clients @@ -22,6 +22,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryClientState(), GetCmdQueryClientStatus(), GetCmdQueryConsensusStates(), + GetCmdQueryConsensusStateHeights(), GetCmdQueryConsensusState(), GetCmdQueryHeader(), GetCmdSelfConsensusState(), diff --git a/modules/core/02-client/client/cli/query.go b/modules/core/02-client/client/cli/query.go index d5e18679a28..eee0a48e6f9 100644 --- a/modules/core/02-client/client/cli/query.go +++ b/modules/core/02-client/client/cli/query.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/client/utils" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/client/utils" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( @@ -164,6 +164,49 @@ func GetCmdQueryConsensusStates() *cobra.Command { return cmd } +// GetCmdQueryConsensusStateHeights defines the command to query the heights of all client consensus states associated with the +// provided client ID. +func GetCmdQueryConsensusStateHeights() *cobra.Command { + cmd := &cobra.Command{ + Use: "consensus-state-heights [client-id]", + Short: "Query the heights of all consensus states of a client.", + Long: "Query the heights of all consensus states associated with the provided client ID.", + Example: fmt.Sprintf("%s query %s %s consensus-state-heights [client-id]", version.AppName, host.ModuleName, types.SubModuleName), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + clientID := args[0] + + queryClient := types.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + req := &types.QueryConsensusStateHeightsRequest{ + ClientId: clientID, + Pagination: pageReq, + } + + res, err := queryClient.ConsensusStateHeights(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "consensus state heights") + + return cmd +} + // GetCmdQueryConsensusState defines the command to query the consensus state of // the chain as defined in https://github.com/cosmos/ibc/tree/master/spec/core/ics-002-client-semantics#query func GetCmdQueryConsensusState() *cobra.Command { diff --git a/modules/core/02-client/client/cli/tx.go b/modules/core/02-client/client/cli/tx.go index 00cee6e5d2a..794b6f5ca5e 100644 --- a/modules/core/02-client/client/cli/tx.go +++ b/modules/core/02-client/client/cli/tx.go @@ -12,12 +12,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // NewCreateClientCmd defines the command to create a new IBC light client. @@ -251,12 +251,12 @@ func NewCmdSubmitUpdateClientProposal() *cobra.Command { return err } - title, err := cmd.Flags().GetString(govcli.FlagTitle) + title, err := cmd.Flags().GetString(govcli.FlagTitle) //nolint:staticcheck // need this till full govv1 conversion. if err != nil { return err } - description, err := cmd.Flags().GetString(govcli.FlagDescription) + description, err := cmd.Flags().GetString(govcli.FlagDescription) //nolint:staticcheck // need this till full govv1 conversion. if err != nil { return err } @@ -290,8 +290,8 @@ func NewCmdSubmitUpdateClientProposal() *cobra.Command { }, } - cmd.Flags().String(govcli.FlagTitle, "", "title of proposal") - cmd.Flags().String(govcli.FlagDescription, "", "description of proposal") + cmd.Flags().String(govcli.FlagTitle, "", "title of proposal") //nolint:staticcheck // need this till full govv1 conversion. + cmd.Flags().String(govcli.FlagDescription, "", "description of proposal") //nolint:staticcheck // need this till full govv1 conversion. cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal") return cmd @@ -322,12 +322,12 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command { } cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) - title, err := cmd.Flags().GetString(govcli.FlagTitle) + title, err := cmd.Flags().GetString(govcli.FlagTitle) //nolint:staticcheck // need this till full govv1 conversion. if err != nil { return err } - description, err := cmd.Flags().GetString(govcli.FlagDescription) + description, err := cmd.Flags().GetString(govcli.FlagDescription) //nolint:staticcheck // need this till full govv1 conversion. if err != nil { return err } @@ -389,8 +389,8 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command { }, } - cmd.Flags().String(govcli.FlagTitle, "", "title of proposal") - cmd.Flags().String(govcli.FlagDescription, "", "description of proposal") + cmd.Flags().String(govcli.FlagTitle, "", "title of proposal") //nolint:staticcheck // need this till full govv1 conversion. + cmd.Flags().String(govcli.FlagDescription, "", "description of proposal") //nolint:staticcheck // need this till full govv1 conversion. cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal") return cmd diff --git a/modules/core/02-client/client/proposal_handler.go b/modules/core/02-client/client/proposal_handler.go index 93e98dbc8b2..7840bd0d4c2 100644 --- a/modules/core/02-client/client/proposal_handler.go +++ b/modules/core/02-client/client/proposal_handler.go @@ -1,26 +1,12 @@ package client import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/client/cli" ) var ( - UpdateClientProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpdateClientProposal, emptyRestHandler) - UpgradeProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal, emptyRestHandler) + UpdateClientProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpdateClientProposal) + UpgradeProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal) ) - -func emptyRestHandler(client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "unsupported-ibc-client", - Handler: func(w http.ResponseWriter, r *http.Request) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "Legacy REST Routes are not supported for IBC proposals") - }, - } -} diff --git a/modules/core/02-client/client/utils/utils.go b/modules/core/02-client/client/utils/utils.go index 0ea44d7523b..a8493da38ad 100644 --- a/modules/core/02-client/client/utils/utils.go +++ b/modules/core/02-client/client/utils/utils.go @@ -8,12 +8,12 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/client" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/client" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // QueryClientState returns a client state. If prove is true, it performs an ABCI store query diff --git a/modules/core/02-client/genesis.go b/modules/core/02-client/genesis.go index 87deebba5d0..18dc745620d 100644 --- a/modules/core/02-client/genesis.go +++ b/modules/core/02-client/genesis.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // InitGenesis initializes the ibc client submodule's state from a provided genesis diff --git a/modules/core/02-client/keeper/client.go b/modules/core/02-client/keeper/client.go index 9fc10fe3d1b..a1f6b4a2e8a 100644 --- a/modules/core/02-client/keeper/client.go +++ b/modules/core/02-client/keeper/client.go @@ -1,13 +1,13 @@ package keeper import ( - "github.com/armon/go-metrics" + metrics "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" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // CreateClient creates a new client state and populates it with a given consensus @@ -110,7 +110,8 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, clientMsg exporte // UpgradeClient upgrades the client to a new client state if this new client was committed to // by the old client at the specified upgrade height func (k Keeper) UpgradeClient(ctx sdk.Context, clientID string, upgradedClient exported.ClientState, upgradedConsState exported.ConsensusState, - proofUpgradeClient, proofUpgradeConsState []byte) error { + proofUpgradeClient, proofUpgradeConsState []byte, +) error { clientState, found := k.GetClientState(ctx, clientID) if !found { return sdkerrors.Wrapf(types.ErrClientNotFound, "cannot update client with ID %s", clientID) diff --git a/modules/core/02-client/keeper/client_test.go b/modules/core/02-client/keeper/client_test.go index 504eca3f726..57f26d305bc 100644 --- a/modules/core/02-client/keeper/client_test.go +++ b/modules/core/02-client/keeper/client_test.go @@ -7,13 +7,13 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestCreateClient() { @@ -70,7 +70,8 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { trustHeight := clientState.GetLatestHeight().(types.Height) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height - path.EndpointA.UpdateClient() + err := path.EndpointA.UpdateClient() + suite.Require().NoError(err) updateHeader = createFutureUpdateFn(trustHeight) }, true, false}, @@ -85,7 +86,8 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { suite.coordinator.CommitBlock(suite.chainB) // this height is not filled in yet suite.coordinator.CommitBlock(suite.chainB) // this height is filled in by the update below - path.EndpointA.UpdateClient() + err := path.EndpointA.UpdateClient() + suite.Require().NoError(err) // ensure fill height not set _, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientConsensusState(suite.chainA.GetContext(), path.EndpointA.ClientID, fillHeight) @@ -272,12 +274,14 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { lastHeight = clienttypes.NewHeight(1, uint64(suite.chainB.GetContext().BlockHeight()+1)) // zero custom fields and store in upgrade store - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + err := suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) + suite.Require().NoError(err) + err = suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + suite.Require().NoError(err) // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := path.EndpointA.UpdateClient() + err = path.EndpointA.UpdateClient() suite.Require().NoError(err) cs, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID) @@ -295,13 +299,15 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { lastHeight = clienttypes.NewHeight(1, uint64(suite.chainB.GetContext().BlockHeight()+1)) // zero custom fields and store in upgrade store - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + err := suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) + suite.Require().NoError(err) + err = suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + suite.Require().NoError(err) // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := path.EndpointA.UpdateClient() + err = path.EndpointA.UpdateClient() suite.Require().NoError(err) cs, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID) @@ -323,13 +329,15 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { lastHeight = clienttypes.NewHeight(1, uint64(suite.chainB.GetContext().BlockHeight()+1)) // zero custom fields and store in upgrade store - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + err := suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) + suite.Require().NoError(err) + err = suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + suite.Require().NoError(err) // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := path.EndpointA.UpdateClient() + err = path.EndpointA.UpdateClient() suite.Require().NoError(err) cs, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID) @@ -353,8 +361,10 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { lastHeight = clienttypes.NewHeight(1, uint64(suite.chainB.GetContext().BlockHeight()+1)) // zero custom fields and store in upgrade store - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) - suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + err := suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedClientBz) + suite.Require().NoError(err) + err = suite.chainB.GetSimApp().UpgradeKeeper.SetUpgradedConsensusState(suite.chainB.GetContext(), int64(lastHeight.GetRevisionHeight()), upgradedConsStateBz) + suite.Require().NoError(err) // change upgradedClient client-specified parameters tmClient := upgradedClient.(*ibctmtypes.ClientState) @@ -362,7 +372,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradedClient = tmClient suite.coordinator.CommitBlock(suite.chainB) - err := path.EndpointA.UpdateClient() + err = path.EndpointA.UpdateClient() suite.Require().NoError(err) cs, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID) @@ -407,7 +417,6 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { suite.Require().Error(err, "verify upgrade passed on invalid case: %s", tc.name) } } - } func (suite *KeeperTestSuite) TestUpdateClientEventEmission() { @@ -441,8 +450,6 @@ func (suite *KeeperTestSuite) TestUpdateClientEventEmission() { suite.Require().NoError(err) suite.Require().Equal(header, emittedHeader) } - } suite.Require().True(contains) - } diff --git a/modules/core/02-client/keeper/encoding.go b/modules/core/02-client/keeper/encoding.go index 9a8156df37e..d8efad641c1 100644 --- a/modules/core/02-client/keeper/encoding.go +++ b/modules/core/02-client/keeper/encoding.go @@ -1,8 +1,8 @@ package keeper import ( - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // UnmarshalClientState attempts to decode and return an ClientState object from diff --git a/modules/core/02-client/keeper/events.go b/modules/core/02-client/keeper/events.go index 56c537b224b..8936442b8eb 100644 --- a/modules/core/02-client/keeper/events.go +++ b/modules/core/02-client/keeper/events.go @@ -2,6 +2,7 @@ package keeper import ( "encoding/hex" + "fmt" "strconv" "strings" @@ -9,8 +10,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // EmitCreateClientEvent emits a create client event @@ -31,7 +32,6 @@ func EmitCreateClientEvent(ctx sdk.Context, clientID string, clientState exporte // EmitUpdateClientEvent emits an update client event func EmitUpdateClientEvent(ctx sdk.Context, clientID string, clientType string, consensusHeights []exported.Height, cdc codec.BinaryCodec, clientMsg exported.ClientMessage) { - // Marshal the ClientMessage as an Any and encode the resulting bytes to hex. // This prevents the event value from containing invalid UTF-8 characters // which may cause data to be lost when JSON encoding/decoding. @@ -42,9 +42,9 @@ func EmitUpdateClientEvent(ctx sdk.Context, clientID string, clientType string, consensusHeightAttr = consensusHeights[0].String() } - var consensusHeightsAttr []string - for _, height := range consensusHeights { - consensusHeightsAttr = append(consensusHeightsAttr, height.String()) + consensusHeightsAttr := make([]string, len(consensusHeights)) + for i, height := range consensusHeights { + consensusHeightsAttr[i] = height.String() } ctx.EventManager().EmitEvents(sdk.Events{ @@ -93,6 +93,17 @@ func EmitUpdateClientProposalEvent(ctx sdk.Context, clientID string, clientState ) } +// EmitUpgradeClientProposalEvent emits an upgrade client proposal event +func EmitUpgradeClientProposalEvent(ctx sdk.Context, title string, height int64) { + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeUpgradeClientProposal, + sdk.NewAttribute(types.AttributeKeyUpgradePlanTitle, title), + sdk.NewAttribute(types.AttributeKeyUpgradePlanHeight, fmt.Sprintf("%d", height)), + ), + ) +} + // EmitSubmitMisbehaviourEvent emits a client misbehaviour event func EmitSubmitMisbehaviourEvent(ctx sdk.Context, clientID string, clientState exported.ClientState) { ctx.EventManager().EmitEvent( diff --git a/modules/core/02-client/keeper/grpc_query.go b/modules/core/02-client/keeper/grpc_query.go index d4a2eca5a4f..2437f616edc 100644 --- a/modules/core/02-client/keeper/grpc_query.go +++ b/modules/core/02-client/keeper/grpc_query.go @@ -14,9 +14,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ types.QueryServer = Keeper{} @@ -83,7 +83,6 @@ func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequ clientStates = append(clientStates, identifiedClient) return nil }) - if err != nil { return nil, err } @@ -177,7 +176,6 @@ func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat consensusStates = append(consensusStates, types.NewConsensusStateWithHeight(height, consensusState)) return true, nil }) - if err != nil { return nil, err } @@ -188,6 +186,45 @@ func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat }, nil } +// ConsensusStateHeights implements the Query/ConsensusStateHeights gRPC method +func (q Keeper) ConsensusStateHeights(c context.Context, req *types.QueryConsensusStateHeightsRequest) (*types.QueryConsensusStateHeightsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if err := host.ClientIdentifierValidator(req.ClientId); err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + ctx := sdk.UnwrapSDKContext(c) + + var consensusStateHeights []types.Height + store := prefix.NewStore(ctx.KVStore(q.storeKey), host.FullClientKey(req.ClientId, []byte(fmt.Sprintf("%s/", host.KeyConsensusStatePrefix)))) + + pageRes, err := query.FilteredPaginate(store, req.Pagination, func(key, _ []byte, accumulate bool) (bool, error) { + // filter any metadata stored under consensus state key + if bytes.Contains(key, []byte("/")) { + return false, nil + } + + height, err := types.ParseHeight(string(key)) + if err != nil { + return false, err + } + + consensusStateHeights = append(consensusStateHeights, height) + return true, nil + }) + if err != nil { + return nil, err + } + + return &types.QueryConsensusStateHeightsResponse{ + ConsensusStateHeights: consensusStateHeights, + Pagination: pageRes, + }, nil +} + // ClientStatus implements the Query/ClientStatus gRPC method func (q Keeper) ClientStatus(c context.Context, req *types.QueryClientStatusRequest) (*types.QueryClientStatusResponse, error) { if req == nil { diff --git a/modules/core/02-client/keeper/grpc_query_test.go b/modules/core/02-client/keeper/grpc_query_test.go index af8183bc5de..f79e838ab48 100644 --- a/modules/core/02-client/keeper/grpc_query_test.go +++ b/modules/core/02-client/keeper/grpc_query_test.go @@ -2,7 +2,6 @@ package keeper_test import ( "fmt" - "time" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,11 +9,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/metadata" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestQueryClientState() { @@ -28,19 +26,22 @@ func (suite *KeeperTestSuite) TestQueryClientState() { malleate func() expPass bool }{ - {"req is nil", + { + "req is nil", func() { req = nil }, false, }, - {"invalid clientID", + { + "invalid clientID", func() { req = &types.QueryClientStateRequest{} }, false, }, - {"client not found", + { + "client not found", func() { req = &types.QueryClientStateRequest{ ClientId: testClientID, @@ -100,7 +101,8 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { malleate func() expPass bool }{ - {"req is nil", + { + "req is nil", func() { req = nil }, @@ -184,7 +186,8 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { malleate func() expPass bool }{ - {"req is nil", + { + "req is nil", func() { req = nil }, @@ -288,7 +291,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { func (suite *KeeperTestSuite) TestQueryConsensusStates() { var ( req *types.QueryConsensusStatesRequest - expConsensusStates = []types.ConsensusStateWithHeight{} + expConsensusStates []types.ConsensusStateWithHeight ) testCases := []struct { @@ -297,14 +300,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { expPass bool }{ { - "invalid client identifier", - func() { - req = &types.QueryConsensusStatesRequest{} - }, - false, - }, - { - "empty pagination", + "success: without pagination", func() { req = &types.QueryConsensusStatesRequest{ ClientId: testClientID, @@ -328,29 +324,30 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { { "success", func() { - cs := ibctmtypes.NewConsensusState( - suite.consensusState.Timestamp, commitmenttypes.NewMerkleRoot([]byte("hash1")), nil, - ) - cs2 := ibctmtypes.NewConsensusState( - suite.consensusState.Timestamp.Add(time.Second), commitmenttypes.NewMerkleRoot([]byte("hash2")), nil, - ) - - clientState := ibctmtypes.NewClientState( - testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, - ) - - // Use CreateClient to ensure that processedTime metadata gets stored. - clientId, err := suite.keeper.CreateClient(suite.ctx, clientState, cs) + path := ibctesting.NewPath(suite.chainA, suite.chainB) + suite.coordinator.SetupClients(path) + + height1 := path.EndpointA.GetClientState().GetLatestHeight().(types.Height) + expConsensusStates = append( + expConsensusStates, + types.NewConsensusStateWithHeight( + height1, + path.EndpointA.GetConsensusState(height1), + )) + + err := path.EndpointA.UpdateClient() suite.Require().NoError(err) - suite.keeper.SetClientConsensusState(suite.ctx, clientId, testClientHeight.Increment(), cs2) - // order is swapped because the res is sorted by client id - expConsensusStates = []types.ConsensusStateWithHeight{ - types.NewConsensusStateWithHeight(testClientHeight, cs), - types.NewConsensusStateWithHeight(testClientHeight.Increment().(types.Height), cs2), - } + height2 := path.EndpointA.GetClientState().GetLatestHeight().(types.Height) + expConsensusStates = append( + expConsensusStates, + types.NewConsensusStateWithHeight( + height2, + path.EndpointA.GetConsensusState(height2), + )) + req = &types.QueryConsensusStatesRequest{ - ClientId: clientId, + ClientId: path.EndpointA.ClientID, Pagination: &query.PageRequest{ Limit: 3, CountTotal: true, @@ -359,6 +356,13 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { }, true, }, + { + "invalid client identifier", + func() { + req = &types.QueryConsensusStatesRequest{} + }, + false, + }, } for _, tc := range testCases { @@ -366,9 +370,8 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { suite.SetupTest() // reset tc.malleate() - ctx := sdk.WrapSDKContext(suite.ctx) - - res, err := suite.queryClient.ConsensusStates(ctx, req) + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + res, err := suite.chainA.QueryServer.ConsensusStates(ctx, req) if tc.expPass { suite.Require().NoError(err) @@ -389,30 +392,119 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { } } -func (suite *KeeperTestSuite) TestQueryClientStatus() { +func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { var ( - req *types.QueryClientStatusRequest + req *types.QueryConsensusStateHeightsRequest + expConsensusStateHeights []types.Height ) + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "success: without pagination", + func() { + req = &types.QueryConsensusStateHeightsRequest{ + ClientId: testClientID, + } + }, + true, + }, + { + "success: response contains no results", + func() { + req = &types.QueryConsensusStateHeightsRequest{ + ClientId: testClientID, + Pagination: &query.PageRequest{ + Limit: 3, + CountTotal: true, + }, + } + }, + true, + }, + { + "success: returns consensus heights", + func() { + path := ibctesting.NewPath(suite.chainA, suite.chainB) + suite.coordinator.SetupClients(path) + + expConsensusStateHeights = append(expConsensusStateHeights, path.EndpointA.GetClientState().GetLatestHeight().(types.Height)) + + err := path.EndpointA.UpdateClient() + suite.Require().NoError(err) + + expConsensusStateHeights = append(expConsensusStateHeights, path.EndpointA.GetClientState().GetLatestHeight().(types.Height)) + + req = &types.QueryConsensusStateHeightsRequest{ + ClientId: path.EndpointA.ClientID, + Pagination: &query.PageRequest{ + Limit: 3, + CountTotal: true, + }, + } + }, + true, + }, + { + "invalid client identifier", + func() { + req = &types.QueryConsensusStateHeightsRequest{} + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + + tc.malleate() + ctx := sdk.WrapSDKContext(suite.chainA.GetContext()) + res, err := suite.chainA.QueryServer.ConsensusStateHeights(ctx, req) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + suite.Require().Equal(len(expConsensusStateHeights), len(res.ConsensusStateHeights)) + for i := range expConsensusStateHeights { + suite.Require().NotNil(res.ConsensusStateHeights[i]) + suite.Require().Equal(expConsensusStateHeights[i], res.ConsensusStateHeights[i]) + } + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestQueryClientStatus() { + var req *types.QueryClientStatusRequest + testCases := []struct { msg string malleate func() expPass bool expStatus string }{ - {"req is nil", + { + "req is nil", func() { req = nil }, false, "", }, - {"invalid clientID", + { + "invalid clientID", func() { req = &types.QueryClientStatusRequest{} }, false, "", }, - {"client not found", + { + "client not found", func() { req = &types.QueryClientStatusRequest{ ClientId: ibctesting.InvalidID, @@ -497,7 +589,8 @@ func (suite *KeeperTestSuite) TestQueryUpgradedConsensusStates() { malleate func() expPass bool }{ - {"req is nil", + { + "req is nil", func() { req = nil }, diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index 1d32549654a..1ff74c43be0 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -14,17 +15,17 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/light" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // Keeper represents a type that grants read and write permissions to any client // state information type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec paramSpace paramtypes.Subspace stakingKeeper types.StakingKeeper @@ -32,7 +33,7 @@ type Keeper struct { } // NewKeeper creates a new NewKeeper instance -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, sk types.StakingKeeper, uk types.UpgradeKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, sk types.StakingKeeper, uk types.UpgradeKeeper) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index 00bcfda178e..dcc8460023e 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -15,15 +15,15 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) const ( @@ -175,7 +175,7 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "frozen client", - &ibctmtypes.ClientState{suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false}, + &ibctmtypes.ClientState{ChainId: suite.chainA.ChainID, TrustLevel: ibctmtypes.DefaultTrustLevel, TrustingPeriod: trustingPeriod, UnbondingPeriod: ubdPeriod, MaxClockDrift: maxClockDrift, FrozenHeight: testClientHeight, LatestHeight: testClientHeight, ProofSpecs: commitmenttypes.GetSDKSpecs(), UpgradePath: ibctesting.UpgradePath, AllowUpdateAfterExpiry: false, AllowUpdateAfterMisbehaviour: false}, false, }, { @@ -205,7 +205,7 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "invalid trust level", - ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.Fraction{0, 1}, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), false, }, { diff --git a/modules/core/02-client/keeper/migrations.go b/modules/core/02-client/keeper/migrations.go index 53ff8a657e7..e4ba66760df 100644 --- a/modules/core/02-client/keeper/migrations.go +++ b/modules/core/02-client/keeper/migrations.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v100 "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100" + v100 "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100" ) // Migrator is a struct for handling in-place store migrations. diff --git a/modules/core/02-client/keeper/params.go b/modules/core/02-client/keeper/params.go index 84bd2845ba3..78fe9b6d5de 100644 --- a/modules/core/02-client/keeper/params.go +++ b/modules/core/02-client/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // GetAllowedClients retrieves the allowed clients from the paramstore diff --git a/modules/core/02-client/keeper/params_test.go b/modules/core/02-client/keeper/params_test.go index c293f7ec195..9e9c7f9574f 100644 --- a/modules/core/02-client/keeper/params_test.go +++ b/modules/core/02-client/keeper/params_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/modules/core/02-client/keeper/proposal.go b/modules/core/02-client/keeper/proposal.go index 115707777e5..d25ae0ef34d 100644 --- a/modules/core/02-client/keeper/proposal.go +++ b/modules/core/02-client/keeper/proposal.go @@ -1,13 +1,13 @@ package keeper import ( - "github.com/armon/go-metrics" + metrics "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" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ClientUpdateProposal will retrieve the subject and substitute client. @@ -92,5 +92,12 @@ func (k Keeper) HandleUpgradeProposal(ctx sdk.Context, p *types.UpgradeProposal) // sets the new upgraded client in last height committed on this chain is at plan.Height, // since the chain will panic at plan.Height and new chain will resume at plan.Height - return k.upgradeKeeper.SetUpgradedClient(ctx, p.Plan.Height, bz) + if err = k.upgradeKeeper.SetUpgradedClient(ctx, p.Plan.Height, bz); err != nil { + return err + } + + // emitting an event for handling client upgrade proposal + EmitUpgradeClientProposalEvent(ctx, p.Title, p.Plan.Height) + + return nil } diff --git a/modules/core/02-client/keeper/proposal_test.go b/modules/core/02-client/keeper/proposal_test.go index 0dcd123f06e..ec11074a5fe 100644 --- a/modules/core/02-client/keeper/proposal_test.go +++ b/modules/core/02-client/keeper/proposal_test.go @@ -1,13 +1,13 @@ package keeper_test import ( - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestClientUpdateProposal() { @@ -144,7 +144,6 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { } }) } - } func (suite *KeeperTestSuite) TestHandleUpgradeProposal() { @@ -196,7 +195,7 @@ func (suite *KeeperTestSuite) TestHandleUpgradeProposal() { suite.Run(tc.name, func() { suite.SetupTest() // reset - oldPlan.Height = 0 //reset + oldPlan.Height = 0 // reset path := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) @@ -266,5 +265,4 @@ func (suite *KeeperTestSuite) TestHandleUpgradeProposal() { } }) } - } diff --git a/modules/core/02-client/legacy/v100/genesis.go b/modules/core/02-client/legacy/v100/genesis.go index 507443382a5..4126cb18af6 100644 --- a/modules/core/02-client/legacy/v100/genesis.go +++ b/modules/core/02-client/legacy/v100/genesis.go @@ -7,10 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // MigrateGenesis accepts exported v1.0.0 IBC client genesis file and migrates it to: @@ -123,13 +123,11 @@ func MigrateGenesis(cdc codec.BinaryCodec, clientGenState *types.GenesisState, g Key: ibctmtypes.IterationKey(height), Value: host.ConsensusStateKey(height), }) - } } } } - } // if we have metadata for unexipred consensus states, add it to consensusMetadata diff --git a/modules/core/02-client/legacy/v100/genesis_test.go b/modules/core/02-client/legacy/v100/genesis_test.go index 0c64722bc59..7d779a250be 100644 --- a/modules/core/02-client/legacy/v100/genesis_test.go +++ b/modules/core/02-client/legacy/v100/genesis_test.go @@ -9,14 +9,14 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - v100 "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" + v100 "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { @@ -25,7 +25,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { clientCtx := client.Context{}. WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). - WithJSONCodec(encodingConfig.Marshaler) + WithCodec(encodingConfig.Marshaler) // create multiple legacy solo machine clients solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-0", "testing", 1) @@ -50,7 +50,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { seq = 1 } - // generate old client state proto defintion + // generate old client state proto definition legacyClientState := &v100.ClientState{ Sequence: clientState.Sequence, FrozenSequence: seq, @@ -147,7 +147,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { } } - bz, err := clientCtx.JSONCodec.MarshalJSON(&expectedClientGenState) + bz, err := clientCtx.Codec.MarshalJSON(&expectedClientGenState) suite.Require().NoError(err) // Indent the JSON bz correctly. @@ -157,7 +157,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { expectedIndentedBz, err := json.MarshalIndent(jsonObj, "", "\t") suite.Require().NoError(err) - bz, err = clientCtx.JSONCodec.MarshalJSON(migrated) + bz, err = clientCtx.Codec.MarshalJSON(migrated) suite.Require().NoError(err) // Indent the JSON bz correctly. @@ -177,7 +177,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { clientCtx := client.Context{}. WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). - WithJSONCodec(encodingConfig.Marshaler) + WithCodec(encodingConfig.Marshaler) suite.coordinator.SetupClients(path1) suite.coordinator.SetupClients(path2) @@ -254,7 +254,6 @@ func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { suite.Require().NotEqual(height, consensusState.Height) } } - } for _, client := range migrated.ClientsMetadata { if client.ClientId == path1.EndpointA.ClientID { @@ -275,7 +274,6 @@ func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { suite.Require().NotEqual(height, consensusState.Height) } } - } for _, client := range migrated.ClientsMetadata { if client.ClientId == path2.EndpointA.ClientID { @@ -285,10 +283,9 @@ func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { suite.Require().NotEqual(ibctmtypes.IterationKey(height), metadata.Key) } } - } } - bz, err := clientCtx.JSONCodec.MarshalJSON(&expectedClientGenState) + bz, err := clientCtx.Codec.MarshalJSON(&expectedClientGenState) suite.Require().NoError(err) // Indent the JSON bz correctly. @@ -298,7 +295,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { expectedIndentedBz, err := json.MarshalIndent(jsonObj, "", "\t") suite.Require().NoError(err) - bz, err = clientCtx.JSONCodec.MarshalJSON(migrated) + bz, err = clientCtx.Codec.MarshalJSON(migrated) suite.Require().NoError(err) // Indent the JSON bz correctly. diff --git a/modules/core/02-client/legacy/v100/solomachine.go b/modules/core/02-client/legacy/v100/solomachine.go index d41d6c31dbc..9df81bee22a 100644 --- a/modules/core/02-client/legacy/v100/solomachine.go +++ b/modules/core/02-client/legacy/v100/solomachine.go @@ -7,7 +7,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // NOTE: this is a mock implmentation for exported.ClientState. This implementation diff --git a/modules/core/02-client/legacy/v100/solomachine.pb.go b/modules/core/02-client/legacy/v100/solomachine.pb.go index 1c87a4d9d2f..76d8004c0ac 100644 --- a/modules/core/02-client/legacy/v100/solomachine.pb.go +++ b/modules/core/02-client/legacy/v100/solomachine.pb.go @@ -6,8 +6,8 @@ package v100 import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - types2 "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + types2 "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -826,7 +826,7 @@ var fileDescriptor_6cc2ee18f7f86d4e = []byte{ // 1369 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5f, 0x6f, 0xdb, 0x54, 0x14, 0xaf, 0xb3, 0xac, 0x6b, 0x4e, 0xba, 0x36, 0x78, 0xd9, 0x96, 0x7a, 0x53, 0x62, 0x8c, 0x18, - 0x05, 0xb1, 0x78, 0xed, 0xc4, 0x84, 0x26, 0x34, 0x70, 0x1c, 0xc3, 0xb2, 0xb5, 0x6e, 0x70, 0x5c, + 0x05, 0xb1, 0x78, 0x2d, 0xda, 0x84, 0x26, 0x34, 0x70, 0x1c, 0xc3, 0xb2, 0xb5, 0x6e, 0x70, 0x5c, 0xd8, 0x26, 0x24, 0xcb, 0x71, 0x6e, 0x53, 0x6b, 0x89, 0x6f, 0x88, 0x9d, 0x74, 0x41, 0x42, 0x42, 0x3c, 0x8d, 0x88, 0x07, 0xbe, 0x40, 0x24, 0x04, 0xe2, 0xab, 0x00, 0x8f, 0xe3, 0x8d, 0xa7, 0x80, 0xb6, 0x6f, 0x90, 0x4f, 0x80, 0xec, 0x7b, 0x13, 0xdb, 0xe9, 0x9a, 0x8a, 0x7f, 0x6f, 0xf7, 0x9e, @@ -895,21 +895,21 @@ var fileDescriptor_6cc2ee18f7f86d4e = []byte{ 0x9e, 0x5a, 0x53, 0xd4, 0xda, 0x7e, 0x8d, 0x42, 0x13, 0xdc, 0xf9, 0xe1, 0x88, 0x4f, 0xcd, 0xc4, 0x6c, 0x11, 0xb8, 0x18, 0x5a, 0x55, 0x64, 0xbd, 0xb2, 0xa7, 0x52, 0xf8, 0x19, 0x6e, 0x6d, 0x38, 0xe2, 0x21, 0x94, 0xb3, 0x9b, 0x70, 0x39, 0x82, 0xbf, 0x2b, 0xa9, 0xaa, 0xb2, 0x43, 0xc1, 0x49, - 0x2e, 0x3d, 0x1c, 0xf1, 0xe7, 0xa8, 0x90, 0x7d, 0x07, 0xae, 0x84, 0xc8, 0xaa, 0x24, 0xdf, 0x57, - 0x74, 0x43, 0xde, 0xdb, 0xdd, 0xad, 0xe8, 0xbb, 0x8a, 0xaa, 0x67, 0xce, 0x72, 0xd9, 0xe1, 0x88, - 0xcf, 0x10, 0x45, 0x28, 0x67, 0xdf, 0x07, 0xfe, 0x98, 0x99, 0x24, 0xdf, 0x57, 0xf7, 0x3e, 0xdd, - 0x51, 0xca, 0x1f, 0x29, 0x81, 0xed, 0x32, 0xb7, 0x31, 0x1c, 0xf1, 0x17, 0x89, 0x76, 0x4e, 0xc9, - 0xde, 0x79, 0x09, 0x81, 0xa6, 0xc8, 0x4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x64, 0x24, 0x8a, 0x2d, 0xd4, 0x34, 0xad, + 0x81, 0xd8, 0xdf, 0xba, 0x71, 0xa3, 0xbe, 0x1c, 0xcc, 0xb1, 0x77, 0xfe, 0x0a, 0x00, 0x00, 0xff, + 0xff, 0x04, 0xb8, 0xaf, 0xec, 0x8a, 0x0d, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/02-client/legacy/v100/store.go b/modules/core/02-client/legacy/v100/store.go index 08910ea419a..1d22547cf26 100644 --- a/modules/core/02-client/legacy/v100/store.go +++ b/modules/core/02-client/legacy/v100/store.go @@ -7,15 +7,15 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - smtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + smtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // MigrateStore performs in-place store migrations from SDK v0.40 of the IBC module to v1.0.0 of ibc-go. @@ -25,7 +25,7 @@ import ( // - Pruning all solo machine consensus states // - Pruning expired tendermint consensus states // - Adds ProcessedHeight and Iteration keys for unexpired tendermint consensus states -func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) (err error) { +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) (err error) { store := ctx.KVStore(storeKey) iterator := sdk.KVStorePrefixIterator(store, host.KeyClientStorePrefix) @@ -45,7 +45,7 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) } for _, clientID := range clients { - clientType, _, err := types.ParseClientIdentifier(clientID) + clientType, _, err := clienttypes.ParseClientIdentifier(clientID) if err != nil { return err } @@ -90,13 +90,11 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) tmClientState, ok := clientState.(*ibctmtypes.ClientState) if !ok { - return sdkerrors.Wrap(types.ErrInvalidClient, "client state is not tendermint even though client id contains 07-tendermint") + return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state is not tendermint even though client id contains 07-tendermint") } // add iteration keys so pruning will be successful - if err = addConsensusMetadata(ctx, clientStore, cdc, tmClientState); err != nil { - return err - } + addConsensusMetadata(ctx, clientStore) if err = ibctmtypes.PruneAllExpiredConsensusStates(ctx, clientStore, cdc, tmClientState); err != nil { return err @@ -110,7 +108,7 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) return nil } -// migrateSolomachine migrates the solomachine from v1 to v2 solo machine protobuf defintion. +// migrateSolomachine migrates the solomachine from v1 to v2 solo machine protobuf definition. func migrateSolomachine(clientState *ClientState) *smtypes.ClientState { isFrozen := clientState.FrozenSequence != 0 consensusState := &smtypes.ConsensusState{ @@ -142,7 +140,7 @@ func pruneSolomachineConsensusStates(clientStore sdk.KVStore) { } // collect consensus states to be pruned - heights = append(heights, types.MustParseHeight(keySplit[1])) + heights = append(heights, clienttypes.MustParseHeight(keySplit[1])) } // delete all consensus states @@ -154,7 +152,7 @@ func pruneSolomachineConsensusStates(clientStore sdk.KVStore) { // addConsensusMetadata adds the iteration key and processed height for all tendermint consensus states // These keys were not included in the previous release of the IBC module. Adding the iteration keys allows // for pruning iteration. -func addConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec, clientState *ibctmtypes.ClientState) error { +func addConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore) { var heights []exported.Height iterator := sdk.KVStorePrefixIterator(clientStore, []byte(host.KeyConsensusStatePrefix)) @@ -166,7 +164,7 @@ func addConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.Bi continue } - heights = append(heights, types.MustParseHeight(keySplit[1])) + heights = append(heights, clienttypes.MustParseHeight(keySplit[1])) } for _, height := range heights { @@ -175,6 +173,4 @@ func addConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.Bi ibctmtypes.SetProcessedHeight(clientStore, height, clienttypes.GetSelfHeight(ctx)) ibctmtypes.SetIterationKey(clientStore, height) } - - return nil } diff --git a/modules/core/02-client/legacy/v100/store_test.go b/modules/core/02-client/legacy/v100/store_test.go index db06d7d4cbd..0d07cfc91e0 100644 --- a/modules/core/02-client/legacy/v100/store_test.go +++ b/modules/core/02-client/legacy/v100/store_test.go @@ -6,12 +6,12 @@ import ( "github.com/stretchr/testify/suite" - v100 "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + v100 "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type LegacyTestSuite struct { @@ -62,7 +62,7 @@ func (suite *LegacyTestSuite) TestMigrateStoreSolomachine() { seq = 1 } - // generate old client state proto defintion + // generate old client state proto definition legacyClientState := &v100.ClientState{ Sequence: clientState.Sequence, FrozenSequence: seq, diff --git a/modules/core/02-client/migrations/v6/solomachine.pb.go b/modules/core/02-client/migrations/v6/solomachine.pb.go index c92f04029f2..bbcb1b6a355 100644 --- a/modules/core/02-client/migrations/v6/solomachine.pb.go +++ b/modules/core/02-client/migrations/v6/solomachine.pb.go @@ -6,8 +6,8 @@ package v6 import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - types2 "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + types2 "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -826,7 +826,7 @@ var fileDescriptor_141333b361aae010 = []byte{ // 1373 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5f, 0x8f, 0xdb, 0x44, 0x10, 0x3f, 0xa7, 0xe9, 0xf5, 0xb2, 0xb9, 0xde, 0x05, 0x37, 0x6d, 0x73, 0x6e, 0x95, 0x18, 0x23, - 0xca, 0x81, 0x68, 0xcc, 0x5d, 0x45, 0x85, 0x2a, 0x04, 0x75, 0x1c, 0x97, 0xa6, 0xbd, 0xf3, 0x05, + 0xca, 0x81, 0x68, 0xcc, 0x1d, 0x6a, 0x85, 0x2a, 0x04, 0x75, 0x1c, 0x97, 0xa6, 0xbd, 0xf3, 0x05, 0xc7, 0x07, 0xb4, 0x42, 0xb2, 0x1c, 0x7b, 0x2f, 0xb1, 0x9a, 0x78, 0xd3, 0x78, 0x93, 0x34, 0x48, 0x48, 0x88, 0xa7, 0x12, 0xf1, 0xc0, 0x17, 0x88, 0x84, 0x40, 0x7c, 0x0e, 0xde, 0x80, 0xc7, 0x3e, 0xf2, 0x14, 0x50, 0xfb, 0x0d, 0xf2, 0x09, 0x90, 0xbd, 0x9b, 0xd8, 0xce, 0xf5, 0x72, 0xe2, 0xdf, @@ -895,21 +895,21 @@ var fileDescriptor_141333b361aae010 = []byte{ 0x8a, 0xe8, 0x1d, 0xa8, 0x35, 0x45, 0xad, 0x1d, 0xd6, 0xa8, 0x6a, 0x82, 0x3b, 0x3f, 0x1a, 0xf3, 0xa9, 0xb9, 0x98, 0x2d, 0x02, 0x2e, 0xa6, 0xad, 0x2a, 0xb2, 0x5e, 0x39, 0x50, 0xa9, 0xfa, 0x19, 0x6e, 0x63, 0x34, 0xe6, 0x41, 0x28, 0x67, 0xb7, 0xc1, 0xe5, 0x88, 0xfe, 0x5d, 0x49, 0x55, 0x95, - 0x3d, 0xaa, 0x9c, 0xe4, 0xd2, 0xa3, 0x31, 0x7f, 0x8e, 0x0a, 0xd9, 0x77, 0xc1, 0x95, 0x50, 0xb3, - 0x2a, 0xc9, 0xf7, 0x15, 0xdd, 0x90, 0x0f, 0xf6, 0xf7, 0x2b, 0xfa, 0xbe, 0xa2, 0xea, 0x99, 0xb3, - 0x5c, 0x76, 0x34, 0xe6, 0x33, 0x04, 0x08, 0xe5, 0xec, 0x87, 0x80, 0x3f, 0x66, 0x26, 0xc9, 0xf7, - 0xd5, 0x83, 0x4f, 0xf7, 0x94, 0xf2, 0x47, 0x4a, 0x60, 0xbb, 0xca, 0x6d, 0x8d, 0xc6, 0xfc, 0x45, - 0x82, 0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, 0xfe, 0x0d, + 0xb1, 0x8d, 0xec, 0x5e, 0x0b, 0x7a, 0xe4, 0x97, 0xe6, 0x9d, 0xdd, 0xeb, 0x64, 0x24, 0x8a, 0x6d, + 0xa7, 0xd1, 0x35, 0xfd, 0x99, 0xe0, 0x89, 0xfd, 0x9b, 0xf5, 0xd5, 0x60, 0x92, 0xbd, 0xfb, 0x57, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xae, 0x69, 0xbe, 0x7a, 0x0d, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/02-client/module.go b/modules/core/02-client/module.go index c15bef6bf97..34ebfc34ec5 100644 --- a/modules/core/02-client/module.go +++ b/modules/core/02-client/module.go @@ -4,8 +4,8 @@ import ( "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/client/cli" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // Name returns the IBC client name diff --git a/modules/core/02-client/proposal_handler.go b/modules/core/02-client/proposal_handler.go index d1b15ce2dad..5064f860ca7 100644 --- a/modules/core/02-client/proposal_handler.go +++ b/modules/core/02-client/proposal_handler.go @@ -3,10 +3,10 @@ package client import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // NewClientProposalHandler defines the 02-client proposal handler diff --git a/modules/core/02-client/proposal_handler_test.go b/modules/core/02-client/proposal_handler_test.go index 2e510f8777e..c128eb0dee0 100644 --- a/modules/core/02-client/proposal_handler_test.go +++ b/modules/core/02-client/proposal_handler_test.go @@ -3,12 +3,12 @@ package client_test import ( sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - client "github.com/cosmos/ibc-go/v3/modules/core/02-client" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + client "github.com/cosmos/ibc-go/v5/modules/core/02-client" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() { @@ -84,5 +84,4 @@ func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() { } }) } - } diff --git a/modules/core/02-client/simulation/decoder.go b/modules/core/02-client/simulation/decoder.go index 8aa19dd7c9c..010b2b75d0e 100644 --- a/modules/core/02-client/simulation/decoder.go +++ b/modules/core/02-client/simulation/decoder.go @@ -6,9 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ ClientUnmarshaler = (*keeper.Keeper)(nil) diff --git a/modules/core/02-client/simulation/decoder_test.go b/modules/core/02-client/simulation/decoder_test.go index 962435a7e25..65b4a287818 100644 --- a/modules/core/02-client/simulation/decoder_test.go +++ b/modules/core/02-client/simulation/decoder_test.go @@ -8,11 +8,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/simulation" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/core/02-client/simulation/genesis.go b/modules/core/02-client/simulation/genesis.go index ddf592dfad2..09ff36f8659 100644 --- a/modules/core/02-client/simulation/genesis.go +++ b/modules/core/02-client/simulation/genesis.go @@ -5,7 +5,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // GenClientGenesis returns the default client genesis state. diff --git a/modules/core/02-client/types/client.go b/modules/core/02-client/types/client.go index bb3d5c4f3d3..4649c3073fa 100644 --- a/modules/core/02-client/types/client.go +++ b/modules/core/02-client/types/client.go @@ -10,8 +10,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" proto "github.com/gogo/protobuf/proto" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/02-client/types/client.pb.go b/modules/core/02-client/types/client.pb.go index 34eb54cc90f..4774269b241 100644 --- a/modules/core/02-client/types/client.pb.go +++ b/modules/core/02-client/types/client.pb.go @@ -9,6 +9,7 @@ import ( types1 "github.com/cosmos/cosmos-sdk/x/upgrade/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -397,52 +398,53 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 705 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0x8e, 0xdb, 0xfc, 0xa2, 0xe6, 0x52, 0x35, 0xfd, 0xb9, 0x29, 0x0d, 0xa1, 0xca, 0x45, 0x27, - 0x86, 0x0c, 0xd4, 0x26, 0xa9, 0x84, 0xaa, 0x6c, 0x24, 0x4b, 0x3b, 0x80, 0x82, 0x51, 0x85, 0x60, - 0x89, 0xfc, 0xe7, 0xea, 0x5c, 0xe5, 0xf8, 0x22, 0xdf, 0x39, 0x90, 0x6f, 0xc0, 0xc8, 0xc8, 0xc0, - 0xd0, 0x6f, 0xc0, 0x97, 0x60, 0xe8, 0xd8, 0x91, 0xc9, 0x42, 0xed, 0xc2, 0x4a, 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0xa6, 0x10, 0x99, - 0x9f, 0x75, 0xad, 0xd3, 0xf3, 0xba, 0x76, 0x76, 0x5e, 0xd7, 0xbe, 0x9d, 0xd7, 0xb5, 0x0f, 0x17, - 0xf5, 0xdc, 0xd9, 0x45, 0x3d, 0xf7, 0xf5, 0xa2, 0x9e, 0x7b, 0xb3, 0xe7, 0x13, 0x3e, 0x8c, 0x1d, - 0xc3, 0xa5, 0x23, 0x53, 0x8d, 0x50, 0xe2, 0xb8, 0x3b, 0x3e, 0x35, 0x27, 0xbb, 0xe6, 0x88, 0x7a, - 0x71, 0x80, 0x99, 0x9c, 0xde, 0x8f, 0xdb, 0x3b, 0x6a, 0x80, 0xf3, 0xe9, 0x18, 0x33, 0xa7, 0x20, - 0x3e, 0xca, 0xee, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x6f, 0x16, 0x77, 0xe0, 0x05, 0x00, - 0x00, + // 734 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xbd, 0x6e, 0x13, 0x4b, + 0x18, 0xf5, 0x3a, 0xbe, 0x56, 0x3c, 0xbe, 0x8a, 0x73, 0x37, 0xce, 0x8d, 0xaf, 0x6f, 0xe4, 0xb1, + 0x46, 0x14, 0x16, 0x22, 0xbb, 0xd8, 0x08, 0x14, 0xb9, 0xc3, 0x6e, 0x92, 0x02, 0x64, 0x16, 0x45, + 0x08, 0x1a, 0x6b, 0x7f, 0x26, 0xeb, 0x89, 0xd6, 0x3b, 0xd6, 0xce, 0xac, 0xc1, 0x6f, 0x40, 0x07, + 0x25, 0x48, 0x29, 0xf2, 0x06, 0x34, 0x3c, 0x02, 0x45, 0xca, 0x88, 0x8a, 0x6a, 0x85, 0x92, 0x86, + 0xda, 0x4f, 0x80, 0x3c, 0x33, 0x9b, 0xd8, 0xf9, 0x01, 0x04, 0xdd, 0xcc, 0x99, 0xb3, 0x67, 0xce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x72, 0x42, 0x0c, 0x4e, + 0x13, 0xf8, 0xff, 0xb9, 0xd8, 0x15, 0x16, 0xb2, 0xf4, 0x0b, 0x38, 0x95, 0x6c, 0xa3, 0xd7, 0x47, + 0x30, 0xf3, 0xf9, 0xe3, 0x56, 0x55, 0x75, 0xc3, 0xa7, 0x63, 0x43, 0x55, 0x69, 0x16, 0x2a, 0xc7, + 0x21, 0x47, 0xef, 0xb3, 0xa0, 0xb4, 0x27, 0x6b, 0xf5, 0xc7, 0x61, 0x3c, 0x00, 0xb9, 0x51, 0x60, + 0x87, 0x62, 0xfe, 0x62, 0x6b, 0xd3, 0x50, 0xd7, 0xa6, 0xad, 0x4d, 0xaf, 0xee, 0x05, 0x76, 0xa8, + 0xde, 0x5c, 0xc1, 0xd7, 0x0f, 0xc0, 0xba, 0xe2, 0x78, 0xfd, 0x85, 0xa6, 0xe5, 0x7e, 0xf0, 0xf6, + 0xd6, 0xa7, 0x09, 0xdc, 0x94, 0x89, 0x5c, 0xfb, 0x30, 0xb2, 0xd6, 0x52, 0x7c, 0xae, 0xff, 0xed, + 0xdb, 0xb3, 0x4c, 0xde, 0x1d, 0xc1, 0xcc, 0xb7, 0x23, 0xa8, 0xfd, 0x24, 0x9b, 0x43, 0x0d, 0xe4, + 0x55, 0x29, 0xbb, 0xa0, 0x14, 0xe1, 0x31, 0x61, 0x84, 0x86, 0xfd, 0x30, 0x1e, 0x3a, 0x38, 0x12, + 0xe1, 0xe4, 0xe6, 0x4b, 0x74, 0x89, 0x80, 0xac, 0x95, 0x14, 0x79, 0x2c, 0x80, 0x05, 0x11, 0x55, + 0xf1, 0xec, 0x8d, 0x22, 0x92, 0x30, 0x27, 0x22, 0x9d, 0xb4, 0x97, 0xd3, 0x01, 0xd0, 0x23, 0x90, + 0xef, 0xd9, 0x91, 0x3d, 0x64, 0x33, 0x61, 0x3b, 0x08, 0xe8, 0xcb, 0xf3, 0x08, 0x58, 0x45, 0xab, + 0x2f, 0x35, 0x0a, 0xf3, 0xc2, 0x97, 0x08, 0xc8, 0x5a, 0x51, 0x88, 0x4c, 0x87, 0x75, 0xac, 0xe3, + 0xd3, 0x9a, 0x76, 0x72, 0x5a, 0xd3, 0xbe, 0x9e, 0xd6, 0xb4, 0xb7, 0x67, 0xb5, 0xcc, 0xc9, 0x59, + 0x2d, 0xf3, 0xe5, 0xac, 0x96, 0x79, 0xb1, 0xed, 0x13, 0x3e, 0x88, 0x1d, 0xc3, 0xa5, 0x43, 0xf5, + 0x37, 0x6b, 0x12, 0xc7, 0xdd, 0xf2, 0xa9, 0x39, 0xbe, 0x6f, 0x0e, 0xa9, 0x17, 0x07, 0x98, 0xc9, + 0x8f, 0xc2, 0xdd, 0xd6, 0x96, 0xfa, 0x2e, 0xf0, 0xc9, 0x08, 0x33, 0x27, 0x2f, 0x7e, 0xb2, 0x7b, + 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xd1, 0x94, 0xf6, 0x37, 0x06, 0x00, 0x00, } func (this *UpgradeProposal) Equal(that interface{}) bool { diff --git a/modules/core/02-client/types/client_test.go b/modules/core/02-client/types/client_test.go index 9f41843c064..f76723a5e4f 100644 --- a/modules/core/02-client/types/client_test.go +++ b/modules/core/02-client/types/client_test.go @@ -5,14 +5,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { - var ( - cswh types.ConsensusStateWithHeight - ) + var cswh types.ConsensusStateWithHeight testCases := []struct { name string diff --git a/modules/core/02-client/types/codec.go b/modules/core/02-client/types/codec.go index defdf4c3480..247507e8c32 100644 --- a/modules/core/02-client/types/codec.go +++ b/modules/core/02-client/types/codec.go @@ -5,10 +5,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" proto "github.com/gogo/protobuf/proto" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces registers the client interfaces to protobuf Any. diff --git a/modules/core/02-client/types/codec_test.go b/modules/core/02-client/types/codec_test.go index 5dd9b99620c..8a0abb79d7e 100644 --- a/modules/core/02-client/types/codec_test.go +++ b/modules/core/02-client/types/codec_test.go @@ -3,11 +3,11 @@ package types_test import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type caseAny struct { @@ -17,7 +17,6 @@ type caseAny struct { } func (suite *TypesTestSuite) TestPackClientState() { - testCases := []struct { name string clientState exported.ClientState diff --git a/modules/core/02-client/types/encoding.go b/modules/core/02-client/types/encoding.go index 0ffff6971c5..b974eb8b942 100644 --- a/modules/core/02-client/types/encoding.go +++ b/modules/core/02-client/types/encoding.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // MustUnmarshalClientState attempts to decode and return an ClientState object from diff --git a/modules/core/02-client/types/encoding_test.go b/modules/core/02-client/types/encoding_test.go index e1846c39f25..6da50574848 100644 --- a/modules/core/02-client/types/encoding_test.go +++ b/modules/core/02-client/types/encoding_test.go @@ -1,12 +1,11 @@ package types_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) func (suite *TypesTestSuite) TestMarshalHeader() { - cdc := suite.chainA.App.AppCodec() h := &ibctmtypes.Header{ TrustedHeight: types.NewHeight(4, 100), diff --git a/modules/core/02-client/types/events.go b/modules/core/02-client/types/events.go index 6975bcd6e66..4e0bd1ba96f 100644 --- a/modules/core/02-client/types/events.go +++ b/modules/core/02-client/types/events.go @@ -3,7 +3,7 @@ package types import ( "fmt" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // IBC client events @@ -16,16 +16,18 @@ const ( AttributeKeyHeader = "header" AttributeKeyUpgradeStore = "upgrade_store" AttributeKeyUpgradePlanHeight = "upgrade_plan_height" + AttributeKeyUpgradePlanTitle = "title" ) // IBC client events vars var ( - EventTypeCreateClient = "create_client" - EventTypeUpdateClient = "update_client" - EventTypeUpgradeClient = "upgrade_client" - EventTypeSubmitMisbehaviour = "client_misbehaviour" - EventTypeUpdateClientProposal = "update_client_proposal" - EventTypeUpgradeChain = "upgrade_chain" + EventTypeCreateClient = "create_client" + EventTypeUpdateClient = "update_client" + EventTypeUpgradeClient = "upgrade_client" + EventTypeSubmitMisbehaviour = "client_misbehaviour" + EventTypeUpdateClientProposal = "update_client_proposal" + EventTypeUpgradeChain = "upgrade_chain" + EventTypeUpgradeClientProposal = "upgrade_client_proposal" AttributeValueCategory = fmt.Sprintf("%s_%s", host.ModuleName, SubModuleName) ) diff --git a/modules/core/02-client/types/genesis.go b/modules/core/02-client/types/genesis.go index fce8a3d1b71..784bae42f79 100644 --- a/modules/core/02-client/types/genesis.go +++ b/modules/core/02-client/types/genesis.go @@ -6,8 +6,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( @@ -110,7 +110,7 @@ func (gs GenesisState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { func (gs GenesisState) Validate() error { // keep track of the max sequence to ensure it is less than // the next sequence used in creating client identifers. - var maxSequence uint64 = 0 + var maxSequence uint64 if err := gs.Params.Validate(); err != nil { return err @@ -196,7 +196,6 @@ func (gs GenesisState) Validate() error { if err := gm.Validate(); err != nil { return fmt.Errorf("invalid client metadata %v clientID %s index %d: %w", gm, clientMetadata.ClientId, i, err) } - } } diff --git a/modules/core/02-client/types/genesis.pb.go b/modules/core/02-client/types/genesis.pb.go index 9f85bc06008..231f4acaf02 100644 --- a/modules/core/02-client/types/genesis.pb.go +++ b/modules/core/02-client/types/genesis.pb.go @@ -221,38 +221,38 @@ var fileDescriptor_bcd0c0f1f2e6a91a = []byte{ // 539 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x41, 0x6e, 0xd3, 0x40, 0x14, 0xcd, 0x34, 0x69, 0x68, 0xa7, 0x15, 0x0d, 0xa3, 0xa8, 0x98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68, 0x9a, 0xbf, 0x3a, 0xb0, 0xfe, 0xcf, 0x3d, 0xde, 0xd4, 0xf7, 0xfa, 0x59, 0x6d, + 0x73, 0xd6, 0xc3, 0x1b, 0x1b, 0xae, 0xae, 0x7a, 0x5f, 0x23, 0xff, 0xf8, 0xd1, 0xf9, 0xc2, 0x06, + 0x17, 0x0b, 0x1b, 0xfc, 0x59, 0xd8, 0xe0, 0xdb, 0xd2, 0xae, 0x5c, 0x2c, 0xed, 0xca, 0xe5, 0xd2, + 0xae, 0x7c, 0x38, 0x1e, 0x32, 0x79, 0x36, 0x19, 0xf8, 0x84, 0x67, 0x01, 0xe1, 0x22, 0xe3, 0x22, + 0x60, 0x03, 0xd2, 0x19, 0xf2, 0x60, 0xfa, 0x3c, 0xc8, 0x78, 0x32, 0x49, 0xa9, 0xd0, 0x6f, 0xf9, + 0x69, 0xaf, 0x63, 0x9e, 0xb3, 0x9c, 0x8d, 0xa8, 0x18, 0xd4, 0xd5, 0xab, 0x7d, 0xf6, 0x37, 0x00, + 0x00, 0xff, 0xff, 0xe7, 0x4b, 0xf9, 0x6b, 0x24, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/02-client/types/genesis_test.go b/modules/core/02-client/types/genesis_test.go index 3774ff48800..778c0ffd30a 100644 --- a/modules/core/02-client/types/genesis_test.go +++ b/modules/core/02-client/types/genesis_test.go @@ -5,14 +5,14 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - client "github.com/cosmos/ibc-go/v3/modules/core/02-client" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" + client "github.com/cosmos/ibc-go/v5/modules/core/02-client" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" ) const ( diff --git a/modules/core/02-client/types/height.go b/modules/core/02-client/types/height.go index 40125b23f2e..292a519fe7c 100644 --- a/modules/core/02-client/types/height.go +++ b/modules/core/02-client/types/height.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.Height = (*Height)(nil) diff --git a/modules/core/02-client/types/height_test.go b/modules/core/02-client/types/height_test.go index c31bbaabf21..03d13f41d9c 100644 --- a/modules/core/02-client/types/height_test.go +++ b/modules/core/02-client/types/height_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) func TestZeroHeight(t *testing.T) { @@ -126,7 +126,6 @@ func TestParseChainID(t *testing.T) { revision := types.ParseChainID(tc.chainID) require.Equal(t, tc.revision, revision, "chainID %s returns incorrect revision", tc.chainID) } - } func TestSetRevisionNumber(t *testing.T) { diff --git a/modules/core/02-client/types/keys.go b/modules/core/02-client/types/keys.go index 426747b0f6c..ea22b0744ef 100644 --- a/modules/core/02-client/types/keys.go +++ b/modules/core/02-client/types/keys.go @@ -8,7 +8,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( diff --git a/modules/core/02-client/types/keys_test.go b/modules/core/02-client/types/keys_test.go index da722040e1c..8a961a532e9 100644 --- a/modules/core/02-client/types/keys_test.go +++ b/modules/core/02-client/types/keys_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // tests ParseClientIdentifier and IsValidClientID diff --git a/modules/core/02-client/types/msgs.go b/modules/core/02-client/types/msgs.go index 43d98a93493..9e95bd1feea 100644 --- a/modules/core/02-client/types/msgs.go +++ b/modules/core/02-client/types/msgs.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // message types for the IBC client @@ -34,7 +34,6 @@ var ( func NewMsgCreateClient( clientState exported.ClientState, consensusState exported.ConsensusState, signer string, ) (*MsgCreateClient, error) { - anyClientState, err := PackClientState(clientState) if err != nil { return nil, err @@ -148,7 +147,8 @@ func (msg MsgUpdateClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err // NewMsgUpgradeClient creates a new MsgUpgradeClient instance // nolint: interfacer func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, consState exported.ConsensusState, - proofUpgradeClient, proofUpgradeConsState []byte, signer string) (*MsgUpgradeClient, error) { + proofUpgradeClient, proofUpgradeConsState []byte, signer string, +) (*MsgUpgradeClient, error) { anyClient, err := PackClientState(clientState) if err != nil { return nil, err diff --git a/modules/core/02-client/types/msgs_test.go b/modules/core/02-client/types/msgs_test.go index 03148e73686..34622f67051 100644 --- a/modules/core/02-client/types/msgs_test.go +++ b/modules/core/02-client/types/msgs_test.go @@ -7,11 +7,11 @@ import ( "github.com/golang/protobuf/proto" "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type TypesTestSuite struct { @@ -212,7 +212,6 @@ func (suite *TypesTestSuite) TestMarshalMsgUpdateClient() { "tendermint client", func() { msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentTMClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) - }, }, } @@ -490,7 +489,6 @@ func (suite *TypesTestSuite) TestMarshalMsgSubmitMisbehaviour() { misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) - }, }, } diff --git a/modules/core/02-client/types/params.go b/modules/core/02-client/types/params.go index 884fec2e5f4..b45659c6376 100644 --- a/modules/core/02-client/types/params.go +++ b/modules/core/02-client/types/params.go @@ -6,7 +6,7 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/02-client/types/params_test.go b/modules/core/02-client/types/params_test.go index 87fed77622e..9ef52485141 100644 --- a/modules/core/02-client/types/params_test.go +++ b/modules/core/02-client/types/params_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) func TestValidateParams(t *testing.T) { diff --git a/modules/core/02-client/types/proposal.go b/modules/core/02-client/types/proposal.go index 02dc3c517ee..4bc7a84a810 100644 --- a/modules/core/02-client/types/proposal.go +++ b/modules/core/02-client/types/proposal.go @@ -6,10 +6,10 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) const ( diff --git a/modules/core/02-client/types/proposal_test.go b/modules/core/02-client/types/proposal_test.go index 8ef103ee18a..073056b289d 100644 --- a/modules/core/02-client/types/proposal_test.go +++ b/modules/core/02-client/types/proposal_test.go @@ -5,12 +5,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TypesTestSuite) TestValidateBasic() { @@ -128,7 +128,6 @@ func (suite *TypesTestSuite) TestUpgradeProposalValidateBasic() { }, }) suite.Require().NoError(err) - }, false, }, { @@ -210,7 +209,6 @@ func (suite *TypesTestSuite) TestMarshalUpgradeProposal() { // unpack client state _, err = types.UnpackClientState(newUp.UpgradedClientState) suite.Require().NoError(err) - } func (suite *TypesTestSuite) TestUpgradeString() { diff --git a/modules/core/02-client/types/query.go b/modules/core/02-client/types/query.go index ac9519b9298..23edf0f26d2 100644 --- a/modules/core/02-client/types/query.go +++ b/modules/core/02-client/types/query.go @@ -3,7 +3,7 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/02-client/types/query.pb.go b/modules/core/02-client/types/query.pb.go index 7ea1d377be6..98bbd08f7da 100644 --- a/modules/core/02-client/types/query.pb.go +++ b/modules/core/02-client/types/query.pb.go @@ -500,6 +500,118 @@ func (m *QueryConsensusStatesResponse) GetPagination() *query.PageResponse { return nil } +// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +// RPC method. +type QueryConsensusStateHeightsRequest struct { + // client identifier + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // pagination request + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryConsensusStateHeightsRequest) Reset() { *m = QueryConsensusStateHeightsRequest{} } +func (m *QueryConsensusStateHeightsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryConsensusStateHeightsRequest) ProtoMessage() {} +func (*QueryConsensusStateHeightsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dc42cdfd1d52d76e, []int{8} +} +func (m *QueryConsensusStateHeightsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConsensusStateHeightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConsensusStateHeightsRequest.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 *QueryConsensusStateHeightsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConsensusStateHeightsRequest.Merge(m, src) +} +func (m *QueryConsensusStateHeightsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryConsensusStateHeightsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConsensusStateHeightsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConsensusStateHeightsRequest proto.InternalMessageInfo + +func (m *QueryConsensusStateHeightsRequest) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *QueryConsensusStateHeightsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryConsensusStateHeightsResponse is the response type for the +// Query/ConsensusStateHeights RPC method +type QueryConsensusStateHeightsResponse struct { + // consensus state heights + ConsensusStateHeights []Height `protobuf:"bytes,1,rep,name=consensus_state_heights,json=consensusStateHeights,proto3" json:"consensus_state_heights"` + // pagination response + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryConsensusStateHeightsResponse) Reset() { *m = QueryConsensusStateHeightsResponse{} } +func (m *QueryConsensusStateHeightsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryConsensusStateHeightsResponse) ProtoMessage() {} +func (*QueryConsensusStateHeightsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_dc42cdfd1d52d76e, []int{9} +} +func (m *QueryConsensusStateHeightsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryConsensusStateHeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryConsensusStateHeightsResponse.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 *QueryConsensusStateHeightsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryConsensusStateHeightsResponse.Merge(m, src) +} +func (m *QueryConsensusStateHeightsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryConsensusStateHeightsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryConsensusStateHeightsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryConsensusStateHeightsResponse proto.InternalMessageInfo + +func (m *QueryConsensusStateHeightsResponse) GetConsensusStateHeights() []Height { + if m != nil { + return m.ConsensusStateHeights + } + return nil +} + +func (m *QueryConsensusStateHeightsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QueryClientStatusRequest is the request type for the Query/ClientStatus RPC // method type QueryClientStatusRequest struct { @@ -511,7 +623,7 @@ func (m *QueryClientStatusRequest) Reset() { *m = QueryClientStatusReque func (m *QueryClientStatusRequest) String() string { return proto.CompactTextString(m) } func (*QueryClientStatusRequest) ProtoMessage() {} func (*QueryClientStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{8} + return fileDescriptor_dc42cdfd1d52d76e, []int{10} } func (m *QueryClientStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -557,7 +669,7 @@ func (m *QueryClientStatusResponse) Reset() { *m = QueryClientStatusResp func (m *QueryClientStatusResponse) String() string { return proto.CompactTextString(m) } func (*QueryClientStatusResponse) ProtoMessage() {} func (*QueryClientStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{9} + return fileDescriptor_dc42cdfd1d52d76e, []int{11} } func (m *QueryClientStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -602,7 +714,7 @@ func (m *QueryClientParamsRequest) Reset() { *m = QueryClientParamsReque func (m *QueryClientParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryClientParamsRequest) ProtoMessage() {} func (*QueryClientParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{10} + return fileDescriptor_dc42cdfd1d52d76e, []int{12} } func (m *QueryClientParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +754,7 @@ func (m *QueryClientParamsResponse) Reset() { *m = QueryClientParamsResp func (m *QueryClientParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryClientParamsResponse) ProtoMessage() {} func (*QueryClientParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{11} + return fileDescriptor_dc42cdfd1d52d76e, []int{13} } func (m *QueryClientParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -687,7 +799,7 @@ func (m *QueryUpgradedClientStateRequest) Reset() { *m = QueryUpgradedCl func (m *QueryUpgradedClientStateRequest) String() string { return proto.CompactTextString(m) } func (*QueryUpgradedClientStateRequest) ProtoMessage() {} func (*QueryUpgradedClientStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{12} + return fileDescriptor_dc42cdfd1d52d76e, []int{14} } func (m *QueryUpgradedClientStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -727,7 +839,7 @@ func (m *QueryUpgradedClientStateResponse) Reset() { *m = QueryUpgradedC func (m *QueryUpgradedClientStateResponse) String() string { return proto.CompactTextString(m) } func (*QueryUpgradedClientStateResponse) ProtoMessage() {} func (*QueryUpgradedClientStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{13} + return fileDescriptor_dc42cdfd1d52d76e, []int{15} } func (m *QueryUpgradedClientStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -772,7 +884,7 @@ func (m *QueryUpgradedConsensusStateRequest) Reset() { *m = QueryUpgrade func (m *QueryUpgradedConsensusStateRequest) String() string { return proto.CompactTextString(m) } func (*QueryUpgradedConsensusStateRequest) ProtoMessage() {} func (*QueryUpgradedConsensusStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{14} + return fileDescriptor_dc42cdfd1d52d76e, []int{16} } func (m *QueryUpgradedConsensusStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -812,7 +924,7 @@ func (m *QueryUpgradedConsensusStateResponse) Reset() { *m = QueryUpgrad func (m *QueryUpgradedConsensusStateResponse) String() string { return proto.CompactTextString(m) } func (*QueryUpgradedConsensusStateResponse) ProtoMessage() {} func (*QueryUpgradedConsensusStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dc42cdfd1d52d76e, []int{15} + return fileDescriptor_dc42cdfd1d52d76e, []int{17} } func (m *QueryUpgradedConsensusStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -857,6 +969,8 @@ func init() { proto.RegisterType((*QueryConsensusStateResponse)(nil), "ibc.core.client.v1.QueryConsensusStateResponse") proto.RegisterType((*QueryConsensusStatesRequest)(nil), "ibc.core.client.v1.QueryConsensusStatesRequest") proto.RegisterType((*QueryConsensusStatesResponse)(nil), "ibc.core.client.v1.QueryConsensusStatesResponse") + proto.RegisterType((*QueryConsensusStateHeightsRequest)(nil), "ibc.core.client.v1.QueryConsensusStateHeightsRequest") + proto.RegisterType((*QueryConsensusStateHeightsResponse)(nil), "ibc.core.client.v1.QueryConsensusStateHeightsResponse") proto.RegisterType((*QueryClientStatusRequest)(nil), "ibc.core.client.v1.QueryClientStatusRequest") proto.RegisterType((*QueryClientStatusResponse)(nil), "ibc.core.client.v1.QueryClientStatusResponse") proto.RegisterType((*QueryClientParamsRequest)(nil), "ibc.core.client.v1.QueryClientParamsRequest") @@ -870,69 +984,73 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) } var fileDescriptor_dc42cdfd1d52d76e = []byte{ - // 983 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xa4, 0x69, 0xd4, 0x3e, 0xbb, 0x09, 0x9a, 0xa6, 0xa9, 0xbb, 0x2d, 0x8e, 0xbb, 0x41, - 0x34, 0x2d, 0xc9, 0x4e, 0xe2, 0x40, 0xd3, 0x0b, 0x07, 0x52, 0xa9, 0xb4, 0x97, 0x52, 0x16, 0x21, - 0x24, 0x24, 0x14, 0xed, 0xae, 0x27, 0x9b, 0x95, 0xec, 0x1d, 0xd7, 0xb3, 0x6b, 0x29, 0xaa, 0x72, - 0xa0, 0x47, 0x4e, 0x48, 0x48, 0x5c, 0x91, 0x38, 0x72, 0xa8, 0x38, 0x20, 0x71, 0xe5, 0x84, 0x7a, - 0xac, 0x04, 0x07, 0x4e, 0x04, 0x25, 0xfc, 0x21, 0x68, 0x67, 0x66, 0xe3, 0x1d, 0x7b, 0x8c, 0xd7, - 0x88, 0xde, 0x76, 0xde, 0xe7, 0xef, 0x7d, 0xcc, 0x6f, 0xb4, 0x50, 0x8f, 0xfc, 0x80, 0x04, 0xac, - 0x47, 0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 0xe2, 0x2b, 0x12, 0xe4, 0x19, - 0x3e, 0xc9, 0x9b, 0xf8, 0x27, 0x04, 0x97, 0x0d, 0x84, 0x88, 0xb7, 0xc7, 0x66, 0x19, 0xcf, 0xb0, - 0xd6, 0xbb, 0xd3, 0x39, 0x29, 0x84, 0x4d, 0x81, 0x70, 0x1d, 0xdf, 0x31, 0xb5, 0xd1, 0xc8, 0xc6, - 0x1c, 0xff, 0x82, 0x60, 0xd9, 0xcc, 0x99, 0xf8, 0xee, 0x64, 0x10, 0xc6, 0xbb, 0xb8, 0x33, 0xb5, - 0x5f, 0x99, 0x35, 0x18, 0x47, 0xdb, 0x7c, 0xd7, 0x7d, 0x79, 0x52, 0x47, 0xaf, 0x4e, 0xea, 0xe8, - 0xaf, 0x93, 0x3a, 0xfa, 0xfa, 0xb4, 0x3e, 0xf3, 0xea, 0xb4, 0x3e, 0xf3, 0xc7, 0x69, 0x7d, 0xe6, - 0xf3, 0x7b, 0x61, 0x94, 0x1c, 0xa4, 0xbe, 0x13, 0xb0, 0x0e, 0x51, 0x3f, 0x4b, 0x91, 0x1f, 0x6c, - 0x84, 0x8c, 0xf4, 0xb7, 0x49, 0x87, 0xb5, 0xd2, 0x36, 0xe5, 0x32, 0xcf, 0x66, 0x73, 0x43, 0xa5, - 0x4a, 0x0e, 0xbb, 0x94, 0xfb, 0xf3, 0x82, 0xfd, 0xb7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xb0, - 0x84, 0x64, 0x2c, 0x98, 0x0d, 0x00, 0x00, + // 1055 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xa4, 0x69, 0xd4, 0x3e, 0xbb, 0x09, 0x9a, 0xe6, 0xc3, 0xdd, 0x16, 0xc7, 0xd9, 0x20, + 0x9a, 0x96, 0x64, 0x27, 0x71, 0xc8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0x34, 0x6a, 0x0f, 0x0b, 0xc7, 0x3f, 0x21, 0x58, 0xd0, 0xaf, 0x7f, 0xbc, + 0x33, 0x1a, 0x84, 0x76, 0xad, 0xec, 0x8e, 0xed, 0x97, 0x67, 0x0c, 0x86, 0x5d, 0x20, 0xbe, 0x6f, + 0x9f, 0x9e, 0x95, 0xd1, 0xb3, 0xb3, 0x32, 0xfa, 0xeb, 0xac, 0x8c, 0xbe, 0x3c, 0x2f, 0x4f, 0x3c, + 0x3b, 0x2f, 0x4f, 0xfc, 0x71, 0x5e, 0x9e, 0xf8, 0x74, 0xcf, 0x0f, 0xa2, 0xa3, 0xd8, 0xb5, 0x3c, + 0xd6, 0x20, 0xea, 0xcf, 0x74, 0xe0, 0x7a, 0xeb, 0x3e, 0x23, 0xed, 0x6d, 0xd2, 0x60, 0xb5, 0xb8, + 0x4e, 0xb9, 0xcc, 0xb3, 0x51, 0x5d, 0x57, 0xa9, 0xa2, 0xe3, 0x26, 0xe5, 0xee, 0xb4, 0x38, 0x64, + 0x5b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x17, 0x2c, 0xcf, 0xb8, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -957,6 +1075,8 @@ type QueryClient interface { // ConsensusStates queries all the consensus state associated with a given // client. ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) + // ConsensusStateHeights queries the height of every consensus states associated with a given client. + ConsensusStateHeights(ctx context.Context, in *QueryConsensusStateHeightsRequest, opts ...grpc.CallOption) (*QueryConsensusStateHeightsResponse, error) // Status queries the status of an IBC client. ClientStatus(ctx context.Context, in *QueryClientStatusRequest, opts ...grpc.CallOption) (*QueryClientStatusResponse, error) // ClientParams queries all parameters of the ibc client. @@ -1011,6 +1131,15 @@ func (c *queryClient) ConsensusStates(ctx context.Context, in *QueryConsensusSta return out, nil } +func (c *queryClient) ConsensusStateHeights(ctx context.Context, in *QueryConsensusStateHeightsRequest, opts ...grpc.CallOption) (*QueryConsensusStateHeightsResponse, error) { + out := new(QueryConsensusStateHeightsResponse) + err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ConsensusStateHeights", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) ClientStatus(ctx context.Context, in *QueryClientStatusRequest, opts ...grpc.CallOption) (*QueryClientStatusResponse, error) { out := new(QueryClientStatusResponse) err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientStatus", in, out, opts...) @@ -1059,6 +1188,8 @@ type QueryServer interface { // ConsensusStates queries all the consensus state associated with a given // client. ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) + // ConsensusStateHeights queries the height of every consensus states associated with a given client. + ConsensusStateHeights(context.Context, *QueryConsensusStateHeightsRequest) (*QueryConsensusStateHeightsResponse, error) // Status queries the status of an IBC client. ClientStatus(context.Context, *QueryClientStatusRequest) (*QueryClientStatusResponse, error) // ClientParams queries all parameters of the ibc client. @@ -1085,6 +1216,9 @@ func (*UnimplementedQueryServer) ConsensusState(ctx context.Context, req *QueryC func (*UnimplementedQueryServer) ConsensusStates(ctx context.Context, req *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConsensusStates not implemented") } +func (*UnimplementedQueryServer) ConsensusStateHeights(ctx context.Context, req *QueryConsensusStateHeightsRequest) (*QueryConsensusStateHeightsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsensusStateHeights not implemented") +} func (*UnimplementedQueryServer) ClientStatus(ctx context.Context, req *QueryClientStatusRequest) (*QueryClientStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClientStatus not implemented") } @@ -1174,6 +1308,24 @@ func _Query_ConsensusStates_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_ConsensusStateHeights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryConsensusStateHeightsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConsensusStateHeights(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.core.client.v1.Query/ConsensusStateHeights", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConsensusStateHeights(ctx, req.(*QueryConsensusStateHeightsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_ClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryClientStatusRequest) if err := dec(in); err != nil { @@ -1266,6 +1418,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConsensusStates", Handler: _Query_ConsensusStates_Handler, }, + { + MethodName: "ConsensusStateHeights", + Handler: _Query_ConsensusStateHeights_Handler, + }, { MethodName: "ClientStatus", Handler: _Query_ClientStatus_Handler, @@ -1646,6 +1802,97 @@ func (m *QueryConsensusStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryConsensusStateHeightsRequest) 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 *QueryConsensusStateHeightsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConsensusStateHeightsRequest) 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.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryConsensusStateHeightsResponse) 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 *QueryConsensusStateHeightsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryConsensusStateHeightsResponse) 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.ConsensusStateHeights) > 0 { + for iNdEx := len(m.ConsensusStateHeights) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ConsensusStateHeights[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 *QueryClientStatusRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2032,6 +2279,42 @@ func (m *QueryConsensusStatesResponse) Size() (n int) { return n } +func (m *QueryConsensusStateHeightsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + 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 *QueryConsensusStateHeightsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ConsensusStateHeights) > 0 { + for _, e := range m.ConsensusStateHeights { + 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 *QueryClientStatusRequest) Size() (n int) { if m == nil { return 0 @@ -3102,6 +3385,244 @@ func (m *QueryConsensusStatesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryConsensusStateHeightsRequest) 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: QueryConsensusStateHeightsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConsensusStateHeightsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", 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.ClientId = 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 *QueryConsensusStateHeightsResponse) 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: QueryConsensusStateHeightsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryConsensusStateHeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusStateHeights", 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.ConsensusStateHeights = append(m.ConsensusStateHeights, Height{}) + if err := m.ConsensusStateHeights[len(m.ConsensusStateHeights)-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 *QueryClientStatusRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/02-client/types/query.pb.gw.go b/modules/core/02-client/types/query.pb.gw.go index 3704fb07895..4286cc772ae 100644 --- a/modules/core/02-client/types/query.pb.gw.go +++ b/modules/core/02-client/types/query.pb.gw.go @@ -309,6 +309,78 @@ func local_request_Query_ConsensusStates_0(ctx context.Context, marshaler runtim } +var ( + filter_Query_ConsensusStateHeights_0 = &utilities.DoubleArray{Encoding: map[string]int{"client_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_ConsensusStateHeights_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConsensusStateHeightsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["client_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "client_id") + } + + protoReq.ClientId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ConsensusStateHeights_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ConsensusStateHeights(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ConsensusStateHeights_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryConsensusStateHeightsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["client_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "client_id") + } + + protoReq.ClientId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ConsensusStateHeights_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ConsensusStateHeights(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_ClientStatus_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryClientStatusRequest var metadata runtime.ServerMetadata @@ -503,6 +575,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ConsensusStateHeights_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ConsensusStateHeights_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ConsensusStateHeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_ClientStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -704,6 +796,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ConsensusStateHeights_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_ConsensusStateHeights_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_ConsensusStateHeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_ClientStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -796,6 +908,8 @@ var ( pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "client", "v1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConsensusStateHeights_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"ibc", "core", "client", "v1", "consensus_states", "client_id", "heights"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ClientStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "core", "client", "v1", "client_status", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ClientParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "client", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) @@ -814,6 +928,8 @@ var ( forward_Query_ConsensusStates_0 = runtime.ForwardResponseMessage + forward_Query_ConsensusStateHeights_0 = runtime.ForwardResponseMessage + forward_Query_ClientStatus_0 = runtime.ForwardResponseMessage forward_Query_ClientParams_0 = runtime.ForwardResponseMessage diff --git a/modules/core/02-client/types/tx.pb.go b/modules/core/02-client/types/tx.pb.go index 1b017c4dfde..a9cf9917069 100644 --- a/modules/core/02-client/types/tx.pb.go +++ b/modules/core/02-client/types/tx.pb.go @@ -376,46 +376,46 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/tx.proto", fileDescriptor_cb5dc4651eb49a04) } var fileDescriptor_cb5dc4651eb49a04 = []byte{ - // 621 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xbf, 0x6e, 0xd3, 0x40, - 0x1c, 0x8e, 0x1b, 0xa8, 0x9a, 0x6b, 0xfa, 0x47, 0x26, 0xa4, 0xae, 0xab, 0xda, 0x91, 0xe9, 0x10, - 0x04, 0xb5, 0x49, 0xb2, 0xa0, 0xc2, 0x42, 0x3a, 0x31, 0x44, 0x02, 0x57, 0x0c, 0xb0, 0x04, 0xff, - 0xb9, 0x5e, 0x4f, 0xc4, 0xbe, 0xc8, 0x67, 0x47, 0xe4, 0x0d, 0x18, 0x79, 0x84, 0x0a, 0x5e, 0x80, - 0xc7, 0x60, 0xec, 0xc0, 0xc0, 0x14, 0x55, 0xc9, 0xc2, 0x9c, 0x27, 0x40, 0xf1, 0x39, 0xc1, 0x76, - 0xec, 0x28, 0x12, 0xb0, 0xf9, 0xee, 0xf7, 0xdd, 0xf7, 0xfd, 0x3e, 0x7f, 0xbf, 0xb3, 0xc1, 0x11, - 0x36, 0x2d, 0xcd, 0x22, 0x1e, 0xd4, 0xac, 0x1e, 0x86, 0xae, 0xaf, 0x0d, 0x1a, 0x9a, 0xff, 0x51, - 0xed, 0x7b, 0xc4, 0x27, 0x3c, 0x8f, 0x4d, 0x4b, 0x9d, 0x15, 0x55, 0x56, 0x54, 0x07, 0x0d, 0xb1, - 0x82, 0x08, 0x22, 0x61, 0x59, 0x9b, 0x3d, 0x31, 0xa4, 0x78, 0x88, 0x08, 0x41, 0x3d, 0xa8, 0x85, - 0x2b, 0x33, 0xb8, 0xd4, 0x0c, 0x77, 0xc8, 0x4a, 0xca, 0x2d, 0x07, 0xf6, 0x3a, 0x14, 0x9d, 0x7b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8, 0x85, 0x88, 0x07, 0xf8, 0x8c, - 0x01, 0x78, 0x98, 0xc3, 0xb1, 0x0c, 0x15, 0x1b, 0x6b, 0x43, 0xe7, 0x9a, 0x6d, 0xfd, 0xfb, 0x58, - 0xe2, 0x6e, 0xc6, 0x12, 0x77, 0x3b, 0x96, 0xb8, 0xcf, 0x13, 0xa9, 0x70, 0x33, 0x91, 0x0a, 0x3f, - 0x27, 0x52, 0xe1, 0xdd, 0x53, 0x84, 0xfd, 0xab, 0xc0, 0x54, 0x2d, 0xe2, 0x68, 0x16, 0xa1, 0x0e, - 0xa1, 0x1a, 0x36, 0xad, 0x53, 0x44, 0xb4, 0x41, 0x4b, 0x73, 0x88, 0x1d, 0xf4, 0x20, 0x65, 0xbf, - 0xb1, 0x27, 0xcd, 0xd3, 0xe8, 0x4f, 0xe6, 0x0f, 0xfb, 0x90, 0x9a, 0x9b, 0xe1, 0x7c, 0xb5, 0x7e, - 0x07, 0x00, 0x00, 0xff, 0xff, 0x46, 0x72, 0x93, 0xc2, 0xe9, 0x06, 0x00, 0x00, + // 623 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0x9b, 0xef, 0x8b, 0x9a, 0x69, 0xfa, 0x23, 0x13, 0x52, 0xd7, 0x55, 0xed, 0xc8, 0x74, + 0x11, 0x04, 0xb5, 0x49, 0x2a, 0x24, 0x54, 0xd8, 0x90, 0xae, 0x58, 0x44, 0x02, 0x57, 0x2c, 0x60, + 0x13, 0xfc, 0x33, 0x9d, 0x8e, 0x88, 0x3d, 0x91, 0xc7, 0x8e, 0xc8, 0x1b, 0xb0, 0xe4, 0x11, 0x2a, + 0x78, 0x01, 0x1e, 0x83, 0x65, 0x17, 0x2c, 0x58, 0x45, 0x55, 0xb2, 0x61, 0x9d, 0x27, 0x40, 0xf1, + 0x38, 0xc1,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 0x46, 0xb2, 0x32, 0xf9, 0x0d, 0x81, 0xd3, 0x13, 0x68, 0x5e, 0x4c, 0x0e, 0x6f, 0x88, 0x58, 0xb6, + 0x23, 0x83, 0xa3, 0xcc, 0x8e, 0xe7, 0x9e, 0x5a, 0x9f, 0x8b, 0xa0, 0xd8, 0xa1, 0x88, 0x7f, 0x07, + 0x2a, 0x89, 0x2f, 0xd1, 0x3d, 0x75, 0xf9, 0x1b, 0xa7, 0xa6, 0x2e, 0xb3, 0xf8, 0x60, 0x0d, 0xd0, + 0x5c, 0x69, 0xa6, 0x90, 0xb8, 0xed, 0x79, 0x0a, 0x71, 0x50, 0xae, 0x42, 0xd6, 0x95, 0xe4, 0x2d, + 0xb0, 0x9d, 0x9c, 0xad, 0xe3, 0xdc, 0xd3, 0x31, 0x94, 0xf8, 0x70, 0x1d, 0xd4, 0x42, 0xc4, 0x03, + 0x7c, 0xc6, 0x00, 0xdc, 0xcf, 0xe1, 0x58, 0x86, 0x8a, 0xcd, 0xb5, 0xa1, 0x73, 0xcd, 0xb6, 0xfe, + 0x6d, 0x2c, 0x71, 0x37, 0x63, 0x89, 0xbb, 0x1d, 0x4b, 0xdc, 0xa7, 0x89, 0x54, 0xb8, 0x99, 0x48, + 0x85, 0x1f, 0x13, 0xa9, 0xf0, 0xf6, 0x09, 0xc2, 0xfe, 0x55, 0x60, 0xaa, 0x16, 0x71, 0x34, 0x8b, + 0x50, 0x87, 0x50, 0x0d, 0x9b, 0xd6, 0x09, 0x22, 0xda, 0xe0, 0xb1, 0xe6, 0x10, 0x3b, 0xe8, 0x41, + 0xca, 0x7e, 0x63, 0x8f, 0x5a, 0x27, 0xd1, 0x9f, 0xcc, 0x1f, 0xf6, 0x21, 0x35, 0x4b, 0xe1, 0x7c, + 0x9d, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x88, 0x72, 0x43, 0x59, 0xe9, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/03-connection/client/cli/cli.go b/modules/core/03-connection/client/cli/cli.go index d31649cf8ef..ccc2b56adae 100644 --- a/modules/core/03-connection/client/cli/cli.go +++ b/modules/core/03-connection/client/cli/cli.go @@ -3,7 +3,7 @@ package cli import ( "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // GetQueryCmd returns the query commands for IBC connections diff --git a/modules/core/03-connection/client/cli/query.go b/modules/core/03-connection/client/cli/query.go index 6ef8fca5b1a..b2cdf51f890 100644 --- a/modules/core/03-connection/client/cli/query.go +++ b/modules/core/03-connection/client/cli/query.go @@ -8,9 +8,9 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/client/utils" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/client/utils" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // GetCmdQueryConnections defines the command to query all the connection ends diff --git a/modules/core/03-connection/client/utils/utils.go b/modules/core/03-connection/client/utils/utils.go index 3bd54a44541..056a9f78d95 100644 --- a/modules/core/03-connection/client/utils/utils.go +++ b/modules/core/03-connection/client/utils/utils.go @@ -10,13 +10,13 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clientutils "github.com/cosmos/ibc-go/v3/modules/core/02-client/client/utils" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/client" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clientutils "github.com/cosmos/ibc-go/v5/modules/core/02-client/client/utils" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/client" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // QueryConnection returns a connection end. @@ -105,7 +105,6 @@ func queryClientConnectionsABCI(clientCtx client.Context, clientID string) (*typ func QueryConnectionClientState( clientCtx client.Context, connectionID string, prove bool, ) (*types.QueryConnectionClientStateResponse, error) { - queryClient := types.NewQueryClient(clientCtx) req := &types.QueryConnectionClientStateRequest{ ConnectionId: connectionID, @@ -140,7 +139,6 @@ func QueryConnectionClientState( func QueryConnectionConsensusState( clientCtx client.Context, connectionID string, height clienttypes.Height, prove bool, ) (*types.QueryConnectionConsensusStateResponse, error) { - queryClient := types.NewQueryClient(clientCtx) req := &types.QueryConnectionConsensusStateRequest{ ConnectionId: connectionID, diff --git a/modules/core/03-connection/genesis.go b/modules/core/03-connection/genesis.go index dca212469c3..00cba50de7d 100644 --- a/modules/core/03-connection/genesis.go +++ b/modules/core/03-connection/genesis.go @@ -3,8 +3,8 @@ package connection import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // InitGenesis initializes the ibc connection submodule's state from a provided genesis diff --git a/modules/core/03-connection/keeper/events.go b/modules/core/03-connection/keeper/events.go index 6b1636ea71e..0a251c287ae 100644 --- a/modules/core/03-connection/keeper/events.go +++ b/modules/core/03-connection/keeper/events.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // EmitConnectionOpenInitEvent emits a connection open init event diff --git a/modules/core/03-connection/keeper/grpc_query.go b/modules/core/03-connection/keeper/grpc_query.go index 77d8bc98c84..3afcd11382e 100644 --- a/modules/core/03-connection/keeper/grpc_query.go +++ b/modules/core/03-connection/keeper/grpc_query.go @@ -10,9 +10,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) var _ types.QueryServer = Keeper{} @@ -68,7 +68,6 @@ func (q Keeper) Connections(c context.Context, req *types.QueryConnectionsReques connections = append(connections, &identifiedConnection) return nil }) - if err != nil { return nil, err } @@ -137,7 +136,6 @@ func (q Keeper) ConnectionClientState(c context.Context, req *types.QueryConnect height := clienttypes.GetSelfHeight(ctx) return types.NewQueryConnectionClientStateResponse(identifiedClientState, nil, height), nil - } // ConnectionConsensusState implements the Query/ConnectionConsensusState gRPC method diff --git a/modules/core/03-connection/keeper/grpc_query_test.go b/modules/core/03-connection/keeper/grpc_query_test.go index a2542fe62b2..a8c03df126e 100644 --- a/modules/core/03-connection/keeper/grpc_query_test.go +++ b/modules/core/03-connection/keeper/grpc_query_test.go @@ -6,10 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestQueryConnection() { @@ -30,13 +30,15 @@ func (suite *KeeperTestSuite) TestQueryConnection() { }, false, }, - {"invalid connectionID", + { + "invalid connectionID", func() { req = &types.QueryConnectionRequest{} }, false, }, - {"connection not found", + { + "connection not found", func() { req = &types.QueryConnectionRequest{ ConnectionId: ibctesting.InvalidID, @@ -186,13 +188,15 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { }, false, }, - {"invalid connectionID", + { + "invalid connectionID", func() { req = &types.QueryClientConnectionsRequest{} }, false, }, - {"connection not found", + { + "connection not found", func() { req = &types.QueryClientConnectionsRequest{ ClientId: ibctesting.InvalidID, diff --git a/modules/core/03-connection/keeper/handshake.go b/modules/core/03-connection/keeper/handshake.go index 177324e3e17..ce0db6a469b 100644 --- a/modules/core/03-connection/keeper/handshake.go +++ b/modules/core/03-connection/keeper/handshake.go @@ -1,17 +1,14 @@ package keeper import ( - "bytes" - "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/gogo/protobuf/proto" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ConnOpenInit initialises a connection attempt on chain A. The generated connection identifier @@ -28,7 +25,7 @@ func (k Keeper) ConnOpenInit( ) (string, error) { versions := types.GetCompatibleVersions() if version != nil { - if !types.IsSupportedVersion(version) { + if !types.IsSupportedVersion(types.GetCompatibleVersions(), version) { return "", sdkerrors.Wrap(types.ErrInvalidVersion, "version is not supported") } @@ -63,7 +60,6 @@ func (k Keeper) ConnOpenInit( // - Identifiers are checked on msg validation func (k Keeper) ConnOpenTry( ctx sdk.Context, - previousConnectionID string, // previousIdentifier counterparty types.Counterparty, // counterpartyConnectionIdentifier, counterpartyPrefix and counterpartyClientIdentifier delayPeriod uint64, clientID string, // clientID of chainA @@ -75,44 +71,8 @@ func (k Keeper) ConnOpenTry( proofHeight exported.Height, // height at which relayer constructs proof of A storing connectionEnd in state consensusHeight exported.Height, // latest height of chain B which chain A has stored in its chain B client ) (string, error) { - var ( - connectionID string - previousConnection types.ConnectionEnd - found bool - ) - - // empty connection identifier indicates continuing a previous connection handshake - if previousConnectionID != "" { - // ensure that the previous connection exists - previousConnection, found = k.GetConnection(ctx, previousConnectionID) - if !found { - return "", sdkerrors.Wrapf(types.ErrConnectionNotFound, "previous connection does not exist for supplied previous connectionID %s", previousConnectionID) - } - - // ensure that the existing connection's - // counterparty is chainA and connection is on INIT stage. - // Check that existing connection versions for initialized connection is equal to compatible - // versions for this chain. - // ensure that existing connection's delay period is the same as desired delay period. - if !(previousConnection.Counterparty.ConnectionId == "" && - bytes.Equal(previousConnection.Counterparty.Prefix.Bytes(), counterparty.Prefix.Bytes()) && - previousConnection.ClientId == clientID && - previousConnection.Counterparty.ClientId == counterparty.ClientId && - previousConnection.DelayPeriod == delayPeriod) { - return "", sdkerrors.Wrap(types.ErrInvalidConnection, "connection fields mismatch previous connection fields") - } - - if !(previousConnection.State == types.INIT) { - return "", sdkerrors.Wrapf(types.ErrInvalidConnectionState, "previous connection state is in state %s, expected INIT", previousConnection.State) - } - - // continue with previous connection - connectionID = previousConnectionID - - } else { - // generate a new connection - connectionID = k.GenerateConnectionIdentifier(ctx) - } + // generate a new connection + connectionID := k.GenerateConnectionIdentifier(ctx) selfHeight := clienttypes.GetSelfHeight(ctx) if consensusHeight.GTE(selfHeight) { @@ -139,15 +99,10 @@ func (k Keeper) ConnOpenTry( expectedCounterparty := types.NewCounterparty(clientID, "", commitmenttypes.NewMerklePrefix(prefix.Bytes())) expectedConnection := types.NewConnectionEnd(types.INIT, counterparty.ClientId, expectedCounterparty, types.ExportedVersionsToProto(counterpartyVersions), delayPeriod) - supportedVersions := types.GetCompatibleVersions() - if len(previousConnection.Versions) != 0 { - supportedVersions = previousConnection.GetVersions() - } - // chain B picks a version from Chain A's available versions that is compatible // with Chain B's supported IBC versions. PickVersion will select the intersection // of the supported versions and the counterparty versions. - version, err := types.PickVersion(supportedVersions, counterpartyVersions) + version, err := types.PickVersion(types.GetCompatibleVersions(), counterpartyVersions) if err != nil { return "", err } @@ -181,7 +136,7 @@ func (k Keeper) ConnOpenTry( } k.SetConnection(ctx, connectionID, connection) - k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", previousConnection.State.String(), "new-state", "TRYOPEN") + k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", "NONE", "new-state", "TRYOPEN") defer func() { telemetry.IncrCounter(1, "ibc", "connection", "open-try") @@ -223,28 +178,19 @@ func (k Keeper) ConnOpenAck( return sdkerrors.Wrap(types.ErrConnectionNotFound, connectionID) } - // Verify the provided version against the previously set connection state - switch { - // connection on ChainA must be in INIT or TRYOPEN - case connection.State != types.INIT && connection.State != types.TRYOPEN: - return sdkerrors.Wrapf( - types.ErrInvalidConnectionState, - "connection state is not INIT or TRYOPEN (got %s)", connection.State.String(), - ) - - // if the connection is INIT then the provided version must be supproted - case connection.State == types.INIT && !types.IsSupportedVersion(version): + // verify the previously set connection state + if connection.State != types.INIT { return sdkerrors.Wrapf( types.ErrInvalidConnectionState, - "connection state is in INIT but the provided version is not supported %s", version, + "connection state is not INIT (got %s)", connection.State.String(), ) + } - // if the connection is in TRYOPEN then the version must be the only set version in the - // retreived connection state. - case connection.State == types.TRYOPEN && (len(connection.Versions) != 1 || !proto.Equal(connection.Versions[0], version)): + // ensure selected version is supported + if !types.IsSupportedVersion(types.ProtoVersionsToExported(connection.Versions), version) { return sdkerrors.Wrapf( types.ErrInvalidConnectionState, - "connection state is in TRYOPEN but the provided version (%s) is not set in the previous connection versions %s", version, connection.Versions, + "the counterparty selected version %s is not supported by versions selected on INIT", version, ) } @@ -283,7 +229,7 @@ func (k Keeper) ConnOpenAck( return err } - k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", connection.State.String(), "new-state", "OPEN") + k.Logger(ctx).Info("connection state updated", "connection-id", connectionID, "previous-state", "INIT", "new-state", "OPEN") defer func() { telemetry.IncrCounter(1, "ibc", "connection", "open-ack") diff --git a/modules/core/03-connection/keeper/handshake_test.go b/modules/core/03-connection/keeper/handshake_test.go index 316c82023ee..6ffb8f697dc 100644 --- a/modules/core/03-connection/keeper/handshake_test.go +++ b/modules/core/03-connection/keeper/handshake_test.go @@ -3,12 +3,12 @@ package keeper_test import ( "time" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) // TestConnOpenInit - chainA initializes (INIT state) a connection with @@ -80,12 +80,11 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { // connection on chainA is INIT func (suite *KeeperTestSuite) TestConnOpenTry() { var ( - path *ibctesting.Path - delayPeriod uint64 - previousConnectionID string - versions []exported.Version - consensusHeight exported.Height - counterpartyClient exported.ClientState + path *ibctesting.Path + delayPeriod uint64 + versions []exported.Version + consensusHeight exported.Height + counterpartyClient exported.ClientState ) testCases := []struct { @@ -100,15 +99,6 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(path.EndpointA.ClientID) }, true}, - {"success with crossing hellos", func() { - err := suite.coordinator.ConnOpenInitOnBothChains(path) - suite.Require().NoError(err) - - // retrieve client state of chainA to pass as counterpartyClient - counterpartyClient = suite.chainA.GetClientState(path.EndpointA.ClientID) - - previousConnectionID = path.EndpointB.ConnectionID - }, true}, {"success with delay period", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -213,49 +203,6 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) }, false}, - {"invalid previous connection is in TRYOPEN", func() { - // open init chainA - err := path.EndpointA.ConnOpenInit() - suite.Require().NoError(err) - - // open try chainB - err = path.EndpointB.ConnOpenTry() - suite.Require().NoError(err) - - err = path.EndpointB.UpdateClient() - suite.Require().NoError(err) - - // retrieve client state of chainA to pass as counterpartyClient - counterpartyClient = suite.chainA.GetClientState(path.EndpointA.ClientID) - - previousConnectionID = path.EndpointB.ConnectionID - }, false}, - {"invalid previous connection has invalid versions", func() { - // open init chainA - err := path.EndpointA.ConnOpenInit() - suite.Require().NoError(err) - - // open try chainB - err = path.EndpointB.ConnOpenTry() - suite.Require().NoError(err) - - // modify connB to be in INIT with incorrect versions - connection, found := suite.chainB.App.GetIBCKeeper().ConnectionKeeper.GetConnection(suite.chainB.GetContext(), path.EndpointB.ConnectionID) - suite.Require().True(found) - - connection.State = types.INIT - connection.Versions = []*types.Version{{}} - - suite.chainB.App.GetIBCKeeper().ConnectionKeeper.SetConnection(suite.chainB.GetContext(), path.EndpointB.ConnectionID, connection) - - err = path.EndpointB.UpdateClient() - suite.Require().NoError(err) - - // retrieve client state of chainA to pass as counterpartyClient - counterpartyClient = suite.chainA.GetClientState(path.EndpointA.ClientID) - - previousConnectionID = path.EndpointB.ConnectionID - }, false}, } for _, tc := range testCases { @@ -263,9 +210,9 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - consensusHeight = clienttypes.ZeroHeight() // must be explicitly changed in malleate - versions = types.GetCompatibleVersions() // must be explicitly changed in malleate - previousConnectionID = "" + consensusHeight = clienttypes.ZeroHeight() // may be changed in malleate + versions = types.GetCompatibleVersions() // may be changed in malleate + delayPeriod = 0 // may be changed in malleate path = ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) @@ -292,7 +239,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { proofClient, _ := suite.chainA.QueryProof(clientKey) connectionID, err := suite.chainB.App.GetIBCKeeper().ConnectionKeeper.ConnOpenTry( - suite.chainB.GetContext(), previousConnectionID, counterparty, delayPeriod, path.EndpointB.ClientID, counterpartyClient, + suite.chainB.GetContext(), counterparty, delayPeriod, path.EndpointB.ClientID, counterpartyClient, versions, proofInit, proofClient, proofConsensus, proofHeight, consensusHeight, ) @@ -333,27 +280,6 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(path.EndpointB.ClientID) }, true}, - {"success from tryopen", func() { - // chainA is in TRYOPEN, chainB is in TRYOPEN - err := path.EndpointB.ConnOpenInit() - suite.Require().NoError(err) - - err = path.EndpointA.ConnOpenTry() - suite.Require().NoError(err) - - // set chainB to TRYOPEN - connection := path.EndpointB.GetConnection() - connection.State = types.TRYOPEN - connection.Counterparty.ConnectionId = path.EndpointA.ConnectionID - suite.chainB.App.GetIBCKeeper().ConnectionKeeper.SetConnection(suite.chainB.GetContext(), path.EndpointB.ConnectionID, connection) - // update path.EndpointB.ClientID so state change is committed - path.EndpointB.UpdateClient() - - path.EndpointA.UpdateClient() - - // retrieve client state of chainB to pass as counterpartyClient - counterpartyClient = suite.chainB.GetClientState(path.EndpointB.ClientID) - }, true}, {"invalid counterparty client", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -370,7 +296,6 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { tmClient.ChainId = "wrongchainid" suite.chainB.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainB.GetContext(), path.EndpointB.ClientID, tmClient) - }, false}, {"consensus height >= latest height", func() { err := path.EndpointA.ConnOpenInit() @@ -441,28 +366,6 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion("2.0", nil) }, false}, - {"connection is in TRYOPEN but the set version in the connection is invalid", func() { - // chainA is in TRYOPEN, chainB is in TRYOPEN - err := path.EndpointB.ConnOpenInit() - suite.Require().NoError(err) - - err = path.EndpointA.ConnOpenTry() - suite.Require().NoError(err) - - // set chainB to TRYOPEN - connection := path.EndpointB.GetConnection() - connection.State = types.TRYOPEN - suite.chainB.App.GetIBCKeeper().ConnectionKeeper.SetConnection(suite.chainB.GetContext(), path.EndpointB.ConnectionID, connection) - - // update path.EndpointB.ClientID so state change is committed - path.EndpointB.UpdateClient() - path.EndpointA.UpdateClient() - - // retrieve client state of chainB to pass as counterpartyClient - counterpartyClient = suite.chainB.GetClientState(path.EndpointB.ClientID) - - version = types.NewVersion("2.0", nil) - }, false}, {"incompatible IBC versions", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -554,7 +457,6 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = path.EndpointB.ConnOpenTry() suite.Require().NoError(err) - }, false}, } diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 8221dd597bc..72e7c8dca13 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -1,18 +1,18 @@ package keeper import ( - "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/tendermint/tendermint/libs/log" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // Keeper defines the IBC connection keeper @@ -20,14 +20,14 @@ type Keeper struct { // implements gRPC QueryServer interface types.QueryServer - storeKey sdk.StoreKey + storeKey storetypes.StoreKey paramSpace paramtypes.Subspace cdc codec.BinaryCodec clientKeeper types.ClientKeeper } // NewKeeper creates a new IBC connection Keeper instance -func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, ck types.ClientKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, ck types.ClientKeeper) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index 0c25d51c452..2062105dac9 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type KeeperTestSuite struct { @@ -46,7 +46,6 @@ func (suite *KeeperTestSuite) TestSetAndGetConnection() { } func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { - path := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) diff --git a/modules/core/03-connection/keeper/params.go b/modules/core/03-connection/keeper/params.go index 3d7c145ac77..9bf0dbefcd8 100644 --- a/modules/core/03-connection/keeper/params.go +++ b/modules/core/03-connection/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // GetMaxExpectedTimePerBlock retrieves the maximum expected time per block from the paramstore diff --git a/modules/core/03-connection/keeper/params_test.go b/modules/core/03-connection/keeper/params_test.go index 21d628fa6fc..930364c410e 100644 --- a/modules/core/03-connection/keeper/params_test.go +++ b/modules/core/03-connection/keeper/params_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/modules/core/03-connection/keeper/verify.go b/modules/core/03-connection/keeper/verify.go index d3807b1f104..3b27990e669 100644 --- a/modules/core/03-connection/keeper/verify.go +++ b/modules/core/03-connection/keeper/verify.go @@ -6,12 +6,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // VerifyClientState verifies a proof of a client state of the running machine diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index f6fc1f92c19..5b9280f0036 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -4,14 +4,14 @@ import ( "fmt" "time" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) var defaultTimeoutHeight = clienttypes.NewHeight(1, 100000) diff --git a/modules/core/03-connection/module.go b/modules/core/03-connection/module.go index 8bfa8ed6017..a298d942446 100644 --- a/modules/core/03-connection/module.go +++ b/modules/core/03-connection/module.go @@ -4,8 +4,8 @@ import ( "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/client/cli" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // Name returns the IBC connection ICS name. diff --git a/modules/core/03-connection/simulation/decoder.go b/modules/core/03-connection/simulation/decoder.go index e01d2787e32..82be6c8d162 100644 --- a/modules/core/03-connection/simulation/decoder.go +++ b/modules/core/03-connection/simulation/decoder.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/modules/core/03-connection/simulation/decoder_test.go b/modules/core/03-connection/simulation/decoder_test.go index 94de9fae92a..dadc31cf3dd 100644 --- a/modules/core/03-connection/simulation/decoder_test.go +++ b/modules/core/03-connection/simulation/decoder_test.go @@ -7,10 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/simulation" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/core/03-connection/simulation/genesis.go b/modules/core/03-connection/simulation/genesis.go index 746daec042f..c8492473b79 100644 --- a/modules/core/03-connection/simulation/genesis.go +++ b/modules/core/03-connection/simulation/genesis.go @@ -5,7 +5,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // GenConnectionGenesis returns the default connection genesis state. diff --git a/modules/core/03-connection/types/codec.go b/modules/core/03-connection/types/codec.go index 8f65884aadf..5b5e8457fa3 100644 --- a/modules/core/03-connection/types/codec.go +++ b/modules/core/03-connection/types/codec.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces register the ibc interfaces submodule implementations to protobuf @@ -38,11 +38,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } -var ( - // SubModuleCdc references the global x/ibc/core/03-connection module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding. - // - // The actual codec used for serialization should be provided to x/ibc/core/03-connection and - // defined at the application level. - SubModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) -) +// SubModuleCdc references the global x/ibc/core/03-connection module codec. Note, the codec should +// ONLY be used in certain instances of tests and for JSON encoding. +// +// The actual codec used for serialization should be provided to x/ibc/core/03-connection and +// defined at the application level. +var SubModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) diff --git a/modules/core/03-connection/types/connection.go b/modules/core/03-connection/types/connection.go index 3fa86a6a30f..0a0ef981361 100644 --- a/modules/core/03-connection/types/connection.go +++ b/modules/core/03-connection/types/connection.go @@ -3,9 +3,9 @@ package types import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ConnectionI = (*ConnectionEnd)(nil) diff --git a/modules/core/03-connection/types/connection.pb.go b/modules/core/03-connection/types/connection.pb.go index d198ef2d8fe..c29f968ad51 100644 --- a/modules/core/03-connection/types/connection.pb.go +++ b/modules/core/03-connection/types/connection.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + types "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -418,52 +418,53 @@ func init() { } var fileDescriptor_90572467c054e43a = []byte{ - // 716 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0xd2, 0x60, - 0x18, 0xa7, 0xa5, 0x30, 0x78, 0x19, 0x8a, 0x95, 0xb8, 0x06, 0xb3, 0xb6, 0xa9, 0x46, 0x89, 0xc9, - 0xa8, 0x8c, 0xc4, 0xc3, 0xd4, 0xc3, 0x60, 0x98, 0x34, 0x2a, 0x92, 0x8e, 0x2d, 0x71, 0x17, 0x52, - 0xda, 0x77, 0xec, 0xcd, 0x68, 0x5f, 0xd2, 0xbe, 0x10, 0xf8, 0x06, 0xcb, 0x4e, 0x5e, 0x3d, 0x2c, - 0x31, 0xf1, 0xbb, 0x98, 0xc5, 0xd3, 0x8e, 0x9e, 0x88, 0xd9, 0xae, 0x9e, 0xf8, 0x04, 0xa6, 0x7d, - 0x0b, 0x74, 0x8b, 0x33, 0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 0x15, 0x63, 0xd5, 0xdd, 0xd3, 0x73, 0x91, 0x39, 0x3b, - 0x17, 0x99, 0x9f, 0xe7, 0x22, 0xf3, 0xe9, 0x42, 0x8c, 0x9d, 0x5d, 0x88, 0xb1, 0x1f, 0x17, 0x62, - 0x6c, 0xef, 0x55, 0x17, 0x91, 0x83, 0x41, 0xc7, 0x3f, 0x15, 0xd5, 0xc4, 0x9e, 0x8d, 0x3d, 0x15, - 0x75, 0xcc, 0xb5, 0x2e, 0x56, 0x87, 0x15, 0xd5, 0xc6, 0xd6, 0xa0, 0x07, 0x3d, 0xfa, 0x06, 0x7f, - 0x5e, 0x59, 0x8b, 0xfc, 0x37, 0x90, 0x71, 0x1f, 0x7a, 0x9d, 0x64, 0xf0, 0xf6, 0xae, 0xfc, 0x0e, - 0x00, 0x00, 0xff, 0xff, 0xf4, 0xbe, 0xf1, 0xb5, 0x3f, 0x06, 0x00, 0x00, + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0xda, 0x48, + 0x14, 0xc7, 0xc6, 0x10, 0x18, 0xc2, 0x2e, 0x3b, 0x8b, 0x36, 0x16, 0xab, 0xd8, 0x96, 0x77, 0xb5, + 0x8b, 0x56, 0x0a, 0x5e, 0x12, 0xed, 0x1e, 0xd2, 0xf6, 0x10, 0x08, 0x95, 0xac, 0xb6, 0x14, 0x39, + 0x24, 0x52, 0x73, 0x41, 0xc6, 0x9e, 0x90, 0x51, 0xb0, 0x07, 0xd9, 0x03, 0x82, 0x6f, 0x10, 0xe5, + 0xd4, 0x6b, 0x0f, 0x91, 0x2a, 0xf5, 0xbb, 0x54, 0x51, 0x4f, 0x39, 0xf6, 0x84, 0xaa, 0xe4, 0xda, + 0x13, 0x9f, 0xa0, 0xb2, 0xc7, 0x80, 0x13, 0x35, 0x95, 0x92, 0xf6, 0xf6, 0x9e, 0x7f, 0x7f,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, 0x79, 0x25, 0x71, 0x9f, 0xae, 0x24, 0xee, 0xf5, 0xb5, 0x94, 0xb8, 0xbc, 0x96, + 0x12, 0x1f, 0xaf, 0xa5, 0xc4, 0xe1, 0xe3, 0x1e, 0xa6, 0xc7, 0xc3, 0x6e, 0x70, 0x2a, 0x9a, 0x45, + 0x7c, 0x87, 0xf8, 0x1a, 0xee, 0x5a, 0x1b, 0x3d, 0xa2, 0x8d, 0xfe, 0xd3, 0x1c, 0x62, 0x0f, 0xfb, + 0xc8, 0x67, 0x6f, 0xf0, 0x7f, 0xb7, 0x36, 0x62, 0xff, 0x0d, 0x74, 0x32, 0x40, 0x7e, 0x37, 0x1d, + 0xbe, 0xbd, 0xb7, 0xbe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x12, 0xa8, 0x86, 0xc5, 0x3f, 0x06, 0x00, + 0x00, } func (m *ConnectionEnd) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/03-connection/types/connection_test.go b/modules/core/03-connection/types/connection_test.go index 08c90be9951..0513b3f4331 100644 --- a/modules/core/03-connection/types/connection_test.go +++ b/modules/core/03-connection/types/connection_test.go @@ -5,10 +5,10 @@ import ( "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) var ( diff --git a/modules/core/03-connection/types/events.go b/modules/core/03-connection/types/events.go index 10fdbeff391..c517b08f11d 100644 --- a/modules/core/03-connection/types/events.go +++ b/modules/core/03-connection/types/events.go @@ -3,7 +3,7 @@ package types import ( "fmt" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // IBC connection events diff --git a/modules/core/03-connection/types/expected_keepers.go b/modules/core/03-connection/types/expected_keepers.go index 05495181222..5570468ee6d 100644 --- a/modules/core/03-connection/types/expected_keepers.go +++ b/modules/core/03-connection/types/expected_keepers.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ClientKeeper expected account IBC client keeper diff --git a/modules/core/03-connection/types/genesis.go b/modules/core/03-connection/types/genesis.go index 3502c13eb59..c485a5c544f 100644 --- a/modules/core/03-connection/types/genesis.go +++ b/modules/core/03-connection/types/genesis.go @@ -3,7 +3,7 @@ package types import ( "fmt" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewConnectionPaths creates a ConnectionPaths instance. @@ -42,7 +42,7 @@ func DefaultGenesisState() GenesisState { func (gs GenesisState) Validate() error { // keep track of the max sequence to ensure it is less than // the next sequence used in creating connection identifers. - var maxSequence uint64 = 0 + var maxSequence uint64 for i, conn := range gs.Connections { sequence, err := ParseConnectionSequence(conn.Id) diff --git a/modules/core/03-connection/types/genesis.pb.go b/modules/core/03-connection/types/genesis.pb.go index 777d8e50e7d..e37f2eccf10 100644 --- a/modules/core/03-connection/types/genesis.pb.go +++ b/modules/core/03-connection/types/genesis.pb.go @@ -102,30 +102,30 @@ func init() { } var fileDescriptor_1879d34bc6ac3cd7 = []byte{ - // 356 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4f, 0xf2, 0x40, - 0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0xee, 0xc5, 0xb8, 0x7b, 0x1e, 0xdb, 0x77, 0x6b, - 0x1b, 0x2d, 0xbc, 0x70, 0x72, 0xe5, 0xe4, 0x58, 0x9d, 0xfe, 0x71, 0xba, 0xf9, 0x15, 0x37, 0x1f, - 0x0d, 0x8b, 0xc3, 0xcb, 0x8f, 0x80, 0x84, 0xe7, 0x19, 0x70, 0x0a, 0x56, 0xa1, 0xa6, 0x37, 0x8a, - 0xee, 0xe9, 0x6e, 0x6d, 0xdb, 0xa9, 0x3c, 0x8f, 0x74, 0xfa, 0x95, 0x78, 0x95, 0xb9, 0x07, 0xfb, - 0x85, 0xd9, 0x35, 0x4a, 0x91, 0x37, 0xf5, 0x42, 0x69, 0x15, 0x6b, 0x7a, 0xa3, 0xdc, 0x46, 0x79, - 0xbf, 0xd5, 0x4b, 0xa8, 0xfd, 0x5b, 0xed, 0x33, 0xee, 0xfd, 0x72, 0x83, 0xf4, 0xd5, 0x06, 0xe9, - 0x9f, 0x1b, 0xa4, 0xbf, 0x6f, 0x91, 0xb6, 0xda, 0x22, 0xed, 0x63, 0x8b, 0xb4, 0x87, 0x6e, 0xc0, - 0xd4, 0x78, 0xe6, 0x63, 0x2a, 0x42, 0x42, 0x85, 0x0c, 0x85, 0x24, 0xcc, 0xa7, 0xcd, 0x40, 0x90, - 0x79, 0x87, 0x84, 0x62, 0x34, 0x9b, 0x80, 0x4c, 0x0f, 0x7e, 0xd9, 0x69, 0x1e, 0xdc, 0x5c, 0x2d, - 0x22, 0x90, 0x7e, 0x29, 0x39, 0x76, 0xe7, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x04, 0xad, 0xb7, - 0x6b, 0x02, 0x00, 0x00, + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0xdb, 0x0b, 0x61, 0x51, 0xee, 0xaa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63, 0xfb, + 0x6e, 0x6d, 0xa3, 0x85, 0x17, 0x4e, 0x2e, 0x9d, 0x1c, 0xab, 0xd3, 0xff, 0x9f, 0x6e, 0x7e, 0xc4, + 0xcd, 0x07, 0xc3, 0xe2, 0xf0, 0xfc, 0x2d, 0x20, 0xe1, 0x69, 0x06, 0x9c, 0x82, 0x55, 0xa8, 0xe9, + 0x8d, 0xa2, 0x7b, 0xbc, 0x5b, 0xdb, 0x76, 0x2a, 0xcf, 0x23, 0x9d, 0x7e, 0x25, 0x5e, 0x65, 0xee, + 0xc1, 0x7e, 0x61, 0x76, 0x8d, 0x52, 0xe4, 0x4d, 0xbd, 0x50, 0x5a, 0xc5, 0x9a, 0xde, 0x28, 0xb7, + 0x51, 0xde, 0x6f, 0xf5, 0x12, 0x6a, 0xff, 0x56, 0xfb, 0x8c, 0x7b, 0xb7, 0xdc, 0x20, 0x7d, 0xb5, + 0x41, 0xfa, 0xc7, 0x06, 0xe9, 0x6f, 0x5b, 0xa4, 0xad, 0xb6, 0x48, 0x7b, 0xdf, 0x22, 0xed, 0xbe, + 0x1b, 0x30, 0x35, 0x9e, 0xf9, 0x98, 0x8a, 0x90, 0x50, 0x21, 0x43, 0x21, 0x09, 0xf3, 0x69, 0x33, + 0x10, 0x64, 0x7e, 0x41, 0x42, 0x31, 0x9a, 0x4d, 0x40, 0xa6, 0x07, 0x3f, 0xef, 0x34, 0x0f, 0x6e, + 0xae, 0x16, 0x11, 0x48, 0xbf, 0x94, 0x1c, 0xbb, 0xf3, 0x19, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x12, + 0xda, 0xc7, 0x6b, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/03-connection/types/genesis_test.go b/modules/core/03-connection/types/genesis_test.go index db2192385b7..2a457f43bc1 100644 --- a/modules/core/03-connection/types/genesis_test.go +++ b/modules/core/03-connection/types/genesis_test.go @@ -5,13 +5,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func TestValidateGenesis(t *testing.T) { - testCases := []struct { name string genState types.GenesisState diff --git a/modules/core/03-connection/types/keys.go b/modules/core/03-connection/types/keys.go index e7ed7a943f3..b1c98de4fb6 100644 --- a/modules/core/03-connection/types/keys.go +++ b/modules/core/03-connection/types/keys.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( diff --git a/modules/core/03-connection/types/keys_test.go b/modules/core/03-connection/types/keys_test.go index b0478d00703..04f7bebb69f 100644 --- a/modules/core/03-connection/types/keys_test.go +++ b/modules/core/03-connection/types/keys_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) // tests ParseConnectionSequence and IsValidConnectionID diff --git a/modules/core/03-connection/types/msgs.go b/modules/core/03-connection/types/msgs.go index 3ea63c84d37..efc9681f81c 100644 --- a/modules/core/03-connection/types/msgs.go +++ b/modules/core/03-connection/types/msgs.go @@ -5,10 +5,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( @@ -74,8 +74,8 @@ func (msg MsgConnectionOpenInit) GetSigners() []sdk.AccAddress { // NewMsgConnectionOpenTry creates a new MsgConnectionOpenTry instance //nolint:interfacer func NewMsgConnectionOpenTry( - previousConnectionID, clientID, counterpartyConnectionID, - counterpartyClientID string, counterpartyClient exported.ClientState, + clientID, counterpartyConnectionID, counterpartyClientID string, + counterpartyClient exported.ClientState, counterpartyPrefix commitmenttypes.MerklePrefix, counterpartyVersions []*Version, delayPeriod uint64, proofInit, proofClient, proofConsensus []byte, @@ -84,7 +84,6 @@ func NewMsgConnectionOpenTry( counterparty := NewCounterparty(counterpartyClientID, counterpartyConnectionID, counterpartyPrefix) csAny, _ := clienttypes.PackClientState(counterpartyClient) return &MsgConnectionOpenTry{ - PreviousConnectionId: previousConnectionID, ClientId: clientID, ClientState: csAny, Counterparty: counterparty, @@ -101,11 +100,8 @@ func NewMsgConnectionOpenTry( // ValidateBasic implements sdk.Msg func (msg MsgConnectionOpenTry) ValidateBasic() error { - // an empty connection identifier indicates that a connection identifier should be generated if msg.PreviousConnectionId != "" { - if !IsValidConnectionID(msg.PreviousConnectionId) { - return sdkerrors.Wrap(ErrInvalidConnectionIdentifier, "invalid previous connection ID") - } + return sdkerrors.Wrap(ErrInvalidConnectionIdentifier, "previous connection identifier must be empty, this field has been deprecated as crossing hellos are no longer supported") } if err := host.ClientIdentifierValidator(msg.ClientId); err != nil { return sdkerrors.Wrap(err, "invalid client ID") diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index 871da3c2b9c..28b56cb6648 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -10,14 +10,15 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" + log "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) var ( @@ -46,7 +47,8 @@ func (suite *MsgTestSuite) SetupTest() { app := simapp.Setup(false) db := dbm.NewMemDB() - store := rootmulti.NewStore(db) + dblog := log.TestingLogger() + store := rootmulti.NewStore(db, dblog) storeKey := storetypes.NewKVStoreKey("iavlStoreKey") store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil) @@ -68,7 +70,6 @@ func (suite *MsgTestSuite) SetupTest() { suite.Require().NoError(err) suite.proof = proof - } func TestMsgTestSuite(t *testing.T) { @@ -81,7 +82,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { // will be used in protocol. var version *types.Version - var testCases = []struct { + testCases := []struct { name string msg *types.MsgConnectionOpenInit expPass bool @@ -111,6 +112,8 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { clientState := ibctmtypes.NewClientState( chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) + any, err := clienttypes.PackClientState(clientState) + suite.Require().NoError(err) // Pack consensus state into any to test unpacking error consState := ibctmtypes.NewConsensusState( @@ -124,29 +127,28 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false, ) - var testCases = []struct { + testCases := []struct { name string msg *types.MsgConnectionOpenTry expPass bool }{ - {"invalid connection ID", types.NewMsgConnectionOpenTry("test/conn1", "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid connection ID", types.NewMsgConnectionOpenTry("(invalidconnection)", "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid client ID", types.NewMsgConnectionOpenTry(connectionID, "test/iris", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "ibc/test", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid counterparty client ID", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "test/conn1", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid nil counterparty client", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", nil, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"invalid client unpacking", &types.MsgConnectionOpenTry{connectionID, "clienttotesta", invalidAny, counterparty, 500, []*types.Version{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer}, false}, - {"counterparty failed validate", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", invalidClient, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty counterparty prefix", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, emptyPrefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty counterpartyVersions", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofInit", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, emptyProof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofClient", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, emptyProof, suite.proof, clientHeight, clientHeight, signer), false}, - {"empty proofConsensus", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, emptyProof, clientHeight, clientHeight, signer), false}, - {"invalid proofHeight", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clienttypes.ZeroHeight(), clientHeight, signer), false}, - {"invalid consensusHeight", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, - {"empty singer", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ""), false}, - {"success", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, - {"invalid version", types.NewMsgConnectionOpenTry(connectionID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"non empty connection ID", &types.MsgConnectionOpenTry{"connection-0", "clienttotesta", any, counterparty, 500, []*types.Version{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer}, false}, + {"invalid client ID", types.NewMsgConnectionOpenTry("test/iris", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry("clienttotesta", "ibc/test", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid counterparty client ID", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "test/conn1", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid nil counterparty client", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", nil, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid client unpacking", &types.MsgConnectionOpenTry{"", "clienttotesta", invalidAny, counterparty, 500, []*types.Version{ibctesting.ConnectionVersion}, clientHeight, suite.proof, suite.proof, suite.proof, clientHeight, signer}, false}, + {"counterparty failed validate", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", invalidClient, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty counterparty prefix", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, emptyPrefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty counterpartyVersions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofInit", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, emptyProof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofClient", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, emptyProof, suite.proof, clientHeight, clientHeight, signer), false}, + {"empty proofConsensus", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, emptyProof, clientHeight, clientHeight, signer), false}, + {"invalid proofHeight", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clienttypes.ZeroHeight(), clientHeight, signer), false}, + {"invalid consensusHeight", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, + {"empty singer", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ""), false}, + {"success", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, + {"invalid version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, } for _, tc := range testCases { @@ -176,7 +178,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { ) connectionID := "connection-0" - var testCases = []struct { + testCases := []struct { name string msg *types.MsgConnectionOpenAck expPass bool @@ -215,7 +217,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { types.NewMsgConnectionOpenConfirm(connectionID, suite.proof, clientHeight, signer), } - var testCases = []struct { + testCases := []struct { msg *types.MsgConnectionOpenConfirm expPass bool errMsg string diff --git a/modules/core/03-connection/types/params_test.go b/modules/core/03-connection/types/params_test.go index 28c4311ff94..a4abacf241a 100644 --- a/modules/core/03-connection/types/params_test.go +++ b/modules/core/03-connection/types/params_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" ) func TestValidateParams(t *testing.T) { diff --git a/modules/core/03-connection/types/query.go b/modules/core/03-connection/types/query.go index 2cae95934b6..2927fd36451 100644 --- a/modules/core/03-connection/types/query.go +++ b/modules/core/03-connection/types/query.go @@ -3,8 +3,8 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/03-connection/types/query.pb.go b/modules/core/03-connection/types/query.pb.go index a3d5cf40410..59d0c136316 100644 --- a/modules/core/03-connection/types/query.pb.go +++ b/modules/core/03-connection/types/query.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" types1 "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -638,60 +638,60 @@ var fileDescriptor_cd8d529f8c7cd06b = []byte{ // 895 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x31, 0x6f, 0x23, 0x45, 0x14, 0xf6, 0x38, 0xb9, 0xd3, 0x65, 0x1c, 0xee, 0x60, 0xe4, 0xbb, 0x33,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 0xa5, 0x54, 0x11, 0xda, 0x16, 0x84, 0xaa, 0xe8, 0x93, 0x19, 0x56, 0x86, - 0xe8, 0xa6, 0x89, 0x7e, 0xca, 0xc2, 0xc2, 0xa4, 0x27, 0x8d, 0x36, 0xa6, 0x85, 0x98, 0xe6, 0x61, - 0x46, 0x65, 0xc6, 0x6a, 0xc5, 0xf1, 0x5b, 0xc1, 0xb1, 0x87, 0xbe, 0x99, 0x89, 0x63, 0xd2, 0x81, - 0xc8, 0xd0, 0xcd, 0xc8, 0xd1, 0x88, 0x2f, 0xf6, 0x89, 0x34, 0x0d, 0xed, 0x40, 0x06, 0xfa, 0xd5, - 0xaf, 0x8e, 0x07, 0x45, 0x70, 0x32, 0x28, 0x82, 0xbf, 0x06, 0x45, 0xf0, 0xc3, 0x79, 0x31, 0x73, - 0x72, 0x5e, 0xcc, 0x9c, 0x9e, 0x17, 0x33, 0x5f, 0x6f, 0x78, 0x7e, 0x58, 0xef, 0x38, 0xd8, 0x65, - 0x4d, 0xa2, 0xfe, 0x01, 0xf6, 0x1d, 0xf7, 0x89, 0xc7, 0x48, 0xb7, 0x4c, 0x9a, 0xac, 0xd6, 0x69, - 0x50, 0x2e, 0x11, 0x3f, 0x2d, 0x3f, 0xd1, 0x40, 0x87, 0xbd, 0x16, 0xe5, 0xce, 0x6d, 0xe1, 0x7f, - 0xe5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xd7, 0xeb, 0x28, 0x8e, 0x0b, 0x00, 0x00, + 0x90, 0x1c, 0x70, 0x33, 0xe7, 0x44, 0x39, 0x1d, 0x21, 0x46, 0xe0, 0x28, 0x90, 0x34, 0x51, 0x58, + 0x24, 0x0a, 0x9a, 0x68, 0x77, 0x3d, 0x59, 0xaf, 0x64, 0xef, 0x38, 0x9e, 0xb5, 0x91, 0x15, 0x59, + 0x48, 0xfc, 0x01, 0x90, 0x68, 0x68, 0x68, 0x29, 0xf8, 0x03, 0x14, 0x74, 0x54, 0x29, 0x23,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b1, 0x47, 0xa4, 0x69, 0x68, 0x07, 0x32, 0xd0, 0xab, 0x7c, + 0x75, 0xd2, 0x2f, 0x82, 0xd3, 0x7e, 0x11, 0xfc, 0xd5, 0x2f, 0x82, 0x1f, 0x2e, 0x8a, 0x99, 0xd3, + 0x8b, 0x62, 0xe6, 0xec, 0xa2, 0x98, 0xf9, 0x7a, 0xd3, 0xf3, 0xc3, 0x5a, 0xdb, 0xc1, 0x2e, 0x6b, + 0x10, 0xf5, 0x0f, 0xb0, 0xef, 0xb8, 0xcf, 0x3c, 0x46, 0x3a, 0xeb, 0xa4, 0xc1, 0xaa, 0xed, 0x3a, + 0xe5, 0x12, 0xf1, 0xf3, 0xb5, 0x67, 0x1a, 0xe8, 0xb0, 0xdb, 0xa4, 0xdc, 0xb9, 0x2b, 0xfc, 0x6f, + 0xed, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xc1, 0x9c, 0x58, 0x8e, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index 3e332e51c4b..c360bbf3520 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -115,9 +115,8 @@ var xxx_messageInfo_MsgConnectionOpenInitResponse proto.InternalMessageInfo // connection on Chain B. type MsgConnectionOpenTry struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - // in the case of crossing hello's, when both chains call OpenInit, we need - // the connection identifier of the previous connection in state INIT - PreviousConnectionId string `protobuf:"bytes,2,opt,name=previous_connection_id,json=previousConnectionId,proto3" json:"previous_connection_id,omitempty" yaml:"previous_connection_id"` + // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + PreviousConnectionId string `protobuf:"bytes,2,opt,name=previous_connection_id,json=previousConnectionId,proto3" json:"previous_connection_id,omitempty" yaml:"previous_connection_id"` // Deprecated: Do not use. ClientState *types.Any `protobuf:"bytes,3,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"` Counterparty Counterparty `protobuf:"bytes,4,opt,name=counterparty,proto3" json:"counterparty"` DelayPeriod uint64 `protobuf:"varint,5,opt,name=delay_period,json=delayPeriod,proto3" json:"delay_period,omitempty" yaml:"delay_period"` @@ -388,65 +387,66 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x31, 0x73, 0xe3, 0x44, - 0x14, 0xb6, 0x62, 0x27, 0xb1, 0xd7, 0x86, 0xbb, 0x5b, 0x9c, 0x44, 0x98, 0x3b, 0xcb, 0xa7, 0x81, - 0x21, 0x05, 0x91, 0xce, 0x97, 0x63, 0x06, 0x32, 0x50, 0xc4, 0x6e, 0x48, 0x71, 0x70, 0x23, 0x6e, - 0x8e, 0x99, 0x6b, 0x3c, 0xf6, 0x7a, 0xa3, 0xec, 0xd8, 0xd6, 0x6a, 0xb4, 0xb2, 0x41, 0xb4, 0x34, - 0x0c, 0x15, 0x0d, 0xfd, 0xfd, 0x07, 0xfe, 0xc4, 0x95, 0x57, 0x52, 0x69, 0x20, 0x69, 0xa8, 0xd5, - 0xd1, 0x31, 0xda, 0x95, 0xe4, 0xb5, 0x23, 0x0f, 0x31, 0xce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d, 0xd6, 0x28, 0x2c, 0xd1, 0x14, 0xfe, 0xa4, 0x80, 0xbd, 0x7c, 0x8e, 0x3e, 0xba, - 0x71, 0xbe, 0x24, 0xa2, 0xf1, 0xd9, 0xba, 0x11, 0xe9, 0x29, 0x3a, 0x2f, 0x5e, 0x5f, 0x36, 0x95, - 0x37, 0x97, 0x4d, 0xe5, 0xcf, 0xcb, 0xa6, 0xf2, 0xeb, 0x55, 0xb3, 0xf0, 0xe6, 0xaa, 0x59, 0xf8, - 0xe3, 0xaa, 0x59, 0x78, 0xf9, 0x85, 0x4d, 0xfc, 0x8b, 0xe9, 0xc0, 0x40, 0x74, 0x62, 0x22, 0xca, - 0x26, 0x94, 0x99, 0x64, 0x80, 0x8e, 0x6c, 0x6a, 0xce, 0x8e, 0xcd, 0x09, 0x1d, 0x4e, 0xc7, 0x98, - 0x89, 0x2f, 0xfa, 0xa3, 0xe3, 0x23, 0xe9, 0x97, 0xee, 0x07, 0x2e, 0x66, 0x83, 0x1d, 0xfe, 0xe4, - 0x1e, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xef, 0xf1, 0x60, 0x63, 0x54, 0x0c, 0x00, 0x00, + // 929 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xbf, 0x73, 0xe3, 0x44, + 0x14, 0xb6, 0x62, 0x27, 0xb1, 0xd7, 0x86, 0xbb, 0x5b, 0x9c, 0x44, 0x88, 0x3b, 0xcb, 0x08, 0x18, + 0x52, 0x10, 0xe9, 0x7c, 0x3f, 0x66, 0x20, 0x03, 0x45, 0xec, 0x86, 0x14, 0x07, 0x37, 0xe2, 0xe6, + 0x66, 0xb8, 0xc6, 0x63, 0xcb, 0x1b, 0x65, 0xc7, 0xb6, 0x56, 0xa3, 0x95, 0x0d, 0xa2, 0xa5, 0x61, + 0xa8, 0xe8, 0x68, 0xef, 0x7f, 0xe0, 0x9f, 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, 0xcb, 0xdf, + 0x8d, 0x4f, 0xd6, 0xce, 0xf5, 0xc2, 0x0b, 0x94, 0x27, 0x9b, 0xa0, 0x57, 0x17, 0x8e, 0x67, 0xb6, + 0x7e, 0xe1, 0x33, 0x6b, 0xb8, 0x41, 0x61, 0x81, 0xa6, 0xf0, 0x47, 0x09, 0x1c, 0xe4, 0x73, 0xf4, + 0xe1, 0xda, 0xf9, 0x92, 0x08, 0xe5, 0xd3, 0x4d, 0x23, 0xd2, 0x53, 0xb4, 0x5f, 0xbe, 0xb9, 0x6e, + 0x48, 0x57, 0xd7, 0x0d, 0xe9, 0x8f, 0xeb, 0x86, 0xf4, 0xcb, 0x4d, 0xa3, 0x70, 0x75, 0xd3, 0x28, + 0xfc, 0x7e, 0xd3, 0x28, 0xbc, 0xfa, 0xdc, 0xc6, 0xfe, 0xe5, 0xa4, 0xaf, 0x5b, 0x64, 0x6c, 0x58, + 0x84, 0x8e, 0x09, 0x35, 0x70, 0xdf, 0x3a, 0xb1, 0x89, 0x31, 0x7d, 0x6a, 0x8c, 0xc9, 0x60, 0x32, + 0x42, 0x94, 0x7f, 0xd2, 0x1f, 0x3e, 0x3e, 0x11, 0xfe, 0xe9, 0x7e, 0xe0, 0x22, 0xda, 0xdf, 0x63, + 0x4f, 0xee, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x33, 0x96, 0x2d, 0x8a, 0x56, 0x0c, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/03-connection/types/version.go b/modules/core/03-connection/types/version.go index f88164aff69..8db884ba6c3 100644 --- a/modules/core/03-connection/types/version.go +++ b/modules/core/03-connection/types/version.go @@ -5,7 +5,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( @@ -117,8 +117,8 @@ func GetCompatibleVersions() []exported.Version { // IsSupportedVersion returns true if the proposed version has a matching version // identifier and its entire feature set is supported or the version identifier // supports an empty feature set. -func IsSupportedVersion(proposedVersion *Version) bool { - supportedVersion, found := FindSupportedVersion(proposedVersion, GetCompatibleVersions()) +func IsSupportedVersion(supportedVersions []exported.Version, proposedVersion *Version) bool { + supportedVersion, found := FindSupportedVersion(proposedVersion, supportedVersions) if !found { return false } diff --git a/modules/core/03-connection/types/version_test.go b/modules/core/03-connection/types/version_test.go index 3fa637cc4de..efeacc5b2b3 100644 --- a/modules/core/03-connection/types/version_test.go +++ b/modules/core/03-connection/types/version_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func TestValidateVersion(t *testing.T) { @@ -57,7 +57,7 @@ func TestIsSupportedVersion(t *testing.T) { } for _, tc := range testCases { - require.Equal(t, tc.expPass, types.IsSupportedVersion(tc.version)) + require.Equal(t, tc.expPass, types.IsSupportedVersion(types.GetCompatibleVersions(), tc.version)) } } @@ -141,7 +141,6 @@ func TestVerifyProposedVersion(t *testing.T) { require.Error(t, err, "test case %d: %s", i, tc.name) } } - } func TestVerifySupportedFeature(t *testing.T) { diff --git a/modules/core/04-channel/client/cli/cli.go b/modules/core/04-channel/client/cli/cli.go index d2dc4e661f8..96ea619249f 100644 --- a/modules/core/04-channel/client/cli/cli.go +++ b/modules/core/04-channel/client/cli/cli.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // GetQueryCmd returns the query commands for IBC channels diff --git a/modules/core/04-channel/client/cli/query.go b/modules/core/04-channel/client/cli/query.go index a92ea327d6d..08d540cafc0 100644 --- a/modules/core/04-channel/client/cli/query.go +++ b/modules/core/04-channel/client/cli/query.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/client/utils" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/client/utils" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( diff --git a/modules/core/04-channel/client/utils/utils.go b/modules/core/04-channel/client/utils/utils.go index de40903e6fb..7a2ac4b42c0 100644 --- a/modules/core/04-channel/client/utils/utils.go +++ b/modules/core/04-channel/client/utils/utils.go @@ -8,12 +8,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clientutils "github.com/cosmos/ibc-go/v3/modules/core/02-client/client/utils" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/client" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clientutils "github.com/cosmos/ibc-go/v5/modules/core/02-client/client/utils" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/client" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // QueryChannel returns a channel end. @@ -64,7 +64,6 @@ func queryChannelABCI(clientCtx client.Context, portID, channelID string) (*type func QueryChannelClientState( clientCtx client.Context, portID, channelID string, prove bool, ) (*types.QueryChannelClientStateResponse, error) { - queryClient := types.NewQueryClient(clientCtx) req := &types.QueryChannelClientStateRequest{ PortId: portID, @@ -99,7 +98,6 @@ func QueryChannelClientState( func QueryChannelConsensusState( clientCtx client.Context, portID, channelID string, height clienttypes.Height, prove bool, ) (*types.QueryChannelConsensusStateResponse, error) { - queryClient := types.NewQueryClient(clientCtx) req := &types.QueryChannelConsensusStateRequest{ PortId: portID, diff --git a/modules/core/04-channel/genesis.go b/modules/core/04-channel/genesis.go index 56f81ca9f72..740d8b81b8d 100644 --- a/modules/core/04-channel/genesis.go +++ b/modules/core/04-channel/genesis.go @@ -3,8 +3,8 @@ package channel import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // InitGenesis initializes the ibc channel submodule's state from a provided genesis diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index 731d298a2ae..2b8f2f4f84e 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // EmitChannelOpenInitEvent emits a channel open init event @@ -131,7 +131,7 @@ func EmitSendPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeSendPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, timeoutHeight.String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -158,7 +158,7 @@ func EmitRecvPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRecvPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -184,7 +184,7 @@ func EmitWriteAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, cha ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeWriteAck, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -193,7 +193,7 @@ func EmitWriteAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, cha sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), + sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyAckHex, hex.EncodeToString(acknowledgement)), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) @@ -252,3 +252,18 @@ func EmitTimeoutPacketEvent(ctx sdk.Context, packet exported.PacketI, channel ty ), }) } + +// EmitChannelClosedEvent emits a channel closed event. +func EmitChannelClosedEvent(ctx sdk.Context, packet exported.PacketI, channel types.Channel) { + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeChannelClosed, + sdk.NewAttribute(types.AttributeKeyPortID, packet.GetSourcePort()), + sdk.NewAttribute(types.AttributeKeyChannelID, packet.GetSourceChannel()), + sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), + sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), + sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), + sdk.NewAttribute(types.AttributeKeyChannelOrdering, channel.Ordering.String()), + ), + }) +} diff --git a/modules/core/04-channel/keeper/grpc_query.go b/modules/core/04-channel/keeper/grpc_query.go index 6bd8418a564..922266280f6 100644 --- a/modules/core/04-channel/keeper/grpc_query.go +++ b/modules/core/04-channel/keeper/grpc_query.go @@ -12,10 +12,10 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) var _ types.QueryServer = (*Keeper)(nil) @@ -69,7 +69,6 @@ func (q Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*t channels = append(channels, &identifiedChannel) return nil }) - if err != nil { return nil, err } @@ -118,7 +117,6 @@ func (q Keeper) ConnectionChannels(c context.Context, req *types.QueryConnection channels = append(channels, &identifiedChannel) return nil }) - if err != nil { return nil, err } @@ -252,7 +250,6 @@ func (q Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi commitments = append(commitments, &commitment) return nil }) - if err != nil { return nil, err } @@ -361,7 +358,6 @@ func (q Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacket return nil }) - if err != nil { return nil, err } @@ -401,7 +397,7 @@ func (q Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedP ctx := sdk.UnwrapSDKContext(c) - var unreceivedSequences = []uint64{} + unreceivedSequences := []uint64{} for i, seq := range req.PacketCommitmentSequences { if seq == 0 { @@ -450,7 +446,7 @@ func (q Keeper) UnreceivedAcks(c context.Context, req *types.QueryUnreceivedAcks ctx := sdk.UnwrapSDKContext(c) - var unreceivedSequences = []uint64{} + unreceivedSequences := []uint64{} for i, seq := range req.PacketAckSequences { if seq == 0 { diff --git a/modules/core/04-channel/keeper/grpc_query_test.go b/modules/core/04-channel/keeper/grpc_query_test.go index cc899e99444..3de3bea1bb2 100644 --- a/modules/core/04-channel/keeper/grpc_query_test.go +++ b/modules/core/04-channel/keeper/grpc_query_test.go @@ -6,11 +6,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *KeeperTestSuite) TestQueryChannel() { @@ -51,7 +51,8 @@ func (suite *KeeperTestSuite) TestQueryChannel() { }, false, }, - {"channel not found", + { + "channel not found", func() { req = &types.QueryChannelRequest{ PortId: "test-port-id", @@ -628,7 +629,8 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { }, false, }, - {"invalid sequence", + { + "invalid sequence", func() { req = &types.QueryPacketCommitmentRequest{ PortId: "test-port-id", @@ -638,7 +640,8 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { }, false, }, - {"channel not found", + { + "channel not found", func() { req = &types.QueryPacketCommitmentRequest{ PortId: "test-port-id", @@ -819,7 +822,8 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { }, false, }, - {"invalid sequence", + { + "invalid sequence", func() { req = &types.QueryPacketReceiptRequest{ PortId: "test-port-id", @@ -923,7 +927,8 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { }, false, }, - {"invalid sequence", + { + "invalid sequence", func() { req = &types.QueryPacketAcknowledgementRequest{ PortId: "test-port-id", @@ -933,7 +938,8 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { }, false, }, - {"channel not found", + { + "channel not found", func() { req = &types.QueryPacketAcknowledgementRequest{ PortId: "test-port-id", @@ -1400,7 +1406,8 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { }, false, }, - {"channel not found", + { + "channel not found", func() { req = &types.QueryNextSequenceReceiveRequest{ PortId: "test-port-id", diff --git a/modules/core/04-channel/keeper/handshake.go b/modules/core/04-channel/keeper/handshake.go index 1d650bb4d7b..6e4a4def90b 100644 --- a/modules/core/04-channel/keeper/handshake.go +++ b/modules/core/04-channel/keeper/handshake.go @@ -8,11 +8,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ChanOpenInit is called by a module to initiate a channel opening handshake with @@ -98,51 +98,20 @@ func (k Keeper) ChanOpenTry( ctx sdk.Context, order types.Order, connectionHops []string, - portID, - previousChannelID string, + portID string, portCap *capabilitytypes.Capability, counterparty types.Counterparty, counterpartyVersion string, proofInit []byte, proofHeight exported.Height, ) (string, *capabilitytypes.Capability, error) { - var ( - previousChannel types.Channel - previousChannelFound bool - ) - - channelID := previousChannelID - // connection hops only supports a single connection if len(connectionHops) != 1 { return "", nil, sdkerrors.Wrapf(types.ErrTooManyConnectionHops, "expected 1, got %d", len(connectionHops)) } - // empty channel identifier indicates continuing a previous channel handshake - if previousChannelID != "" { - // channel identifier and connection hop length checked on msg.ValidateBasic() - // ensure that the previous channel exists - previousChannel, previousChannelFound = k.GetChannel(ctx, portID, previousChannelID) - if !previousChannelFound { - return "", nil, sdkerrors.Wrapf(types.ErrInvalidChannel, "previous channel does not exist for supplied previous channelID %s", previousChannelID) - } - // previous channel must use the same fields - if !(previousChannel.Ordering == order && - previousChannel.Counterparty.PortId == counterparty.PortId && - previousChannel.Counterparty.ChannelId == "" && - previousChannel.ConnectionHops[0] == connectionHops[0] && // ChanOpenInit will only set a single connection hop - previousChannel.Version == counterpartyVersion) { - return "", nil, sdkerrors.Wrap(types.ErrInvalidChannel, "channel fields mismatch previous channel fields") - } - - if previousChannel.State != types.INIT { - return "", nil, sdkerrors.Wrapf(types.ErrInvalidChannelState, "previous channel state is in %s, expected INIT", previousChannel.State) - } - - } else { - // generate a new channel - channelID = k.GenerateChannelIdentifier(ctx) - } + // generate a new channel + channelID := k.GenerateChannelIdentifier(ctx) if !k.portKeeper.Authenticate(ctx, portCap, portID) { return "", nil, sdkerrors.Wrapf(porttypes.ErrInvalidPort, "caller does not own port capability for port ID %s", portID) @@ -199,20 +168,9 @@ func (k Keeper) ChanOpenTry( err error ) - if !previousChannelFound { - capKey, err = k.scopedKeeper.NewCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) - if err != nil { - return "", nil, sdkerrors.Wrapf(err, "could not create channel capability for port ID %s and channel ID %s", portID, channelID) - } - - } else { - // capability initialized in ChanOpenInit - capKey, found = k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) - if !found { - return "", nil, sdkerrors.Wrapf(types.ErrChannelCapabilityNotFound, - "capability not found for existing channel, portID (%s) channelID (%s)", portID, channelID, - ) - } + capKey, err = k.scopedKeeper.NewCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) + if err != nil { + return "", nil, sdkerrors.Wrapf(err, "could not create channel capability for port ID %s and channel ID %s", portID, channelID) } return channelID, capKey, nil @@ -230,18 +188,15 @@ func (k Keeper) WriteOpenTryChannel( counterparty types.Counterparty, version string, ) { - previousChannel, previousChannelFound := k.GetChannel(ctx, portID, channelID) - if !previousChannelFound { - k.SetNextSequenceSend(ctx, portID, channelID, 1) - k.SetNextSequenceRecv(ctx, portID, channelID, 1) - k.SetNextSequenceAck(ctx, portID, channelID, 1) - } + k.SetNextSequenceSend(ctx, portID, channelID, 1) + k.SetNextSequenceRecv(ctx, portID, channelID, 1) + k.SetNextSequenceAck(ctx, portID, channelID, 1) channel := types.NewChannel(types.TRYOPEN, order, counterparty, connectionHops, version) k.SetChannel(ctx, portID, channelID, channel) - k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", previousChannel.State.String(), "new-state", "TRYOPEN") + k.Logger(ctx).Info("channel state updated", "port-id", portID, "channel-id", channelID, "previous-state", "NONE", "new-state", "TRYOPEN") defer func() { telemetry.IncrCounter(1, "ibc", "channel", "open-try") @@ -267,11 +222,8 @@ func (k Keeper) ChanOpenAck( return sdkerrors.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID) } - if !(channel.State == types.INIT || channel.State == types.TRYOPEN) { - return sdkerrors.Wrapf( - types.ErrInvalidChannelState, - "channel state should be INIT or TRYOPEN (got %s)", channel.State.String(), - ) + if channel.State != types.INIT { + return sdkerrors.Wrapf(types.ErrInvalidChannelState, "channel state should be INIT (got %s)", channel.State.String()) } if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { diff --git a/modules/core/04-channel/keeper/handshake_test.go b/modules/core/04-channel/keeper/handshake_test.go index aa554fe9fd8..187e9e0b9c6 100644 --- a/modules/core/04-channel/keeper/handshake_test.go +++ b/modules/core/04-channel/keeper/handshake_test.go @@ -5,12 +5,12 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type testCase = struct { @@ -143,10 +143,9 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { // ChanOpenTry can succeed. func (suite *KeeperTestSuite) TestChanOpenTry() { var ( - path *ibctesting.Path - previousChannelID string - portCap *capabilitytypes.Capability - heightDiff uint64 + path *ibctesting.Path + portCap *capabilitytypes.Capability + heightDiff uint64 ) testCases := []testCase{ @@ -158,34 +157,6 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { suite.chainB.CreatePortCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, ibctesting.MockPort) portCap = suite.chainB.GetPortCapability(ibctesting.MockPort) }, true}, - {"success with crossing hello", func() { - suite.coordinator.SetupConnections(path) - path.SetChannelOrdered() - err := suite.coordinator.ChanOpenInitOnBothChains(path) - suite.Require().NoError(err) - - previousChannelID = path.EndpointB.ChannelID - portCap = suite.chainB.GetPortCapability(ibctesting.MockPort) - }, true}, - {"previous channel with invalid version, crossing hello", func() { - suite.coordinator.SetupConnections(path) - path.SetChannelOrdered() - - // modify channel version - path.EndpointA.ChannelConfig.Version = "invalid version" - - err := suite.coordinator.ChanOpenInitOnBothChains(path) - suite.Require().NoError(err) - - previousChannelID = path.EndpointB.ChannelID - portCap = suite.chainB.GetPortCapability(ibctesting.MockPort) - }, false}, - {"previous channel with invalid state", func() { - suite.coordinator.SetupConnections(path) - - // make previous channel have wrong ordering - path.EndpointA.ChanOpenInit() - }, false}, {"connection doesn't exist", func() { path.EndpointA.ConnectionID = ibctesting.FirstConnectionID path.EndpointB.ConnectionID = ibctesting.FirstConnectionID @@ -268,7 +239,6 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset heightDiff = 0 // must be explicitly changed in malleate - previousChannelID = "" path = ibctesting.NewPath(suite.chainA, suite.chainB) tc.malleate() @@ -286,7 +256,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { channelID, cap, err := suite.chainB.App.GetIBCKeeper().ChannelKeeper.ChanOpenTry( suite.chainB.GetContext(), types.ORDERED, []string{path.EndpointB.ConnectionID}, - path.EndpointB.ChannelConfig.PortID, previousChannelID, portCap, counterparty, path.EndpointA.ChannelConfig.Version, + path.EndpointB.ChannelConfig.PortID, portCap, counterparty, path.EndpointA.ChannelConfig.Version, proof, malleateHeight(proofHeight, heightDiff), ) @@ -352,7 +322,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, true}, {"channel doesn't exist", func() {}, false}, - {"channel state is not INIT or TRYOPEN", func() { + {"channel state is not INIT", func() { // create fully open channels on both chains suite.coordinator.Setup(path) channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index ca2f824ad48..0f409ca5c0f 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" @@ -12,12 +13,12 @@ import ( "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ porttypes.ICS4Wrapper = Keeper{} @@ -27,7 +28,7 @@ type Keeper struct { // implements gRPC QueryServer interface types.QueryServer - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.BinaryCodec clientKeeper types.ClientKeeper connectionKeeper types.ConnectionKeeper @@ -37,7 +38,7 @@ type Keeper struct { // NewKeeper creates a new IBC channel Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, + cdc codec.BinaryCodec, key storetypes.StoreKey, clientKeeper types.ClientKeeper, connectionKeeper types.ConnectionKeeper, portKeeper types.PortKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) Keeper { diff --git a/modules/core/04-channel/keeper/keeper_test.go b/modules/core/04-channel/keeper/keeper_test.go index f04664d71f4..af7c365609d 100644 --- a/modules/core/04-channel/keeper/keeper_test.go +++ b/modules/core/04-channel/keeper/keeper_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) // KeeperTestSuite is a testing suite to test keeper functions. diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index 05be506077a..41b13de7c16 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -9,11 +9,11 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // SendPacket is called by a module in order to send an IBC packet on a channel diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 949b45a2e2f..29319bf7507 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -7,14 +7,14 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) var ( @@ -237,7 +237,6 @@ func (suite *KeeperTestSuite) TestSendPacket() { } }) } - } // TestRecvPacket test RecvPacket on chainB. Since packet commitment verification will always @@ -504,7 +503,6 @@ func (suite *KeeperTestSuite) TestRecvPacket() { } }) } - } func (suite *KeeperTestSuite) TestWriteAcknowledgement() { @@ -568,7 +566,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { func() { suite.coordinator.Setup(path) packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) - ack = ibcmock.NewMockEmptyAcknowledgement() + ack = ibcmock.NewEmptyAcknowledgement() channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) }, false, diff --git a/modules/core/04-channel/keeper/timeout.go b/modules/core/04-channel/keeper/timeout.go index 5a14ef85b6b..212e94bc8e8 100644 --- a/modules/core/04-channel/keeper/timeout.go +++ b/modules/core/04-channel/keeper/timeout.go @@ -8,10 +8,10 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // TimeoutPacket is called by a module which originally attempted to send a @@ -170,6 +170,10 @@ func (k Keeper) TimeoutExecuted( // emit an event marking that we have processed the timeout EmitTimeoutPacketEvent(ctx, packet, channel) + if channel.Ordering == types.ORDERED && channel.State == types.CLOSED { + EmitChannelClosedEvent(ctx, packet, channel) + } + return nil } diff --git a/modules/core/04-channel/keeper/timeout_test.go b/modules/core/04-channel/keeper/timeout_test.go index a7151c4c0ff..a52586697a2 100644 --- a/modules/core/04-channel/keeper/timeout_test.go +++ b/modules/core/04-channel/keeper/timeout_test.go @@ -7,12 +7,12 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) // TestTimeoutPacket test the TimeoutPacket call on chainA by ensuring the timeout has passed @@ -430,5 +430,4 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { } }) } - } diff --git a/modules/core/04-channel/module.go b/modules/core/04-channel/module.go index 00dfc6a808b..977867bac03 100644 --- a/modules/core/04-channel/module.go +++ b/modules/core/04-channel/module.go @@ -4,8 +4,8 @@ import ( "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/client/cli" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // Name returns the IBC channel ICS name. diff --git a/modules/core/04-channel/simulation/decoder.go b/modules/core/04-channel/simulation/decoder.go index d09834551e8..338e70e8834 100644 --- a/modules/core/04-channel/simulation/decoder.go +++ b/modules/core/04-channel/simulation/decoder.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/modules/core/04-channel/simulation/decoder_test.go b/modules/core/04-channel/simulation/decoder_test.go index 5a78c03be56..fbafa56a9ab 100644 --- a/modules/core/04-channel/simulation/decoder_test.go +++ b/modules/core/04-channel/simulation/decoder_test.go @@ -8,10 +8,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/simulation" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/core/04-channel/simulation/genesis.go b/modules/core/04-channel/simulation/genesis.go index 7c11dd6cb55..5e24f86b2db 100644 --- a/modules/core/04-channel/simulation/genesis.go +++ b/modules/core/04-channel/simulation/genesis.go @@ -5,7 +5,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // GenChannelGenesis returns the default channel genesis state. diff --git a/modules/core/04-channel/types/acknowledgement.go b/modules/core/04-channel/types/acknowledgement.go index b46de2b981d..49c795d0d55 100644 --- a/modules/core/04-channel/types/acknowledgement.go +++ b/modules/core/04-channel/types/acknowledgement.go @@ -1,6 +1,7 @@ package types import ( + "fmt" "reflect" "strings" @@ -8,6 +9,12 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) +const ( + // ackErrorString defines a string constant included in error acknowledgements + // NOTE: Changing this const is state machine breaking as acknowledgements are written into state. + ackErrorString = "error handling packet: see events for details" +) + // NewResultAcknowledgement returns a new instance of Acknowledgement using an Acknowledgement_Result // type in the Response field. func NewResultAcknowledgement(result []byte) Acknowledgement { @@ -22,10 +29,14 @@ func NewResultAcknowledgement(result []byte) Acknowledgement { // type in the Response field. // NOTE: Acknowledgements are written into state and thus, changes made to error strings included in packet acknowledgements // risk an app hash divergence when nodes in a network are running different patch versions of software. -func NewErrorAcknowledgement(err string) Acknowledgement { +func NewErrorAcknowledgement(err error) Acknowledgement { + // the ABCI code is included in the abcitypes.ResponseDeliverTx hash + // constructed in Tendermint and is therefore deterministic + _, code, _ := sdkerrors.ABCIInfo(err, false) // discard non-determinstic codespace and log values + return Acknowledgement{ Response: &Acknowledgement_Error{ - Error: err, + Error: fmt.Sprintf("ABCI code: %d: %s", code, ackErrorString), }, } } diff --git a/modules/core/04-channel/types/acknowledgement_test.go b/modules/core/04-channel/types/acknowledgement_test.go index 658ff31a8b5..3c053ee4aba 100644 --- a/modules/core/04-channel/types/acknowledgement_test.go +++ b/modules/core/04-channel/types/acknowledgement_test.go @@ -1,6 +1,20 @@ package types_test -import "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" +import ( + "fmt" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + abcitypes "github.com/tendermint/tendermint/abci/types" + tmprotostate "github.com/tendermint/tendermint/proto/tendermint/state" + tmstate "github.com/tendermint/tendermint/state" + + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" +) + +const ( + gasUsed = uint64(100) + gasWanted = uint64(100) +) // tests acknowledgement.ValidateBasic and acknowledgement.GetBytes func (suite TypesTestSuite) TestAcknowledgement() { @@ -18,7 +32,7 @@ func (suite TypesTestSuite) TestAcknowledgement() { }, { "valid failed ack", - types.NewErrorAcknowledgement("error"), + types.NewErrorAcknowledgement(fmt.Errorf("error")), false, true, }, @@ -29,10 +43,10 @@ func (suite TypesTestSuite) TestAcknowledgement() { false, }, { - "empty faied ack", - types.NewErrorAcknowledgement(" "), - false, + "empty failed ack", + types.NewErrorAcknowledgement(fmt.Errorf(" ")), false, + true, }, { "nil response", @@ -68,3 +82,64 @@ func (suite TypesTestSuite) TestAcknowledgement() { }) } } + +// The safety of including ABCI error codes in the acknowledgement rests +// on the inclusion of these ABCI error codes in the abcitypes.ResposneDeliverTx +// hash. If the ABCI codes get removed from consensus they must no longer be used +// in the packet acknowledgement. +// +// This test acts as an indicator that the ABCI error codes may no longer be deterministic. +func (suite *TypesTestSuite) TestABCICodeDeterminism() { + // same ABCI error code used + err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") + errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") + + // different ABCI error code used + errDifferentABCICode := sdkerrors.ErrNotFound + + deliverTx := sdkerrors.ResponseDeliverTx(err, gasUsed, gasWanted, false) + responses := tmprotostate.ABCIResponses{ + DeliverTxs: []*abcitypes.ResponseDeliverTx{ + &deliverTx, + }, + } + + deliverTxSameABCICode := sdkerrors.ResponseDeliverTx(errSameABCICode, gasUsed, gasWanted, false) + responsesSameABCICode := tmprotostate.ABCIResponses{ + DeliverTxs: []*abcitypes.ResponseDeliverTx{ + &deliverTxSameABCICode, + }, + } + + deliverTxDifferentABCICode := sdkerrors.ResponseDeliverTx(errDifferentABCICode, gasUsed, gasWanted, false) + responsesDifferentABCICode := tmprotostate.ABCIResponses{ + DeliverTxs: []*abcitypes.ResponseDeliverTx{ + &deliverTxDifferentABCICode, + }, + } + + hash := tmstate.ABCIResponsesResultsHash(&responses) + hashSameABCICode := tmstate.ABCIResponsesResultsHash(&responsesSameABCICode) + hashDifferentABCICode := tmstate.ABCIResponsesResultsHash(&responsesDifferentABCICode) + + suite.Require().Equal(hash, hashSameABCICode) + suite.Require().NotEqual(hash, hashDifferentABCICode) +} + +// TestAcknowledgementError will verify that only a constant string and +// ABCI error code are used in constructing the acknowledgement error string +func (suite *TypesTestSuite) TestAcknowledgementError() { + // same ABCI error code used + err := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 1") + errSameABCICode := sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "error string 2") + + // different ABCI error code used + errDifferentABCICode := sdkerrors.ErrNotFound + + ack := types.NewErrorAcknowledgement(err) + ackSameABCICode := types.NewErrorAcknowledgement(errSameABCICode) + ackDifferentABCICode := types.NewErrorAcknowledgement(errDifferentABCICode) + + suite.Require().Equal(ack, ackSameABCICode) + suite.Require().NotEqual(ack, ackDifferentABCICode) +} diff --git a/modules/core/04-channel/types/channel.go b/modules/core/04-channel/types/channel.go index 4671000ab70..7bf6454d511 100644 --- a/modules/core/04-channel/types/channel.go +++ b/modules/core/04-channel/types/channel.go @@ -3,8 +3,8 @@ package types import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 3ce5ce3a2e1..00d37abb5f1 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -501,39 +501,39 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 925 bytes of a gzipped FileDescriptorProto + // 926 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0x1a, 0x47, 0x10, 0x66, 0x60, 0xf8, 0x2b, 0x16, 0x96, 0x6d, 0x67, 0xf1, 0x64, 0x62, 0x33, 0x78, 0x94, 0xc3, - 0xca, 0x91, 0xc1, 0x6b, 0x5b, 0x89, 0xe2, 0x53, 0x96, 0x1f, 0x6b, 0x47, 0xb1, 0x60, 0x35, 0xb0, + 0xca, 0x91, 0xc1, 0xeb, 0x38, 0x89, 0xe2, 0x53, 0x96, 0x1f, 0x6b, 0x47, 0xb1, 0x60, 0x35, 0xb0, 0x87, 0xf8, 0x42, 0x60, 0xa6, 0x03, 0x23, 0xc3, 0x34, 0x99, 0x69, 0x58, 0xed, 0x1b, 0x58, 0x5c, 0x92, 0x17, 0x40, 0x8a, 0x14, 0x25, 0xaf, 0x90, 0x57, 0xf0, 0xd1, 0xc7, 0x9c, 0x50, 0xb4, 0x7b, 0xc8, 0x9d, 0x17, 0x48, 0x34, 0xdd, 0x3d, 0xfc, 0xac, 0xad, 0x3d, 0x26, 0x17, 0x9f, 0xe8, 0xaa, 0xef, 0xab, 0xaa, 0x6f, 0xaa, 0x8a, 0x56, 0xc3, 0x03, 0xa7, 0x6f, 0x55, 0x2c, 0xe2, 0xe1, 0x8a, 0x35, 0xec, 0xb9, 0x2e, 0x1e, 0x55, 0x66, 0xc7, 0xe1, 0xb1, 0x3c, 0xf1, 0x08, 0x25, 0xe8, 0x8e, - 0xd3, 0xb7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9, 0x98, 0x92, 0x16, 0xdc, 0xd9, 0x66, 0x85, 0x72, 0xd8, 0x18, 0xab, - 0xc5, 0xd5, 0x52, 0x53, 0xdf, 0x4f, 0xb5, 0xd6, 0x84, 0xb6, 0xbc, 0xa1, 0x30, 0x04, 0xb2, 0xdd, + 0xc5, 0xd5, 0x52, 0x53, 0xdf, 0x4d, 0xb5, 0xd6, 0x84, 0xb6, 0xbc, 0xa1, 0x30, 0x04, 0xb2, 0xdd, 0xa3, 0x3d, 0x36, 0xee, 0x3d, 0x93, 0x9d, 0xd1, 0xf7, 0x90, 0xa3, 0xce, 0x18, 0x93, 0x29, 0xed, 0x0e, 0xb1, 0x33, 0x18, 0x52, 0x36, 0xf0, 0xcc, 0xce, 0xbe, 0xf3, 0x9b, 0x68, 0x76, 0x5c, 0x3e, 0x65, 0x8c, 0xea, 0xfd, 0x60, 0x59, 0x37, 0xed, 0xd8, 0x8d, 0xd7, 0xcd, 0xac, 0x70, 0x70, 0x36, @@ -541,25 +541,25 @@ var fileDescriptor_c3a07336710636a0 = []byte{ 0x6a, 0xa9, 0x29, 0xbb, 0x49, 0xd6, 0x14, 0xdd, 0xcc, 0x0b, 0x5f, 0x27, 0x74, 0x89, 0x0d, 0xf8, 0x5d, 0x82, 0x0c, 0xdf, 0x00, 0xf6, 0x9f, 0xfd, 0x0f, 0x56, 0x6f, 0x67, 0xd3, 0x62, 0x37, 0x36, 0x2d, 0xec, 0xaa, 0xbc, 0xe9, 0xaa, 0x10, 0xfa, 0x93, 0x04, 0x29, 0x2e, 0xd4, 0xb0, 0xff, 0x67, - 0x95, 0x42, 0x51, 0x0b, 0xf6, 0x4f, 0xac, 0xd7, 0x2e, 0xb9, 0x18, 0x61, 0x7b, 0x80, 0xc7, 0xd8, + 0x95, 0x42, 0x51, 0x0b, 0xf6, 0x4f, 0xac, 0x57, 0x2e, 0xb9, 0x18, 0x61, 0x7b, 0x80, 0xc7, 0xd8, 0xa5, 0x48, 0x81, 0x84, 0x87, 0xf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x1b, 0x00, 0x00, 0xff, 0xff, 0x47, 0xf5, 0x82, 0xa6, 0x98, 0x08, 0x00, 0x00, + 0xfa, 0xd6, 0xa3, 0x01, 0xa9, 0xcc, 0xbe, 0xa8, 0x8c, 0x89, 0x3d, 0x1d, 0x61, 0x9f, 0x3f, 0x13, + 0x1e, 0x3f, 0x7d, 0x14, 0xbe, 0x3b, 0xe8, 0xe5, 0x04, 0xfb, 0xfd, 0x04, 0x7b, 0x27, 0x7c, 0xfe, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xca, 0xc5, 0xda, 0x98, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/04-channel/types/channel_test.go b/modules/core/04-channel/types/channel_test.go index c6cc9a03a9c..8bf27306e86 100644 --- a/modules/core/04-channel/types/channel_test.go +++ b/modules/core/04-channel/types/channel_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) func TestChannelValidateBasic(t *testing.T) { diff --git a/modules/core/04-channel/types/codec.go b/modules/core/04-channel/types/codec.go index 8981417130b..28b87bef117 100644 --- a/modules/core/04-channel/types/codec.go +++ b/modules/core/04-channel/types/codec.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces register the ibc channel submodule interfaces to protobuf diff --git a/modules/core/04-channel/types/errors.go b/modules/core/04-channel/types/errors.go index 8c31cfbae18..efe90f165c0 100644 --- a/modules/core/04-channel/types/errors.go +++ b/modules/core/04-channel/types/errors.go @@ -38,4 +38,5 @@ var ( ErrNoOpMsg = sdkerrors.Register(SubModuleName, 23, "message is redundant, no-op will be performed") ErrInvalidChannelVersion = sdkerrors.Register(SubModuleName, 24, "invalid channel version") + ErrPacketNotSent = sdkerrors.Register(SubModuleName, 25, "packet has not been sent") ) diff --git a/modules/core/04-channel/types/events.go b/modules/core/04-channel/types/events.go index e9f909a695d..0d6fc843e27 100644 --- a/modules/core/04-channel/types/events.go +++ b/modules/core/04-channel/types/events.go @@ -3,7 +3,7 @@ package types import ( "fmt" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // IBC channel events @@ -22,9 +22,9 @@ const ( EventTypeTimeoutPacket = "timeout_packet" EventTypeTimeoutPacketOnClose = "timeout_on_close_packet" - // NOTE: DEPRECATED in favor of AttributeKeyDataHex + // Deprecated: in favor of AttributeKeyDataHex AttributeKeyData = "packet_data" - // NOTE: DEPRECATED in favor of AttributeKeyAckHex + // Deprecated: in favor of AttributeKeyAckHex AttributeKeyAck = "packet_ack" AttributeKeyDataHex = "packet_data_hex" @@ -48,6 +48,7 @@ var ( EventTypeChannelOpenConfirm = "channel_open_confirm" EventTypeChannelCloseInit = "channel_close_init" EventTypeChannelCloseConfirm = "channel_close_confirm" + EventTypeChannelClosed = "channel_close" AttributeValueCategory = fmt.Sprintf("%s_%s", host.ModuleName, SubModuleName) ) diff --git a/modules/core/04-channel/types/expected_keepers.go b/modules/core/04-channel/types/expected_keepers.go index 317cefd16c1..56031bdf528 100644 --- a/modules/core/04-channel/types/expected_keepers.go +++ b/modules/core/04-channel/types/expected_keepers.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ClientKeeper expected account IBC client keeper diff --git a/modules/core/04-channel/types/genesis.go b/modules/core/04-channel/types/genesis.go index 5f6b9370942..a83a95cc30a 100644 --- a/modules/core/04-channel/types/genesis.go +++ b/modules/core/04-channel/types/genesis.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // NewPacketState creates a new PacketState instance. @@ -76,7 +76,7 @@ func DefaultGenesisState() GenesisState { func (gs GenesisState) Validate() error { // keep track of the max sequence to ensure it is less than // the next sequence used in creating connection identifers. - var maxSequence uint64 = 0 + var maxSequence uint64 for i, channel := range gs.Channels { sequence, err := ParseChannelSequence(channel.ChannelId) diff --git a/modules/core/04-channel/types/genesis.pb.go b/modules/core/04-channel/types/genesis.pb.go index fa474dbb006..427149a4743 100644 --- a/modules/core/04-channel/types/genesis.pb.go +++ b/modules/core/04-channel/types/genesis.pb.go @@ -195,39 +195,39 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/genesis.proto", fileDescriptor_cb06ec201f452595) } var fileDescriptor_cb06ec201f452595 = []byte{ - // 506 bytes of a gzipped FileDescriptorProto + // 507 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd3, 0x40, 0x10, 0x87, 0xe3, 0x36, 0x4d, 0xd3, 0x6d, 0x13, 0xd1, 0x6d, 0x23, 0x99, 0xa8, 0xd8, 0xc6, 0x48, - 0x28, 0x12, 0xaa, 0x4d, 0x69, 0x2f, 0x70, 0x34, 0x07, 0xc8, 0x0d, 0x6d, 0x39, 0x21, 0xa1, 0xc8, - 0x5e, 0x4f, 0xdd, 0x55, 0x62, 0x6f, 0xf0, 0x6e, 0x02, 0x7d, 0x0a, 0x78, 0xac, 0x1e, 0x7b, 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00, 0xff, 0xff, 0x9e, 0x9e, 0x83, 0xae, 0x46, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/04-channel/types/genesis_test.go b/modules/core/04-channel/types/genesis_test.go index 856c0833c88..d02bd534246 100644 --- a/modules/core/04-channel/types/genesis_test.go +++ b/modules/core/04-channel/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) const ( diff --git a/modules/core/04-channel/types/keys.go b/modules/core/04-channel/types/keys.go index 8b81da4cfbb..18b7389b173 100644 --- a/modules/core/04-channel/types/keys.go +++ b/modules/core/04-channel/types/keys.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( diff --git a/modules/core/04-channel/types/keys_test.go b/modules/core/04-channel/types/keys_test.go index f5bef1eaf2d..ecc7adef30c 100644 --- a/modules/core/04-channel/types/keys_test.go +++ b/modules/core/04-channel/types/keys_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // tests ParseChannelSequence and IsValidChannelID diff --git a/modules/core/04-channel/types/msgs.go b/modules/core/04-channel/types/msgs.go index ea94f4b18b4..f9f33556867 100644 --- a/modules/core/04-channel/types/msgs.go +++ b/modules/core/04-channel/types/msgs.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) var _ sdk.Msg = &MsgChannelOpenInit{} @@ -66,7 +66,7 @@ var _ sdk.Msg = &MsgChannelOpenTry{} // It is left as an argument for go API backwards compatibility. // nolint:interfacer func NewMsgChannelOpenTry( - portID, previousChannelID, version string, channelOrder Order, connectionHops []string, + portID, version string, channelOrder Order, connectionHops []string, counterpartyPortID, counterpartyChannelID, counterpartyVersion string, proofInit []byte, proofHeight clienttypes.Height, signer string, ) *MsgChannelOpenTry { @@ -74,7 +74,6 @@ func NewMsgChannelOpenTry( channel := NewChannel(TRYOPEN, channelOrder, counterparty, connectionHops, version) return &MsgChannelOpenTry{ PortId: portID, - PreviousChannelId: previousChannelID, Channel: channel, CounterpartyVersion: counterpartyVersion, ProofInit: proofInit, @@ -89,9 +88,7 @@ func (msg MsgChannelOpenTry) ValidateBasic() error { return sdkerrors.Wrap(err, "invalid port ID") } if msg.PreviousChannelId != "" { - if !IsValidChannelID(msg.PreviousChannelId) { - return sdkerrors.Wrap(ErrInvalidChannelIdentifier, "invalid previous channel ID") - } + return sdkerrors.Wrap(ErrInvalidChannelIdentifier, "previous channel identifier must be empty, this field has been deprecated as crossing hellos are no longer supported") } if len(msg.ProofInit) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof init") diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 623ed992d22..f600453744f 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -10,13 +10,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" + log "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - "github.com/cosmos/ibc-go/v3/testing/simapp" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) const ( @@ -77,7 +78,8 @@ type TypesTestSuite struct { func (suite *TypesTestSuite) SetupTest() { app := simapp.Setup(false) db := dbm.NewMemDB() - store := rootmulti.NewStore(db) + dblog := log.TestingLogger() + store := rootmulti.NewStore(db, dblog) storeKey := storetypes.NewKVStoreKey("iavlStoreKey") store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil) @@ -151,25 +153,23 @@ func (suite *TypesTestSuite) TestMsgChannelOpenTryValidateBasic() { msg *types.MsgChannelOpenTry expPass bool }{ - {"", types.NewMsgChannelOpenTry(portid, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), true}, - {"too short port id", types.NewMsgChannelOpenTry(invalidShortPort, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"too long port id", types.NewMsgChannelOpenTry(invalidLongPort, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"port id contains non-alpha", types.NewMsgChannelOpenTry(invalidPort, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"too short channel id", types.NewMsgChannelOpenTry(portid, invalidShortChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"too long channel id", types.NewMsgChannelOpenTry(portid, invalidLongChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"channel id contains non-alpha", types.NewMsgChannelOpenTry(portid, invalidChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"", types.NewMsgChannelOpenTry(portid, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, "", suite.proof, height, addr), true}, - {"proof height is zero", types.NewMsgChannelOpenTry(portid, chanid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, clienttypes.ZeroHeight(), addr), false}, - {"invalid channel order", types.NewMsgChannelOpenTry(portid, chanid, version, types.Order(4), connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"connection hops more than 1 ", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, invalidConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"too short connection id", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, invalidShortConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"too long connection id", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, invalidLongConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"connection id contains non-alpha", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, []string{invalidConnection}, cpportid, cpchanid, version, suite.proof, height, addr), false}, - {"", types.NewMsgChannelOpenTry(portid, chanid, "", types.UNORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), true}, - {"invalid counterparty port id", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, connHops, invalidPort, cpchanid, version, suite.proof, height, addr), false}, - {"invalid counterparty channel id", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, connHops, cpportid, invalidChannel, version, suite.proof, height, addr), false}, - {"empty proof", types.NewMsgChannelOpenTry(portid, chanid, version, types.UNORDERED, connHops, cpportid, cpchanid, version, emptyProof, height, addr), false}, - {"channel not in TRYOPEN state", &types.MsgChannelOpenTry{portid, chanid, initChannel, version, suite.proof, height, addr}, false}, + {"", types.NewMsgChannelOpenTry(portid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), true}, + {"too short port id", types.NewMsgChannelOpenTry(invalidShortPort, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"too long port id", types.NewMsgChannelOpenTry(invalidLongPort, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"port id contains non-alpha", types.NewMsgChannelOpenTry(invalidPort, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"", types.NewMsgChannelOpenTry(portid, version, types.ORDERED, connHops, cpportid, cpchanid, "", suite.proof, height, addr), true}, + {"proof height is zero", types.NewMsgChannelOpenTry(portid, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, clienttypes.ZeroHeight(), addr), false}, + {"invalid channel order", types.NewMsgChannelOpenTry(portid, version, types.Order(4), connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"connection hops more than 1 ", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, invalidConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"too short connection id", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, invalidShortConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"too long connection id", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, invalidLongConnHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"connection id contains non-alpha", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, []string{invalidConnection}, cpportid, cpchanid, version, suite.proof, height, addr), false}, + {"", types.NewMsgChannelOpenTry(portid, "", types.UNORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), true}, + {"invalid counterparty port id", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, connHops, invalidPort, cpchanid, version, suite.proof, height, addr), false}, + {"invalid counterparty channel id", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, connHops, cpportid, invalidChannel, version, suite.proof, height, addr), false}, + {"empty proof", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, connHops, cpportid, cpchanid, version, emptyProof, height, addr), false}, + {"channel not in TRYOPEN state", &types.MsgChannelOpenTry{portid, "", initChannel, version, suite.proof, height, addr}, false}, + {"previous channel id is not empty", &types.MsgChannelOpenTry{portid, chanid, initChannel, version, suite.proof, height, addr}, false}, } for _, tc := range testCases { diff --git a/modules/core/04-channel/types/packet.go b/modules/core/04-channel/types/packet.go index dd59c8bfde9..8ce0475c4f8 100644 --- a/modules/core/04-channel/types/packet.go +++ b/modules/core/04-channel/types/packet.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // CommitPacket returns the packet commitment bytes. The commitment consists of: @@ -129,7 +129,7 @@ func (p PacketId) Validate() error { return nil } -// NewPacketId returns a new instance of PacketId -func NewPacketId(portId, channelId string, seq uint64) PacketId { - return PacketId{PortId: portId, ChannelId: channelId, Sequence: seq} +// NewPacketID returns a new instance of PacketId +func NewPacketID(portID, channelID string, seq uint64) PacketId { + return PacketId{PortId: portID, ChannelId: channelID, Sequence: seq} } diff --git a/modules/core/04-channel/types/packet_test.go b/modules/core/04-channel/types/packet_test.go index 1020e763e50..cb1644f1dcc 100644 --- a/modules/core/04-channel/types/packet_test.go +++ b/modules/core/04-channel/types/packet_test.go @@ -7,8 +7,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) func TestCommitPacket(t *testing.T) { diff --git a/modules/core/04-channel/types/query.go b/modules/core/04-channel/types/query.go index 31d58e50632..b43718a0bcd 100644 --- a/modules/core/04-channel/types/query.go +++ b/modules/core/04-channel/types/query.go @@ -3,8 +3,8 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var ( diff --git a/modules/core/04-channel/types/query.pb.go b/modules/core/04-channel/types/query.pb.go index 1345b0bcdea..18bc4e95276 100644 --- a/modules/core/04-channel/types/query.pb.go +++ b/modules/core/04-channel/types/query.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" types1 "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -1708,101 +1708,101 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1490 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0xd4, 0xc6, - 0x17, 0xcf, 0x6c, 0x16, 0x48, 0x1e, 0x7c, 0xf9, 0x31, 0x49, 0x20, 0x98, 0xb0, 0x09, 0xfb, 0x55, - 0x4b, 0x40, 0xc2, 0x43, 0x12, 0x4a, 0x69, 0xd5, 0x22, 0x91, 0x48, 0x85, 0x54, 0xe5, 0x97, 0x53, - 0x54, 0x40, 0x6a, 0xb7, 0x5e, 0xef, 0xb0, 0xb1, 0x92, 0xb5, 0xcd, 0xda, 0xbb, 0x80, 0xd2, 0xad, - 0xaa, 0x1e, 0x28, 0x52, 0x2f, 0x55, 0x39, 0x54, 0xea, 0xa5, 0x52, 0x6f, 0x1c, 0x7a, 0xe8, 0x5f, - 0xd0, 0x2b, 0xb7, 0x22, 0xd1, 0x43, 0x25, 0x24, 0x5a, 0x11, 0x24, 0x7a, 0xed, 0xa5, 0xe7, 0xca, - 0xf3, 0xc3, 0x6b, 0xef, 0xda, 0x4e, 0x36, 0x9b, 0x95, 0xa2, 0xde, 0xec, 0xf1, 0xbc, 0x37, 0x9f, - 0xcf, 0xe7, 0xcd, 0x7b, 0x79, 0x6f, 0x03, 0xe3, 0x66, 0xd1, 0x20, 0x86, 0x5d, 0xa5, 0xc4, 0x58, - 0xd4, 0x2d, 0x8b, 0x2e, 0x93, 0xfa, 0x14, 0xb9, 0x5d, 0xa3, 0xd5, 0x7b, 0xaa, 0x53, 0xb5, 0x3d, - 0x1b, 0x0f, 0x99, 0x45, 0x43, 0xf5, 0x37, 0xa8, 0x62, 0x83, 0x5a, 0x9f, 0x52, 0x42, 0x56, 0xcb, - 0x26, 0xb5, 0x3c, 0xdf, 0x88, 0x3f, 0x71, 0x2b, 0xe5, 0xb8, 0x61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0xc6, 0x2d, 0xf7, 0x32, 0xe5, 0x7f, 0x42, 0x70, 0x24, 0xc2, - 0xd0, 0xe7, 0x64, 0xb9, 0x35, 0x77, 0x33, 0xf4, 0xc3, 0x47, 0x61, 0x4f, 0x95, 0xd6, 0x4d, 0xd7, - 0xb4, 0xad, 0x82, 0x55, 0xab, 0x14, 0x69, 0x95, 0xa1, 0xcc, 0x6a, 0xbb, 0xe5, 0xf2, 0x25, 0xb6, - 0x1a, 0xd9, 0x28, 0xe8, 0x64, 0xa3, 0x1b, 0x05, 0xde, 0x67, 0x08, 0xf2, 0x69, 0x78, 0x45, 0x50, - 0xde, 0x85, 0x3d, 0x86, 0xfc, 0x12, 0x09, 0xc6, 0xb0, 0xca, 0xff, 0x1e, 0xa8, 0xf2, 0xef, 0x81, - 0x7a, 0xce, 0xba, 0xa7, 0xed, 0x36, 0x22, 0x6e, 0xf0, 0x21, 0x18, 0x14, 0x81, 0x0c, 0x58, 0x0d, - 0xf0, 0x85, 0xf9, 0x52, 0x33, 0x1a, 0xfd, 0x69, 0xd1, 0xc8, 0x6e, 0x24, 0x1a, 0x55, 0x18, 0x63, - 0xe4, 0xae, 0xe8, 0xc6, 0x12, 0xf5, 0xe6, 0xec, 0x4a, 0xc5, 0xf4, 0x2a, 0xd4, 0xf2, 0xba, 0x8d, - 0x83, 0x02, 0x03, 0xae, 0xef, 0xc2, 0x32, 0xa8, 0x08, 0x40, 0xf0, 0x9e, 0xff, 0x1e, 0xc1, 0xe1, - 0x84, 0x43, 0x85, 0x98, 0xac, 0x64, 0xc9, 0x55, 0x76, 0xf0, 0x2e, 0x2d, 0xb4, 0xd2, 0xcb, 0xeb, - 0xf9, 0x43, 0x12, 0x38, 0xb7, 0x5b, 0x49, 0xa2, 0x75, 0xb6, 0x7f, 0xc3, 0x75, 0xf6, 0x95, 0x2c, - 0xf9, 0x31, 0x08, 0x83, 0x32, 0xbb, 0xb3, 0xa9, 0x96, 0xac, 0xb4, 0x13, 0xb1, 0x95, 0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8d, 0x13, 0x65, 0x9b, 0xd4, 0x67, 0x48, 0xc5, 0x2e, - 0xd5, 0x96, 0xa9, 0xcb, 0x21, 0x9c, 0x3c, 0x75, 0x42, 0xa2, 0xf0, 0xee, 0x39, 0xd4, 0x2d, 0x6e, - 0x67, 0x3f, 0xe2, 0xce, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x82, 0x70, 0x0e, 0x40, 0xa8, 0x1c, - 0x00, 0x00, + // 1489 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcd, 0x6f, 0xd4, 0x46, + 0x14, 0xcf, 0x6c, 0x16, 0x48, 0x1e, 0x94, 0x8f, 0x49, 0x02, 0xc1, 0x84, 0x4d, 0xd8, 0xaa, 0x25, + 0x20, 0xe1, 0x21, 0xe1, 0xa3, 0xb4, 0x6a, 0x91, 0x48, 0xa4, 0x42, 0xaa, 0xf2, 0xe5, 0x14, 0x15, + 0x90, 0xda, 0xad, 0xd7, 0x3b, 0x6c, 0xac, 0x64, 0x6d, 0xb3, 0xf6, 0x2e, 0xa0, 0x74, 0xab, 0xaa, + 0x07, 0x8a, 0xd4, 0x4b, 0x55, 0x0e, 0x95, 0x7a, 0xa9, 0xd4, 0x1b, 0x87, 0x1e, 0xfa, 0x17, 0xf4, + 0xca, 0xad, 0x48, 0xf4, 0x50, 0x09, 0x89, 0x56, 0x04, 0x89, 0x5e, 0x7b, 0xe9, 0xb9, 0xf2, 0x7c, + 0x78, 0xed, 0x5d, 0xdb, 0xc9, 0x66, 0xb3, 0x52, 0xd4, 0x9b, 0x3d, 0x9e, 0xf7, 0xe6, 0xf7, 0xfb, + 0xbd, 0x79, 0x2f, 0xef, 0x6d, 0x60, 0xdc, 0x2c, 0x1a, 0xc4, 0xb0, 0xab, 0x94, 0x18, 0x0b, 0xba, + 0x65, 0xd1, 0x25, 0x52, 0x9f, 0x22, 0xb7, 0x6b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, 0x17, 0x39, 0xf4, 0xed, 0x4a, 0xae, 0xef, 0xc9, 0x4a, + 0xae, 0xef, 0x8f, 0x95, 0x5c, 0xdf, 0xcd, 0xb7, 0xcb, 0xa6, 0xb7, 0x50, 0x2b, 0xaa, 0x86, 0x5d, + 0x21, 0xe2, 0x1f, 0x83, 0x66, 0xd1, 0x38, 0x56, 0xb6, 0x49, 0xfd, 0x14, 0xa9, 0xd8, 0xa5, 0xda, + 0x12, 0x75, 0x39, 0x84, 0xe3, 0x27, 0x8f, 0x49, 0x14, 0xde, 0x3d, 0x87, 0xba, 0xc5, 0xad, 0xec, + 0x47, 0xdc, 0x13, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x35, 0x4f, 0x49, 0x3c, 0xa8, 0x1c, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index fe6f344384d..530656af689 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" @@ -160,9 +160,8 @@ func (m *MsgChannelOpenInitResponse) GetVersion() string { // value will be ignored by core IBC. type MsgChannelOpenTry struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"` - // in the case of crossing hello's, when both chains call OpenInit, we need - // the channel identifier of the previous channel in state INIT - PreviousChannelId string `protobuf:"bytes,2,opt,name=previous_channel_id,json=previousChannelId,proto3" json:"previous_channel_id,omitempty" yaml:"previous_channel_id"` + // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + PreviousChannelId string `protobuf:"bytes,2,opt,name=previous_channel_id,json=previousChannelId,proto3" json:"previous_channel_id,omitempty" yaml:"previous_channel_id"` // Deprecated: Do not use. // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. Channel Channel `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"` CounterpartyVersion string `protobuf:"bytes,4,opt,name=counterparty_version,json=counterpartyVersion,proto3" json:"counterparty_version,omitempty" yaml:"counterparty_version"` @@ -918,88 +917,88 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0xe2, 0x56, - 0x17, 0xc6, 0x40, 0x20, 0x39, 0xe4, 0x4d, 0x88, 0x49, 0x32, 0xc4, 0x24, 0x98, 0xd7, 0x8b, 0x49, - 0x94, 0x2a, 0x30, 0x49, 0x66, 0x54, 0x4d, 0x54, 0xa9, 0x0a, 0x94, 0x51, 0xa3, 0x36, 0x1f, 0x32, - 0xa4, 0x52, 0xd3, 0xaa, 0x08, 0xcc, 0x1d, 0x62, 0x01, 0x36, 0xb5, 0x0d, 0x33, 0xfc, 0x83, 0x51, - 0x56, 0xb3, 0x1e, 0x29, 0xd2, 0x54, 0x5d, 0x55, 0x5d, 0x4c, 0x7f, 0xc6, 0x2c, 0x67, 0xd5, 0x56, - 0x5d, 0xa0, 0x2a, 0xd9, 0x74, 0xcd, 0x2f, 0xa8, 0x7c, 0x7d, 0x6d, 0x0c, 0xd8, 0x8a, 0x33, 0x93, - 0x64, 0xba, 0xf3, 0xbd, 0xe7, 0xb9, 0xe7, 0x9c, 0xfb, 0x9c, 0xe7, 0x7e, 0x19, 0x96, 0xc5, 0x8a, - 0x90, 0x11, 0x64, 0x05, 0x65, 0x84, 0xd3,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0x2e, 0x97, 0x2f, 0x14, 0xa2, 0x7e, 0x26, 0x72, 0x76, 0x9e, 0x0a, - 0x93, 0x26, 0x13, 0x7c, 0xf1, 0x73, 0xd2, 0xb7, 0xf5, 0x66, 0x12, 0x02, 0xfb, 0x6a, 0x8d, 0xae, - 0xc3, 0xec, 0xe8, 0x6b, 0xdf, 0x79, 0xf6, 0xe3, 0x6f, 0x6e, 0x26, 0xe3, 0x11, 0x68, 0xf1, 0x7c, - 0x0a, 0x33, 0x23, 0x0f, 0xe9, 0xfb, 0x1e, 0x5c, 0x14, 0x95, 0x2e, 0x93, 0xf6, 0x86, 0x73, 0x89, - 0xa4, 0xdf, 0x88, 0xbd, 0x44, 0xda, 0x15, 0xea, 0x9e, 0x22, 0xd9, 0x5e, 0x06, 0xb4, 0x06, 0xb4, - 0xc3, 0xab, 0x60, 0xdd, 0x83, 0x17, 0x82, 0x65, 0xb6, 0xbc, 0x63, 0xad, 0xa8, 0x12, 0x44, 0xc7, - 0x2e, 0xcf, 0x6b, 0x57, 0xf8, 0xb1, 0x90, 0xcc, 0x03, 0xaf, 0x48, 0x2b, 0xde, 0x33, 0x88, 0x39, - 0x5e, 0x78, 0xbd, 0x38, 0x32, 0xe7, 0xb9, 0x7d, 0x0d, 0xb0, 0x15, 0xf8, 0x7b, 0x00, 0xdb, 0xad, - 0x90, 0x73, 0x73, 0x31, 0xc0, 0x30, 0xeb, 0x57, 0x63, 0x2c, 0xef, 0x05, 0x08, 0x9b, 0x17, 0x20, - 0xd6, 0x6d, 0x18, 0x01, 0x30, 0xab, 0x57, 0x00, 0xec, 0xda, 0x1b, 0x39, 0x9b, 0xef, 0x5f, 0x31, - 0x94, 0xe0, 0xdc, 0xb5, 0xe7, 0x72, 0x9e, 0xd4, 0x61, 0x76, 0xf4, 0x10, 0x70, 0xcd, 0x72, 0x04, - 0xe8, 0xbe, 0x78, 0x5d, 0x36, 0xc9, 0x6c, 0xe1, 0xed, 0x45, 0x92, 0x7a, 0x77, 0x91, 0xa4, 0xfe, - 0xbe, 0x48, 0x52, 0x2f, 0x2f, 0x93, 0xbe, 0x77, 0x97, 0x49, 0xdf, 0x9f, 0x97, 0x49, 0xdf, 0xc9, - 0xe3, 0x9a, 0xa8, 0x9d, 0xb6, 0x2b, 0x69, 0x41, 0x6e, 0x66, 0x04, 0x59, 0x6d, 0xca, 0x6a, 0x46, - 0xac, 0x08, 0x1b, 0x35, 0x39, 0xd3, 0xd9, 0xce, 0x34, 0xe5, 0x6a, 0xbb, 0x81, 0x54, 0xe3, 0xc7, - 0xe3, 0x83, 0x87, 0x1b, 0xe6, 0xbf, 0x47, 0xad, 0xdb, 0x42, 0x6a, 0x25, 0x84, 0xff, 0x3b, 0x6e, - 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x51, 0x2e, 0xf7, 0xe5, 0x06, 0x15, 0x00, 0x00, + // 1295 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdf, 0x6f, 0xda, 0xd6, + 0x17, 0xc7, 0x40, 0x21, 0x39, 0xf4, 0x9b, 0x10, 0x93, 0xa4, 0xc4, 0x24, 0x98, 0xaf, 0x1f, 0x9a, + 0x28, 0x53, 0xa0, 0x49, 0x1b, 0x4d, 0x8d, 0x26, 0x4d, 0x81, 0x51, 0x2d, 0xda, 0x92, 0x20, 0x43, + 0x26, 0x2d, 0x9b, 0x86, 0xc0, 0xdc, 0x12, 0x0b, 0xb0, 0x99, 0x6d, 0x68, 0xf9, 0x0f, 0xaa, 0x3c, + 0xf5, 0xb9, 0x52, 0xa4, 0x4e, 0x7b, 0x9a, 0xf6, 0xd0, 0xfd, 0x19, 0x7d, 0xec, 0xdb, 0xaa, 0x3d, + 0xa0, 0x29, 0x79, 0xd9, 0x33, 0x7f, 0xc1, 0xe4, 0xeb, 0x6b, 0x63, 0xc0, 0x56, 0x9c, 0x36, 0x49, + 0xf7, 0xe6, 0x7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x52, 0x11, 0xfd, 0x08, 0x80, 0xb8, 0x1a, + 0x66, 0xbb, 0x30, 0xe8, 0xb3, 0x73, 0x46, 0xb6, 0x43, 0x1b, 0xc7, 0x4f, 0x93, 0xc6, 0x5e, 0x8d, + 0x8e, 0x43, 0xb8, 0x8b, 0x14, 0x55, 0x94, 0x25, 0x9c, 0xf3, 0x34, 0x6f, 0x36, 0xb9, 0xf7, 0x01, + 0x98, 0x1b, 0x0d, 0x57, 0x52, 0x7a, 0x57, 0x23, 0xa4, 0x00, 0xb1, 0xb6, 0x82, 0xba, 0xa2, 0xdc, + 0x51, 0xcb, 0xb6, 0xdc, 0x70, 0xa0, 0x6c, 0x6a, 0xd0, 0x67, 0x19, 0x32, 0x70, 0x12, 0xc4, 0xc5, + 0x29, 0x7e, 0xce, 0xec, 0xcf, 0x59, 0xe9, 0xda, 0x28, 0x0e, 0x5c, 0x9d, 0x62, 0x1e, 0xe6, 0x05, + 0xb9, 0x23, 0x69, 0x48, 0x69, 0x57, 0x14, 0xad, 0x57, 0x36, 0x67, 0x1e, 0xc4, 0x09, 0xb1, 0x83, + 0x3e, 0x9b, 0x20, 0x64, 0x39, 0xa0, 0x38, 0x3e, 0x66, 0xef, 0xfe, 0xce, 0xe8, 0xd5, 0x69, 0x6f, + 0x2b, 0xb2, 0xfc, 0xb4, 0x2c, 0x4a, 0xa2, 0x16, 0xbf, 0x93, 0xa2, 0xd6, 0xee, 0xda, 0x69, 0x1f, + 0xda, 0x38, 0x7e, 0x1a, 0x37, 0xb0, 0xae, 0x8e, 0xe1, 0xae, 0x61, 0x39, 0x41, 0x62, 0xfd, 0x44, + 0x8b, 0x87, 0xf0, 0x64, 0x18, 0xdb, 0x64, 0x0c, 0xfd, 0x76, 0x37, 0xd3, 0x5f, 0x63, 0x44, 0x36, + 0xa1, 0x4f, 0x65, 0xd0, 0x67, 0x63, 0x76, 0xbf, 0xc6, 0x68, 0x8e, 0x8f, 0xe0, 0xa6, 0x81, 0xb4, + 0x09, 0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c3, 0xc3, 0x42, 0x94, 0x62, 0xa6, 0x4e, 0xcf, 0x52, 0x41, 0xfd, 0x9b, 0xde, + 0x80, 0x65, 0x47, 0x60, 0xf1, 0x28, 0x97, 0xcb, 0x17, 0x8b, 0x51, 0x3f, 0x13, 0x39, 0x3d, 0x4b, + 0x85, 0x49, 0x93, 0x09, 0xbe, 0xf8, 0x35, 0xe9, 0xdb, 0x7a, 0x33, 0x05, 0x81, 0x7d, 0xb5, 0x4e, + 0x37, 0x60, 0x76, 0xfc, 0xbd, 0xef, 0x3c, 0xfb, 0xc9, 0x57, 0x37, 0x93, 0xf1, 0x08, 0xb4, 0x78, + 0x3e, 0x81, 0x99, 0xb1, 0xa7, 0xf4, 0x7d, 0x0f, 0x2e, 0x4a, 0x4a, 0x8f, 0x49, 0x7b, 0xc3, 0xb9, + 0x44, 0xd2, 0x6f, 0xc4, 0x5e, 0x22, 0xed, 0x0a, 0x0d, 0x4f, 0x91, 0x6c, 0x2f, 0x03, 0x5a, 0x03, + 0xda, 0xe1, 0x55, 0xb0, 0xee, 0xc1, 0x0b, 0xc1, 0x32, 0x5b, 0xde, 0xb1, 0x56, 0x54, 0x09, 0xa2, + 0x13, 0x97, 0xe7, 0xb5, 0x4b, 0xfc, 0x58, 0x48, 0xe6, 0x81, 0x57, 0xa4, 0x15, 0xef, 0x19, 0xc4, + 0x1c, 0x2f, 0xbc, 0x5e, 0x1c, 0x99, 0xf3, 0x7c, 0x78, 0x05, 0xb0, 0x15, 0xf8, 0x47, 0x00, 0xdb, + 0xad, 0x90, 0x73, 0x73, 0x31, 0xc4, 0x30, 0xeb, 0x97, 0x63, 0x2c, 0xef, 0x45, 0x08, 0x9b, 0x17, + 0x20, 0xd6, 0x6d, 0x18, 0x01, 0x30, 0xab, 0x97, 0x00, 0xec, 0xda, 0x1b, 0x3b, 0x9b, 0xef, 0x5f, + 0x32, 0x94, 0xe0, 0xdc, 0xb5, 0xe7, 0x72, 0x9e, 0x34, 0x60, 0x76, 0xfc, 0x10, 0x70, 0xcd, 0x72, + 0x0c, 0xe8, 0xbe, 0x78, 0x5d, 0x36, 0xc9, 0x6c, 0xf1, 0xed, 0x79, 0x92, 0x7a, 0x77, 0x9e, 0xa4, + 0xfe, 0x3e, 0x4f, 0x52, 0x2f, 0x2f, 0x92, 0xbe, 0x77, 0x17, 0x49, 0xdf, 0xfb, 0x8b, 0xa4, 0xef, + 0xf8, 0x71, 0x5d, 0xd4, 0x4e, 0x3a, 0xd5, 0xb4, 0x20, 0xb7, 0x32, 0x82, 0xac, 0xb6, 0x64, 0x35, + 0x23, 0x56, 0x85, 0x8d, 0xba, 0x9c, 0xe9, 0x6e, 0x67, 0x5a, 0x72, 0xad, 0xd3, 0x44, 0xaa, 0xf1, + 0xeb, 0xf1, 0xc1, 0xa3, 0x0d, 0xf3, 0xef, 0xa3, 0xd6, 0x6b, 0x23, 0xb5, 0x1a, 0xc2, 0x7f, 0x1e, + 0x1f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xd8, 0x03, 0x69, 0x08, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/version.go b/modules/core/04-channel/types/version.go deleted file mode 100644 index a2696d291ed..00000000000 --- a/modules/core/04-channel/types/version.go +++ /dev/null @@ -1,27 +0,0 @@ -package types - -import "strings" - -const ChannelVersionDelimiter = ":" - -// SplitChannelVersion middleware version will split the channel version string -// into the outermost middleware version and the underlying app version. -// It will use the default delimiter `:` for middleware versions. -// In case there's no delimeter, this function returns an empty string for the middleware version (first return argument), -// and the full input as the second underlying app version. -func SplitChannelVersion(version string) (middlewareVersion, appVersion string) { - // only split out the first middleware version - splitVersions := strings.Split(version, ChannelVersionDelimiter) - if len(splitVersions) == 1 { - return "", version - } - middlewareVersion = splitVersions[0] - appVersion = strings.Join(splitVersions[1:], ChannelVersionDelimiter) - return -} - -// MergeChannelVersions merges the provided versions together with the channel version delimiter -// the versions should be passed in from the highest-level middleware to the base application -func MergeChannelVersions(versions ...string) string { - return strings.Join(versions, ChannelVersionDelimiter) -} diff --git a/modules/core/04-channel/types/version_test.go b/modules/core/04-channel/types/version_test.go deleted file mode 100644 index 1ccacf7d9f2..00000000000 --- a/modules/core/04-channel/types/version_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package types_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" -) - -func TestSplitVersions(t *testing.T) { - testCases := []struct { - name string - version string - mwVersion string - appVersion string - }{ - { - "single wrapped middleware", - "fee29-1:ics20-1", - "fee29-1", - "ics20-1", - }, - { - "multiple wrapped middleware", - "fee29-1:whitelist:ics20-1", - "fee29-1", - "whitelist:ics20-1", - }, - { - "no middleware", - "ics20-1", - "", - "ics20-1", - }, - } - - for _, tc := range testCases { - mwVersion, appVersion := types.SplitChannelVersion(tc.version) - require.Equal(t, tc.mwVersion, mwVersion, "middleware version is unexpected for case: %s", tc.name) - require.Equal(t, tc.appVersion, appVersion, "app version is unexpected for case: %s", tc.name) - } -} - -func TestMergeVersions(t *testing.T) { - testCases := []struct { - name string - versions []string - merged string - }{ - { - "single version", - []string{"ics20-1"}, - "ics20-1", - }, - { - "empty version", - []string{}, - "", - }, - { - "two versions", - []string{"fee29-1", "ics20-1"}, - "fee29-1:ics20-1", - }, - { - "multiple versions", - []string{"fee29-1", "whitelist", "ics20-1"}, - "fee29-1:whitelist:ics20-1", - }, - } - - for _, tc := range testCases { - actual := types.MergeChannelVersions(tc.versions...) - require.Equal(t, tc.merged, actual, "merged versions string does not equal expected value") - } -} diff --git a/modules/core/05-port/keeper/keeper.go b/modules/core/05-port/keeper/keeper.go index ef898664337..588c6311a92 100644 --- a/modules/core/05-port/keeper/keeper.go +++ b/modules/core/05-port/keeper/keeper.go @@ -8,8 +8,8 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // Keeper defines the IBC connection keeper diff --git a/modules/core/05-port/keeper/keeper_test.go b/modules/core/05-port/keeper/keeper_test.go index 52fa4198730..71d4349edca 100644 --- a/modules/core/05-port/keeper/keeper_test.go +++ b/modules/core/05-port/keeper/keeper_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/ibc-go/v3/modules/core/05-port/keeper" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/05-port/keeper" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) var ( diff --git a/modules/core/05-port/module.go b/modules/core/05-port/module.go index 8aab55b1fb8..770aef4c1f0 100644 --- a/modules/core/05-port/module.go +++ b/modules/core/05-port/module.go @@ -4,8 +4,8 @@ import ( "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" - "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v3/modules/core/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v5/modules/core/client/cli" ) // Name returns the IBC port ICS name. diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index e6ba8f3449b..4539cf67087 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -4,17 +4,23 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // IBCModule defines an interface that implements all the callbacks // that modules must define as specified in ICS-26 type IBCModule interface { - // OnChanOpenInit will verify that the relayer-chosen parameters are - // valid and perform any custom INIT logic.It may return an error if - // the chosen parameters are invalid in which case the handshake is aborted. - // OnChanOpenInit should return an error if the provided version is invalid. + // OnChanOpenInit will verify that the relayer-chosen parameters + // are valid and perform any custom INIT logic. + // It may return an error if the chosen parameters are invalid + // in which case the handshake is aborted. + // If the provided version string is non-empty, OnChanOpenInit should return + // the version string if valid or an error if the provided version is invalid. + // If the version string is empty, OnChanOpenInit is expected to + // return a default version string representing the version(s) it supports. + // If there is no default version string for the application, + // it should return an error if provided version is empty string. OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, @@ -24,7 +30,7 @@ type IBCModule interface { channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, - ) error + ) (string, error) // OnChanOpenTry will verify the relayer-chosen parameters along with the // counterparty-chosen version string and perform custom TRY logic. @@ -99,7 +105,7 @@ type IBCModule interface { ) error } -// ICS4Wrapper implements the ICS4 interfaces that IBC applications use to send packets and acknolwedgements. +// ICS4Wrapper implements the ICS4 interfaces that IBC applications use to send packets and acknowledgements. type ICS4Wrapper interface { SendPacket( ctx sdk.Context, diff --git a/modules/core/05-port/types/query.pb.go b/modules/core/05-port/types/query.pb.go index 17a6cfc65da..68efeeb04ea 100644 --- a/modules/core/05-port/types/query.pb.go +++ b/modules/core/05-port/types/query.pb.go @@ -6,15 +6,16 @@ package types import ( context "context" fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + io "io" + math "math" + math_bits "math/bits" + + types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/23-commitment/types/codec.go b/modules/core/23-commitment/types/codec.go index 886a6c14e5b..04dac5c2dd4 100644 --- a/modules/core/23-commitment/types/codec.go +++ b/modules/core/23-commitment/types/codec.go @@ -3,7 +3,7 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces registers the commitment interfaces to protobuf Any. diff --git a/modules/core/23-commitment/types/commitment.pb.go b/modules/core/23-commitment/types/commitment.pb.go index b5c4a458535..41f2cef8906 100644 --- a/modules/core/23-commitment/types/commitment.pb.go +++ b/modules/core/23-commitment/types/commitment.pb.go @@ -217,28 +217,28 @@ func init() { } var fileDescriptor_7921d88972a41469 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xbf, 0x4e, 0xeb, 0x30, - 0x14, 0xc6, 0x13, 0xdd, 0xaa, 0x97, 0xba, 0x95, 0x10, 0x01, 0x2a, 0xd4, 0x21, 0x45, 0x19, 0xa0, - 0x4b, 0x6d, 0xb5, 0x61, 0xaa, 0x60, 0x09, 0xac, 0x48, 0x55, 0x06, 0x06, 0x16, 0x94, 0x18, 0x37, - 0xb1, 0xda, 0x70, 0xa2, 0xd8, 0xad, 0xc8, 0x1b, 0x30, 0x32, 0x32, 0xf2, 0x38, 0x8c, 0x1d, 0x99, - 0x2a, 0xd4, 0xbe, 0x41, 0x9f, 0x00, 0xd9, 0xa6, 0x90, 0xed, 0x7c, 0x3a, 0xbf, 0xf3, 0xef, 0x3b, - 0xe8, 0x9c, 0xc7, 0x94, 0x50, 0x28, 0x18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0xd7, 0x7e, 0xdd, - 0xb8, 0xd6, 0x72, 0xe3, 0x5a, 0x9f, 0x1b, 0xd7, 0xba, 0xbf, 0x4c, 0xb8, 0x4c, 0xe7, 0xb1, 0x32, - 0x91, 0x50, 0x10, 0x19, 0x08, 0xc2, 0x63, 0xda, 0x4f, 0x80, 0x2c, 0x7c, 0x92, 0xc1, 0xe3, 0x7c, - 0xc6, 0x84, 0xf9, 0xc7, 0xd0, 0xef, 0x57, 0x5e, 0x22, 0xcb, 0x9c, 0x89, 0xb8, 0xae, 0xfd, 0xf4, - 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xec, 0x9a, 0x38, 0xca, 0xb6, 0x01, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x3f, 0x4f, 0xc2, 0x40, + 0x18, 0xc6, 0xdb, 0x48, 0x50, 0x0e, 0x12, 0x63, 0x55, 0x62, 0x18, 0x8a, 0xe9, 0xa0, 0x2c, 0xdc, + 0x05, 0xd0, 0x85, 0xe8, 0x52, 0x5d, 0x4d, 0x48, 0x07, 0x07, 0x17, 0xd3, 0x9e, 0x47, 0x7b, 0x81, + 0xfa, 0x36, 0xbd, 0x83, 0xd8, 0x6f, 0xe0, 0xe8, 0xe8, 0xe8, 0xc7, 0x71, 0x64, 0x74, 0x22, 0x06, + 0xbe, 0x01, 0x9f, 0xc0, 0xdc, 0x9d, 0x68, 0xb7, 0xf7, 0xc9, 0xfb, 0x7b, 0xff, 0x3d, 0x2f, 0x3a, + 0xe7, 0x11, 0x25, 0x14, 0x72, 0x46, 0x28, 0xa4, 0x29, 0x97, 0x29, 0x7b, 0x96, 0x64, 0xde, 0x2b, + 0x29, 0x9c, 0xe5, 0x20, 0xc1, 0x69, 0xf2, 0x88, 0x62, 0x05, 0xe2, 0x52, 0x6a, 0xde, 0x6b, 0x1d, + 0xc5, 0x10, 0x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 0x31, 0x90, 0xf9, 0x25, 0x49, 0xe1, 0x69, 0x36, 0x65, + 0xc2, 0xfc, 0xa3, 0x3f, 0xe8, 0x96, 0x5e, 0x22, 0x8b, 0x8c, 0x89, 0xa8, 0xaa, 0xfd, 0x1c, 0xfc, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x8c, 0x4f, 0xba, 0xb6, 0x01, 0x00, 0x00, } func (m *MerkleRoot) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/23-commitment/types/commitment_test.go b/modules/core/23-commitment/types/commitment_test.go index d1a32b9cae8..b46553cab47 100644 --- a/modules/core/23-commitment/types/commitment_test.go +++ b/modules/core/23-commitment/types/commitment_test.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" ) @@ -20,7 +21,8 @@ type MerkleTestSuite struct { func (suite *MerkleTestSuite) SetupTest() { db := dbm.NewMemDB() - suite.store = rootmulti.NewStore(db) + dblog := log.TestingLogger() + suite.store = rootmulti.NewStore(db, dblog) suite.storeKey = storetypes.NewKVStoreKey("iavlStoreKey") diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 17f1487d982..2c1663a1971 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -10,7 +10,7 @@ import ( "github.com/gogo/protobuf/proto" tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // var representing the proofspecs for a SDK chain @@ -128,7 +128,7 @@ func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) { var _ exported.Proof = (*MerkleProof)(nil) -// VerifyMembership verifies the membership pf a merkle proof against the given root, path, and value. +// VerifyMembership verifies the membership of a merkle proof against the given root, path, and value. func (proof MerkleProof) VerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, value []byte) error { if err := proof.validateVerificationArgs(specs, root); err != nil { return err diff --git a/modules/core/23-commitment/types/merkle_test.go b/modules/core/23-commitment/types/merkle_test.go index 28b8b3cd0dd..d5a2d06803b 100644 --- a/modules/core/23-commitment/types/merkle_test.go +++ b/modules/core/23-commitment/types/merkle_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" ) func (suite *MerkleTestSuite) TestVerifyMembership() { @@ -72,7 +72,6 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { } }) } - } func (suite *MerkleTestSuite) TestVerifyNonMembership() { @@ -136,7 +135,6 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { } }) } - } func TestApplyPrefix(t *testing.T) { diff --git a/modules/core/23-commitment/types/utils_test.go b/modules/core/23-commitment/types/utils_test.go index ea2abea2026..7af4272e6dc 100644 --- a/modules/core/23-commitment/types/utils_test.go +++ b/modules/core/23-commitment/types/utils_test.go @@ -7,7 +7,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" ) func (suite *MerkleTestSuite) TestConvertProofs() { diff --git a/modules/core/24-host/keys.go b/modules/core/24-host/keys.go index c12449f182f..f67b92aba35 100644 --- a/modules/core/24-host/keys.go +++ b/modules/core/24-host/keys.go @@ -3,7 +3,7 @@ package host import ( "fmt" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) const ( diff --git a/modules/core/24-host/parse_test.go b/modules/core/24-host/parse_test.go index 60b33d8ce45..7700fafed18 100644 --- a/modules/core/24-host/parse_test.go +++ b/modules/core/24-host/parse_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) func TestParseIdentifier(t *testing.T) { diff --git a/modules/core/24-host/validate.go b/modules/core/24-host/validate.go index 7102e66b455..23341cec543 100644 --- a/modules/core/24-host/validate.go +++ b/modules/core/24-host/validate.go @@ -36,7 +36,7 @@ var IsValidID = regexp.MustCompile(`^[a-zA-Z0-9\.\_\+\-\#\[\]\<\>]+$`).MatchStri // ValidateFn function type to validate path and identifier bytestrings type ValidateFn func(string) error -func defaultIdentifierValidator(id string, min, max int) error { //nolint:unparam +func defaultIdentifierValidator(id string, min, max int) error { if strings.TrimSpace(id) == "" { return sdkerrors.Wrap(ErrInvalidID, "identifier cannot be blank") } diff --git a/modules/core/ante/ante.go b/modules/core/ante/ante.go index e9218ea4b94..48caef7bff5 100644 --- a/modules/core/ante/ante.go +++ b/modules/core/ante/ante.go @@ -3,25 +3,25 @@ package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" ) -type AnteDecorator struct { +type RedundantRelayDecorator struct { k *keeper.Keeper } -func NewAnteDecorator(k *keeper.Keeper) AnteDecorator { - return AnteDecorator{k: k} +func NewRedundantRelayDecorator(k *keeper.Keeper) RedundantRelayDecorator { + return RedundantRelayDecorator{k: k} } -// AnteDecorator returns an error if a multiMsg tx only contains packet messages (Recv, Ack, Timeout) and additional update messages +// RedundantRelayDecorator returns an error if a multiMsg tx only contains packet messages (Recv, Ack, Timeout) and additional update messages // and all packet messages are redundant. If the transaction is just a single UpdateClient message, or the multimsg transaction // contains some other message type, then the antedecorator returns no error and continues processing to ensure these transactions // are included. This will ensure that relayers do not waste fees on multiMsg transactions when another relayer has already submitted // all packets, by rejecting the tx at the mempool layer. -func (ad AnteDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (rrd RedundantRelayDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { // do not run redundancy check on DeliverTx or simulate if (ctx.IsCheckTx() || ctx.IsReCheckTx()) && !simulate { // keep track of total packet messages and number of redundancies across `RecvPacket`, `AcknowledgePacket`, and `TimeoutPacket/OnClose` @@ -30,47 +30,47 @@ func (ad AnteDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne for _, m := range tx.GetMsgs() { switch msg := m.(type) { case *channeltypes.MsgRecvPacket: - response, err := ad.k.RecvPacket(sdk.WrapSDKContext(ctx), msg) + response, err := rrd.k.RecvPacket(sdk.WrapSDKContext(ctx), msg) if err != nil { return ctx, err } if response.Result == channeltypes.NOOP { - redundancies += 1 + redundancies++ } - packetMsgs += 1 + packetMsgs++ case *channeltypes.MsgAcknowledgement: - response, err := ad.k.Acknowledgement(sdk.WrapSDKContext(ctx), msg) + response, err := rrd.k.Acknowledgement(sdk.WrapSDKContext(ctx), msg) if err != nil { return ctx, err } if response.Result == channeltypes.NOOP { - redundancies += 1 + redundancies++ } - packetMsgs += 1 + packetMsgs++ case *channeltypes.MsgTimeout: - response, err := ad.k.Timeout(sdk.WrapSDKContext(ctx), msg) + response, err := rrd.k.Timeout(sdk.WrapSDKContext(ctx), msg) if err != nil { return ctx, err } if response.Result == channeltypes.NOOP { - redundancies += 1 + redundancies++ } - packetMsgs += 1 + packetMsgs++ case *channeltypes.MsgTimeoutOnClose: - response, err := ad.k.TimeoutOnClose(sdk.WrapSDKContext(ctx), msg) + response, err := rrd.k.TimeoutOnClose(sdk.WrapSDKContext(ctx), msg) if err != nil { return ctx, err } if response.Result == channeltypes.NOOP { - redundancies += 1 + redundancies++ } - packetMsgs += 1 + packetMsgs++ case *clienttypes.MsgUpdateClient: - _, err := ad.k.UpdateClient(sdk.WrapSDKContext(ctx), msg) + _, err := rrd.k.UpdateClient(sdk.WrapSDKContext(ctx), msg) if err != nil { return ctx, err } diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index 43c17d9f382..363ea28e398 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -7,12 +7,12 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/ante" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/ante" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type AnteTestSuite struct { @@ -430,10 +430,10 @@ func (suite *AnteTestSuite) TestAnteDecorator() { msg := suite.createRecvPacketMessage(uint64(1), false) // We want to be able to run check tx with the non-redundant message without - // commiting it to a block, so that the when check tx runs with the redundant + // committing it to a block, so that the when check tx runs with the redundant // message they are both in the same block k := suite.chainB.App.GetIBCKeeper() - decorator := ante.NewAnteDecorator(k) + decorator := ante.NewRedundantRelayDecorator(k) checkCtx := suite.chainB.GetContext().WithIsCheckTx(true) next := func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { return ctx, nil } txBuilder := suite.chainB.TxConfig.NewTxBuilder() @@ -458,7 +458,7 @@ func (suite *AnteTestSuite) TestAnteDecorator() { suite.SetupTest() k := suite.chainB.App.GetIBCKeeper() - decorator := ante.NewAnteDecorator(k) + decorator := ante.NewRedundantRelayDecorator(k) msgs := tc.malleate(suite) diff --git a/modules/core/client/cli/cli.go b/modules/core/client/cli/cli.go index 92a3756cdb5..0aeeec7a1a0 100644 --- a/modules/core/client/cli/cli.go +++ b/modules/core/client/cli/cli.go @@ -1,14 +1,13 @@ package cli import ( - "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - connection "github.com/cosmos/ibc-go/v3/modules/core/03-connection" - channel "github.com/cosmos/ibc-go/v3/modules/core/04-channel" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" + connection "github.com/cosmos/ibc-go/v5/modules/core/03-connection" + channel "github.com/cosmos/ibc-go/v5/modules/core/04-channel" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // GetTxCmd returns the transaction commands for this module diff --git a/modules/core/client/query.go b/modules/core/client/query.go index 30377a495c4..65a6a450d79 100644 --- a/modules/core/client/query.go +++ b/modules/core/client/query.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" abci "github.com/tendermint/tendermint/abci/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) // QueryTendermintProof performs an ABCI query with the given key and returns diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index 9d54a66c71b..1254e89ab10 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -109,7 +109,7 @@ type ClientState interface { value []byte, ) error - // VerifyNonMembership is a generic proof verification method which verifies the absense of a given CommitmentPath at a specified height. + // VerifyNonMembership is a generic proof verification method which verifies the absence of a given CommitmentPath at a specified height. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). VerifyNonMembership( ctx sdk.Context, diff --git a/modules/core/genesis.go b/modules/core/genesis.go index 47797440b39..e7875770dac 100644 --- a/modules/core/genesis.go +++ b/modules/core/genesis.go @@ -3,11 +3,11 @@ package ibc import ( sdk "github.com/cosmos/cosmos-sdk/types" - client "github.com/cosmos/ibc-go/v3/modules/core/02-client" - connection "github.com/cosmos/ibc-go/v3/modules/core/03-connection" - channel "github.com/cosmos/ibc-go/v3/modules/core/04-channel" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/types" + client "github.com/cosmos/ibc-go/v5/modules/core/02-client" + connection "github.com/cosmos/ibc-go/v5/modules/core/03-connection" + channel "github.com/cosmos/ibc-go/v5/modules/core/04-channel" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) // InitGenesis initializes the ibc state from a provided genesis diff --git a/modules/core/genesis_test.go b/modules/core/genesis_test.go index e27f44cf5bd..d5c9b7abbd1 100644 --- a/modules/core/genesis_test.go +++ b/modules/core/genesis_test.go @@ -8,16 +8,16 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ibc "github.com/cosmos/ibc-go/v3/modules/core" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - "github.com/cosmos/ibc-go/v3/modules/core/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + ibc "github.com/cosmos/ibc-go/v5/modules/core" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) const ( diff --git a/modules/core/keeper/grpc_query.go b/modules/core/keeper/grpc_query.go index 2fb171a9c02..29b2e986607 100644 --- a/modules/core/keeper/grpc_query.go +++ b/modules/core/keeper/grpc_query.go @@ -3,9 +3,9 @@ package keeper import ( "context" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // ClientState implements the IBC QueryServer interface @@ -28,6 +28,11 @@ func (q Keeper) ConsensusStates(c context.Context, req *clienttypes.QueryConsens return q.ClientKeeper.ConsensusStates(c, req) } +// ConsensusStateHeights implements the IBC QueryServer interface +func (q Keeper) ConsensusStateHeights(c context.Context, req *clienttypes.QueryConsensusStateHeightsRequest) (*clienttypes.QueryConsensusStateHeightsResponse, error) { + return q.ClientKeeper.ConsensusStateHeights(c, req) +} + // ClientStatus implements the IBC QueryServer interface func (q Keeper) ClientStatus(c context.Context, req *clienttypes.QueryClientStatusRequest) (*clienttypes.QueryClientStatusResponse, error) { return q.ClientKeeper.ClientStatus(c, req) diff --git a/modules/core/keeper/keeper.go b/modules/core/keeper/keeper.go index 69044e9e4ea..65b23fc2339 100644 --- a/modules/core/keeper/keeper.go +++ b/modules/core/keeper/keeper.go @@ -1,19 +1,22 @@ package keeper import ( + "fmt" + "reflect" + "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - clientkeeper "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectionkeeper "github.com/cosmos/ibc-go/v3/modules/core/03-connection/keeper" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channelkeeper "github.com/cosmos/ibc-go/v3/modules/core/04-channel/keeper" - portkeeper "github.com/cosmos/ibc-go/v3/modules/core/05-port/keeper" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v3/modules/core/types" + clientkeeper "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectionkeeper "github.com/cosmos/ibc-go/v5/modules/core/03-connection/keeper" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channelkeeper "github.com/cosmos/ibc-go/v5/modules/core/04-channel/keeper" + portkeeper "github.com/cosmos/ibc-go/v5/modules/core/05-port/keeper" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) var _ types.QueryServer = (*Keeper)(nil) @@ -34,7 +37,7 @@ type Keeper struct { // NewKeeper creates a new ibc Keeper func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, stakingKeeper clienttypes.StakingKeeper, upgradeKeeper clienttypes.UpgradeKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) *Keeper { @@ -46,6 +49,19 @@ func NewKeeper( paramSpace = paramSpace.WithKeyTable(keyTable) } + // panic if any of the keepers passed in is empty + if reflect.ValueOf(stakingKeeper).IsZero() { + panic(fmt.Errorf("cannot initialize IBC keeper: empty staking keeper")) + } + + if reflect.ValueOf(upgradeKeeper).IsZero() { + panic(fmt.Errorf("cannot initialize IBC keeper: empty upgrade keeper")) + } + + if reflect.DeepEqual(capabilitykeeper.ScopedKeeper{}, scopedKeeper) { + panic(fmt.Errorf("cannot initialize IBC keeper: empty scoped keeper")) + } + clientKeeper := clientkeeper.NewKeeper(cdc, key, paramSpace, stakingKeeper, upgradeKeeper) connectionKeeper := connectionkeeper.NewKeeper(cdc, key, paramSpace, clientKeeper) portKeeper := portkeeper.NewKeeper(scopedKeeper) diff --git a/modules/core/keeper/keeper_test.go b/modules/core/keeper/keeper_test.go new file mode 100644 index 00000000000..33973b63bb8 --- /dev/null +++ b/modules/core/keeper/keeper_test.go @@ -0,0 +1,133 @@ +package keeper_test + +import ( + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" + "github.com/stretchr/testify/suite" + + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + ibctesting "github.com/cosmos/ibc-go/v5/testing" +) + +type KeeperTestSuite struct { + suite.Suite + + coordinator *ibctesting.Coordinator + + chainA *ibctesting.TestChain + chainB *ibctesting.TestChain +} + +func (suite *KeeperTestSuite) SetupTest() { + suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) + + suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) + suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) + + // TODO: remove + // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) + suite.coordinator.CommitNBlocks(suite.chainA, 2) + suite.coordinator.CommitNBlocks(suite.chainB, 2) +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} + +// MockStakingKeeper implements clienttypes.StakingKeeper used in ibckeeper.NewKeeper +type MockStakingKeeper struct { + mockField string +} + +func (d MockStakingKeeper) GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) { + return stakingtypes.HistoricalInfo{}, true +} + +func (d MockStakingKeeper) UnbondingTime(ctx sdk.Context) time.Duration { + return 0 +} + +// Test ibckeeper.NewKeeper used to initialize IBCKeeper when creating an app instance. +// It verifies if ibckeeper.NewKeeper panic when any of the keepers passed in is empty. +func (suite *KeeperTestSuite) TestNewKeeper() { + var ( + stakingKeeper clienttypes.StakingKeeper + upgradeKeeper clienttypes.UpgradeKeeper + scopedKeeper capabilitykeeper.ScopedKeeper + newIBCKeeper = func() { + ibckeeper.NewKeeper( + suite.chainA.GetSimApp().AppCodec(), + suite.chainA.GetSimApp().GetKey(ibchost.StoreKey), + suite.chainA.GetSimApp().GetSubspace(ibchost.ModuleName), + stakingKeeper, + upgradeKeeper, + scopedKeeper, + ) + } + ) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + {"failure: empty staking keeper", func() { + emptyStakingKeeper := stakingkeeper.Keeper{} + + stakingKeeper = emptyStakingKeeper + }, false}, + {"failure: empty mock staking keeper", func() { + // use a different implementation of clienttypes.StakingKeeper + emptyMockStakingKeeper := MockStakingKeeper{} + + stakingKeeper = emptyMockStakingKeeper + }, false}, + {"failure: empty upgrade keeper", func() { + emptyUpgradeKeeper := upgradekeeper.Keeper{} + + upgradeKeeper = emptyUpgradeKeeper + }, false}, + {"failure: empty scoped keeper", func() { + emptyScopedKeeper := capabilitykeeper.ScopedKeeper{} + + scopedKeeper = emptyScopedKeeper + }, false}, + {"success: replace stakingKeeper with non-empty MockStakingKeeper", func() { + // use a different implementation of clienttypes.StakingKeeper + mockStakingKeeper := MockStakingKeeper{"not empty"} + + stakingKeeper = mockStakingKeeper + }, true}, + } + + for _, tc := range testCases { + tc := tc + suite.SetupTest() + + suite.Run(tc.name, func() { + stakingKeeper = suite.chainA.GetSimApp().StakingKeeper + upgradeKeeper = suite.chainA.GetSimApp().UpgradeKeeper + scopedKeeper = suite.chainA.GetSimApp().ScopedIBCKeeper + + tc.malleate() + + if tc.expPass { + suite.Require().NotPanics( + newIBCKeeper, + ) + } else { + suite.Require().Panics( + newIBCKeeper, + ) + } + }) + } +} diff --git a/modules/core/keeper/migrations.go b/modules/core/keeper/migrations.go index 286ce5b2e97..ca56594b113 100644 --- a/modules/core/keeper/migrations.go +++ b/modules/core/keeper/migrations.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - clientkeeper "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" + clientkeeper "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" ) // Migrator is a struct for handling in-place store migrations. diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index fd7ccbdff64..5f6c77a3981 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -4,21 +4,22 @@ import ( "context" metrics "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" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - coretypes "github.com/cosmos/ibc-go/v3/modules/core/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + coretypes "github.com/cosmos/ibc-go/v5/modules/core/types" ) -var _ clienttypes.MsgServer = Keeper{} -var _ connectiontypes.MsgServer = Keeper{} -var _ channeltypes.MsgServer = Keeper{} +var ( + _ clienttypes.MsgServer = Keeper{} + _ connectiontypes.MsgServer = Keeper{} + _ channeltypes.MsgServer = Keeper{} +) // CreateClient defines a rpc handler method for MsgCreateClient. func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateClient) (*clienttypes.MsgCreateClientResponse, error) { @@ -117,7 +118,7 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms } if _, err := k.ConnectionKeeper.ConnOpenTry( - ctx, msg.PreviousConnectionId, msg.Counterparty, msg.DelayPeriod, msg.ClientId, targetClient, + ctx, msg.Counterparty, msg.DelayPeriod, msg.ClientId, targetClient, connectiontypes.ProtoVersionsToExported(msg.CounterpartyVersions), msg.ProofInit, msg.ProofClient, msg.ProofConsensus, msg.ProofHeight, msg.ConsensusHeight, ); err != nil { @@ -187,16 +188,17 @@ func (k Keeper) ChannelOpenInit(goCtx context.Context, msg *channeltypes.MsgChan } // Perform application logic callback - if err = cbs.OnChanOpenInit(ctx, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.PortId, channelID, cap, msg.Channel.Counterparty, msg.Channel.Version); err != nil { + version, err := cbs.OnChanOpenInit(ctx, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.PortId, channelID, cap, msg.Channel.Counterparty, msg.Channel.Version) + if err != nil { return nil, sdkerrors.Wrap(err, "channel open init callback failed") } // Write channel into state - k.ChannelKeeper.WriteOpenInitChannel(ctx, msg.PortId, channelID, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.Channel.Counterparty, msg.Channel.Version) + k.ChannelKeeper.WriteOpenInitChannel(ctx, msg.PortId, channelID, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.Channel.Counterparty, version) return &channeltypes.MsgChannelOpenInitResponse{ ChannelId: channelID, - Version: msg.Channel.Version, + Version: version, }, nil } @@ -219,7 +221,7 @@ func (k Keeper) ChannelOpenTry(goCtx context.Context, msg *channeltypes.MsgChann } // Perform 04-channel verification - channelID, cap, err := k.ChannelKeeper.ChanOpenTry(ctx, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.PortId, msg.PreviousChannelId, + channelID, cap, err := k.ChannelKeeper.ChanOpenTry(ctx, msg.Channel.Ordering, msg.Channel.ConnectionHops, msg.PortId, portCap, msg.Channel.Counterparty, msg.CounterpartyVersion, msg.ProofInit, msg.ProofHeight, ) if err != nil { diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index f4d0a05282f..a98e00327d7 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -1,57 +1,25 @@ package keeper_test import ( - "testing" - sdk "github.com/cosmos/cosmos-sdk/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/stretchr/testify/suite" - - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" -) -const height = 10 + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" +) var ( timeoutHeight = clienttypes.NewHeight(1, 10000) maxSequence = uint64(10) ) -type KeeperTestSuite struct { - suite.Suite - - coordinator *ibctesting.Coordinator - - chainA *ibctesting.TestChain - chainB *ibctesting.TestChain -} - -// SetupTest creates a coordinator with 2 test chains. -func (suite *KeeperTestSuite) SetupTest() { - suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) - - suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) - suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) - - // TODO: remove - // commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1) - suite.coordinator.CommitNBlocks(suite.chainA, 2) - suite.coordinator.CommitNBlocks(suite.chainB, 2) - -} - -func TestIBCTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} - // tests the IBC handler receiving a packet on ordered and unordered channels. // It verifies that the storing of an acknowledgement on success occurs. It // tests high level properties like ordering and basic sanity checks. More @@ -447,7 +415,6 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { path.EndpointA.UpdateClient() packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, true}, {"channel does not exist", func() { // any non-nil value of packet is valid diff --git a/modules/core/legacy/v100/genesis.go b/modules/core/legacy/v100/genesis.go index a1c85978ba2..cf924f4b4cb 100644 --- a/modules/core/legacy/v100/genesis.go +++ b/modules/core/legacy/v100/genesis.go @@ -6,11 +6,11 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" tmtypes "github.com/tendermint/tendermint/types" - clientv100 "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/types" + clientv100 "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) // MigrateGenesis accepts exported v1.0.0 IBC client genesis file and migrates it to: @@ -25,7 +25,7 @@ func MigrateGenesis(appState genutiltypes.AppMap, clientCtx client.Context, genD // unmarshal relative source genesis application state ibcGenState := &types.GenesisState{} - clientCtx.JSONCodec.MustUnmarshalJSON(appState[host.ModuleName], ibcGenState) + clientCtx.Codec.MustUnmarshalJSON(appState[host.ModuleName], ibcGenState) clientGenState, err := clientv100.MigrateGenesis(codec.NewProtoCodec(clientCtx.InterfaceRegistry), &ibcGenState.ClientGenesis, genDoc.GenesisTime, clienttypes.NewHeight(clienttypes.ParseChainID(genDoc.ChainID), uint64(genDoc.InitialHeight))) if err != nil { @@ -48,7 +48,7 @@ func MigrateGenesis(appState genutiltypes.AppMap, clientCtx client.Context, genD delete(appState, host.ModuleName) // set new ibc genesis state - appState[host.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(ibcGenState) + appState[host.ModuleName] = clientCtx.Codec.MustMarshalJSON(ibcGenState) } return appState, nil } diff --git a/modules/core/legacy/v100/genesis_test.go b/modules/core/legacy/v100/genesis_test.go index b0db2e4e1b3..b50a802b935 100644 --- a/modules/core/legacy/v100/genesis_test.go +++ b/modules/core/legacy/v100/genesis_test.go @@ -9,15 +9,15 @@ import ( "github.com/stretchr/testify/suite" tmtypes "github.com/tendermint/tendermint/types" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - clientv100 "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/legacy/v100" - "github.com/cosmos/ibc-go/v3/modules/core/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - "github.com/cosmos/ibc-go/v3/testing/simapp" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" + clientv100 "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/legacy/v100" + "github.com/cosmos/ibc-go/v5/modules/core/types" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) type LegacyTestSuite struct { @@ -52,7 +52,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { clientCtx := client.Context{}. WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). - WithJSONCodec(encodingConfig.Marshaler) + WithCodec(encodingConfig.Marshaler) // create multiple legacy solo machine clients solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-0", "testing", 1) @@ -77,7 +77,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { seq = 1 } - // generate old client state proto defintion + // generate old client state proto definition legacyClientState := &clientv100.ClientState{ Sequence: clientState.Sequence, FrozenSequence: seq, @@ -155,7 +155,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { ibcGenState := types.DefaultGenesisState() ibcGenState.ClientGenesis = clientGenState clientv100.RegisterInterfaces(clientCtx.InterfaceRegistry) - appState[host.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(ibcGenState) + appState[host.ModuleName] = clientCtx.Codec.MustMarshalJSON(ibcGenState) genDoc := tmtypes.GenesisDoc{ ChainID: suite.chainA.ChainID, GenesisTime: suite.coordinator.CurrentTime, @@ -170,7 +170,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { expectedIBCGenState := types.DefaultGenesisState() expectedIBCGenState.ClientGenesis = expectedClientGenState - bz, err := clientCtx.JSONCodec.MarshalJSON(expectedIBCGenState) + bz, err := clientCtx.Codec.MarshalJSON(expectedIBCGenState) suite.Require().NoError(err) expectedAppState[host.ModuleName] = bz diff --git a/modules/core/migrations/v5/migrations.go b/modules/core/migrations/v5/migrations.go index c08992cf7d3..dec7eb79d80 100644 --- a/modules/core/migrations/v5/migrations.go +++ b/modules/core/migrations/v5/migrations.go @@ -5,10 +5,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - clientkeeper "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clientkeeper "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // Localhost is the client type for a localhost client. It is also used as the clientID diff --git a/modules/core/migrations/v5/migrations_test.go b/modules/core/migrations/v5/migrations_test.go index 0c81e5c973d..2e70ede1cae 100644 --- a/modules/core/migrations/v5/migrations_test.go +++ b/modules/core/migrations/v5/migrations_test.go @@ -6,11 +6,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - v5 "github.com/cosmos/ibc-go/v3/modules/core/migrations/v5" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + v5 "github.com/cosmos/ibc-go/v5/modules/core/migrations/v5" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type MigrationsV5TestSuite struct { diff --git a/modules/core/module.go b/modules/core/module.go index cab9fc8ab2e..a2888a6d6bf 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -12,21 +12,20 @@ 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/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - clientkeeper "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/client/cli" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" - "github.com/cosmos/ibc-go/v3/modules/core/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/types" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" + clientkeeper "github.com/cosmos/ibc-go/v5/modules/core/02-client/keeper" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/client/cli" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" + "github.com/cosmos/ibc-go/v5/modules/core/simulation" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) var ( @@ -64,14 +63,20 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes does nothing. IBC does not support legacy REST routes. -func (AppModuleBasic) RegisterRESTRoutes(client.Context, *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - clienttypes.RegisterQueryHandlerClient(context.Background(), mux, clienttypes.NewQueryClient(clientCtx)) - connectiontypes.RegisterQueryHandlerClient(context.Background(), mux, connectiontypes.NewQueryClient(clientCtx)) - channeltypes.RegisterQueryHandlerClient(context.Background(), mux, channeltypes.NewQueryClient(clientCtx)) + err := clienttypes.RegisterQueryHandlerClient(context.Background(), mux, clienttypes.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } + err = connectiontypes.RegisterQueryHandlerClient(context.Background(), mux, connectiontypes.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } + err = channeltypes.RegisterQueryHandlerClient(context.Background(), mux, channeltypes.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } } // GetTxCmd returns the root tx command for the ibc module. @@ -135,7 +140,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryService(cfg.QueryServer(), am.keeper) m := clientkeeper.NewMigrator(am.keeper.ClientKeeper) - cfg.RegisterMigration(host.ModuleName, 1, m.Migrate1to2) + err := cfg.RegisterMigration(host.ModuleName, 1, m.Migrate1to2) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the ibc module. It returns diff --git a/modules/core/simulation/decoder.go b/modules/core/simulation/decoder.go index 16869f1b061..27585b26ea4 100644 --- a/modules/core/simulation/decoder.go +++ b/modules/core/simulation/decoder.go @@ -5,11 +5,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" - clientsim "github.com/cosmos/ibc-go/v3/modules/core/02-client/simulation" - connectionsim "github.com/cosmos/ibc-go/v3/modules/core/03-connection/simulation" - channelsim "github.com/cosmos/ibc-go/v3/modules/core/04-channel/simulation" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" + clientsim "github.com/cosmos/ibc-go/v5/modules/core/02-client/simulation" + connectionsim "github.com/cosmos/ibc-go/v5/modules/core/03-connection/simulation" + channelsim "github.com/cosmos/ibc-go/v5/modules/core/04-channel/simulation" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/modules/core/simulation/decoder_test.go b/modules/core/simulation/decoder_test.go index 621375a024f..43f1d918e8c 100644 --- a/modules/core/simulation/decoder_test.go +++ b/modules/core/simulation/decoder_test.go @@ -7,13 +7,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/kv" "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/simulation" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - "github.com/cosmos/ibc-go/v3/testing/simapp" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/simulation" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/core/simulation/genesis.go b/modules/core/simulation/genesis.go index e6decacb26b..0705bfd22f4 100644 --- a/modules/core/simulation/genesis.go +++ b/modules/core/simulation/genesis.go @@ -9,14 +9,14 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" - clientsims "github.com/cosmos/ibc-go/v3/modules/core/02-client/simulation" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectionsims "github.com/cosmos/ibc-go/v3/modules/core/03-connection/simulation" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channelsims "github.com/cosmos/ibc-go/v3/modules/core/04-channel/simulation" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/types" + clientsims "github.com/cosmos/ibc-go/v5/modules/core/02-client/simulation" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectionsims "github.com/cosmos/ibc-go/v5/modules/core/03-connection/simulation" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channelsims "github.com/cosmos/ibc-go/v5/modules/core/04-channel/simulation" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) // Simulation parameter constants diff --git a/modules/core/simulation/genesis_test.go b/modules/core/simulation/genesis_test.go index 6010f74c20f..60fa6011b23 100644 --- a/modules/core/simulation/genesis_test.go +++ b/modules/core/simulation/genesis_test.go @@ -5,21 +5,24 @@ import ( "math/rand" "testing" + "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" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/stretchr/testify/require" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/simulation" - "github.com/cosmos/ibc-go/v3/modules/core/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/simulation" + "github.com/cosmos/ibc-go/v5/modules/core/types" ) // TestRandomizedGenState tests the normal scenario of applying RandomizedGenState. // Abonormal scenarios are not tested here. func TestRandomizedGenState(t *testing.T) { interfaceRegistry := codectypes.NewInterfaceRegistry() + cryptocodec.RegisterInterfaces(interfaceRegistry) cdc := codec.NewProtoCodec(interfaceRegistry) s := rand.NewSource(1) @@ -31,7 +34,7 @@ func TestRandomizedGenState(t *testing.T) { Rand: r, NumBonded: 3, Accounts: simtypes.RandomAccounts(r, 3), - InitialStake: 1000, + InitialStake: math.NewInt(1000), GenState: make(map[string]json.RawMessage), } diff --git a/modules/core/types/codec.go b/modules/core/types/codec.go index 079fa341d25..30cb5ecd263 100644 --- a/modules/core/types/codec.go +++ b/modules/core/types/codec.go @@ -3,12 +3,12 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // RegisterInterfaces registers x/ibc interfaces into protobuf Any. diff --git a/modules/core/types/genesis.go b/modules/core/types/genesis.go index 6b9304d9b8e..6334b559548 100644 --- a/modules/core/types/genesis.go +++ b/modules/core/types/genesis.go @@ -3,9 +3,9 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) var _ codectypes.UnpackInterfacesMessage = GenesisState{} diff --git a/modules/core/types/genesis.pb.go b/modules/core/types/genesis.pb.go index 11fe53adab2..af75e6097d4 100644 --- a/modules/core/types/genesis.pb.go +++ b/modules/core/types/genesis.pb.go @@ -5,9 +5,9 @@ package types import ( fmt "fmt" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - types2 "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + types2 "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -97,28 +97,28 @@ func init() { func init() { proto.RegisterFile("ibc/core/types/v1/genesis.proto", fileDescriptor_b9a49c5663e6fc59) } var fileDescriptor_b9a49c5663e6fc59 = []byte{ - // 323 bytes of a gzipped FileDescriptorProto + // 324 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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 0x96, - 0xde, 0x07, 0x87, 0x2d, 0x41, 0x78, 0xa2, 0x03, 0xb3, 0xe2, 0xe7, 0x9e, 0xdf, 0x9c, 0x5e, 0xbb, - 0x3a, 0x95, 0x6b, 0xdc, 0x72, 0xd5, 0x8c, 0xe5, 0x1b, 0x19, 0xdf, 0x95, 0xf1, 0x59, 0x6d, 0x41, - 0xd8, 0x6b, 0xc2, 0x3f, 0xef, 0xbb, 0x77, 0x6a, 0x5e, 0x46, 0x2d, 0xfd, 0x57, 0x49, 0x47, 0x2d, - 0xa9, 0x06, 0x2c, 0x23, 0x32, 0xc6, 0x0b, 0x63, 0x3c, 0xec, 0x09, 0xc2, 0xae, 0x49, 0xcc, 0xd2, - 0xec, 0x71, 0x53, 0x20, 0x77, 0x5b, 0x20, 0xf7, 0xbb, 0x40, 0xee, 0x47, 0x89, 0x9c, 0x6d, 0x89, - 0x9c, 0xcf, 0x12, 0x39, 0xcf, 0x38, 0xe1, 0x6a, 0xbe, 0x8a, 0x31, 0x85, 0x8c, 0x50, 0x90, 0x19, - 0x48, 0xc2, 0x63, 0x7a, 0x9b, 0x00, 0xc9, 0xa7, 0x24, 0x83, 0xd7, 0x55, 0xca, 0x64, 0xeb, 0x5f, - 0x8a, 0xff, 0x57, 0x5f, 0x6b, 0xfa, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x81, 0x4d, 0x5d, 0x1d, 0x64, - 0x02, 0x00, 0x00, + 0x05, 0x5b, 0x05, 0xb1, 0x30, 0x76, 0x81, 0x39, 0x6c, 0x2c, 0x28, 0x31, 0x26, 0x35, 0x4a, 0x7c, + 0xaa, 0xda, 0x8d, 0xd4, 0xb7, 0xe0, 0xb1, 0x3a, 0x76, 0x44, 0x0c, 0x15, 0x4a, 0xde, 0x80, 0x27, + 0x40, 0x8d, 0x4d, 0x92, 0xca, 0x5b, 0xf4, 0x9f, 0xef, 0xfc, 0xdf, 0x51, 0x12, 0x6f, 0xc0, 0x63, + 0x4a, 0x28, 0x2c, 0x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0b, 0xe4, 0x7e, 0x94, 0xc8, 0xd9, 0x94, + 0xc8, 0xf9, 0x2c, 0x91, 0xf3, 0x8c, 0x13, 0xae, 0x66, 0xcb, 0x18, 0x53, 0xc8, 0x08, 0x05, 0x99, + 0x81, 0x24, 0x3c, 0xa6, 0xd7, 0x09, 0x90, 0xfc, 0x8e, 0x64, 0xf0, 0xba, 0x4c, 0x99, 0x6c, 0xfd, + 0x4b, 0xf1, 0xff, 0xea, 0x6b, 0xdd, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x43, 0xe1, 0x18, + 0x64, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/types/query.go b/modules/core/types/query.go index ef9d0589448..dda49b9a37a 100644 --- a/modules/core/types/query.go +++ b/modules/core/types/query.go @@ -3,12 +3,12 @@ package types import ( "github.com/gogo/protobuf/grpc" - client "github.com/cosmos/ibc-go/v3/modules/core/02-client" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connection "github.com/cosmos/ibc-go/v3/modules/core/03-connection" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channel "github.com/cosmos/ibc-go/v3/modules/core/04-channel" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + client "github.com/cosmos/ibc-go/v5/modules/core/02-client" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connection "github.com/cosmos/ibc-go/v5/modules/core/03-connection" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channel "github.com/cosmos/ibc-go/v5/modules/core/04-channel" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // QueryServer defines the IBC interfaces that the gRPC query server must implement diff --git a/modules/light-clients/06-solomachine/client_state.go b/modules/light-clients/06-solomachine/client_state.go index 159ea5052f6..fd660c3785a 100644 --- a/modules/light-clients/06-solomachine/client_state.go +++ b/modules/light-clients/06-solomachine/client_state.go @@ -9,10 +9,10 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientState = (*ClientState)(nil) @@ -152,7 +152,7 @@ func (cs *ClientState) VerifyMembership( return nil } -// VerifyNonMembership is a generic proof verification method which verifies the absense of a given CommitmentPath at a specified height. +// VerifyNonMembership is a generic proof verification method which verifies the absence of a given CommitmentPath at a specified height. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). func (cs *ClientState) VerifyNonMembership( ctx sdk.Context, diff --git a/modules/light-clients/06-solomachine/client_state_test.go b/modules/light-clients/06-solomachine/client_state_test.go index 49fedc102a9..9f5c4ed02ff 100644 --- a/modules/light-clients/06-solomachine/client_state_test.go +++ b/modules/light-clients/06-solomachine/client_state_test.go @@ -3,13 +3,13 @@ package solomachine_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) const ( diff --git a/modules/light-clients/06-solomachine/codec.go b/modules/light-clients/06-solomachine/codec.go index ed040d7b2c2..2792e19c759 100644 --- a/modules/light-clients/06-solomachine/codec.go +++ b/modules/light-clients/06-solomachine/codec.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces register the ibc channel submodule interfaces to protobuf diff --git a/modules/light-clients/06-solomachine/consensus_state.go b/modules/light-clients/06-solomachine/consensus_state.go index 35e11fa6064..1f63823663f 100644 --- a/modules/light-clients/06-solomachine/consensus_state.go +++ b/modules/light-clients/06-solomachine/consensus_state.go @@ -6,8 +6,8 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ConsensusState = &ConsensusState{} diff --git a/modules/light-clients/06-solomachine/consensus_state_test.go b/modules/light-clients/06-solomachine/consensus_state_test.go index 6b601a95cb6..6319c418931 100644 --- a/modules/light-clients/06-solomachine/consensus_state_test.go +++ b/modules/light-clients/06-solomachine/consensus_state_test.go @@ -1,9 +1,9 @@ package solomachine_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *SoloMachineTestSuite) TestConsensusState() { @@ -60,7 +60,6 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { tc := tc suite.Run(tc.name, func() { - err := tc.consensusState.ValidateBasic() if tc.expPass { diff --git a/modules/light-clients/06-solomachine/header.go b/modules/light-clients/06-solomachine/header.go index f2a63ef4ddb..b5bfe11f28d 100644 --- a/modules/light-clients/06-solomachine/header.go +++ b/modules/light-clients/06-solomachine/header.go @@ -6,8 +6,8 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientMessage = &Header{} diff --git a/modules/light-clients/06-solomachine/header_test.go b/modules/light-clients/06-solomachine/header_test.go index a2b96ea7d62..1a0ce46ee33 100644 --- a/modules/light-clients/06-solomachine/header_test.go +++ b/modules/light-clients/06-solomachine/header_test.go @@ -1,9 +1,9 @@ package solomachine_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { diff --git a/modules/light-clients/06-solomachine/misbehaviour.go b/modules/light-clients/06-solomachine/misbehaviour.go index 6e58a8c76f8..526fc76e839 100644 --- a/modules/light-clients/06-solomachine/misbehaviour.go +++ b/modules/light-clients/06-solomachine/misbehaviour.go @@ -5,9 +5,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientMessage = &Misbehaviour{} diff --git a/modules/light-clients/06-solomachine/misbehaviour_handle.go b/modules/light-clients/06-solomachine/misbehaviour_handle.go index 80eb3f04097..e108931b7ea 100644 --- a/modules/light-clients/06-solomachine/misbehaviour_handle.go +++ b/modules/light-clients/06-solomachine/misbehaviour_handle.go @@ -3,7 +3,7 @@ package solomachine import ( "github.com/cosmos/cosmos-sdk/codec" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" ) // verifySignatureAndData verifies that the currently registered public key has signed @@ -43,5 +43,4 @@ func (cs ClientState) verifySignatureAndData(cdc codec.BinaryCodec, misbehaviour } return nil - } diff --git a/modules/light-clients/06-solomachine/misbehaviour_test.go b/modules/light-clients/06-solomachine/misbehaviour_test.go index 552fc9c7e57..2e6044b67d1 100644 --- a/modules/light-clients/06-solomachine/misbehaviour_test.go +++ b/modules/light-clients/06-solomachine/misbehaviour_test.go @@ -1,9 +1,9 @@ package solomachine_test import ( - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *SoloMachineTestSuite) TestMisbehaviour() { diff --git a/modules/light-clients/06-solomachine/proof_test.go b/modules/light-clients/06-solomachine/proof_test.go index 0ea96ee4116..2fa853d46a5 100644 --- a/modules/light-clients/06-solomachine/proof_test.go +++ b/modules/light-clients/06-solomachine/proof_test.go @@ -4,7 +4,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" ) func (suite *SoloMachineTestSuite) TestVerifySignature() { diff --git a/modules/light-clients/06-solomachine/proposal_handle.go b/modules/light-clients/06-solomachine/proposal_handle.go index 4a32e2af2e1..1abb33f31fa 100644 --- a/modules/light-clients/06-solomachine/proposal_handle.go +++ b/modules/light-clients/06-solomachine/proposal_handle.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // CheckSubstituteAndUpdateState verifies that the subject is allowed to be updated by @@ -22,7 +22,6 @@ func (cs ClientState) CheckSubstituteAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, _ sdk.KVStore, substituteClient exported.ClientState, ) (exported.ClientState, error) { - if !cs.AllowUpdateAfterProposal { return nil, sdkerrors.Wrapf( clienttypes.ErrUpdateClientFailed, diff --git a/modules/light-clients/06-solomachine/proposal_handle_test.go b/modules/light-clients/06-solomachine/proposal_handle_test.go index 26f04b93326..cc099327d25 100644 --- a/modules/light-clients/06-solomachine/proposal_handle_test.go +++ b/modules/light-clients/06-solomachine/proposal_handle_test.go @@ -1,12 +1,12 @@ package solomachine_test import ( - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *SoloMachineTestSuite) TestCheckSubstituteAndUpdateState() { diff --git a/modules/light-clients/06-solomachine/solomachine.pb.go b/modules/light-clients/06-solomachine/solomachine.pb.go index dbc9ad634aa..4714f24f568 100644 --- a/modules/light-clients/06-solomachine/solomachine.pb.go +++ b/modules/light-clients/06-solomachine/solomachine.pb.go @@ -388,56 +388,56 @@ func init() { } var fileDescriptor_264187157b9220a4 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x4f, 0xe3, 0x46, - 0x18, 0x8e, 0x8d, 0x41, 0xc9, 0x24, 0x0d, 0xd4, 0x0a, 0xc8, 0xa4, 0x55, 0x1c, 0xf9, 0x50, 0x71, - 0xc1, 0x2e, 0x44, 0xea, 0x81, 0x5e, 0x4a, 0x40, 0x55, 0x3f, 0xa8, 0x8a, 0x0c, 0x5c, 0x7a, 0xb1, - 0xc6, 0xf6, 0xc4, 0x19, 0xd5, 0xf1, 0xb8, 0x9e, 0x71, 0xa2, 0x54, 0x3d, 0x54, 0x3d, 0xf5, 0xd8, - 0x4b, 0xef, 0x55, 0xa5, 0xfe, 0x8e, 0x5e, 0x77, 0x6f, 0x1c, 0xf7, 0x14, 0xad, 0xe0, 0x1f, 0xe4, - 0x17, 0xac, 0x3c, 0x76, 0xe2, 0x0f, 0x58, 0x90, 0x76, 0xf7, 0x36, 0xf3, 0x7e, 0x3e, 0xef, 0x33, - 0xcf, 0x6b, 0x83, 0x23, 0x6c, 0x3b, 0x86, 0x8f, 0xbd, 0x31, 0x73, 0x7c, 0x8c, 0x02, 0x46, 0x0d, - 0x4a, 0x7c, 0x32, 0x81, 0xce, 0x18, 0x07, 0xc8, 0x98, 0x0e, 0x8a, 0x57, 0x3d, 0x8c, 0x08, 0x23, - 0xb2, 0x8a, 0x6d, 0x47, 0x2f, 0xa6, 0xe8, 0xc5, 0x98, 0xe9, 0xa0, 0xd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x51, 0xba, 0x8f, 0x6f, 0x59, 0x46, 0xf1, 0xdd, 0x96, 0x71, 0x38, 0x7a, 0x71, 0xd7, 0x13, 0x6e, - 0xef, 0x7a, 0xc2, 0xeb, 0xbb, 0x9e, 0xf0, 0xd7, 0x7d, 0xaf, 0x76, 0x7b, 0xdf, 0xab, 0xbd, 0xba, - 0xef, 0xd5, 0x7e, 0xba, 0xf0, 0x30, 0x1b, 0xc7, 0xb6, 0xee, 0x90, 0x89, 0xe1, 0x10, 0x3a, 0x21, - 0xd4, 0xc0, 0xb6, 0x73, 0xe8, 0x91, 0xe4, 0x9f, 0x38, 0x21, 0x6e, 0xec, 0x23, 0x9a, 0xfe, 0x37, - 0x0f, 0x57, 0x3f, 0xce, 0xcf, 0xbf, 0x38, 0x2c, 0xc8, 0xfb, 0xcb, 0xc2, 0xd9, 0xde, 0xe2, 0x33, - 0x0e, 0xde, 0x04, 0x00, 0x00, 0xff, 0xff, 0x49, 0x19, 0x81, 0xe4, 0x6e, 0x07, 0x00, 0x00, + // 784 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0x8e, 0x5d, 0xb7, 0x4a, 0x26, 0x21, 0x2d, 0x56, 0x5a, 0xb9, 0x01, 0xc5, 0x91, 0x0f, 0xa8, + 0x97, 0xda, 0xb4, 0x11, 0x1c, 0xca, 0x85, 0xa6, 0x15, 0xe2, 0xa3, 0x88, 0xca, 0x6d, 0x2f, 0x5c, + 0xac, 0xb1, 0x3d, 0x71, 0x46, 0x38, 0x1e, 0xe3, 0x19, 0x27, 0x0a, 0xe2, 0x80, 0x38, 0x71, 0xe4, + 0xc2, 0x1d, 0x21, 0xf1, 0x3b, 0xb8, 0xb2, 0xb7, 0x1e, 0xf7, 0x14, 0xad, 0xda, 0x7f, 0x90, 0x5f, + 0xb0, 0xf2, 0xd8, 0x89, 0x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x95, 0x11, 0xf8, 0x08, 0xfa, 0x3e, + 0x99, 0x59, 0x71, 0xe8, 0x42, 0x86, 0x2c, 0x38, 0x62, 0x28, 0xb2, 0xc2, 0x88, 0x84, 0x84, 0x42, + 0x5f, 0x91, 0x38, 0xf4, 0x4f, 0x96, 0x0b, 0x55, 0x4b, 0x0b, 0x3e, 0x11, 0xac, 0x99, 0x0a, 0xf7, + 0xde, 0x70, 0xe7, 0x69, 0xe2, 0xbb, 0xcc, 0x5c, 0x27, 0xd2, 0x1f, 0x7f, 0xab, 0x35, 0xed, 0x1f, + 0x01, 0xb4, 0xcb, 0x58, 0xe5, 0x6f, 0x01, 0x08, 0x63, 0xdb, 0xc7, 0x8e, 0xf5, 0x13, 0x9a, 0x73, + 0x1a, 0x9b, 0xc7, 0x1d, 0x3d, 0x7d, 0x04, 0x7d, 0xf5, 0x08, 0xfa, 0x69, 0x30, 0x1f, 0xee, 0x2e, + 0x17, 0xea, 0x87, 0x29, 0x88, 0x3c, 0x43, 0x33, 0x1b, 0xe9, 0xe5, 0x3b, 0x34, 0x97, 0xfb, 0xa0, + 0xe9, 0xe2, 0x29, 0x8a, 0x28, 0x1e, 0x61, 0x14, 0x71, 0xda, 0x1b, 0x66, 0xd1, 0x24, 0x7f, 0x0c, + 0x1a, 0x0c, 0x4f, 0x10, 0x65, 0x70, 0x12, 0x72, 0x76, 0x25, 0x33, 0x37, 0x64, 0x20, 0x7f, 0x17, + 0xc1, 0xd6, 0xd7, 0x08, 0xba, 0x28, 0x7a, 0xf2, 0x85, 0x4b, 0xa5, 0xc4, 0x4a, 0xa9, 0xc4, 0x4b, + 0xb1, 0x17, 0x40, 0x16, 0x47, 0xe9, 0x33, 0xb6, 0xcc, 0xdc, 0x20, 0xdf, 0x80, 0x76, 0x80, 0x66, + 0x56, 0x61, 0x70, 0xe9, 0x89, 0xc1, 0xf7, 0x97, 0x0b, 0x75, 0x37, 0x1d, 0xbc, 0x9c, 0xa5, 0x99, + 0xad, 0x00, 0xcd, 0x2e, 0xd7, 0xf3, 0x9f, 0x81, 0xed, 0x24, 0xa0, 0xc8, 0xc1, 0x66, 0xc2, 0x41, + 0x51, 0x10, 0x95, 0x00, 0xcd, 0x4c, 0x90, 0x9c, 0xe7, 0x86, 0x8c, 0x84, 0x17, 0x22, 0x68, 0x7d, + 0x8f, 0xa9, 0x8d, 0xc6, 0x70, 0x8a, 0x49, 0x1c, 0xc9, 0x03, 0xd0, 0x48, 0xc5, 0x67, 0x61, 0x97, + 0x73, 0xd1, 0x18, 0xee, 0xe5, 0x82, 0x5e, 0xbb, 0x34, 0x45, 0x30, 0xeb, 0xe9, 0xed, 0x1b, 0xb7, + 0xc4, 0x9f, 0x58, 0xe1, 0x2f, 0x04, 0x1f, 0xac, 0x09, 0xb1, 0x48, 0xb0, 0x12, 0xfb, 0xd1, 0xb3, + 0x62, 0xbf, 0x5a, 0x65, 0x9d, 0x06, 0xee, 0x39, 0x64, 0x70, 0xa8, 0x2c, 0x17, 0x6a, 0x27, 0xc5, + 0x51, 0xaa, 0xa8, 0x99, 0xad, 0xf5, 0xfd, 0x87, 0xa0, 0xd2, 0x91, 0xcd, 0x48, 0x46, 0xfa, 0xfb, + 0xea, 0xc8, 0x66, 0xa4, 0xd8, 0xf1, 0x7a, 0x46, 0x32, 0x2e, 0x7f, 0x05, 0x3b, 0xd5, 0x0a, 0x65, + 0x7d, 0x08, 0x55, 0x7d, 0xc8, 0x40, 0x0a, 0x21, 0x1b, 0x73, 0xce, 0x5a, 0x26, 0x3f, 0x27, 0x36, + 0x17, 0x32, 0x98, 0x89, 0x89, 0x9f, 0xcb, 0x1a, 0x94, 0x1e, 0x97, 0xf3, 0x6f, 0x02, 0x50, 0xae, + 0x57, 0x36, 0xe4, 0xae, 0x91, 0x70, 0x18, 0x5f, 0x82, 0x76, 0x3e, 0x00, 0x2f, 0xcf, 0xb1, 0x14, + 0x25, 0x57, 0xf6, 0x6b, 0x66, 0xce, 0xe1, 0xf9, 0x03, 0x08, 0xe2, 0xe3, 0x10, 0xfe, 0x12, 0x40, + 0x23, 0xe9, 0x3b, 0x9c, 0x33, 0x44, 0xdf, 0x61, 0xa9, 0x2a, 0xfb, 0xbd, 0xf1, 0x70, 0xbf, 0x57, + 0xc4, 0x49, 0x8f, 0x10, 0xb7, 0x99, 0x13, 0x97, 0xe1, 0xfa, 0x57, 0x00, 0x20, 0xdd, 0x74, 0x3e, + 0xca, 0x05, 0x68, 0x66, 0xfb, 0xf5, 0xec, 0xb7, 0x28, 0x91, 0xbe, 0x5c, 0x5a, 0xc9, 0xec, 0x63, + 0x94, 0xee, 0xe3, 0x1b, 0x96, 0x51, 0x7c, 0xbb, 0x65, 0x1c, 0x8e, 0xfe, 0xbf, 0xeb, 0x09, 0xb7, + 0x77, 0x3d, 0xe1, 0xd5, 0x5d, 0x4f, 0xf8, 0xf3, 0xbe, 0x57, 0xbb, 0xbd, 0xef, 0xd5, 0x5e, 0xde, + 0xf7, 0x6a, 0x3f, 0x5e, 0x78, 0x98, 0x8d, 0x63, 0x5b, 0x77, 0xc8, 0xc4, 0x70, 0x08, 0x9d, 0x10, + 0x6a, 0x60, 0xdb, 0x39, 0xf4, 0x88, 0x31, 0xfd, 0xcc, 0x98, 0x10, 0x37, 0xf6, 0x11, 0x4d, 0xff, + 0x9b, 0x87, 0xab, 0x1f, 0xe7, 0xa7, 0x9f, 0x1f, 0x16, 0xe4, 0xfd, 0x45, 0xe1, 0x6c, 0x6f, 0xf1, + 0x19, 0x07, 0xaf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x62, 0x3e, 0x62, 0x81, 0x6e, 0x07, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/modules/light-clients/06-solomachine/solomachine_test.go b/modules/light-clients/06-solomachine/solomachine_test.go index c913d776fc2..c73a8ecebc4 100644 --- a/modules/light-clients/06-solomachine/solomachine_test.go +++ b/modules/light-clients/06-solomachine/solomachine_test.go @@ -11,10 +11,10 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) type SoloMachineTestSuite struct { diff --git a/modules/light-clients/06-solomachine/update.go b/modules/light-clients/06-solomachine/update.go index d514603f784..5eb628876c1 100644 --- a/modules/light-clients/06-solomachine/update.go +++ b/modules/light-clients/06-solomachine/update.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // VerifyClientMessage introspects the provided ClientMessage and checks its validity diff --git a/modules/light-clients/06-solomachine/update_test.go b/modules/light-clients/06-solomachine/update_test.go index e205886bc25..5664eb264a2 100644 --- a/modules/light-clients/06-solomachine/update_test.go +++ b/modules/light-clients/06-solomachine/update_test.go @@ -4,12 +4,12 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *SoloMachineTestSuite) TestVerifyClientMessageHeader() { diff --git a/modules/light-clients/07-tendermint/client_state.go b/modules/light-clients/07-tendermint/client_state.go index 27a78768571..0c3715e4db1 100644 --- a/modules/light-clients/07-tendermint/client_state.go +++ b/modules/light-clients/07-tendermint/client_state.go @@ -11,9 +11,9 @@ import ( "github.com/tendermint/tendermint/light" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientState = (*ClientState)(nil) @@ -248,7 +248,7 @@ func (cs ClientState) VerifyMembership( return nil } -// VerifyNonMembership is a generic proof verification method which verifies the absense of a given CommitmentPath at a specified height. +// VerifyNonMembership is a generic proof verification method which verifies the absence of a given CommitmentPath at a specified height. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). func (cs ClientState) VerifyNonMembership( ctx sdk.Context, diff --git a/modules/light-clients/07-tendermint/client_state_test.go b/modules/light-clients/07-tendermint/client_state_test.go index f69aecd969d..38144e0a3a3 100644 --- a/modules/light-clients/07-tendermint/client_state_test.go +++ b/modules/light-clients/07-tendermint/client_state_test.go @@ -6,15 +6,15 @@ import ( ics23 "github.com/confio/ics23/go" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" + transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" ) const ( @@ -411,7 +411,7 @@ func (suite *TendermintTestSuite) TestVerifyMembership() { }, { "proof verification failed", func() { - // change the value being prooved + // change the value being proved value = []byte("invalid value") }, false, }, @@ -638,7 +638,7 @@ func (suite *TendermintTestSuite) TestVerifyNonMembership() { }, { "verify non membership fails as path exists", func() { - // change the value being prooved + // change the value being proved key := host.FullClientStateKey(testingpath.EndpointB.ClientID) merklePath := commitmenttypes.NewMerklePath(string(key)) merklePath, err := commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) diff --git a/modules/light-clients/07-tendermint/codec.go b/modules/light-clients/07-tendermint/codec.go index 931f66ca1b4..5e98991f24e 100644 --- a/modules/light-clients/07-tendermint/codec.go +++ b/modules/light-clients/07-tendermint/codec.go @@ -3,7 +3,7 @@ package tendermint import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // RegisterInterfaces registers the tendermint concrete client-related diff --git a/modules/light-clients/07-tendermint/consensus_state.go b/modules/light-clients/07-tendermint/consensus_state.go index 10a551f36b1..ce0e3006afe 100644 --- a/modules/light-clients/07-tendermint/consensus_state.go +++ b/modules/light-clients/07-tendermint/consensus_state.go @@ -7,9 +7,9 @@ import ( tmbytes "github.com/tendermint/tendermint/libs/bytes" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // SentinelRoot is used as a stand-in root value for the consensus state set at the upgrade height diff --git a/modules/light-clients/07-tendermint/consensus_state_test.go b/modules/light-clients/07-tendermint/consensus_state_test.go index b2b73ca4b4a..4775ea75b6e 100644 --- a/modules/light-clients/07-tendermint/consensus_state_test.go +++ b/modules/light-clients/07-tendermint/consensus_state_test.go @@ -3,9 +3,9 @@ package tendermint_test import ( "time" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { @@ -48,7 +48,8 @@ func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { Root: commitmenttypes.NewMerkleRoot([]byte("app_hash")), NextValidatorsHash: []byte("hi"), }, - false}, + false, + }, {"timestamp is zero", &tendermint.ConsensusState{ @@ -56,7 +57,8 @@ func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { Root: commitmenttypes.NewMerkleRoot([]byte("app_hash")), NextValidatorsHash: suite.valsHash, }, - false}, + false, + }, } for i, tc := range testCases { diff --git a/modules/light-clients/07-tendermint/genesis.go b/modules/light-clients/07-tendermint/genesis.go index ea47828a075..ab9159a00a8 100644 --- a/modules/light-clients/07-tendermint/genesis.go +++ b/modules/light-clients/07-tendermint/genesis.go @@ -3,8 +3,8 @@ package tendermint import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // ExportMetadata exports all the consensus metadata in the client store so they can be included in clients genesis diff --git a/modules/light-clients/07-tendermint/genesis_test.go b/modules/light-clients/07-tendermint/genesis_test.go index 9feb66372cf..b7b7d85820a 100644 --- a/modules/light-clients/07-tendermint/genesis_test.go +++ b/modules/light-clients/07-tendermint/genesis_test.go @@ -3,9 +3,9 @@ package tendermint_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) // expected export ordering: diff --git a/modules/light-clients/07-tendermint/header.go b/modules/light-clients/07-tendermint/header.go index ee57b2c085f..9fc00198245 100644 --- a/modules/light-clients/07-tendermint/header.go +++ b/modules/light-clients/07-tendermint/header.go @@ -7,9 +7,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientMessage = &Header{} diff --git a/modules/light-clients/07-tendermint/header_test.go b/modules/light-clients/07-tendermint/header_test.go index b1df2128a1f..eea6dd65945 100644 --- a/modules/light-clients/07-tendermint/header_test.go +++ b/modules/light-clients/07-tendermint/header_test.go @@ -5,9 +5,9 @@ import ( tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) func (suite *TendermintTestSuite) TestGetHeight() { @@ -21,9 +21,7 @@ func (suite *TendermintTestSuite) TestGetTime() { } func (suite *TendermintTestSuite) TestHeaderValidateBasic() { - var ( - header *tendermint.Header - ) + var header *tendermint.Header testCases := []struct { name string malleate func() diff --git a/modules/light-clients/07-tendermint/misbehaviour.go b/modules/light-clients/07-tendermint/misbehaviour.go index 41eb6a11efd..3fc237621ab 100644 --- a/modules/light-clients/07-tendermint/misbehaviour.go +++ b/modules/light-clients/07-tendermint/misbehaviour.go @@ -7,14 +7,14 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) var _ exported.ClientMessage = &Misbehaviour{} -// Use the same FrozenHeight for all misbehaviour +// FrozenHeight is same for all misbehaviour var FrozenHeight = clienttypes.NewHeight(0, 1) // NewMisbehaviour creates a new Misbehaviour instance. diff --git a/modules/light-clients/07-tendermint/misbehaviour_handle.go b/modules/light-clients/07-tendermint/misbehaviour_handle.go index 08ddfcffecb..0417dd4da17 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_handle.go +++ b/modules/light-clients/07-tendermint/misbehaviour_handle.go @@ -9,7 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" ) // verifyMisbehaviour determines whether or not two conflicting @@ -21,7 +21,6 @@ import ( // to misbehaviour.Header2 // Misbehaviour sets frozen height to {0, 1} since it is only used as a boolean value (zero or non-zero). func (cs *ClientState) verifyMisbehaviour(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec, misbehaviour *Misbehaviour) error { - // if heights are equal check that this is valid misbehaviour of a fork // otherwise if heights are unequal check that this is valid misbehavior of BFT time violation if misbehaviour.Header1.GetHeight().EQ(misbehaviour.Header2.GetHeight()) { @@ -40,12 +39,10 @@ func (cs *ClientState) verifyMisbehaviour(ctx sdk.Context, clientStore sdk.KVSto return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers block hashes are equal") } - } else { + } else if misbehaviour.Header1.SignedHeader.Header.Time.After(misbehaviour.Header2.SignedHeader.Header.Time) { // Header1 is at greater height than Header2, therefore Header1 time must be less than or equal to // Header2 time in order to be valid misbehaviour (violation of monotonic time). - if misbehaviour.Header1.SignedHeader.Header.Time.After(misbehaviour.Header2.SignedHeader.Header.Time) { - return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers are not at same height and are monotonically increasing") - } + return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers are not at same height and are monotonically increasing") } // Regardless of the type of misbehaviour, ensure that both headers are valid and would have been accepted by light-client diff --git a/modules/light-clients/07-tendermint/misbehaviour_handle_test.go b/modules/light-clients/07-tendermint/misbehaviour_handle_test.go index a8bfa024862..52cb17efa0b 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_handle_test.go +++ b/modules/light-clients/07-tendermint/misbehaviour_handle_test.go @@ -7,12 +7,12 @@ import ( tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - smtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + smtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" ) func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { diff --git a/modules/light-clients/07-tendermint/misbehaviour_test.go b/modules/light-clients/07-tendermint/misbehaviour_test.go index 41aa89cbdec..8a433a4d0e0 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_test.go +++ b/modules/light-clients/07-tendermint/misbehaviour_test.go @@ -7,11 +7,11 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" ) func (suite *TendermintTestSuite) TestMisbehaviour() { diff --git a/modules/light-clients/07-tendermint/proposal_handle.go b/modules/light-clients/07-tendermint/proposal_handle.go index 62457e67876..bba5f779a8f 100644 --- a/modules/light-clients/07-tendermint/proposal_handle.go +++ b/modules/light-clients/07-tendermint/proposal_handle.go @@ -2,13 +2,14 @@ package tendermint import ( "reflect" + "time" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // CheckSubstituteAndUpdateState will try to update the client with the state of the @@ -70,6 +71,9 @@ func (cs ClientState) CheckSubstituteAndUpdateState( cs.LatestHeight = substituteClientState.LatestHeight cs.ChainId = substituteClientState.ChainId + // set new trusting period based on the substitute client state + cs.TrustingPeriod = substituteClientState.TrustingPeriod + // no validation is necessary since the substitute is verified to be Active // in 02-client. setClientState(subjectClientStore, cdc, &cs) @@ -78,15 +82,22 @@ func (cs ClientState) CheckSubstituteAndUpdateState( } // IsMatchingClientState returns true if all the client state parameters match -// except for frozen height, latest height, and chain-id. +// except for frozen height, latest height, trusting period, chain-id. func IsMatchingClientState(subject, substitute ClientState) bool { // zero out parameters which do not need to match subject.LatestHeight = clienttypes.ZeroHeight() subject.FrozenHeight = clienttypes.ZeroHeight() + subject.TrustingPeriod = time.Duration(0) substitute.LatestHeight = clienttypes.ZeroHeight() substitute.FrozenHeight = clienttypes.ZeroHeight() + substitute.TrustingPeriod = time.Duration(0) subject.ChainId = "" substitute.ChainId = "" + // sets both sets of flags to true as these flags have been DEPRECATED, see ADR-026 for more information + subject.AllowUpdateAfterExpiry = true + substitute.AllowUpdateAfterExpiry = true + subject.AllowUpdateAfterMisbehaviour = true + substitute.AllowUpdateAfterMisbehaviour = true return reflect.DeepEqual(subject, substitute) } diff --git a/modules/light-clients/07-tendermint/proposal_handle_test.go b/modules/light-clients/07-tendermint/proposal_handle_test.go index a14e80bae7b..22703f4b01d 100644 --- a/modules/light-clients/07-tendermint/proposal_handle_test.go +++ b/modules/light-clients/07-tendermint/proposal_handle_test.go @@ -3,16 +3,13 @@ package tendermint_test import ( "time" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) -var ( - frozenHeight = clienttypes.NewHeight(0, 1) -) +var frozenHeight = clienttypes.NewHeight(0, 1) func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() { var ( @@ -31,10 +28,12 @@ func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() { { "non-matching substitute", func() { suite.coordinator.SetupClients(substitutePath) - substituteClientState = suite.chainA.GetClientState(substitutePath.EndpointA.ClientID).(*tendermint.ClientState) - tmClientState, ok := substituteClientState.(*tendermint.ClientState) + substituteClientState, ok := suite.chainA.GetClientState(substitutePath.EndpointA.ClientID).(*tendermint.ClientState) suite.Require().True(ok) + // change trusting period so that test should fail + substituteClientState.TrustingPeriod = time.Hour * 24 * 7 + tmClientState := substituteClientState tmClientState.ChainId = tmClientState.ChainId + "different chain" }, }, @@ -44,15 +43,12 @@ func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() { tc := tc suite.Run(tc.name, func() { - suite.SetupTest() // reset subjectPath := ibctesting.NewPath(suite.chainA, suite.chainB) substitutePath = ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(subjectPath) subjectClientState := suite.chainA.GetClientState(subjectPath.EndpointA.ClientID).(*tendermint.ClientState) - subjectClientState.AllowUpdateAfterMisbehaviour = true - subjectClientState.AllowUpdateAfterExpiry = true // expire subject client suite.coordinator.IncrementTimeBy(subjectClientState.TrustingPeriod) @@ -74,52 +70,40 @@ func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() { // this is to prevent headers from failing when attempting to update later. func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { testCases := []struct { - name string - AllowUpdateAfterExpiry bool - AllowUpdateAfterMisbehaviour bool - FreezeClient bool - ExpireClient bool - expPass bool + name string + FreezeClient bool + ExpireClient bool + expPass bool }{ { - name: "PASS: update checks are deprecated, client is frozen and expired", - AllowUpdateAfterExpiry: false, - AllowUpdateAfterMisbehaviour: false, - FreezeClient: true, - ExpireClient: true, - expPass: true, + name: "PASS: update checks are deprecated, client is frozen and expired", + FreezeClient: true, + ExpireClient: true, + expPass: true, }, { - name: "PASS: update checks are deprecated, not frozen or expired", - AllowUpdateAfterExpiry: false, - AllowUpdateAfterMisbehaviour: true, - FreezeClient: false, - ExpireClient: false, - expPass: true, + name: "PASS: update checks are deprecated, not frozen or expired", + FreezeClient: false, + ExpireClient: false, + expPass: true, }, { - name: "PASS: update checks are deprecated, not frozen or expired", - AllowUpdateAfterExpiry: true, - AllowUpdateAfterMisbehaviour: false, - FreezeClient: false, - ExpireClient: false, - expPass: true, + name: "PASS: update checks are deprecated, not frozen or expired", + FreezeClient: false, + ExpireClient: false, + expPass: true, }, { - name: "PASS: update checks are deprecated, client is frozen", - AllowUpdateAfterExpiry: true, - AllowUpdateAfterMisbehaviour: true, - FreezeClient: true, - ExpireClient: false, - expPass: true, + name: "PASS: update checks are deprecated, client is frozen", + FreezeClient: true, + ExpireClient: false, + expPass: true, }, { - name: "PASS: update checks are deprecated, client is expired", - AllowUpdateAfterExpiry: true, - AllowUpdateAfterMisbehaviour: true, - FreezeClient: false, - ExpireClient: true, - expPass: true, + name: "PASS: update checks are deprecated, client is expired", + FreezeClient: false, + ExpireClient: true, + expPass: true, }, } @@ -130,7 +114,6 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { // a client are each tested to ensure that unexpiry headers cannot update // a client when a unfreezing header is required. suite.Run(tc.name, func() { - // start by testing unexpiring the client suite.SetupTest() // reset @@ -138,8 +121,6 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { subjectPath := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(subjectPath) subjectClientState := suite.chainA.GetClientState(subjectPath.EndpointA.ClientID).(*tendermint.ClientState) - subjectClientState.AllowUpdateAfterExpiry = tc.AllowUpdateAfterExpiry - subjectClientState.AllowUpdateAfterMisbehaviour = tc.AllowUpdateAfterMisbehaviour // apply freezing or expiry as determined by the test case if tc.FreezeClient { @@ -160,8 +141,8 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { substitutePath := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(substitutePath) substituteClientState := suite.chainA.GetClientState(substitutePath.EndpointA.ClientID).(*tendermint.ClientState) - substituteClientState.AllowUpdateAfterExpiry = tc.AllowUpdateAfterExpiry - substituteClientState.AllowUpdateAfterMisbehaviour = tc.AllowUpdateAfterMisbehaviour + // update trusting period of substitute client state + substituteClientState.TrustingPeriod = time.Hour * 24 * 7 suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), substitutePath.EndpointA.ClientID, substituteClientState) // update substitute a few times @@ -212,15 +193,11 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { suite.Require().Equal(expectedIterationKey, subjectIterationKey) suite.Require().Equal(newChainID, updatedClient.(*tendermint.ClientState).ChainId) - - // ensure updated client state is set in store - bz := subjectClientStore.Get(host.ClientStateKey()) - suite.Require().Equal(clienttypes.MustMarshalClientState(suite.chainA.Codec, updatedClient), bz) + suite.Require().Equal(time.Hour*24*7, updatedClient.(*tendermint.ClientState).TrustingPeriod) } else { suite.Require().Error(err) suite.Require().Nil(updatedClient) } - }) } } @@ -261,9 +238,15 @@ func (suite *TendermintTestSuite) TestIsMatchingClientState() { }, true, }, { - "not matching, trusting period is different", func() { + "matching, trusting period is different", func() { subjectClientState.TrustingPeriod = time.Duration(time.Hour * 10) substituteClientState.TrustingPeriod = time.Duration(time.Hour * 1) + }, true, + }, + { + "not matching, trust level is different", func() { + subjectClientState.TrustLevel = tendermint.Fraction{2, 3} + substituteClientState.TrustLevel = tendermint.Fraction{1, 3} }, false, }, } @@ -282,7 +265,6 @@ func (suite *TendermintTestSuite) TestIsMatchingClientState() { tc.malleate() suite.Require().Equal(tc.expPass, tendermint.IsMatchingClientState(*subjectClientState, *substituteClientState)) - }) } } diff --git a/modules/light-clients/07-tendermint/store.go b/modules/light-clients/07-tendermint/store.go index 2be5e94c97e..33957568e2d 100644 --- a/modules/light-clients/07-tendermint/store.go +++ b/modules/light-clients/07-tendermint/store.go @@ -9,9 +9,9 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) /* @@ -87,7 +87,6 @@ func IterateConsensusMetadata(store sdk.KVStore, cb func(key, val []byte) bool) if len(keySplit) != 3 { // ignore all consensus state keys continue - } if keySplit[2] != "processedTime" && keySplit[2] != "processedHeight" { @@ -295,7 +294,7 @@ func PruneAllExpiredConsensusStates( return false } - IterateConsensusStateAscending(clientStore, pruneCb) + err = IterateConsensusStateAscending(clientStore, pruneCb) if err != nil { return err } diff --git a/modules/light-clients/07-tendermint/store_test.go b/modules/light-clients/07-tendermint/store_test.go index f5d57ded2cd..851a39c1945 100644 --- a/modules/light-clients/07-tendermint/store_test.go +++ b/modules/light-clients/07-tendermint/store_test.go @@ -4,13 +4,13 @@ import ( "math" "time" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachine "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TendermintTestSuite) TestGetConsensusState() { diff --git a/modules/light-clients/07-tendermint/tendermint.pb.go b/modules/light-clients/07-tendermint/tendermint.pb.go index 7bac5c42672..46a11f4537f 100644 --- a/modules/light-clients/07-tendermint/tendermint.pb.go +++ b/modules/light-clients/07-tendermint/tendermint.pb.go @@ -6,8 +6,8 @@ package tendermint import ( fmt "fmt" _go "github.com/confio/ics23/go" - types "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - types1 "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" + types "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + types1 "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -323,75 +323,75 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1082 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0x6f, 0xda, 0x7e, 0xdb, 0x64, 0x92, 0x6e, 0xfb, 0x35, 0xa5, 0x9b, 0x96, 0x6e, 0x1c, 0x19, - 0xa9, 0xe4, 0x40, 0x6d, 0x92, 0x22, 0x21, 0x15, 0x2e, 0xb8, 0x0b, 0x6a, 0x57, 0xac, 0x54, 0xb9, - 0xfc, 0x90, 0x90, 0x90, 0x99, 0xd8, 0x93, 0x64, 0xb4, 0xb6, 0xc7, 0xf2, 0x4c, 0x42, 0xcb, 0x5f, - 0x00, 0x27, 0xf6, 0x88, 0x38, 0x71, 0xe0, 0x8f, 0xd9, 0x63, 0x8f, 0x9c, 0x0c, 0x6a, 0xaf, 0x9c, - 0x72, 0xe4, 0x84, 0xe6, 0x87, 0xed, 0x69, 0xb7, 0x4b, 0xb5, 0x5c, 0xa2, 0x79, 0xef, 0x7d, 0xde, - 0xe7, 0x93, 0x99, 0xf7, 0xe6, 0x8d, 0x81, 0x83, 0x87, 0x81, 0x13, 0xe1, 0xf1, 0x84, 0x05, 0x11, - 0x46, 0x09, 0xa3, 0x0e, 0x43, 0x49, 0x88, 0xb2, 0x18, 0x27, 0xcc, 0x99, 0xf5, 0x35, 0xcb, 0x4e, - 0x33, 0xc2, 0x88, 0xd1, 0xc1, 0xc3, 0xc0, 0xd6, 0x13, 0x6c, 0x0d, 0x32, 0xeb, 0xef, 0x74, 0xb5, - 0x7c, 0x76, 0x91, 0x22, 0xea, 0xcc, 0x60, 0x84, 0x43, 0xc8, 0x48, 0x26, 0x19, 0x76, 0x76, 0x5f, - 0x42, 0x88, 0x5f, 0x15, 0x6d, 0xa5, 0x19, 0x21, 0xa3, 0xc2, 0xea, 0x8c, 0x09, 0x19, 0x47, 0xc8, - 0x11, 0xd6, 0x70, 0x3a, 0x72, 0xc2, 0x69, 0x06, 0x19, 0x26, 0x89, 0x8a, 0x9b, 0xb7, 0xe3, 0x0c, - 0xc7, 0x88, 0x32, 0x18, 0xa7, 0x05, 0x80, 0xef, 0x2f, 0x20, 0x19, 0x72, 0xe4, 0xdf, 0xe5, 0x7b, - 0x92, 0x2b, 0x05, 0x78, 0xa7, 0x02, 0x90, 0x38, 0xc6, 0x2c, 0x2e, 0x40, 0xa5, 0xa5, 0x80, 0x9b, - 0x63, 0x32, 0x26, 0x62, 0xe9, 0xf0, 0x95, 0xf4, 0x5a, 0x7f, 0xad, 0x82, 0xe6, 0x91, 0xe0, 0x3b, - 0x63, 0x90, 0x21, 0x63, 0x1b, 0xd4, 0x83, 0x09, 0xc4, 0x89, 0x8f, 0xc3, 0x76, 0xad, 0x5b, 0xeb, - 0x35, 0xbc, 0x55, 0x61, 0x9f, 0x84, 0x06, 0x02, 0x4d, 0x96, 0x4d, 0x29, 0xf3, 0x23, 0x34, 0x43, - 0x51, 0x7b, 0xb1, 0x5b, 0xeb, 0x35, 0x07, 0x3d, 0xfb, 0xdf, 0xcf, 0xd3, 0xfe, 0x34, 0x83, 0x01, - 0xdf, 0xb0, 0xbb,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x7e, 0xbf, 0xee, - 0x2c, 0x7c, 0xfd, 0x44, 0xbb, 0x64, 0x01, 0xa1, 0x31, 0xa1, 0xfc, 0xe3, 0x6b, 0x7f, 0x4c, 0x9c, - 0xd9, 0x81, 0x13, 0x93, 0x70, 0x1a, 0x21, 0x2a, 0x3f, 0xc5, 0xf6, 0x8b, 0x6f, 0xb1, 0xf7, 0x3e, - 0xd8, 0xaf, 0xf6, 0xfa, 0x61, 0xb5, 0x1c, 0xae, 0x88, 0xc9, 0x72, 0xf0, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x3e, 0x30, 0x59, 0x01, 0xbf, 0x09, 0x00, 0x00, + // 1080 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x26, 0xe9, 0xb6, 0x98, 0xd2, 0x4d, 0x4b, 0x37, 0x8e, 0x8c, 0x54, + 0x72, 0xa0, 0x36, 0x49, 0x41, 0x48, 0x85, 0x0b, 0xee, 0x82, 0xda, 0x15, 0x2b, 0x55, 0x2e, 0x3f, + 0x24, 0x24, 0x64, 0x26, 0xf6, 0x24, 0x19, 0xad, 0xed, 0xb1, 0x3c, 0x93, 0xd0, 0xf2, 0x17, 0xc0, + 0x89, 0x3d, 0x22, 0x4e, 0x1c, 0xf8, 0x63, 0xf6, 0xd8, 0x23, 0x27, 0x83, 0xda, 0x2b, 0xa7, 0x1c, + 0x39, 0xa1, 0xf9, 0x61, 0x7b, 0xda, 0xed, 0x52, 0x2d, 0x97, 0x68, 0xde, 0x7b, 0xdf, 0xfb, 0xbe, + 0xcc, 0xbc, 0x37, 0x6f, 0x0c, 0x1c, 0x3c, 0x0c, 0x9c, 0x08, 0x8f, 0x27, 0x2c, 0x88, 0x30, 0x4a, + 0x18, 0x75, 0x18, 0x4a, 0x42, 0x94, 0x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0x08, 0x8d, 0x09, 0xe5, 0x1f, 0x5f, 0x7b, 0x63, 0xe2, 0xcc, 0x3e, + 0x70, 0x62, 0x12, 0x4e, 0x23, 0x44, 0xe5, 0xa7, 0xd8, 0x5e, 0xf1, 0x2d, 0xf6, 0xde, 0x87, 0x7b, + 0xd5, 0x5e, 0x3f, 0xaa, 0x96, 0xc3, 0x7b, 0x62, 0xb2, 0xec, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, + 0xcc, 0x58, 0x27, 0x4c, 0xbf, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/modules/light-clients/07-tendermint/tendermint_test.go b/modules/light-clients/07-tendermint/tendermint_test.go index 843e1f71c57..a3610f8c86a 100644 --- a/modules/light-clients/07-tendermint/tendermint_test.go +++ b/modules/light-clients/07-tendermint/tendermint_test.go @@ -11,11 +11,11 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" - "github.com/cosmos/ibc-go/v3/testing/simapp" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) const ( diff --git a/modules/light-clients/07-tendermint/update.go b/modules/light-clients/07-tendermint/update.go index f1606748b07..39481df125a 100644 --- a/modules/light-clients/07-tendermint/update.go +++ b/modules/light-clients/07-tendermint/update.go @@ -11,10 +11,10 @@ import ( "github.com/tendermint/tendermint/light" tmtypes "github.com/tendermint/tendermint/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // VerifyClientMessage checks if the clientMessage is of type Header or Misbehaviour and verifies the message @@ -186,7 +186,9 @@ func (cs ClientState) pruneOldestConsensusState(ctx sdk.Context, cdc codec.Binar return true } - IterateConsensusStateAscending(clientStore, pruneCb) + if err := IterateConsensusStateAscending(clientStore, pruneCb); err != nil { + panic(err) + } // if pruneHeight is set, delete consensus state and metadata if pruneHeight != nil { @@ -209,7 +211,7 @@ func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCode if existingConsState != nil { // This header has already been submitted and the necessary state is already stored // in client store, thus we can return early without further validation. - if reflect.DeepEqual(existingConsState, tmHeader.ConsensusState()) { + if reflect.DeepEqual(existingConsState, tmHeader.ConsensusState()) { //nolint:gosimple return false } diff --git a/modules/light-clients/07-tendermint/update_test.go b/modules/light-clients/07-tendermint/update_test.go index dec1e384a86..41406e35dd7 100644 --- a/modules/light-clients/07-tendermint/update_test.go +++ b/modules/light-clients/07-tendermint/update_test.go @@ -4,14 +4,15 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" - ibctestingmock "github.com/cosmos/ibc-go/v3/testing/mock" tmtypes "github.com/tendermint/tendermint/types" + + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" + ibctestingmock "github.com/cosmos/ibc-go/v5/testing/mock" ) func (suite *TendermintTestSuite) TestVerifyHeader() { diff --git a/modules/light-clients/07-tendermint/upgrade.go b/modules/light-clients/07-tendermint/upgrade.go index 9d3e25ae5fa..f70996eaa08 100644 --- a/modules/light-clients/07-tendermint/upgrade.go +++ b/modules/light-clients/07-tendermint/upgrade.go @@ -8,9 +8,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // VerifyUpgradeAndUpdateState checks if the upgraded client has been committed by the current client diff --git a/modules/light-clients/07-tendermint/upgrade_test.go b/modules/light-clients/07-tendermint/upgrade_test.go index 601ab53d046..0506e4b6478 100644 --- a/modules/light-clients/07-tendermint/upgrade_test.go +++ b/modules/light-clients/07-tendermint/upgrade_test.go @@ -3,11 +3,11 @@ package tendermint_test import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + tendermint "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func (suite *TendermintTestSuite) TestVerifyUpgrade() { diff --git a/proto/ibc/applications/fee/v1/ack.proto b/proto/ibc/applications/fee/v1/ack.proto index 728c7536c6b..6c3ee318936 100644 --- a/proto/ibc/applications/fee/v1/ack.proto +++ b/proto/ibc/applications/fee/v1/ack.proto @@ -2,14 +2,14 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; // IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware message IncentivizedAcknowledgement { - // the underlying app acknowledgement result bytes - bytes result = 1; + // the underlying app acknowledgement bytes + bytes app_acknowledgement = 1 [(gogoproto.moretags) = "yaml:\"app_acknowledgement\""]; // the relayer address which submits the recv packet message string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""]; // success flag of the base application callback diff --git a/proto/ibc/applications/fee/v1/fee.proto b/proto/ibc/applications/fee/v1/fee.proto index e7a1fa438df..e39d1e7b716 100644 --- a/proto/ibc/applications/fee/v1/fee.proto +++ b/proto/ibc/applications/fee/v1/fee.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/fee/v1/genesis.proto b/proto/ibc/applications/fee/v1/genesis.proto index cae132239d6..463b35cf485 100644 --- a/proto/ibc/applications/fee/v1/genesis.proto +++ b/proto/ibc/applications/fee/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; @@ -16,11 +16,14 @@ message GenesisState { // list of fee enabled channels repeated FeeEnabledChannel fee_enabled_channels = 2 [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; - // list of registered relayer addresses - repeated RegisteredRelayerAddress registered_relayers = 3 - [(gogoproto.moretags) = "yaml:\"registered_relayers\"", (gogoproto.nullable) = false]; + // list of registered payees + repeated RegisteredPayee registered_payees = 3 + [(gogoproto.moretags) = "yaml:\"registered_payees\"", (gogoproto.nullable) = false]; + // list of registered counterparty payees + repeated RegisteredCounterpartyPayee registered_counterparty_payees = 4 + [(gogoproto.moretags) = "yaml:\"registered_counterparty_payees\"", (gogoproto.nullable) = false]; // list of forward relayer addresses - repeated ForwardRelayerAddress forward_relayers = 4 + repeated ForwardRelayerAddress forward_relayers = 5 [(gogoproto.moretags) = "yaml:\"forward_relayers\"", (gogoproto.nullable) = false]; } @@ -32,14 +35,25 @@ message FeeEnabledChannel { string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; } -// RegisteredRelayerAddress contains the address and counterparty address for a specific relayer (for distributing fees) -message RegisteredRelayerAddress { +// RegisteredPayee contains the relayer address and payee address for a specific channel +message RegisteredPayee { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; // the relayer address - string address = 1; - // the counterparty relayer address - string counterparty_address = 2 [(gogoproto.moretags) = "yaml:\"counterparty_address\""]; + string relayer = 2; + // the payee address + string payee = 3; +} + +// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +// for recv fee distribution) +message RegisteredCounterpartyPayee { // unique channel identifier - string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 2; + // the counterparty payee address + string counterparty_payee = 3 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; } // ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements diff --git a/proto/ibc/applications/fee/v1/metadata.proto b/proto/ibc/applications/fee/v1/metadata.proto index 0afb3e09b2e..ba47374fd4b 100644 --- a/proto/ibc/applications/fee/v1/metadata.proto +++ b/proto/ibc/applications/fee/v1/metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index acab12f5161..8c3a9fdc05b 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -22,37 +22,42 @@ service Query { // IncentivizedPacket returns all packet fees for a packet given its identifier rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { option (google.api.http).get = - "/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/" - "{packet_id.sequence}"; + "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/" + "{packet_id.sequence}/incentivized_packet"; } // Gets all incentivized packets for a specific channel rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest) returns (QueryIncentivizedPacketsForChannelResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets/port/{port_id}/channel/{channel_id}"; + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets"; } // TotalRecvFees returns the total receive fees for a packet given its identifier rpc TotalRecvFees(QueryTotalRecvFeesRequest) returns (QueryTotalRecvFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/total_recv_fees/port/{packet_id.port_id}/channel/" - "{packet_id.channel_id}/sequence/{packet_id.sequence}"; + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_recv_fees"; } // TotalAckFees returns the total acknowledgement fees for a packet given its identifier rpc TotalAckFees(QueryTotalAckFeesRequest) returns (QueryTotalAckFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/total_ack_fees/port/{packet_id.port_id}/channel/" - "{packet_id.channel_id}/sequence/{packet_id.sequence}"; + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_ack_fees"; } // TotalTimeoutFees returns the total timeout fees for a packet given its identifier rpc TotalTimeoutFees(QueryTotalTimeoutFeesRequest) returns (QueryTotalTimeoutFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/total_timeout_fees/port/{packet_id.port_id}/channel/" - "{packet_id.channel_id}/sequence/{packet_id.sequence}"; + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_timeout_fees"; } - // CounterpartyAddress returns the registered counterparty address for forward relaying - rpc CounterpartyAddress(QueryCounterpartyAddressRequest) returns (QueryCounterpartyAddressResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}"; + // Payee returns the registered payee address for a specific channel given the relayer address + rpc Payee(QueryPayeeRequest) returns (QueryPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee"; + } + + // CounterpartyPayee returns the registered counterparty payee for forward relaying + rpc CounterpartyPayee(QueryCounterpartyPayeeRequest) returns (QueryCounterpartyPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee"; } // FeeEnabledChannels returns a list of all fee enabled channels @@ -62,7 +67,7 @@ service Query { // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}"; + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled"; } } @@ -159,18 +164,32 @@ message QueryTotalTimeoutFeesResponse { ]; } -// QueryCounterpartyAddressRequest defines the request type for the CounterpartyAddress rpc -message QueryCounterpartyAddressRequest { +// QueryPayeeRequest defines the request type for the Payee rpc +message QueryPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the distribution address is registered + string relayer = 2; +} + +// QueryPayeeResponse defines the response type for the Payee rpc +message QueryPayeeResponse { + // the payee address to which packet fees are paid out + string payee_address = 1 [(gogoproto.moretags) = "yaml:\"payee_address\""]; +} + +// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeRequest { // unique channel identifier string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; // the relayer address to which the counterparty is registered - string relayer_address = 2 [(gogoproto.moretags) = "yaml:\"relayer_address\""]; + string relayer = 2; } -// QueryCounterpartyAddressResponse defines the response type for the CounterpartyAddress rpc -message QueryCounterpartyAddressResponse { - // the counterparty address used to compensate forward relaying - string counterparty_address = 1 [(gogoproto.moretags) = "yaml:\"counterparty_address\""]; +// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeResponse { + // the counterparty payee address used to compensate forward relaying + string counterparty_payee = 1 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; } // QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index 7a0044cd363..f2d69d2311a 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.fee.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"; import "gogoproto/gogo.proto"; import "ibc/applications/fee/v1/fee.proto"; @@ -10,12 +10,19 @@ import "ibc/core/channel/v1/channel.proto"; // Msg defines the ICS29 Msg service. service Msg { - // RegisterCounterpartyAddress defines a rpc handler method for MsgRegisterCounterpartyAddress - // RegisterCounterpartyAddress is called by the relayer on each channelEnd and allows them to specify their - // counterparty address before relaying. This ensures they will be properly compensated for forward relaying since - // destination chain must send back relayer's source address (counterparty address) in acknowledgement. This function - // may be called more than once by a relayer, in which case, latest counterparty address is always used. - rpc RegisterCounterpartyAddress(MsgRegisterCounterpartyAddress) returns (MsgRegisterCounterpartyAddressResponse); + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + // the source chain from which packets originate as this is where fee distribution takes place. This function may be + // called more than once by a relayer, in which case, the latest payee is always used. + rpc RegisterPayee(MsgRegisterPayee) returns (MsgRegisterPayeeResponse); + + // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + // payee address before relaying. This ensures they will be properly compensated for forward relaying since + // the destination chain must include the registered counterparty payee address in the acknowledgement. This function + // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + rpc RegisterCounterpartyPayee(MsgRegisterCounterpartyPayee) returns (MsgRegisterCounterpartyPayeeResponse); // PayPacketFee defines a rpc handler method for MsgPayPacketFee // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to @@ -30,21 +37,41 @@ service Msg { rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); } -// MsgRegisterCounterpartyAddress defines the request type for the RegisterCounterpartyAddress rpc -message MsgRegisterCounterpartyAddress { +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +message MsgRegisterPayee { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; // the relayer address - string address = 1; - // the counterparty relayer address - string counterparty_address = 2 [(gogoproto.moretags) = "yaml:\"counterparty_address\""]; + string relayer = 3; + // the payee address + string payee = 4; +} + +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +message MsgRegisterPayeeResponse {} + +// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; // unique channel identifier - string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 3; + // the counterparty payee address + string counterparty_payee = 4 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; } -// MsgRegisterCounterpartyAddressResponse defines the response type for the RegisterCounterpartyAddress rpc -message MsgRegisterCounterpartyAddressResponse {} +// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayeeResponse {} // MsgPayPacketFee defines the request type for the PayPacketFee rpc // This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be diff --git a/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto b/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto index 291f3e4fd90..99f007e0873 100644 --- a/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto +++ b/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/interchain_accounts/controller/v1/query.proto b/proto/ibc/applications/interchain_accounts/controller/v1/query.proto index d3960e9d14c..5b0d0b407c5 100644 --- a/proto/ibc/applications/interchain_accounts/controller/v1/query.proto +++ b/proto/ibc/applications/interchain_accounts/controller/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"; import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; import "google/api/annotations.proto"; diff --git a/proto/ibc/applications/interchain_accounts/host/v1/host.proto b/proto/ibc/applications/interchain_accounts/host/v1/host.proto index a9d951cef82..3e0316680e6 100644 --- a/proto/ibc/applications/interchain_accounts/host/v1/host.proto +++ b/proto/ibc/applications/interchain_accounts/host/v1/host.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/interchain_accounts/host/v1/query.proto b/proto/ibc/applications/interchain_accounts/host/v1/query.proto index 5512d7b4fa5..8e3c22cf63a 100644 --- a/proto/ibc/applications/interchain_accounts/host/v1/query.proto +++ b/proto/ibc/applications/interchain_accounts/host/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"; import "google/api/annotations.proto"; import "ibc/applications/interchain_accounts/host/v1/host.proto"; diff --git a/proto/ibc/applications/interchain_accounts/v1/account.proto b/proto/ibc/applications/interchain_accounts/v1/account.proto index 75d2fbd89ed..ae98b9cfac9 100644 --- a/proto/ibc/applications/interchain_accounts/v1/account.proto +++ b/proto/ibc/applications/interchain_accounts/v1/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/interchain_accounts/v1/genesis.proto b/proto/ibc/applications/interchain_accounts/v1/genesis.proto index 3902f890708..0687003195f 100644 --- a/proto/ibc/applications/interchain_accounts/v1/genesis.proto +++ b/proto/ibc/applications/interchain_accounts/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; import "gogoproto/gogo.proto"; import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; diff --git a/proto/ibc/applications/interchain_accounts/v1/metadata.proto b/proto/ibc/applications/interchain_accounts/v1/metadata.proto index 3eab1d04a69..fc8722289a6 100644 --- a/proto/ibc/applications/interchain_accounts/v1/metadata.proto +++ b/proto/ibc/applications/interchain_accounts/v1/metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/interchain_accounts/v1/packet.proto b/proto/ibc/applications/interchain_accounts/v1/packet.proto index 51ff4279aeb..f66130f24b1 100644 --- a/proto/ibc/applications/interchain_accounts/v1/packet.proto +++ b/proto/ibc/applications/interchain_accounts/v1/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/transfer/v1/genesis.proto b/proto/ibc/applications/transfer/v1/genesis.proto index 0b5c0e0d122..e1b653bb782 100644 --- a/proto/ibc/applications/transfer/v1/genesis.proto +++ b/proto/ibc/applications/transfer/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; import "ibc/applications/transfer/v1/transfer.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto index 2ed28049fd7..5b877832440 100644 --- a/proto/ibc/applications/transfer/v1/query.proto +++ b/proto/ibc/applications/transfer/v1/query.proto @@ -7,7 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/transfer/v1/transfer.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; // Query provides defines the gRPC querier service. service Query { @@ -30,12 +30,17 @@ service Query { rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) { option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}"; } + + // EscrowAddress returns the escrow address for a particular port and channel id. + rpc EscrowAddress(QueryEscrowAddressRequest) returns (QueryEscrowAddressResponse) { + option (google.api.http).get = "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address"; + } } // QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC // method message QueryDenomTraceRequest { - // hash (in hex format) of the denomination trace information. + // hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. string hash = 1; } @@ -84,3 +89,17 @@ message QueryDenomHashResponse { // hash (in hex format) of the denomination trace information. string hash = 1; } + +// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. +message QueryEscrowAddressRequest { + // unique port identifier + string port_id = 1; + // unique channel identifier + string channel_id = 2; +} + +// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. +message QueryEscrowAddressResponse { + // the escrow account address + string escrow_address = 1; +} \ No newline at end of file diff --git a/proto/ibc/applications/transfer/v1/transfer.proto b/proto/ibc/applications/transfer/v1/transfer.proto index 7a99485c589..4c51c2b9e1c 100644 --- a/proto/ibc/applications/transfer/v1/transfer.proto +++ b/proto/ibc/applications/transfer/v1/transfer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index 8f1392b0cf3..3747f9e5fa1 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/ibc/applications/transfer/v2/packet.proto b/proto/ibc/applications/transfer/v2/packet.proto index 850320df340..3860046525c 100644 --- a/proto/ibc/applications/transfer/v2/packet.proto +++ b/proto/ibc/applications/transfer/v2/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v2; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"; // FungibleTokenPacketData defines a struct for the packet payload // See FungibleTokenPacketData spec: diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 177f2c85fd1..27547d6291e 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/proto/ibc/core/channel/v1/genesis.proto b/proto/ibc/core/channel/v1/genesis.proto index d95c891b6c8..cf106a42504 100644 --- a/proto/ibc/core/channel/v1/genesis.proto +++ b/proto/ibc/core/channel/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index ceb13d00091..2165df8c7ea 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index d34b00e9124..4f10ee747c5 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; @@ -79,9 +79,8 @@ message MsgChannelOpenTry { option (gogoproto.goproto_getters) = false; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need - // the channel identifier of the previous channel in state INIT - string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; + // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + string previous_channel_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_channel_id\""]; // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. Channel channel = 3 [(gogoproto.nullable) = false]; string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 657d99ed204..0c42ce7b019 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -2,11 +2,12 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos/upgrade/v1beta1/upgrade.proto"; +import "cosmos_proto/cosmos.proto"; // IdentifiedClientState defines a client state with an additional client // identifier field. @@ -41,7 +42,8 @@ message ClientConsensusStates { // handler may fail if the subject and the substitute do not match in client and // chain parameters (with exception to latest height, frozen height, and chain-id). message ClientUpdateProposal { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; // the title of the update proposal string title = 1; // the description of the proposal @@ -56,9 +58,10 @@ message ClientUpdateProposal { // UpgradeProposal is a gov Content type for initiating an IBC breaking // upgrade. message UpgradeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; diff --git a/proto/ibc/core/client/v1/genesis.proto b/proto/ibc/core/client/v1/genesis.proto index 0ca29d224b0..da92918df65 100644 --- a/proto/ibc/core/client/v1/genesis.proto +++ b/proto/ibc/core/client/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; import "ibc/core/client/v1/client.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto index 91a906fe54b..ceb0a6f9742 100644 --- a/proto/ibc/core/client/v1/query.proto +++ b/proto/ibc/core/client/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; @@ -36,6 +36,11 @@ service Query { option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; } + // ConsensusStateHeights queries the height of every consensus states associated with a given client. + rpc ConsensusStateHeights(QueryConsensusStateHeightsRequest) returns (QueryConsensusStateHeightsResponse) { + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}/heights"; + } + // Status queries the status of an IBC client. rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; @@ -137,6 +142,24 @@ message QueryConsensusStatesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } +// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +// RPC method. +message QueryConsensusStateHeightsRequest { + // client identifier + string client_id = 1; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryConsensusStateHeightsResponse is the response type for the +// Query/ConsensusStateHeights RPC method +message QueryConsensusStateHeightsResponse { + // consensus state heights + repeated Height consensus_state_heights = 1 [(gogoproto.nullable) = false]; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QueryClientStatusRequest is the request type for the Query/ClientStatus RPC // method message QueryClientStatusRequest { diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto index 386bf9a51ee..27f81917e4c 100644 --- a/proto/ibc/core/client/v1/tx.proto +++ b/proto/ibc/core/client/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/proto/ibc/core/commitment/v1/commitment.proto b/proto/ibc/core/commitment/v1/commitment.proto index b0afed2273b..5667f20de24 100644 --- a/proto/ibc/core/commitment/v1/commitment.proto +++ b/proto/ibc/core/commitment/v1/commitment.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.commitment.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types"; import "gogoproto/gogo.proto"; import "proofs.proto"; diff --git a/proto/ibc/core/connection/v1/connection.proto b/proto/ibc/core/connection/v1/connection.proto index 7fd2a6909ad..9defdcb8b86 100644 --- a/proto/ibc/core/connection/v1/connection.proto +++ b/proto/ibc/core/connection/v1/connection.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/commitment/v1/commitment.proto"; diff --git a/proto/ibc/core/connection/v1/genesis.proto b/proto/ibc/core/connection/v1/genesis.proto index 1a53422c94a..b0860737a75 100644 --- a/proto/ibc/core/connection/v1/genesis.proto +++ b/proto/ibc/core/connection/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/connection/v1/connection.proto"; diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto index f28578f5fc5..30bae901aef 100644 --- a/proto/ibc/core/connection/v1/query.proto +++ b/proto/ibc/core/connection/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index e7e09c84cff..b681bce6ec3 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -49,14 +49,13 @@ message MsgConnectionOpenTry { option (gogoproto.goproto_getters) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need - // the connection identifier of the previous connection in state INIT - string previous_connection_id = 2 [(gogoproto.moretags) = "yaml:\"previous_connection_id\""]; - google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; - ibc.core.client.v1.Height proof_height = 7 + // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + string previous_connection_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_connection_id\""]; + google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; + Counterparty counterparty = 4 [(gogoproto.nullable) = false]; + uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; + repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; + ibc.core.client.v1.Height proof_height = 7 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` diff --git a/proto/ibc/core/types/v1/genesis.proto b/proto/ibc/core/types/v1/genesis.proto index fbddbf3035f..09deaf6184b 100644 --- a/proto/ibc/core/types/v1/genesis.proto +++ b/proto/ibc/core/types/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.types.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/types"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/genesis.proto"; diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto index c279f5e728e..8be12dab8b7 100644 --- a/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/legacy/v100"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/proto/ibc/lightclients/solomachine/v2/solomachine.proto index 5b828483bfc..5cc5ba9c551 100644 --- a/proto/ibc/lightclients/solomachine/v2/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v2/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v2; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/migrations/v6"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/core/02-client/migrations/v6"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; @@ -186,4 +186,4 @@ message PacketReceiptAbsenceData { message NextSequenceRecvData { bytes path = 1; uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} \ No newline at end of file +} diff --git a/proto/ibc/lightclients/solomachine/v3/solomachine.proto b/proto/ibc/lightclients/solomachine/v3/solomachine.proto index 63ce566782d..5475a16bd93 100644 --- a/proto/ibc/lightclients/solomachine/v3/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v3/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v3; -option go_package = "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine;solomachine"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine;solomachine"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index 89ab3595684..27c5c909460 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.tendermint.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint;tendermint"; +option go_package = "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint;tendermint"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; diff --git a/testing/README.md b/testing/README.md index ad02a80e640..a488ffa42f1 100644 --- a/testing/README.md +++ b/testing/README.md @@ -255,8 +255,8 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/ibc-go/v3/modules/apps/transfer/simapp" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/cosmos/ibc-go/v5/modules/apps/transfer/simapp" + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func SetupTransferTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage) { diff --git a/testing/app.go b/testing/app.go index 1cde8614b6d..7cd218e010a 100644 --- a/testing/app.go +++ b/testing/app.go @@ -5,11 +5,13 @@ import ( "testing" "time" + "cosmossdk.io/math" "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" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" 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" @@ -23,11 +25,11 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) -var DefaultTestingAppInit func() (TestingApp, map[string]json.RawMessage) = SetupTestingApp +var DefaultTestingAppInit = SetupTestingApp type TestingApp interface { abci.Application @@ -43,7 +45,7 @@ type TestingApp interface { AppCodec() codec.Codec // Implemented by BaseApp - LastCommitID() sdk.CommitID + LastCommitID() storetypes.CommitID LastBlockHeight() int64 } @@ -58,7 +60,7 @@ func SetupTestingApp() (TestingApp, map[string]json.RawMessage) { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, powerReduction sdk.Int, balances ...banktypes.Balance) TestingApp { +func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, powerReduction math.Int, balances ...banktypes.Balance) TestingApp { app, genesisState := DefaultTestingAppInit() // set genesis accounts diff --git a/testing/chain.go b/testing/chain.go index 9b6dbf40590..07769553306 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -25,14 +25,14 @@ import ( tmtypes "github.com/tendermint/tendermint/types" tmversion "github.com/tendermint/tendermint/version" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - "github.com/cosmos/ibc-go/v3/modules/core/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - "github.com/cosmos/ibc-go/v3/testing/mock" - "github.com/cosmos/ibc-go/v3/testing/simapp" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + "github.com/cosmos/ibc-go/v5/modules/core/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) var MaxAccounts = 10 @@ -334,7 +334,10 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { chain.NextBlock() // increment sequence for successful transaction execution - chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) + err = chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) + if err != nil { + return nil, err + } chain.Coordinator.IncrementTime() @@ -481,8 +484,8 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, // MakeCommit expects a signer array in the same order as the validator array. // Thus we iterate over the ordered validator set and construct a signer array // from the signer map in the same order. - var signerArr []tmtypes.PrivValidator - for _, v := range tmValSet.Validators { + var signerArr []tmtypes.PrivValidator //nolint:prealloc // using prealloc here would be needlessly complex + for _, v := range tmValSet.Validators { //nolint:staticcheck // need to check for nil validator set signerArr = append(signerArr, signers[v.Address.String()]) } @@ -494,7 +497,7 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, Commit: commit.ToProto(), } - if tmValSet != nil { + if tmValSet != nil { //nolint:staticcheck valSet, err = tmValSet.ToProto() require.NoError(chain.T, err) } diff --git a/testing/chain_test.go b/testing/chain_test.go index 64ddc6c751e..6d2d32684fb 100644 --- a/testing/chain_test.go +++ b/testing/chain_test.go @@ -3,11 +3,11 @@ package ibctesting_test import ( "testing" - "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctesting "github.com/cosmos/ibc-go/v3/testing" + "github.com/stretchr/testify/require" + + ibctesting "github.com/cosmos/ibc-go/v5/testing" ) func TestChangeValSet(t *testing.T) { diff --git a/testing/config.go b/testing/config.go index 673e374b5ba..15c3cc6fde1 100644 --- a/testing/config.go +++ b/testing/config.go @@ -3,11 +3,11 @@ package ibctesting import ( "time" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - "github.com/cosmos/ibc-go/v3/testing/mock" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/testing/mock" ) type ClientConfig interface { diff --git a/testing/coordinator.go b/testing/coordinator.go index 42743621c60..6374a17b170 100644 --- a/testing/coordinator.go +++ b/testing/coordinator.go @@ -183,7 +183,6 @@ func GetChainID(index int) string { // CONTRACT: the passed in list of indexes must not contain duplicates func (coord *Coordinator) CommitBlock(chains ...*TestChain) { for _, chain := range chains { - chain.NextBlock() } coord.IncrementTime() @@ -197,42 +196,3 @@ func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) { coord.IncrementTime() } } - -// ConnOpenInitOnBothChains initializes a connection on both endpoints with the state INIT -// using the OpenInit handshake call. -func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error { - if err := path.EndpointA.ConnOpenInit(); err != nil { - return err - } - - if err := path.EndpointB.ConnOpenInit(); err != nil { - return err - } - - if err := path.EndpointA.UpdateClient(); err != nil { - return err - } - - return path.EndpointB.UpdateClient() -} - -// ChanOpenInitOnBothChains initializes a channel on the source chain and counterparty chain -// with the state INIT using the OpenInit handshake call. -func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error { - // NOTE: only creation of a capability for a transfer or mock port is supported - // Other applications must bind to the port in InitGenesis or modify this code. - - if err := path.EndpointA.ChanOpenInit(); err != nil { - return err - } - - if err := path.EndpointB.ChanOpenInit(); err != nil { - return err - } - - if err := path.EndpointA.UpdateClient(); err != nil { - return err - } - - return path.EndpointB.UpdateClient() -} diff --git a/testing/endpoint.go b/testing/endpoint.go index d332ae97a6e..a219f71f219 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -7,13 +7,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" ) // Endpoint is a which represents a channel endpoint and its associated @@ -235,8 +235,7 @@ func (endpoint *Endpoint) ConnOpenTry() error { counterpartyClient, proofClient, proofConsensus, consensusHeight, proofInit, proofHeight := endpoint.QueryConnectionHandshakeProof() msg := connectiontypes.NewMsgConnectionOpenTry( - "", endpoint.ClientID, // does not support handshake continuation - endpoint.Counterparty.ConnectionID, endpoint.Counterparty.ClientID, + endpoint.ClientID, endpoint.Counterparty.ConnectionID, endpoint.Counterparty.ClientID, counterpartyClient, endpoint.Counterparty.Chain.GetPrefix(), []*connectiontypes.Version{ConnectionVersion}, endpoint.ConnectionConfig.DelayPeriod, proofInit, proofClient, proofConsensus, proofHeight, consensusHeight, @@ -333,6 +332,10 @@ func (endpoint *Endpoint) ChanOpenInit() error { endpoint.ChannelID, err = ParseChannelIDFromEvents(res.GetEvents()) require.NoError(endpoint.Chain.T, err) + // update version to selected app version + // NOTE: this update must be performed after SendMsgs() + endpoint.ChannelConfig.Version = endpoint.GetChannel().Version + return nil } @@ -345,7 +348,7 @@ func (endpoint *Endpoint) ChanOpenTry() error { proof, height := endpoint.Counterparty.Chain.QueryProof(channelKey) msg := channeltypes.NewMsgChannelOpenTry( - endpoint.ChannelConfig.PortID, "", // does not support handshake continuation + endpoint.ChannelConfig.PortID, endpoint.ChannelConfig.Version, endpoint.ChannelConfig.Order, []string{endpoint.ConnectionID}, endpoint.Counterparty.ChannelConfig.PortID, endpoint.Counterparty.ChannelID, endpoint.Counterparty.ChannelConfig.Version, proof, height, diff --git a/testing/events.go b/testing/events.go index 7828b42619f..aaa4fd79589 100644 --- a/testing/events.go +++ b/testing/events.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // ParseClientIDFromEvents parses events emitted from a MsgCreateClient and returns the @@ -64,9 +64,8 @@ func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { if ev.Type == channeltypes.EventTypeSendPacket { packet := channeltypes.Packet{} for _, attr := range ev.Attributes { - switch string(attr.Key) { - case channeltypes.AttributeKeyData: + case channeltypes.AttributeKeyData: //nolint:staticcheck // DEPRECATED packet.Data = attr.Value case channeltypes.AttributeKeySequence: @@ -122,7 +121,7 @@ func ParseAckFromEvents(events sdk.Events) ([]byte, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeWriteAck { for _, attr := range ev.Attributes { - if string(attr.Key) == channeltypes.AttributeKeyAck { + if string(attr.Key) == channeltypes.AttributeKeyAck { //nolint:staticcheck // DEPRECATED return attr.Value, nil } } diff --git a/testing/mock/ack.go b/testing/mock/ack.go index c25176a02da..b41b1a5cbad 100644 --- a/testing/mock/ack.go +++ b/testing/mock/ack.go @@ -1,23 +1,23 @@ package mock -// MockEmptyAcknowledgement implements the exported.Acknowledgement interface and always returns an empty byte string as Response -type MockEmptyAcknowledgement struct { +// EmptyAcknowledgement implements the exported.Acknowledgement interface and always returns an empty byte string as Response +type EmptyAcknowledgement struct { Response []byte } -// NewMockEmptyAcknowledgement returns a new instance of MockEmptyAcknowledgement -func NewMockEmptyAcknowledgement() MockEmptyAcknowledgement { - return MockEmptyAcknowledgement{ +// NewMockEmptyAcknowledgement returns a new instance of EmptyAcknowledgement +func NewEmptyAcknowledgement() EmptyAcknowledgement { + return EmptyAcknowledgement{ Response: []byte{}, } } // Success implements the Acknowledgement interface -func (ack MockEmptyAcknowledgement) Success() bool { +func (ack EmptyAcknowledgement) Success() bool { return true } // Acknowledgement implements the Acknowledgement interface -func (ack MockEmptyAcknowledgement) Acknowledgement() []byte { +func (ack EmptyAcknowledgement) Acknowledgement() []byte { return []byte{} } diff --git a/testing/mock/ibc_app.go b/testing/mock/ibc_app.go index 77eb17b8c6f..13ba72b97d3 100644 --- a/testing/mock/ibc_app.go +++ b/testing/mock/ibc_app.go @@ -5,12 +5,12 @@ import ( capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) -// MockIBCApp contains IBC application module callbacks as defined in 05-port. -type MockIBCApp struct { +// IBCApp contains IBC application module callbacks as defined in 05-port. +type IBCApp struct { PortID string ScopedKeeper capabilitykeeper.ScopedKeeper @@ -23,7 +23,7 @@ type MockIBCApp struct { channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, - ) error + ) (string, error) OnChanOpenTry func( ctx sdk.Context, @@ -87,9 +87,9 @@ type MockIBCApp struct { ) error } -// NewMockIBCApp returns a MockIBCApp. An empty PortID indicates the mock app doesn't bind/claim ports. -func NewMockIBCApp(portID string, scopedKeeper capabilitykeeper.ScopedKeeper) *MockIBCApp { - return &MockIBCApp{ +// NewIBCApp returns a IBCApp. An empty PortID indicates the mock app doesn't bind/claim ports. +func NewIBCApp(portID string, scopedKeeper capabilitykeeper.ScopedKeeper) *IBCApp { + return &IBCApp{ PortID: portID, ScopedKeeper: scopedKeeper, } diff --git a/testing/mock/ibc_module.go b/testing/mock/ibc_module.go index e58f6ae7156..7687be61a09 100644 --- a/testing/mock/ibc_module.go +++ b/testing/mock/ibc_module.go @@ -4,23 +4,24 @@ import ( "bytes" "fmt" "strconv" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" ) // IBCModule implements the ICS26 callbacks for testing/mock. type IBCModule struct { appModule *AppModule - IBCApp *MockIBCApp // base application of an IBC middleware stack + IBCApp *IBCApp // base application of an IBC middleware stack } // NewIBCModule creates a new IBCModule given the underlying mock IBC application and scopedKeeper. -func NewIBCModule(appModule *AppModule, app *MockIBCApp) IBCModule { +func NewIBCModule(appModule *AppModule, app *IBCApp) IBCModule { appModule.ibcApps = append(appModule.ibcApps, app) return IBCModule{ appModule: appModule, @@ -32,18 +33,21 @@ func NewIBCModule(appModule *AppModule, app *MockIBCApp) IBCModule { func (im IBCModule) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, -) error { +) (string, error) { + if strings.TrimSpace(version) == "" { + version = Version + } + if im.IBCApp.OnChanOpenInit != nil { return im.IBCApp.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, version) - } // Claim channel capability passed back by IBC module if err := im.IBCApp.ScopedKeeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return err + return "", err } - return nil + return version, nil } // OnChanOpenTry implements the IBCModule interface. diff --git a/testing/mock/ibc_module_test.go b/testing/mock/ibc_module_test.go index d3efe9f142c..9afc4ec7c2b 100644 --- a/testing/mock/ibc_module_test.go +++ b/testing/mock/ibc_module_test.go @@ -2,12 +2,12 @@ package mock_test import ( "testing" - + "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v3/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v5/testing/mock" ) func TestCreateCapabilityName(t *testing.T) { diff --git a/testing/mock/mock.go b/testing/mock/mock.go index b621a05e9f7..b46893811fd 100644 --- a/testing/mock/mock.go +++ b/testing/mock/mock.go @@ -2,6 +2,7 @@ package mock import ( "encoding/json" + "fmt" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -9,14 +10,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" ) const ( @@ -28,7 +28,7 @@ const ( var ( MockAcknowledgement = channeltypes.NewResultAcknowledgement([]byte("mock acknowledgement")) - MockFailAcknowledgement = channeltypes.NewErrorAcknowledgement("mock failed acknowledgement") + MockFailAcknowledgement = channeltypes.NewErrorAcknowledgement(fmt.Errorf("mock failed acknowledgement")) MockPacketData = []byte("mock packet data") MockFailPacketData = []byte("mock failed packet data") MockAsyncPacketData = []byte("mock async packet data") @@ -70,9 +70,6 @@ func (AppModuleBasic) ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, return nil } -// RegisterRESTRoutes implements AppModuleBasic interface. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes implements AppModuleBasic interface. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} @@ -89,7 +86,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { // AppModule represents the AppModule for the mock module. type AppModule struct { AppModuleBasic - ibcApps []*MockIBCApp + ibcApps []*IBCApp portKeeper PortKeeper } @@ -127,7 +124,10 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. if ibcApp.PortID != "" && !am.portKeeper.IsBound(ctx, ibcApp.PortID) { // bind mock portID cap := am.portKeeper.BindPort(ctx, ibcApp.PortID) - ibcApp.ScopedKeeper.ClaimCapability(ctx, cap, host.PortPath(ibcApp.PortID)) + err := ibcApp.ScopedKeeper.ClaimCapability(ctx, cap, host.PortPath(ibcApp.PortID)) + if err != nil { + panic(err) + } } } diff --git a/testing/mock/privval_test.go b/testing/mock/privval_test.go index 452fa667824..c4ce5a8f77f 100644 --- a/testing/mock/privval_test.go +++ b/testing/mock/privval_test.go @@ -7,7 +7,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/ibc-go/v3/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/mock" ) const chainID = "testChain" diff --git a/testing/path.go b/testing/path.go index 731d3cd5e1b..bb581b8f62f 100644 --- a/testing/path.go +++ b/testing/path.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" ) // Path contains two endpoints representing two chains connected over IBC diff --git a/testing/simapp/ante_handler.go b/testing/simapp/ante_handler.go index 04ffad13e2a..ff39c3fd2d6 100644 --- a/testing/simapp/ante_handler.go +++ b/testing/simapp/ante_handler.go @@ -5,8 +5,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante" - "github.com/cosmos/ibc-go/v3/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v5/modules/core/ante" + "github.com/cosmos/ibc-go/v5/modules/core/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC keeper. @@ -25,30 +25,23 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler") } if options.SignModeHandler == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") - } - - var sigGasConsumer = options.SigGasConsumer - if sigGasConsumer == nil { - sigGasConsumer = ante.DefaultSigVerificationGasConsumer + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for AnteHandler") } anteDecorators := []sdk.AnteDecorator{ - ante.NewSetUpContextDecorator(), - ante.NewRejectExtensionOptionsDecorator(), - ante.NewMempoolFeeDecorator(), + ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), - // SetPubKeyDecorator must be called before all signature verification decorators - ante.NewSetPubKeyDecorator(options.AccountKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(options.AccountKeeper), - ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), + ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewAnteDecorator(options.IBCKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 738e29cdd59..1fb0079871b 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -7,43 +7,37 @@ import ( "os" "path/filepath" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // this is used for serving docs "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" - authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" 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" + authz "github.com/cosmos/cosmos-sdk/x/authz" + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - simappparams "github.com/cosmos/ibc-go/v3/testing/simapp/params" "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" @@ -61,8 +55,11 @@ import ( "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" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -81,35 +78,37 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts" - icacontroller "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller" - icacontrollerkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types" - icahost "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" - ibcfee "github.com/cosmos/ibc-go/v3/modules/apps/29-fee" - ibcfeekeeper "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/keeper" - ibcfeetypes "github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v3/modules/core" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v3/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" - ibcmock "github.com/cosmos/ibc-go/v3/testing/mock" - - authz "github.com/cosmos/cosmos-sdk/x/authz" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" + "github.com/gorilla/mux" + "github.com/rakyll/statik/fs" + "github.com/spf13/cast" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" + dbm "github.com/tendermint/tm-db" - // unnamed import of statik for swagger UI support - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" + ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ibcfee "github.com/cosmos/ibc-go/v5/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" + transfer "github.com/cosmos/ibc-go/v5/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v5/modules/core" + ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + ibcmock "github.com/cosmos/ibc-go/v5/testing/mock" + simappparams "github.com/cosmos/ibc-go/v5/testing/simapp/params" ) const appName = "SimApp" @@ -135,8 +134,14 @@ var ( mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( - paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + distrclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + ibcclientclient.UpdateClientProposalHandler, + ibcclientclient.UpgradeProposalHandler, + }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -164,6 +169,7 @@ var ( ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, ibcfeetypes.ModuleName: nil, icatypes.ModuleName: nil, + ibcmock.ModuleName: nil, } ) @@ -184,9 +190,9 @@ type SimApp struct { invCheckPeriod uint // keys to access the substores - keys map[string]*sdk.KVStoreKey - tkeys map[string]*sdk.TransientStoreKey - memKeys map[string]*sdk.MemoryStoreKey + keys map[string]*storetypes.KVStoreKey + tkeys map[string]*storetypes.TransientStoreKey + memKeys map[string]*storetypes.MemoryStoreKey // keepers AccountKeeper authkeeper.AccountKeeper @@ -282,7 +288,7 @@ func NewSimApp( app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable())) + bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) @@ -300,9 +306,10 @@ func NewSimApp( // seal capability keeper after scoping modules app.CapabilityKeeper.Seal() - // add keepers + // SDK module keepers + app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, + appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, sdk.GetConfig().GetBech32AccountAddrPrefix(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), @@ -316,8 +323,9 @@ func NewSimApp( ) app.DistrKeeper = distrkeeper.NewKeeper( appCodec, keys[distrtypes.StoreKey], app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, authtypes.FeeCollectorName, app.ModuleAccountAddrs(), + &stakingKeeper, authtypes.FeeCollectorName, ) + app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), ) @@ -326,7 +334,7 @@ func NewSimApp( ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) + app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -334,88 +342,149 @@ func NewSimApp( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) - // Create IBC Keeper + app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) + + // IBC Keepers + app.IBCKeeper = ibckeeper.NewKeeper( appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, ) - app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.BaseApp.MsgServiceRouter()) - // register the proposal types - govRouter := govtypes.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + govRouter := govv1beta1.NewRouter() + govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) - app.GovKeeper = govkeeper.NewKeeper( + + govConfig := govtypes.DefaultConfig() + /* + Example of setting gov params: + govConfig.MaxMetadataLen = 10000 + */ + govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, + &stakingKeeper, govRouter, app.MsgServiceRouter(), govConfig, + ) + + app.GovKeeper = *govKeeper.SetHooks( + govtypes.NewMultiGovHooks( + // register the governance hooks + ), + ) + + // IBC Fee Module keeper + app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( + appCodec, keys[ibcfeetypes.StoreKey], app.GetSubspace(ibcfeetypes.ModuleName), + app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, + ) + + // ICA Controller keeper + app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( + appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), + app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + scopedICAControllerKeeper, app.MsgServiceRouter(), ) - app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(appCodec, keys[ibcfeetypes.StoreKey], app.GetSubspace(ibcfeetypes.ModuleName), - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, + // ICA Host keeper + app.ICAHostKeeper = icahostkeeper.NewKeeper( + appCodec, keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), ) + // Create IBC Router + ibcRouter := porttypes.NewRouter() + + // Middleware Stacks + // Create Transfer Keeper and pass IBCFeeKeeper as expected Channel and PortKeeper // since fee middleware will wrap the IBCKeeper for underlying application. app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCFeeKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, ) - transferModule := transfer.NewAppModule(app.TransferKeeper) - transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) - - // create fee-wrapped transfer module - feeTransferModule := ibcfee.NewIBCModule(app.IBCFeeKeeper, transferIBCModule) - feeModule := ibcfee.NewAppModule(app.IBCFeeKeeper) + // Mock Module Stack + // Mock Module setup for testing IBC and also acts as the interchain accounts authentication module // NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do // not replicate if you do not need to test core IBC or light clients. mockModule := ibcmock.NewAppModule(&app.IBCKeeper.PortKeeper) - // create fee wrapped mock module - feeMockModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewMockIBCApp(MockFeePort, scopedFeeMockKeeper)) - app.FeeMockModule = feeMockModule + // The mock module is used for testing IBC + mockIBCModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp(ibcmock.ModuleName, scopedIBCMockKeeper)) + ibcRouter.AddRoute(ibcmock.ModuleName, mockIBCModule) - feeWithMockModule := ibcfee.NewIBCModule(app.IBCFeeKeeper, feeMockModule) + // Create Transfer Stack + // SendPacket, since it is originating from the application to core IBC: + // transferKeeper.SendPacket -> fee.SendPacket -> channel.SendPacket - mockIBCModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewMockIBCApp(ibcmock.ModuleName, scopedIBCMockKeeper)) + // RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way + // channel.RecvPacket -> fee.OnRecvPacket -> transfer.OnRecvPacket - app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( - appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, // may be replaced with middleware such as ics29 fee - app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - scopedICAControllerKeeper, app.MsgServiceRouter(), - ) + // transfer stack contains (from top to bottom): + // - IBC Fee Middleware + // - Transfer - app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), - ) + // create IBC module from bottom to top of stack + var transferStack porttypes.IBCModule + transferStack = transfer.NewIBCModule(app.TransferKeeper) + transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) - icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper) + // Add transfer stack to IBC Router + ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) - // initialize ICA module with mock module as the authentication module on the controller side - icaAuthModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewMockIBCApp("", scopedICAMockKeeper)) - app.ICAAuthModule = icaAuthModule + // Create Interchain Accounts Stack + // SendPacket, since it is originating from the application to core IBC: + // icaAuthModuleKeeper.SendTx -> icaController.SendPacket -> fee.SendPacket -> channel.SendPacket - icaControllerIBCModule := icacontroller.NewIBCModule(app.ICAControllerKeeper, icaAuthModule) - icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) + // initialize ICA module with mock module as the authentication module on the controller side + var icaControllerStack porttypes.IBCModule + icaControllerStack = ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp("", scopedICAMockKeeper)) + app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule) + icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper) + icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) + + // RecvPacket, message that originates from core IBC and goes down to app, the flow is: + // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket + + var icaHostStack porttypes.IBCModule + icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper) + icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) + + // Add host, controller & ica auth modules to IBC router + ibcRouter. + // the ICA Controller middleware needs to be explicitly added to the IBC Router because the + // ICA controller module owns the port capability for ICA. The ICA authentication module + // owns the channel capability. + AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). + AddRoute(icahosttypes.SubModuleName, icaHostStack). + AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerStack) // ica with mock auth module stack route to ica (top level of middleware stack) + + // Create Mock IBC Fee module stack for testing + // SendPacket, since it is originating from the application to core IBC: + // mockModule.SendPacket -> fee.SendPacket -> channel.SendPacket + + // OnRecvPacket, message that originates from core IBC and goes down to app, the flow is the otherway + // channel.RecvPacket -> fee.OnRecvPacket -> mockModule.OnRecvPacket + + // OnAcknowledgementPacket as this is where fee's are paid out + // mockModule.OnAcknowledgementPacket -> fee.OnAcknowledgementPacket -> channel.OnAcknowledgementPacket - // Create static IBC router, add app routes, then set and seal it - // pass in top-level (fully-wrapped) IBCModules to IBC Router - ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(icacontrollertypes.SubModuleName, icaControllerIBCModule). - AddRoute(icahosttypes.SubModuleName, icaHostIBCModule). - AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerIBCModule). // ica with mock auth module stack route to ica (top level of middleware stack) - AddRoute(ibctransfertypes.ModuleName, feeTransferModule). - AddRoute(ibcmock.ModuleName, mockIBCModule). - AddRoute(MockFeePort, feeWithMockModule) + // create fee wrapped mock module + feeMockModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp(MockFeePort, scopedFeeMockKeeper)) + app.FeeMockModule = feeMockModule + feeWithMockModule := ibcfee.NewIBCMiddleware(feeMockModule, app.IBCFeeKeeper) + ibcRouter.AddRoute(MockFeePort, feeWithMockModule) + // Seal the IBC Router app.IBCKeeper.SetRouter(ibcRouter) // create evidence keeper with router @@ -429,11 +498,12 @@ func NewSimApp( // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. - var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) + skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. app.mm = module.NewManager( + // SDK app modules genutil.NewAppModule( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig, @@ -445,7 +515,7 @@ func NewSimApp( crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), @@ -454,9 +524,11 @@ func NewSimApp( ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - transferModule, - feeModule, - icaModule, + + // IBC modules + transfer.NewAppModule(app.TransferKeeper), + ibcfee.NewAppModule(app.IBCFeeKeeper), + ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), mockModule, ) @@ -508,7 +580,7 @@ func NewSimApp( capability.NewAppModule(appCodec, *app.CapabilityKeeper), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), @@ -516,7 +588,7 @@ func NewSimApp( evidence.NewAppModule(app.EvidenceKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ibc.NewAppModule(app.IBCKeeper), - transferModule, + transfer.NewAppModule(app.TransferKeeper), ) app.sm.RegisterStoreDecoders() @@ -601,6 +673,12 @@ func (app *SimApp) LoadHeight(height int64) error { func (app *SimApp) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) for acc := range maccPerms { + // do not add mock module to blocked addresses + // this is only used for testing + if acc == ibcmock.ModuleName { + continue + } + modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true } @@ -637,21 +715,21 @@ func (app *SimApp) InterfaceRegistry() types.InterfaceRegistry { // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. -func (app *SimApp) GetKey(storeKey string) *sdk.KVStoreKey { +func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey { return app.keys[storeKey] } // GetTKey returns the TransientStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. -func (app *SimApp) GetTKey(storeKey string) *sdk.TransientStoreKey { +func (app *SimApp) GetTKey(storeKey string) *storetypes.TransientStoreKey { return app.tkeys[storeKey] } // GetMemKey returns the MemStoreKey for the provided mem key. // // NOTE: This is solely used for testing purposes. -func (app *SimApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey { +func (app *SimApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { return app.memKeys[storeKey] } @@ -699,16 +777,12 @@ func (app *SimApp) SimulationManager() *module.SimulationManager { // API server. func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx - rpc.RegisterRoutes(clientCtx, apiSvr.Router) - // Register legacy tx routes. - authrest.RegisterTxRoutes(clientCtx, apiSvr.Router) // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register legacy and grpc-gateway routes for all modules. - ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router) ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily @@ -724,7 +798,12 @@ func (app *SimApp) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) + tmservice.RegisterTendermintService( + clientCtx, + app.BaseApp.GRPCQueryRouter(), + app.interfaceRegistry, + app.Query, + ) } // RegisterSwaggerAPI registers swagger route with API Server @@ -748,7 +827,7 @@ func GetMaccPerms() map[string][]string { } // initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { +func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) paramsKeeper.Subspace(authtypes.ModuleName) @@ -757,7 +836,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(minttypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) + paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(ibchost.ModuleName) diff --git a/testing/simapp/encoding.go b/testing/simapp/encoding.go index f308cadc23d..63eb410f547 100644 --- a/testing/simapp/encoding.go +++ b/testing/simapp/encoding.go @@ -3,7 +3,7 @@ package simapp import ( "github.com/cosmos/cosmos-sdk/std" - simappparams "github.com/cosmos/ibc-go/v3/testing/simapp/params" + simappparams "github.com/cosmos/ibc-go/v5/testing/simapp/params" ) // MakeTestEncodingConfig creates an EncodingConfig for testing. This function diff --git a/testing/simapp/export.go b/testing/simapp/export.go index fba37920697..618339c3bea 100644 --- a/testing/simapp/export.go +++ b/testing/simapp/export.go @@ -108,8 +108,8 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) app.DistrKeeper.SetFeePool(ctx, feePool) - app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) - return false + err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + return err != nil }) // reinitialize all delegations @@ -122,8 +122,14 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] if err != nil { panic(err) } - app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) - app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } } // reset context height diff --git a/testing/simapp/genesis_account_test.go b/testing/simapp/genesis_account_test.go index 8a223148955..44e6cd25a20 100644 --- a/testing/simapp/genesis_account_test.go +++ b/testing/simapp/genesis_account_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" - "github.com/cosmos/ibc-go/v3/testing/simapp" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) func TestSimGenesisAccountValidate(t *testing.T) { diff --git a/testing/simapp/params/amino.go b/testing/simapp/params/amino.go index 440c29f817e..d603987dd5f 100644 --- a/testing/simapp/params/amino.go +++ b/testing/simapp/params/amino.go @@ -1,3 +1,4 @@ +//go:build test_amino // +build test_amino package params @@ -5,7 +6,7 @@ package params import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // MakeTestEncodingConfig creates an EncodingConfig for an amino based test configuration. diff --git a/testing/simapp/params/proto.go b/testing/simapp/params/proto.go index 04aa524b900..a752d107907 100644 --- a/testing/simapp/params/proto.go +++ b/testing/simapp/params/proto.go @@ -1,3 +1,4 @@ +//go:build !test_amino // +build !test_amino package params diff --git a/testing/simapp/sim_bench_test.go b/testing/simapp/sim_bench_test.go index 6f8b020a043..8e2e17ef518 100644 --- a/testing/simapp/sim_bench_test.go +++ b/testing/simapp/sim_bench_test.go @@ -11,7 +11,7 @@ import ( ) // Profile with: -// /usr/local/go/bin/go test -benchmem -run=^$ github.com/cosmos/ibc-go/v3/testing/simapp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out +// /usr/local/go/bin/go test -benchmem -run=^$ github.com/cosmos/ibc-go/v5/testing/simapp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out func BenchmarkFullAppSimulation(b *testing.B) { b.ReportAllocs() config, db, dir, logger, _, err := SetupSimulation("goleveldb-app-sim", "Simulation") diff --git a/testing/simapp/sim_test.go b/testing/simapp/sim_test.go index bbc8f4a8c0c..55366d50360 100644 --- a/testing/simapp/sim_test.go +++ b/testing/simapp/sim_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -29,9 +30,9 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/testing/simapp/helpers" + ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/testing/simapp/helpers" ) // Get flags every time the simulator is run @@ -40,8 +41,8 @@ func init() { } type StoreKeysPrefixes struct { - A sdk.StoreKey - B sdk.StoreKey + A storetypes.StoreKey + B storetypes.StoreKey Prefixes [][]byte } @@ -163,11 +164,13 @@ func TestAppImportExport(t *testing.T) { storeKeysPrefixes := []StoreKeysPrefixes{ {app.keys[authtypes.StoreKey], newApp.keys[authtypes.StoreKey], [][]byte{}}, - {app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], + { + app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], [][]byte{ stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, stakingtypes.HistoricalInfoKey, - }}, // ordering may change but it doesn't matter + }, + }, // ordering may change but it doesn't matter {app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}}, {app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}}, {app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}}, diff --git a/testing/simapp/simd/cmd/cmd_test.go b/testing/simapp/simd/cmd/cmd_test.go index 446639c5bf0..6a953a8dd17 100644 --- a/testing/simapp/simd/cmd/cmd_test.go +++ b/testing/simapp/simd/cmd/cmd_test.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/stretchr/testify/require" - "github.com/cosmos/ibc-go/v3/testing/simapp" - "github.com/cosmos/ibc-go/v3/testing/simapp/simd/cmd" + "github.com/cosmos/ibc-go/v5/testing/simapp" + "github.com/cosmos/ibc-go/v5/testing/simapp/simd/cmd" ) func TestInitCmd(t *testing.T) { @@ -20,5 +20,5 @@ func TestInitCmd(t *testing.T) { fmt.Sprintf("--%s=%s", cli.FlagOverwrite, "true"), // Overwrite genesis.json, in case it already exists }) - require.NoError(t, svrcmd.Execute(rootCmd, simapp.DefaultNodeHome)) + require.NoError(t, svrcmd.Execute(rootCmd, "simd", simapp.DefaultNodeHome)) } diff --git a/testing/simapp/simd/cmd/genaccounts.go b/testing/simapp/simd/cmd/genaccounts.go index b31b1c20fb4..92f82070edd 100644 --- a/testing/simapp/simd/cmd/genaccounts.go +++ b/testing/simapp/simd/cmd/genaccounts.go @@ -8,7 +8,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" @@ -39,8 +38,8 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - depCdc := clientCtx.JSONCodec - cdc := depCdc.(codec.Codec) + depCdc := clientCtx.Codec + cdc := depCdc serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config @@ -53,7 +52,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) // attempt to lookup address from Keybase if no address was provided - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf) + kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf, clientCtx.Codec) if err != nil { return err } @@ -63,7 +62,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa return fmt.Errorf("failed to get address from Keybase: %w", err) } - addr = info.GetAddress() + _, err = info.GetAddress() + if err != nil { + return fmt.Errorf("failed to get address from Keybase: %w", err) + } } coins, err := sdk.ParseCoinsNormalized(args[1]) diff --git a/testing/simapp/simd/cmd/genaccounts_test.go b/testing/simapp/simd/cmd/genaccounts_test.go index 0cdf365bf93..291e1acec2a 100644 --- a/testing/simapp/simd/cmd/genaccounts_test.go +++ b/testing/simapp/simd/cmd/genaccounts_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" - "github.com/cosmos/ibc-go/v3/testing/simapp" - simcmd "github.com/cosmos/ibc-go/v3/testing/simapp/simd/cmd" + "github.com/cosmos/ibc-go/v5/testing/simapp" + simcmd "github.com/cosmos/ibc-go/v5/testing/simapp/simd/cmd" ) var testMbm = module.NewBasicManager(genutil.AppModuleBasic{}) @@ -63,7 +63,7 @@ func TestAddGenesisAccountCmd(t *testing.T) { require.NoError(t, err) serverCtx := server.NewContext(viper.New(), cfg, logger) - clientCtx := client.Context{}.WithJSONCodec(appCodec).WithHomeDir(home) + clientCtx := client.Context{}.WithCodec(appCodec).WithHomeDir(home) ctx := context.Background() ctx = context.WithValue(ctx, client.ClientContextKey, &clientCtx) @@ -73,7 +73,8 @@ func TestAddGenesisAccountCmd(t *testing.T) { cmd.SetArgs([]string{ tc.addr, tc.denom, - fmt.Sprintf("--%s=home", flags.FlagHome)}) + fmt.Sprintf("--%s=home", flags.FlagHome), + }) if tc.expectErr { require.Error(t, cmd.ExecuteContext(ctx)) diff --git a/testing/simapp/simd/cmd/root.go b/testing/simapp/simd/cmd/root.go index e690093709e..c3eceb0a32a 100644 --- a/testing/simapp/simd/cmd/root.go +++ b/testing/simapp/simd/cmd/root.go @@ -17,6 +17,7 @@ import ( serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" @@ -26,12 +27,13 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cast" "github.com/spf13/cobra" + tmcfg "github.com/tendermint/tendermint/config" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/ibc-go/v3/testing/simapp" - "github.com/cosmos/ibc-go/v3/testing/simapp/params" + "github.com/cosmos/ibc-go/v5/testing/simapp" + "github.com/cosmos/ibc-go/v5/testing/simapp/params" ) // NewRootCmd creates a new root command for simd. It is called once in the @@ -71,8 +73,9 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { } customAppTemplate, customAppConfig := initAppConfig() + customTMConfig := initTendermintConfig() - return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig) + return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customTMConfig) }, } @@ -81,6 +84,18 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { return rootCmd, encodingConfig } +// initTendermintConfig helps to override default Tendermint Config values. +// return tmcfg.DefaultConfig if no custom configuration is required for the application. +func initTendermintConfig() *tmcfg.Config { + cfg := tmcfg.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{}) { @@ -246,7 +261,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a } snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) + snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) //nolint:staticcheck // this is clearer. if err != nil { panic(err) } @@ -255,6 +270,11 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a panic(err) } + snapshotOptions := snapshottypes.NewSnapshotOptions( + cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), + cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), + ) + return simapp.NewSimApp( logger, db, traceStore, true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), @@ -269,9 +289,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), - baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetSnapshot(snapshotStore, snapshotOptions), ) } @@ -279,8 +297,8 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a // and exports state. func (a appCreator) appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, - appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { - + appOpts servertypes.AppOptions, +) (servertypes.ExportedApp, error) { var simApp *simapp.SimApp homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { diff --git a/testing/simapp/simd/cmd/testnet.go b/testing/simapp/simd/cmd/testnet.go index 019f534183b..ae505599ad1 100644 --- a/testing/simapp/simd/cmd/testnet.go +++ b/testing/simapp/simd/cmd/testnet.go @@ -18,6 +18,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -93,7 +94,7 @@ Example: return cmd } -const nodeDirPerm = 0755 +const nodeDirPerm = 0o755 // Initialize the testnet func InitTestnet( @@ -112,7 +113,6 @@ func InitTestnet( algoStr string, numValidators int, ) error { - if chainID == "" { chainID = "chain-" + tmrand.NewRand().Str(6) } @@ -166,7 +166,7 @@ func InitTestnet( memo := fmt.Sprintf("%s@%s:26656", nodeIDs[i], ip) genFiles = append(genFiles, nodeConfig.GenesisFile()) - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, nodeDir, inBuf) + kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, nodeDir, inBuf, clientCtx.Codec) if err != nil { return err } @@ -177,7 +177,7 @@ func InitTestnet( return err } - addr, secret, err := server.GenerateSaveCoinKey(kb, nodeDirName, true, algo) + addr, secret, err := testutil.GenerateSaveCoinKey(kb, nodeDirName, "test", true, algo) if err != nil { _ = os.RemoveAll(outputDir) return err @@ -269,12 +269,11 @@ func initGenFiles( genAccounts []authtypes.GenesisAccount, genBalances []banktypes.Balance, genFiles []string, numValidators int, ) error { - - appGenState := mbm.DefaultGenesis(clientCtx.JSONCodec) + appGenState := mbm.DefaultGenesis(clientCtx.Codec) // set the accounts in the genesis state var authGenState authtypes.GenesisState - clientCtx.JSONCodec.MustUnmarshalJSON(appGenState[authtypes.ModuleName], &authGenState) + clientCtx.Codec.MustUnmarshalJSON(appGenState[authtypes.ModuleName], &authGenState) accounts, err := authtypes.PackAccounts(genAccounts) if err != nil { @@ -282,14 +281,14 @@ func initGenFiles( } authGenState.Accounts = accounts - appGenState[authtypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&authGenState) + appGenState[authtypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&authGenState) // set the balances in the genesis state var bankGenState banktypes.GenesisState - clientCtx.JSONCodec.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) + clientCtx.Codec.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) bankGenState.Balances = genBalances - appGenState[banktypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&bankGenState) + appGenState[banktypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&bankGenState) appGenStateJSON, err := json.MarshalIndent(appGenState, "", " ") if err != nil { @@ -316,7 +315,6 @@ func collectGenFiles( nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { - var appState json.RawMessage genTime := tmtime.Now() @@ -336,7 +334,7 @@ func collectGenFiles( return err } - nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.JSONCodec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) + nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) if err != nil { return err } @@ -382,15 +380,15 @@ func calculateIP(ip string, i int) (string, error) { } func writeFile(name string, dir string, contents []byte) error { - writePath := filepath.Join(dir) + writePath := filepath.Dir(dir) file := filepath.Join(writePath, name) - err := tmos.EnsureDir(writePath, 0755) + err := tmos.EnsureDir(writePath, 0o755) if err != nil { return err } - err = tmos.WriteFile(file, contents, 0644) + err = tmos.WriteFile(file, contents, 0o644) if err != nil { return err } diff --git a/testing/simapp/simd/main.go b/testing/simapp/simd/main.go index 79a7da2ac28..ea4fc0d88aa 100644 --- a/testing/simapp/simd/main.go +++ b/testing/simapp/simd/main.go @@ -6,14 +6,14 @@ import ( "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/cosmos/ibc-go/v3/testing/simapp" - "github.com/cosmos/ibc-go/v3/testing/simapp/simd/cmd" + "github.com/cosmos/ibc-go/v5/testing/simapp" + "github.com/cosmos/ibc-go/v5/testing/simapp/simd/cmd" ) func main() { rootCmd, _ := cmd.NewRootCmd() - if err := svrcmd.Execute(rootCmd, simapp.DefaultNodeHome); err != nil { + if err := svrcmd.Execute(rootCmd, "simd", simapp.DefaultNodeHome); err != nil { switch e := err.(type) { case server.ErrorCode: os.Exit(e.Code) diff --git a/testing/simapp/state.go b/testing/simapp/state.go index 86f20e2b115..8a556c3e03b 100644 --- a/testing/simapp/state.go +++ b/testing/simapp/state.go @@ -8,6 +8,7 @@ import ( "math/rand" "time" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,7 +20,7 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" tmtypes "github.com/tendermint/tendermint/types" - simappparams "github.com/cosmos/ibc-go/v3/testing/simapp/params" + simappparams "github.com/cosmos/ibc-go/v5/testing/simapp/params" ) // AppStateFn returns the initial application state using a genesis or the simulation parameters. @@ -28,7 +29,6 @@ import ( func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn { return func(r *rand.Rand, accs []simtypes.Account, config simtypes.Config, ) (appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time) { - if FlagGenesisTimeValue == 0 { genesisTimestamp = simtypes.RandTimestamp(r) } else { @@ -166,7 +166,7 @@ func AppStateRandomizedFn( Rand: r, GenState: genesisState, Accounts: accs, - InitialStake: initialStake, + InitialStake: math.NewInt(initialStake), NumBonded: numInitiallyBonded, GenTimestamp: genesisTimestamp, } diff --git a/testing/simapp/test_helpers.go b/testing/simapp/test_helpers.go index 1df1714d8a7..ab04f77afa1 100644 --- a/testing/simapp/test_helpers.go +++ b/testing/simapp/test_helpers.go @@ -9,15 +9,20 @@ import ( "testing" "time" + "cosmossdk.io/math" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "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/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" @@ -25,7 +30,8 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/ibc-go/v3/testing/simapp/helpers" + "github.com/cosmos/ibc-go/v5/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/simapp/helpers" ) // DefaultConsensusParams defines the default Tendermint consensus params used in @@ -59,25 +65,116 @@ func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { // Setup initializes a new SimApp. A Nop logger is set in SimApp. func Setup(isCheckTx bool) *SimApp { - app, genesisState := setup(!isCheckTx, 5) - if !isCheckTx { - // init chain must be called to stop deliverState from being nil - stateBytes, err := json.MarshalIndent(genesisState, "", " ") - if err != nil { - panic(err) + privVal := mock.NewPV() + pubKey, _ := privVal.GetPubKey() + + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + // generate genesis account + senderPrivKey := secp256k1.GenPrivKey() + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + balance := banktypes.Balance{ + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), + } + + app := SetupWithGenesisValSet(valSet, []authtypes.GenesisAccount{acc}, balance) + + return app +} + +// SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts +// that also act as delegators. For simplicity, each validator is bonded with a delegation +// of one consensus engine unit in the default token of the simapp from first genesis +// account. A Nop logger is set in SimApp. +func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { + app, genesisState := setup(true, 5) + genesisState = genesisStateWithValSet(app, genesisState, valSet, genAccs, balances...) + + stateBytes, _ := json.MarshalIndent(genesisState, "", " ") + + // init chain will set the validator set and initialize the genesis accounts + app.InitChain( + abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: DefaultConsensusParams, + AppStateBytes: stateBytes, + }, + ) + + // commit genesis changes + app.Commit() + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ + Height: app.LastBlockHeight() + 1, + AppHash: app.LastCommitID().Hash, + ValidatorsHash: valSet.Hash(), + NextValidatorsHash: valSet.Hash(), + }}) + + return app +} + +func genesisStateWithValSet(app *SimApp, genesisState GenesisState, + valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, + balances ...banktypes.Balance, +) GenesisState { + // set genesis accounts + authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) + genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.DefaultPowerReduction + + for _, val := range valSet.Validators { + pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey) + pkAny, _ := codectypes.NewAnyWithValue(pk) + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + MinSelfDelegation: sdk.ZeroInt(), } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) - // Initialize the chain - app.InitChain( - abci.RequestInitChain{ - Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, - AppStateBytes: stateBytes, - }, - ) } + // set validators and delegations + stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) - return app + totalSupply := sdk.NewCoins() + for _, b := range balances { + // add genesis acc tokens to total supply + totalSupply = totalSupply.Add(b.Coins...) + } + + for range delegations { + // add delegated tokens to total supply + totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) + } + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, + }) + + // update total supply + bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) + genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) + + return genesisState } // SetupWithGenesisAccounts initializes a new SimApp with the provided genesis @@ -138,7 +235,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") // base address string buffer.WriteString(numString) // adding on final two digits to make addresses unique - res, _ := sdk.AccAddressFromHex(buffer.String()) + res, _ := sdk.AccAddressFromHexUnsafe(buffer.String()) bech := res.String() addr, _ := TestAddr(buffer.String(), bech) @@ -150,7 +247,7 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the SimApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdk.Int) { +func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt math.Int) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) for _, pk := range pubKeys { @@ -160,17 +257,17 @@ func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { +func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) } // AddTestAddrs constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { +func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) } -func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { +func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt math.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) @@ -206,7 +303,7 @@ func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress { } func TestAddr(addr string, bech string) (sdk.AccAddress, error) { - res, err := sdk.AccAddressFromHex(addr) + res, err := sdk.AccAddressFromHexUnsafe(addr) if err != nil { return nil, err } @@ -240,7 +337,6 @@ func SignAndDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { - tx, err := helpers.GenTx( txCfg, msgs, @@ -254,7 +350,7 @@ func SignAndDeliver( require.NoError(t, err) // Simulate a sending a transaction - gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) + gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) if expPass { require.NoError(t, err) diff --git a/testing/simapp/utils.go b/testing/simapp/utils.go index 9abfc060b94..e8b33eebb6a 100644 --- a/testing/simapp/utils.go +++ b/testing/simapp/utils.go @@ -13,7 +13,7 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/ibc-go/v3/testing/simapp/helpers" + "github.com/cosmos/ibc-go/v5/testing/simapp/helpers" ) // SetupSimulation creates the config, db (levelDB), temporary directory and logger for @@ -39,7 +39,7 @@ func SetupSimulation(dirPrefix, dbName string) (simtypes.Config, dbm.DB, string, return simtypes.Config{}, nil, "", nil, false, err } - db, err := sdk.NewLevelDB(dbName, dir) + db, err := sdk.NewLevelDB(dbName, dir) //nolint:staticcheck // this is clearer. if err != nil { return simtypes.Config{}, nil, "", nil, false, err } @@ -84,7 +84,7 @@ func CheckExportSimulation( return err } - if err := ioutil.WriteFile(config.ExportStatePath, []byte(exported.AppState), 0600); err != nil { + if err := ioutil.WriteFile(config.ExportStatePath, []byte(exported.AppState), 0o600); err != nil { return err } } @@ -96,7 +96,7 @@ func CheckExportSimulation( return err } - if err := ioutil.WriteFile(config.ExportParamsPath, paramsBz, 0600); err != nil { + if err := ioutil.WriteFile(config.ExportParamsPath, paramsBz, 0o600); err != nil { return err } } diff --git a/testing/solomachine.go b/testing/solomachine.go index f0cd445d1db..d22e67afd24 100644 --- a/testing/solomachine.go +++ b/testing/solomachine.go @@ -12,11 +12,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/stretchr/testify/require" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v3/modules/core/24-host" - "github.com/cosmos/ibc-go/v3/modules/core/exported" - solomachinetypes "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine" + clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v5/modules/core/exported" + solomachinetypes "github.com/cosmos/ibc-go/v5/modules/light-clients/06-solomachine" ) // Solomachine is a testing helper used to simulate a counterparty diff --git a/testing/values.go b/testing/values.go index 3591711e24a..2652bee1809 100644 --- a/testing/values.go +++ b/testing/values.go @@ -1,6 +1,6 @@ /* - This file contains the variables, constants, and default values - used in the testing package and commonly defined in tests. +This file contains the variables, constants, and default values +used in the testing package and commonly defined in tests. */ package ibctesting @@ -9,12 +9,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types" - ibctmtypes "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint" - "github.com/cosmos/ibc-go/v3/testing/mock" - "github.com/cosmos/ibc-go/v3/testing/simapp" + ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" + ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v5/testing/mock" + "github.com/cosmos/ibc-go/v5/testing/simapp" ) const ( @@ -46,9 +46,9 @@ const ( var ( DefaultOpenInitVersion *connectiontypes.Version - // Default params variables used to create a TM client - DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel - TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) + // DefaultTrustLevel sets params variables used to create a TM client + DefaultTrustLevel = ibctmtypes.DefaultTrustLevel + TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) UpgradePath = []string{"upgrade", "upgradedIBCState"} diff --git a/third_party/proto/cosmos/auth/v1beta1/auth.proto b/third_party/proto/cosmos/auth/v1beta1/auth.proto index 79071456f6e..963c6f15198 100644 --- a/third_party/proto/cosmos/auth/v1beta1/auth.proto +++ b/third_party/proto/cosmos/auth/v1beta1/auth.proto @@ -17,11 +17,10 @@ message BaseAccount { option (cosmos_proto.implements_interface) = "AccountI"; - string address = 1; - google.protobuf.Any pub_key = 2 - [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; - uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; - uint64 sequence = 4; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty"]; + uint64 account_number = 3; + uint64 sequence = 4; } // ModuleAccount defines an account for modules that holds coins on a pool. @@ -30,7 +29,7 @@ message ModuleAccount { option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "ModuleAccountI"; - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + BaseAccount base_account = 1 [(gogoproto.embed) = true]; string name = 2; repeated string permissions = 3; } @@ -40,12 +39,9 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; - uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; - uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; - uint64 sig_verify_cost_ed25519 = 4 - [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; - uint64 sig_verify_cost_secp256k1 = 5 - [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; + uint64 max_memo_characters = 1; + uint64 tx_sig_limit = 2; + uint64 tx_size_cost_per_byte = 3; + uint64 sig_verify_cost_ed25519 = 4 [(gogoproto.customname) = "SigVerifyCostED25519"]; + uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1"]; } - diff --git a/third_party/proto/cosmos/auth/v1beta1/genesis.proto b/third_party/proto/cosmos/auth/v1beta1/genesis.proto index 5d6823e6b35..48f068b872e 100644 --- a/third_party/proto/cosmos/auth/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/auth/v1beta1/genesis.proto @@ -9,10 +9,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // GenesisState defines the auth module's genesis state. message GenesisState { - // params defines all the paramaters of the module. + // params defines all the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; // accounts are the accounts present at genesis. repeated google.protobuf.Any accounts = 2; } - diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto index 2a8cbccedd8..0a368144aba 100644 --- a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto @@ -30,6 +30,11 @@ message PageRequest { // count_total is only respected when offset is used. It is ignored when key // is set. bool count_total = 4; + + // reverse is set to true if results are to be returned in the descending order. + // + // Since: cosmos-sdk 0.43 + bool reverse = 5; } // PageResponse is to be embedded in gRPC response messages where the @@ -41,7 +46,8 @@ message PageRequest { // } message PageResponse { // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently + // query the next page most efficiently. It will be empty if + // there are no more results. bytes next_key = 1; // total is total number of results available if PageRequest.count_total diff --git a/third_party/proto/cosmos/base/v1beta1/coin.proto b/third_party/proto/cosmos/base/v1beta1/coin.proto index fab75284b7f..69e67e09954 100644 --- a/third_party/proto/cosmos/base/v1beta1/coin.proto +++ b/third_party/proto/cosmos/base/v1beta1/coin.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package cosmos.base.v1beta1; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types"; option (gogoproto.goproto_stringer_all) = false; @@ -15,7 +16,8 @@ message Coin { option (gogoproto.equal) = true; string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; } // DecCoin defines a token with a denomination and a decimal amount. @@ -26,15 +28,16 @@ message DecCoin { option (gogoproto.equal) = true; string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; } // IntProto defines a Protobuf wrapper around an Int object. message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; } // DecProto defines a Protobuf wrapper around a Dec object. message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto index d322dedc30d..9831c894d23 100644 --- a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -1,16 +1,18 @@ syntax = "proto3"; package cosmos.upgrade.v1beta1; +import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; +option (gogoproto.goproto_getters_all) = false; // Plan specifies information about a planned upgrade and when it should occur. message Plan { - option (gogoproto.equal) = true; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; // Sets the name for the upgrade. This name will be used by the upgraded // version of the software to apply any special "on-upgrade" commands during @@ -21,9 +23,10 @@ message Plan { // reached and the software will exit. string name = 1; - // The time after which the upgrade must be performed. - // Leave set to its zero value to use a pre-defined Height instead. - google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + // has been removed from the SDK. + // If this field is not empty, an error will be thrown. + google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // The height at which the upgrade must be performed. // Only used if Time is not set. @@ -33,16 +36,21 @@ message Plan { // such as a git commit that validators could automatically upgrade to string info = 4; - // UpgradedClientState field has been deprecated. IBC upgrade logic has been + // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been // moved to the IBC module in the sub module 02-client. - reserved 5; - reserved "option"; + // If this field is not empty, an error will be thrown. + google.protobuf.Any upgraded_client_state = 5 [deprecated = true]; } // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgSoftwareUpgrade. message SoftwareUpgradeProposal { - option (gogoproto.equal) = true; + option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; @@ -51,9 +59,28 @@ message SoftwareUpgradeProposal { // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgCancelUpgrade. message CancelSoftwareUpgradeProposal { - option (gogoproto.equal) = true; + option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; } + +// ModuleVersion specifies a module and its consensus version. +// +// Since: cosmos-sdk 0.43 +message ModuleVersion { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = true; + + // name of the app module + string name = 1; + + // consensus version of the app module + uint64 version = 2; +} diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto index 167b170757b..c017141aa70 100644 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -13,4 +13,6 @@ extend google.protobuf.MessageOptions { extend google.protobuf.FieldOptions { string accepts_interface = 93001; + + string scalar = 93002; } diff --git a/third_party/proto/proofs.proto b/third_party/proto/proofs.proto index da43503ecbd..a1397dff5fb 100644 --- a/third_party/proto/proofs.proto +++ b/third_party/proto/proofs.proto @@ -11,6 +11,7 @@ enum HashOp { KECCAK = 3; RIPEMD160 = 4; BITCOIN = 5; // ripemd160(sha256(x)) + SHA512_256 = 6; } /**