diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a374952c066..aadab8b6813 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1,8 @@ # CODEOWNERS: https://help.github.com/articles/about-codeowners/ -* @AdityaSripal @damiannolan @chatton @DimitrisJim @gjermundgaraba @bznein +* @AdityaSripal @damiannolan @DimitrisJim @gjermundgaraba -# Our appreciation and gratitude to past code owners: @fedekunze @seantking @tmsdkeys @charleenfei @crodriguezvega @colin-axner +# Our appreciation and gratitude to past code owners: @fedekunze @seantking @tmsdkeys @charleenfei @crodriguezvega @colin-axner @chatton @bznein # Order is important; the last matching pattern takes the most # precedence. When someone opens a pull request that only @@ -11,42 +11,42 @@ # CODEOWNERS for the CODEOWNER file -/.github/CODEOWNERS @AdityaSripal @damiannolan @chatton +/.github/CODEOWNERS @AdityaSripal @damiannolan # CODEOWNERS for the core IBC module -/modules/core/ @AdityaSripal @damiannolan @chatton -/proto/ibc/core/ @AdityaSripal @damiannolan @chatton +/modules/core/ @AdityaSripal @damiannolan +/proto/ibc/core/ @AdityaSripal @damiannolan # CODEOWNERS for the light-clients -/modules/light-clients/ @AdityaSripal @damiannolan @chatton -/proto/ibc/lightclients/ @AdityaSripal @damiannolan @chatton +/modules/light-clients/ @AdityaSripal @damiannolan +/proto/ibc/lightclients/ @AdityaSripal @damiannolan # CODEOWNERS for 08-wasm light client module -/modules/light-clients/08-wasm/ @AdityaSripal @damiannolan @chatton @DimitrisJim @srdtrk +/modules/light-clients/08-wasm/ @AdityaSripal @damiannolan @DimitrisJim @srdtrk # CODEOWNERS for ICS 20 -/modules/apps/transfer/ @AdityaSripal @damiannolan @chatton @DimitrisJim -/proto/ibc/applications/transfer/ @AdityaSripal @damiannolan @chatton @DimitrisJim +/modules/apps/transfer/ @AdityaSripal @damiannolan @DimitrisJim +/proto/ibc/applications/transfer/ @AdityaSripal @damiannolan @DimitrisJim # CODEOWNERS for interchain-accounts module -/modules/apps/27-interchain-accounts/ @AdityaSripal @damiannolan @chatton -/proto/ibc/applications/interchain_accounts/ @AdityaSripal @damiannolan @chatton +/modules/apps/27-interchain-accounts/ @AdityaSripal @damiannolan +/proto/ibc/applications/interchain_accounts/ @AdityaSripal @damiannolan # CODEOWNERS for fee module -/modules/apps/29-fee/ @AdityaSripal @damiannolan @chatton -/proto/ibc/applications/fee/ @AdityaSripal @damiannolan @chatton +/modules/apps/29-fee/ @AdityaSripal @damiannolan +/proto/ibc/applications/fee/ @AdityaSripal @damiannolan # CODEOWNERS for callbacks middleware -/modules/apps/callbacks/ @AdityaSripal @damiannolan @srdtrk @chatton +/modules/apps/callbacks/ @AdityaSripal @damiannolan @srdtrk # CODEOWNERS for docs -/docs/ @AdityaSripal @damiannolan @chatton @DimitrisJim @srdtrk +/docs/ @AdityaSripal @damiannolan @DimitrisJim @srdtrk diff --git a/.github/mergify.yml b/.github/mergify.yml index d8bb1105e59..55f367b0b62 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,5 +1,9 @@ queue_rules: - name: default + queue_conditions: + - "#approved-reviews-by>=1" + - base=main + - label=automerge commit_message_template: | {{ title }} (#{{ number }}) {{ body }} @@ -7,17 +11,9 @@ queue_rules: - "#approved-reviews-by>=1" - base=main - label=automerge + merge_method: squash pull_request_rules: - - name: automerge to main with label automerge and branch protection passing - conditions: - - "#approved-reviews-by>=1" - - base=main - - label=automerge - actions: - queue: - name: default - merge_method: squash - name: backport patches to v0.1.x callbacks ibc-go v7.3.x branch conditions: - base=main @@ -130,3 +126,7 @@ pull_request_rules: backport: branches: - release/v9.0.x + - name: automerge to main with label automerge and branch protection passing + conditions: [] + actions: + queue: diff --git a/.github/workflows/callbacks.yml b/.github/workflows/callbacks.yml index 23323a0851b..adf1b777e56 100644 --- a/.github/workflows/callbacks.yml +++ b/.github/workflows/callbacks.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/setup-go@v5 with: go-version: '1.23' - cache: false - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -63,7 +62,7 @@ jobs: steps: - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} - uses: SonarSource/sonarcloud-github-action@v3.1.0 + uses: SonarSource/sonarcloud-github-action@v4.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index fd8d516afa1..d144d2a266a 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -27,7 +27,7 @@ jobs: run: make build-docs - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.6.9 + uses: JamesIves/github-pages-deploy-action@v4.7.2 with: branch: gh-pages folder: docs/build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 546be4b85a9..d00b629d7fd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -28,7 +28,7 @@ jobs: images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} - name: Build Docker image - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: context: . tags: ${{ steps.meta.outputs.tags }} @@ -46,7 +46,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push Docker image - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: context: . push: true diff --git a/.github/workflows/e2e-compatibility-workflow-call.yaml b/.github/workflows/e2e-compatibility-workflow-call.yaml index 4b65e4d3720..8bd01e6db5d 100644 --- a/.github/workflows/e2e-compatibility-workflow-call.yaml +++ b/.github/workflows/e2e-compatibility-workflow-call.yaml @@ -60,10 +60,8 @@ jobs: # Note: this is significant as the standard behaviour when running e2es on PRs # is that there is a set of env vars that are the same for each run. e.g. the same docker image is used # for every test. With compatibility tests, each test may be running different combinations of images. - CHAIN_IMAGE: 'ghcr.io/cosmos/ibc-go-simd' CHAIN_A_TAG: '${{ matrix.chain-a }}' CHAIN_B_TAG: '${{ matrix.chain-b }}' - CHAIN_BINARY: 'simd' RELAYER_ID: '${{ matrix.relayer-type }}' - name: Upload Diagnostics uses: actions/upload-artifact@v4 diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index e19336d5e2f..c0b20654826 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -59,7 +59,6 @@ jobs: CHAIN_A_TAG: latest CHAIN_B_TAG: latest CHAIN_IMAGE: ibc-go-simd - RELAYER_ID: "hermes" # by default use hermes for fork e2es. FORK: "true" # run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go. if: ${{ github.repository != 'cosmos/ibc-go' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index 96558e5c1fc..5ce0ff99a3d 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -23,7 +23,7 @@ on: default: '' # empty string means don't skip any test. chain-image: description: 'The image to use for chains' - required: true + required: false type: string default: 'ghcr.io/cosmos/ibc-go-simd' chain-a-tag: @@ -36,37 +36,12 @@ on: description: 'The tag to use for chain B' required: true type: string - chain-binary: - default: 'simd' - description: 'The chain binary' - required: false - type: string - chain-upgrade-tag: - default: '' - description: 'The image tag that the chain will be upgraded to' - required: false - type: string # upgrade-plan-name is only required during upgrade tests, and is otherwise ignored. upgrade-plan-name: default: '' description: 'The upgrade plan name' required: false type: string - relayer-image: - description: 'The image to use for the relayer' - required: false - default: '' # the tests themselves will choose a sensible default when unset. - type: string - relayer-type: - description: 'The type of relayer to use' - required: false - default: 'hermes' - type: string - relayer-tag: - description: 'The tag to use for the relayer' - required: false - default: '' # the tests themselves will choose a sensible default when unset. - type: string build-and-push-docker-image: description: 'Flag to specify if the docker image should be built and pushed beforehand' required: false @@ -82,6 +57,11 @@ on: required: false type: boolean default: false + e2e-config-path: + description: 'Specify relative or absolute path of config file for test' + required: false + type: string + default: 'ci-e2e-config.yaml' env: REGISTRY: ghcr.io @@ -98,11 +78,7 @@ jobs: echo "Chain Image: ${{ inputs.chain-image }}" echo "Chain A Tag: ${{ inputs.chain-a-tag }}" echo "Chain B Tag: ${{ inputs.chain-b-tag }}" - echo "Chain Upgrade Tag: ${{ inputs.chain-upgrade-tag }}" echo "Upgrade Plan Name: ${{ inputs.upgrade-plan-name }}" - echo "Relayer Image:" ${{ inputs.relayer-image }} - echo "Relayer Type: ${{ inputs.relayer-type }}" - echo "Relayer Tag: ${{ inputs.relayer-tag }}" echo "Test Entry Point: ${{ inputs.test-entry-point }}" echo "Test: ${{ inputs.test }}" echo "Github Ref Name: ${{ github.ref_name }}" @@ -132,7 +108,7 @@ jobs: - name: Build and push Docker image if: ${{ inputs.build-and-push-docker-image }} - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: context: . push: true @@ -179,7 +155,7 @@ jobs: - name: Build and push Docker image if: ${{ inputs.build-and-push-docker-image-wasm }} - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: context: . push: true @@ -226,14 +202,10 @@ jobs: - docker-build-wasm env: CHAIN_IMAGE: '${{ inputs.chain-image }}' + CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}' CHAIN_A_TAG: '${{ inputs.chain-a-tag }}' CHAIN_B_TAG: '${{ inputs.chain-b-tag }}' - RELAYER_IMAGE: '${{ inputs.relayer-image }}' - RELAYER_TAG: '${{ inputs.relayer-tag }}' - RELAYER_ID: '${{ inputs.relayer-type }}' - CHAIN_BINARY: '${{ inputs.chain-binary }}' - CHAIN_UPGRADE_TAG: '${{ inputs.chain-upgrade-tag }}' - CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}' + E2E_CONFIG_PATH: '${{ inputs.e2e-config-path }}' strategy: fail-fast: false matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }} @@ -271,14 +243,7 @@ jobs: CHAIN_IMAGE: '${{ inputs.chain-image }}' CHAIN_A_TAG: '${{ inputs.chain-a-tag }}' CHAIN_B_TAG: '${{ inputs.chain-b-tag }}' - RELAYER_IMAGE: '${{ inputs.relayer-image }}' - RELAYER_TAG: '${{ inputs.relayer-tag }}' - RELAYER_ID: '${{ inputs.relayer-type }}' - CHAIN_BINARY: '${{ inputs.chain-binary }}' - CHAIN_UPGRADE_TAG: '${{ inputs.chain-upgrade-tag }}' - CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}' - # explicitly set to true so that if a test fails, it doesn't delete the chain and cause other tests to fail. - KEEP_CONTAINERS: "true" + E2E_CONFIG_PATH: '${{ inputs.e2e-config-path }}' strategy: fail-fast: false matrix: diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 25a906c966b..adca6a3d2e9 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -5,215 +5,110 @@ on: branches: - main paths: - # upgrade tests will run on any changes to the upgrade_test.go file. + # upgrade tests will run on any changes to the upgrade_test.go file, + # and changes to the workflow itself. - 'e2e/tests/upgrades/upgrade_test.go' + - '.github/workflows/e2e-upgrade.yaml' schedule: - cron: '0 0 * * *' jobs: - upgrade-v7-hermes: + upgrade-v7: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v6.1.0 chain-b-tag: v6.1.0 - chain-upgrade-tag: v7.0.0 upgrade-plan-name: "v7" test-entry-point: "TestUpgradeTestSuite" test: "TestV6ToV7ChainUpgrade" upload-logs: true - relayer-type: hermes - upgrade-v7_1-hermes: + upgrade-v7_1: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v7.0.0 chain-b-tag: v7.0.0 - chain-upgrade-tag: v7.1.0 upgrade-plan-name: "v7.1" test-entry-point: "TestUpgradeTestSuite" test: "TestV7ToV7_1ChainUpgrade" upload-logs: true - relayer-type: hermes - upgrade-v8-hermes: + upgrade-v8: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v7.0.0 chain-b-tag: v7.0.0 - chain-upgrade-tag: v8.0.0 upgrade-plan-name: "v8" test-entry-point: "TestUpgradeTestSuite" test: "TestV7ToV8ChainUpgrade" upload-logs: true - relayer-type: hermes - upgrade-v8_1-hermes: + upgrade-v8_1: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v8.0.0 chain-b-tag: v8.0.0 - chain-upgrade-tag: v8.1.0 upgrade-plan-name: "v8.1" test-entry-point: "TestUpgradeTestSuite" test: "TestV8ToV8_1ChainUpgrade" upload-logs: true - relayer-type: hermes - upgrade-v8_1-channel-upgrades-hermes: + upgrade-v8_1-channel-upgrades: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v8.0.0 chain-b-tag: v8.0.0 - chain-upgrade-tag: v8.1.0 upgrade-plan-name: "v8.1" test-entry-point: "TestUpgradeTestSuite" test: "TestV8ToV8_1ChainUpgrade_FeeMiddlewareChannelUpgrade" upload-logs: true - relayer-type: hermes - upgrade-v7-rly: - uses: ./.github/workflows/e2e-test-workflow-call.yml - with: - chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd - chain-a-tag: v6.1.0 - chain-b-tag: v6.1.0 - chain-upgrade-tag: v7.0.0 - upgrade-plan-name: "v7" - test-entry-point: "TestUpgradeTestSuite" - test: "TestV6ToV7ChainUpgrade" - upload-logs: true - relayer-type: rly - relayer-image: ghcr.io/cosmos/relayer - relayer-tag: latest - - upgrade-v7_1-rly: - uses: ./.github/workflows/e2e-test-workflow-call.yml - with: - chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd - chain-a-tag: v7.0.0 - chain-b-tag: v7.0.0 - chain-upgrade-tag: v7.1.0 - upgrade-plan-name: "v7.1" - test-entry-point: "TestUpgradeTestSuite" - test: "TestV7ToV7_1ChainUpgrade" - upload-logs: true - relayer-type: rly - relayer-image: ghcr.io/cosmos/relayer - relayer-tag: latest - - upgrade-v8-rly: - uses: ./.github/workflows/e2e-test-workflow-call.yml - with: - chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd - chain-a-tag: v7.0.0 - chain-b-tag: v7.0.0 - chain-upgrade-tag: v8.0.0 - upgrade-plan-name: "v8" - test-entry-point: "TestUpgradeTestSuite" - test: "TestV7ToV8ChainUpgrade" - upload-logs: true - relayer-type: rly - relayer-image: ghcr.io/cosmos/relayer - relayer-tag: latest - - upgrade-v8_1-rly: - uses: ./.github/workflows/e2e-test-workflow-call.yml - with: - chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd - chain-a-tag: v8.0.0 - chain-b-tag: v8.0.0 - chain-upgrade-tag: v8.1.0 - upgrade-plan-name: "v8.1" - test-entry-point: "TestUpgradeTestSuite" - test: "TestV8ToV8_1ChainUpgrade" - upload-logs: true - relayer-type: rly - relayer-image: ghcr.io/cosmos/relayer - relayer-tag: latest - - upgrade-ibcwasm-v8-hermes: + upgrade-ibcwasm-v8: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-wasm-simd - chain-binary: simd chain-a-tag: v7.3.0-e2e-upgrade chain-b-tag: v7.3.0-e2e-upgrade - chain-upgrade-tag: v8.0.0-e2e-upgrade upgrade-plan-name: "ibcwasm-v8" test-entry-point: "TestIBCWasmUpgradeTestSuite" test: "TestIBCWasmChainUpgrade" upload-logs: true - relayer-type: hermes - - upgrade-v9-hermes: - uses: ./.github/workflows/e2e-test-workflow-call.yml - with: - chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd - chain-a-tag: v8.4.0 - chain-b-tag: v8.4.0 - chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released - upgrade-plan-name: "v9" - test-entry-point: "TestUpgradeTestSuite" - test: "TestV8ToV9ChainUpgrade" - upload-logs: true - relayer-type: hermes - upgrade-v9-rly: + upgrade-v9: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v8.4.0 chain-b-tag: v8.4.0 - chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released upgrade-plan-name: "v9" test-entry-point: "TestUpgradeTestSuite" test: "TestV8ToV9ChainUpgrade" upload-logs: true - relayer-type: rly - relayer-image: ghcr.io/cosmos/relayer - relayer-tag: latest upgrade-v9-localhost: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v8.4.0 chain-b-tag: v8.4.0 - chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released upgrade-plan-name: "v9" test-entry-point: "TestUpgradeTestSuite" test: "TestV8ToV9ChainUpgrade_Localhost" upload-logs: true - relayer-type: hermes - upgrade-v9-channel-upgrades-hermes: + upgrade-v9-channel-upgrades: uses: ./.github/workflows/e2e-test-workflow-call.yml with: chain-image: ghcr.io/cosmos/ibc-go-simd - chain-binary: simd chain-a-tag: v8.4.0 - chain-b-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released - chain-upgrade-tag: main # TODO: Update tag to v9.0.0 once it is (pre)released + chain-b-tag: v9.0.0 upgrade-plan-name: "v9" test-entry-point: "TestUpgradeTestSuite" test: "TestV8ToV9ChainUpgrade_ICS20v2ChannelUpgrade" upload-logs: true - relayer-type: hermes diff --git a/.github/workflows/e2e-wasm.yaml b/.github/workflows/e2e-wasm.yaml index 9d21ea48bdd..08db9c0dfcc 100644 --- a/.github/workflows/e2e-wasm.yaml +++ b/.github/workflows/e2e-wasm.yaml @@ -62,11 +62,9 @@ jobs: build-and-push-docker-image-wasm: true # if the test fails, we upload logs so that we can download them from the UI. upload-logs: true - chain-image: ghcr.io/cosmos/ibc-go-wasm-simd # with regular tests, both images are the same. chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}' chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}' - chain-binary: 'simd' # only run the grandpa test suite for wasm tests. test-entry-point: 'TestGrandpaTestSuite' # exclude transfer tests which rely on removed packet event attributes: # https://github.com/cosmos/ibc-go/issues/6243 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ec9ede27813..e24ff69bf35 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -61,11 +61,9 @@ jobs: build-and-push-docker-image: true # if the test fails, we upload logs so that we can download them from the UI. upload-logs: true - chain-image: ghcr.io/cosmos/ibc-go-simd # with regular tests, both images are the same. chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}' chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}' - chain-binary: 'simd' # on regular PRs we won't run upgrade tests. # NOTE: we are exluding TestTransferTestSuite as we run this full suite instead of each individual test. test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite,TestTransferTestSuite,TestAuthzTransferTestSuite,TestTransferTestSuiteSendReceive,TestTransferTestSuiteSendEnabled,TestTransferLocalhostTestSuite,TestConnectionTestSuite,TestInterchainAccountsGovTestSuite,TestIncentivizedTransferTestSuite,TestTransferForwardingTestSuite' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b28afcd9f27..813b13fcc4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 with: context: . push: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e958e183463..fcee6f0b4e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,7 +146,7 @@ jobs: name: '${{ github.sha }}-03-coverage' - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} - uses: SonarSource/sonarcloud-github-action@v3.1.0 + uses: SonarSource/sonarcloud-github-action@v4.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/wasm-client.yml b/.github/workflows/wasm-client.yml index c5bcdaac9c4..f947cac3b79 100644 --- a/.github/workflows/wasm-client.yml +++ b/.github/workflows/wasm-client.yml @@ -68,7 +68,7 @@ jobs: steps: - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} - uses: SonarSource/sonarcloud-github-action@v3.1.0 + uses: SonarSource/sonarcloud-github-action@v4.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.golangci.yml b/.golangci.yml index 99a7c1eadf8..3165ce2a84a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,25 +16,26 @@ linters: - ineffassign - misspell - nakedret + - revive - staticcheck - - thelper - - typecheck - stylecheck - - revive - - typecheck - tenv + - thelper + - typecheck - unconvert # Prefer unparam over revive's unused param. It is more thorough in its checking. - unparam - unused - - misspell issues: exclude-rules: - - text: 'differs only by capitalization to method' + - text: "differs only by capitalization to method" linters: - revive - - text: 'Use of weak random number generator' + - text: "Use of weak random number generator" + linters: + - gosec + - text: "G115: integer overflow conversion" linters: - gosec - linters: @@ -56,11 +57,25 @@ linters-settings: - prefix(github.com/cometbft/cometbft) - prefix(github.com/cosmos/ibc-go) custom-order: true + gocritic: + disabled-checks: + - appendAssign + gosec: + # Available rules: https://github.com/securego/gosec#available-rules + excludes: + - G101 # Potential hardcoded credentials + - G107 # Potential HTTP request made with variable url + - G115 # Integer overflow conversion (used everywhere with int64 -> uint64 block height) + - G404 # Use of weak random number generator (math/rand instead of crypto/rand) + exclude-generated: true + confidence: medium revive: enable-all-rules: true # Do NOT whine about the following, full explanation found in: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#description-of-available-rules rules: + - name: redundant-import-alias + disabled: true - name: use-any disabled: true - name: if-return @@ -109,7 +124,7 @@ linters-settings: - name: unhandled-error disabled: false arguments: - - 'fmt.Printf' - - 'fmt.Print' - - 'fmt.Println' - - 'myFunction' + - "fmt.Printf" + - "fmt.Print" + - "fmt.Println" + - "myFunction" diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f9200953d2..48438165af4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,16 +36,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -### Testing - -* [\#7430](https://github.com/cosmos/ibc-go/pull/7430) Update the block proposer in test chains for each block. - ### Dependencies -* [\#7540](https://github.com/cosmos/ibc-go/pull/7540) Bump CometBFT to v0.38.15. +* [\#7261](https://github.com/cosmos/ibc-go/pull/7261) Bump CometBFT to v1.0.0. +* [\#7261](https://github.com/cosmos/ibc-go/pull/7261) Bump Cosmos SDK to v0.52.0. ### API Breaking +* (apps/27-interchain-accounts) [\#7713](https://github.com/cosmos/ibc-go/pull/7713) Update interchain accounts `GenerateAddress` func to now accept `header.Info` in favour of `sdk.Context`. This function now uses `AppHash` and `Hash` (merkle root of block) instead of `AppHash` and `DataHash` as pre-image data for address generation. * (core, apps) [\#7213](https://github.com/cosmos/ibc-go/pull/7213) Remove capabilities from `SendPacket`. * (core, apps) [\#7213](https://github.com/cosmos/ibc-go/pull/7225) Remove capabilities from `WriteAcknowledgement`. * (core, apps) [\#7232](https://github.com/cosmos/ibc-go/pull/7232) Remove capabilities from channel handshake methods. TODO list all changes @@ -63,6 +61,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* (testing)[\#7430](https://github.com/cosmos/ibc-go/pull/7430) Update the block proposer in test chains for each block. + ### Features ### Bug Fixes diff --git a/Dockerfile b/Dockerfile index 9a2955c0b40..1717bc183c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM golang:1.23.2-alpine as builder +FROM golang:1.23.3-alpine as builder ARG IBC_GO_VERSION -RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make; +RUN set -eux; apk add --no-cache gcc git libusb-dev linux-headers make musl-dev; ENV GOPATH="" diff --git a/cmd/build_test_matrix/main.go b/cmd/build_test_matrix/main.go index ad77e04c50d..3acb402e50f 100644 --- a/cmd/build_test_matrix/main.go +++ b/cmd/build_test_matrix/main.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "errors" "fmt" "go/ast" "go/parser" @@ -139,7 +140,7 @@ func getGithubActionMatrixForTests(e2eRootDirectory, testName string, suite stri } if len(gh.Include) == 0 { - return GithubActionTestMatrix{}, fmt.Errorf("no test cases found") + return GithubActionTestMatrix{}, errors.New("no test cases found") } // Sort the test cases by name so that the order is consistent. diff --git a/docs/architecture/adr-015-ibc-packet-receiver.md b/docs/architecture/adr-015-ibc-packet-receiver.md index 591694ba3b8..3fbe090ce94 100644 --- a/docs/architecture/adr-015-ibc-packet-receiver.md +++ b/docs/architecture/adr-015-ibc-packet-receiver.md @@ -295,5 +295,5 @@ Proposed ## References -- Relevant comment: [cosmos/ics#289](https://github.com/cosmos/ics/issues/289#issuecomment-544533583) +- Relevant comment: [cosmos/ics#289](https://github.com/cosmos/ibc/issues/289#issuecomment-544533583) - [ICS26 - Routing Module](https://github.com/cosmos/ibc/tree/master/spec/core/ics-026-routing-module) diff --git a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md index 2c295ad9ae7..efad623b5c9 100644 --- a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md +++ b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md @@ -84,7 +84,7 @@ No neutral consequences. ## References -- [Prior discussion](https://github.com/cosmos/ics/issues/421) -- [Epoch number discussion](https://github.com/cosmos/ics/issues/439) -- [Upgrade plan discussion](https://github.com/cosmos/ics/issues/445) +- [Prior discussion](https://github.com/cosmos/ibc/issues/421) +- [Epoch number discussion](https://github.com/cosmos/ibc/issues/439) +- [Upgrade plan discussion](https://github.com/cosmos/ibc/issues/445) - [Migration from gov v1beta1 to gov v1](https://github.com/cosmos/ibc-go/issues/3672) diff --git a/docs/client/swagger-ui/swagger.yaml b/docs/client/swagger-ui/swagger.yaml index bb8d6cb6d2a..6f8b634ede4 100644 --- a/docs/client/swagger-ui/swagger.yaml +++ b/docs/client/swagger-ui/swagger.yaml @@ -593,7 +593,9 @@ paths: - Query /ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets: get: - summary: Gets all incentivized packets for a specific channel + summary: >- + IncentivizedPacketsForChannel retrieves all incentivized packets for a + specific channel operationId: IncentivizedPacketsForChannel responses: '200': diff --git a/docs/dev/release-management.md b/docs/dev/release-management.md index 246f1bd3ea3..668e85a7c5c 100644 --- a/docs/dev/release-management.md +++ b/docs/dev/release-management.md @@ -70,7 +70,6 @@ Additionally, for the first point release of a new major or minor release branch - Update the table of supported release lines (and End of Life dates) in [`RELEASES.md`](../../RELEASES.md): add the new release line and remove any release lines that might have become discontinued. - Update the [list of supported release lines in README.md](../../RELEASES.md#releases), if necessary. -- Update the [e2e compatibility test matrices](https://github.com/cosmos/ibc-go/tree/main/.github/compatibility-test-matrices): add the tag for the new release and remove any tags that might not be recommended anymore. - Update the manual [e2e `simd`](https://github.com/cosmos/ibc-go/blob/main/.github/workflows/e2e-manual-simd.yaml) test workflow: - Remove any tags that might not be recommended anymore. - Update docs site: diff --git a/docs/docs/01-ibc/01-overview.md b/docs/docs/01-ibc/01-overview.md index d2918a09519..504a0c4039d 100644 --- a/docs/docs/01-ibc/01-overview.md +++ b/docs/docs/01-ibc/01-overview.md @@ -157,7 +157,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light clients as bytes. It is up to light client implementations to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/cosmos/ics23) implementation. ### [Ports](https://github.com/cosmos/ibc-go/blob/main/modules/core/05-port) diff --git a/docs/docs/01-ibc/02-integration.md b/docs/docs/01-ibc/02-integration.md index def03102de0..4a2a771590d 100644 --- a/docs/docs/01-ibc/02-integration.md +++ b/docs/docs/01-ibc/02-integration.md @@ -255,7 +255,7 @@ app.ModuleManager = module.NewManager( ### Application ABCI ordering -One addition from IBC is the concept of `HistoricalInfo` which is stored in the Cosmos SDK `x/staking` module. The number of records stored by `x/staking` is controlled by the `HistoricalEntries` parameter which stores `HistoricalInfo` on a per height basis. +One addition from IBC is the concept of `HistoricalInfo` which is stored in the Cosmos SDK `x/staking` module. The number of records stored by `x/staking` is controlled by the `HistoricalEntries` parameter which stores `HistoricalInfo` on a per-height basis. Each entry contains the historical information for the `Header` and `ValidatorSet` of this chain which is stored at each height during the `BeginBlock` call. The `HistoricalInfo` is required to introspect a blockchain's prior state at a given height in order to verify the light client `ConsensusState` during the connection handshake. diff --git a/docs/docs/01-ibc/05-upgrades/00-intro.md b/docs/docs/01-ibc/05-upgrades/00-intro.md index 61711d35f01..d9b8ef25fae 100644 --- a/docs/docs/01-ibc/05-upgrades/00-intro.md +++ b/docs/docs/01-ibc/05-upgrades/00-intro.md @@ -9,7 +9,7 @@ slug: /ibc/upgrades/intro This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/docs/02-apps/01-transfer/09-client.md b/docs/docs/02-apps/01-transfer/09-client.md index 3ba88e6dfc1..80c3910b3de 100644 --- a/docs/docs/02-apps/01-transfer/09-client.md +++ b/docs/docs/02-apps/01-transfer/09-client.md @@ -41,8 +41,8 @@ of amount and denomination (e.g. `100uatom,100uosmo`) in the `coins` option. The additional flags that can be used with the command are: - `--packet-timeout-height` to specify the timeout block height in the format `{revision}-{height}`. The default value is `0-0`, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with `--absolute-timeouts` set to true. -- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (fromthe current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. -- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout timeout is considered relative to current UTC time). +- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (from the current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. +- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout is considered relative to current UTC time). - `--memo` to specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination. - `--forwarding` to specify forwarding information in the form of a comma separated list of source port ID/channel ID pairs at each intermediary chain (e.g. `transfer/channel-0,transfer/channel-1`). - `--unwind` to specify if the tokens must be automatically unwound to there origin chain. This option can be used in combination with `--forwarding` to forward the tokens to the final destination after unwinding. When this flag is true, the tokens specified in the `coins` option must all have the same denomination trace path (i.e. all tokens must be IBC vouchers sharing exactly the same set of destination port/channel IDs in their denomination trace path). Arguments `[src-port]` and `[src-channel]` must not be passed if the `--unwind` flag is specified. diff --git a/docs/docs/02-apps/01-transfer/10-ICS20-v1/09-client.md b/docs/docs/02-apps/01-transfer/10-ICS20-v1/09-client.md index 20d8c2f10a0..2634673adca 100644 --- a/docs/docs/02-apps/01-transfer/10-ICS20-v1/09-client.md +++ b/docs/docs/02-apps/01-transfer/10-ICS20-v1/09-client.md @@ -44,8 +44,8 @@ The `coins` parameter accepts the amount and denomination (e.g. `100uatom`) of t The additional flags that can be used with the command are: - `--packet-timeout-height` to specify the timeout block height in the format `{revision}-{height}`. The default value is `0-0`, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with `--absolute-timeouts` set to true. -- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (fromthe current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. -- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout timeout is considered relative to current UTC time). +- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (from the current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. +- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout is considered relative to current UTC time). - `--memo` to specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination. #### `total-escrow` diff --git a/docs/docs/04-middleware/02-callbacks/01-overview.md b/docs/docs/04-middleware/02-callbacks/01-overview.md index eae194b2b96..6dce7ed4759 100644 --- a/docs/docs/04-middleware/02-callbacks/01-overview.md +++ b/docs/docs/04-middleware/02-callbacks/01-overview.md @@ -51,5 +51,5 @@ And the following diagram shows how a typical `SendPacket` and `WriteAcknowledge - The receive packet callback does not pass IBC Actor's address, this is because the IBC Actor lives in the counterparty chain and cannot be trusted. :::warning -If the callbacks middleware wraps the transfer application, we strongly discourage the usage of source callbacks if [`MsgTransfer` includes forwarding information](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L54-L55) (which is only supported from ICS20 v2). Source callback information will be executed on the last hop before the destination chain, not on the sending chain. The explanation for this behaviour is that, if the tokens are routed through intermediary chains, then the transfer application on the sending chain will construct a packet data where the [`memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L38) is empty, and any [memo string](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L51) included in `MsgTransfer` is placed in the [`destination_memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L48). This makes it impossible to trigger the source callbacks on the sending chain, since the memo string is not available in the `memo` field. Then, on the chain before the final destination chain, the transfer application will construct the packet data with the memo string back in the `memo` field, so that it can be consumed by the callbacks middleware on the destination chain. However, if the `memo` field of `FungibleTokenPacketDataV2` is not empty on the chain before the final destination and the transfer application on that chain is wrapped by callbacks middleware, then the source callbacks would be triggered. Therefore, in order to prevent this unexpected behaviour (i.e. source callbacks triggered not on sending chain, but on the intermediary chain before the final destination) we are strongly recommeding to not include source callbacks information in the `memo` field of `MsgTransfer`. +If the callbacks middleware wraps the transfer application, we strongly discourage the usage of source callbacks if [`MsgTransfer` includes forwarding information](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L54-L55) (which is only supported from ICS20 v2). Source callback information will be executed on the last hop before the destination chain, not on the sending chain. The explanation for this behaviour is that, if the tokens are routed through intermediary chains, then the transfer application on the sending chain will construct a packet data where the [`memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L38) is empty, and any [memo string](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L51) included in `MsgTransfer` is placed in the [`destination_memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L48). This makes it impossible to trigger the source callbacks on the sending chain, since the memo string is not available in the `memo` field. Then, on the chain before the final destination chain, the transfer application will construct the packet data with the memo string back in the `memo` field, so that it can be consumed by the callbacks middleware on the destination chain. However, if the `memo` field of `FungibleTokenPacketDataV2` is not empty on the chain before the final destination and the transfer application on that chain is wrapped by callbacks middleware, then the source callbacks would be triggered. Therefore, in order to prevent this unexpected behaviour (i.e. source callbacks triggered not on sending chain, but on the intermediary chain before the final destination) we are strongly recommending to not include source callbacks information in the `memo` field of `MsgTransfer`. ::: diff --git a/docs/tutorials/02-channel-upgrades/06-incentivize-packet.md b/docs/tutorials/02-channel-upgrades/06-incentivize-packet.md index 49139fde97f..ef766ad6e2e 100644 --- a/docs/tutorials/02-channel-upgrades/06-incentivize-packet.md +++ b/docs/tutorials/02-channel-upgrades/06-incentivize-packet.md @@ -30,7 +30,7 @@ simd q ibc-fee counterparty-payee channel-0 $RLY_CHAIN2 --node http://localhost: counterparty_payee: cosmos1vdy5fp0jy2l2ees870a7mls357v7uad6ufzcyz ``` -We see that the counterparty payee address matches what we expected (i.e. the `RLY_CHAIN1` address). In this tutorial we are going to send only one packet from chain `chain1` to chain `chain2`, so we only need to register the counterparty payee on chain `chain2`. In real life circumstances relayers relay packets on both directions (i.e. from chain `chain1` to `chain2` and also viceversa), and thus relayers should register as well on chain `chain1` the counterparty payee address to be compensated for delivering the `MsgRecvPacket` on chain `chain1`. +We see that the counterparty payee address matches what we expected (i.e. the `RLY_CHAIN1` address). In this tutorial we are going to send only one packet from chain `chain1` to chain `chain2`, so we only need to register the counterparty payee on chain `chain2`. In real life circumstances relayers relay packets on both directions (i.e. from chain `chain1` to `chain2` and also vice-versa), and thus relayers should register as well on chain `chain1` the counterparty payee address to be compensated for delivering the `MsgRecvPacket` on chain `chain1`. ## Multi-message transaction with single `MsgPayPacketFee` message diff --git a/docs/versioned_docs/version-v4.6.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v4.6.x/01-ibc/01-overview.md index 3bb823536d6..a804002a2e7 100644 --- a/docs/versioned_docs/version-v4.6.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v4.6.x/01-ibc/01-overview.md @@ -137,7 +137,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light-clients as bytes. It is up to light client implementation to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/confio/ics23) implementation. ### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/advanced/10-ocap.md) diff --git a/docs/versioned_docs/version-v4.6.x/01-ibc/05-upgrades/00-intro.md b/docs/versioned_docs/version-v4.6.x/01-ibc/05-upgrades/00-intro.md index 3ff92aba64f..8d2b85c6f30 100644 --- a/docs/versioned_docs/version-v4.6.x/01-ibc/05-upgrades/00-intro.md +++ b/docs/versioned_docs/version-v4.6.x/01-ibc/05-upgrades/00-intro.md @@ -9,7 +9,7 @@ slug: /ibc/upgrades/intro This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/versioned_docs/version-v5.4.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v5.4.x/01-ibc/01-overview.md index 3bb823536d6..a804002a2e7 100644 --- a/docs/versioned_docs/version-v5.4.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v5.4.x/01-ibc/01-overview.md @@ -137,7 +137,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light-clients as bytes. It is up to light client implementation to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/confio/ics23) implementation. ### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/advanced/10-ocap.md) diff --git a/docs/versioned_docs/version-v5.4.x/01-ibc/05-upgrades/00-intro.md b/docs/versioned_docs/version-v5.4.x/01-ibc/05-upgrades/00-intro.md index 14c82d3ff0d..4fd3f740ca7 100644 --- a/docs/versioned_docs/version-v5.4.x/01-ibc/05-upgrades/00-intro.md +++ b/docs/versioned_docs/version-v5.4.x/01-ibc/05-upgrades/00-intro.md @@ -2,7 +2,7 @@ This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/versioned_docs/version-v6.3.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v6.3.x/01-ibc/01-overview.md index 3bb823536d6..a804002a2e7 100644 --- a/docs/versioned_docs/version-v6.3.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v6.3.x/01-ibc/01-overview.md @@ -137,7 +137,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light-clients as bytes. It is up to light client implementation to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/confio/ics23) implementation. ### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/advanced/10-ocap.md) diff --git a/docs/versioned_docs/version-v6.3.x/01-ibc/05-upgrades/00-intro.md b/docs/versioned_docs/version-v6.3.x/01-ibc/05-upgrades/00-intro.md index 3ff92aba64f..8d2b85c6f30 100644 --- a/docs/versioned_docs/version-v6.3.x/01-ibc/05-upgrades/00-intro.md +++ b/docs/versioned_docs/version-v6.3.x/01-ibc/05-upgrades/00-intro.md @@ -9,7 +9,7 @@ slug: /ibc/upgrades/intro This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/versioned_docs/version-v6.3.x/04-migrations/05-v3-to-v4.md b/docs/versioned_docs/version-v6.3.x/04-migrations/05-v3-to-v4.md index d916ec51252..859e135b1d6 100644 --- a/docs/versioned_docs/version-v6.3.x/04-migrations/05-v3-to-v4.md +++ b/docs/versioned_docs/version-v6.3.x/04-migrations/05-v3-to-v4.md @@ -157,4 +157,4 @@ if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, 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). +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/versioned_docs/version-v7.8.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v7.8.x/01-ibc/01-overview.md index 637508f6359..33a152c3624 100644 --- a/docs/versioned_docs/version-v7.8.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v7.8.x/01-ibc/01-overview.md @@ -137,7 +137,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light-clients as bytes. It is up to light client implementation to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/cosmos/ics23) implementation. ### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/advanced/10-ocap.md) diff --git a/docs/versioned_docs/version-v7.8.x/01-ibc/05-upgrades/00-intro.md b/docs/versioned_docs/version-v7.8.x/01-ibc/05-upgrades/00-intro.md index d97ac898277..3b979ea9c9f 100644 --- a/docs/versioned_docs/version-v7.8.x/01-ibc/05-upgrades/00-intro.md +++ b/docs/versioned_docs/version-v7.8.x/01-ibc/05-upgrades/00-intro.md @@ -9,7 +9,7 @@ slug: /ibc/upgrades/intro This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connnected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/versioned_docs/version-v8.5.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v8.5.x/01-ibc/01-overview.md index 62673d6c171..e0bf581dea4 100644 --- a/docs/versioned_docs/version-v8.5.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v8.5.x/01-ibc/01-overview.md @@ -157,7 +157,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light-clients as bytes. It is up to light client implementation to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/cosmos/ics23) implementation. ### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/learn/advanced/10-ocap.md) diff --git a/docs/versioned_docs/version-v8.5.x/01-ibc/05-upgrades/00-intro.md b/docs/versioned_docs/version-v8.5.x/01-ibc/05-upgrades/00-intro.md index 61711d35f01..d9b8ef25fae 100644 --- a/docs/versioned_docs/version-v8.5.x/01-ibc/05-upgrades/00-intro.md +++ b/docs/versioned_docs/version-v8.5.x/01-ibc/05-upgrades/00-intro.md @@ -9,7 +9,7 @@ slug: /ibc/upgrades/intro This directory contains information on how to upgrade an IBC chain without breaking counterparty clients and connections. -IBC-connected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform a IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. +IBC-connected chains must be able to upgrade without breaking connections to other chains. Otherwise there would be a massive disincentive towards upgrading and disrupting high-value IBC connections, thus preventing chains in the IBC ecosystem from evolving and improving. Many chain upgrades may be irrelevant to IBC, however some upgrades could potentially break counterparty clients if not handled correctly. Thus, any IBC chain that wishes to perform an IBC-client-breaking upgrade must perform an IBC upgrade in order to allow counterparty clients to securely upgrade to the new light client. 1. The [quick-guide](./01-quick-guide.md) describes how IBC-connected chains can perform client-breaking upgrades and how relayers can securely upgrade counterparty clients using the SDK. 2. The [developer-guide](./02-developer-guide.md) is a guide for developers intending to develop IBC client implementations with upgrade functionality. diff --git a/docs/versioned_docs/version-v8.5.x/01-ibc/10-roadmap.md b/docs/versioned_docs/version-v8.5.x/01-ibc/10-roadmap.md index 962108bbde7..0ebf3ea6f51 100644 --- a/docs/versioned_docs/version-v8.5.x/01-ibc/10-roadmap.md +++ b/docs/versioned_docs/version-v8.5.x/01-ibc/10-roadmap.md @@ -33,7 +33,7 @@ Follow the progress with the [alpha milestone](https://github.com/cosmos/ibc-go/ ### Conditional clients -Conditional clients are light clients which are dependent on another client in order to verify or update state. Conditional clients are essential for integration with modular blockchains which break up consensus and state management, such as rollups. Currently, light clients receive a single provable store they maintain. There is an unidirectional communication channel with 02-client: the 02-client module will call into the light client, without allowing for the light client to call into the 02-client module. But modular blockchains break up a logical blockchain into many constituent parts, so in order to accurately represent these chains and also to account for various types of shared security primitives that are coming up, we need to introduce dependencies between clients. In the case of optimistic rollups, for example, in order to prove execution (allowing for fraud proofs), you must prove data availability and sequencing. A potential solution to this problem is that a light client may optionally specify a list of dependencies and the 02-client module would lookup read-only provable stores for each dependency and provide this to the conditional client to perform verification. Please see [this issue](https://github.com/cosmos/ibc-go/issues/5112) for more details. +Conditional clients are light clients which are dependent on another client in order to verify or update state. Conditional clients are essential for integration with modular blockchains which break up consensus and state management, such as rollups. Currently, light clients receive a single provable store they maintain. There is a unidirectional communication channel with 02-client: the 02-client module will call into the light client, without allowing for the light client to call into the 02-client module. But modular blockchains break up a logical blockchain into many constituent parts, so in order to accurately represent these chains and also to account for various types of shared security primitives that are coming up, we need to introduce dependencies between clients. In the case of optimistic rollups, for example, in order to prove execution (allowing for fraud proofs), you must prove data availability and sequencing. A potential solution to this problem is that a light client may optionally specify a list of dependencies and the 02-client module would lookup read-only provable stores for each dependency and provide this to the conditional client to perform verification. Please see [this issue](https://github.com/cosmos/ibc-go/issues/5112) for more details. ## v10.0.0 diff --git a/docs/versioned_docs/version-v9.0.x/01-ibc/01-overview.md b/docs/versioned_docs/version-v9.0.x/01-ibc/01-overview.md index d2918a09519..504a0c4039d 100644 --- a/docs/versioned_docs/version-v9.0.x/01-ibc/01-overview.md +++ b/docs/versioned_docs/version-v9.0.x/01-ibc/01-overview.md @@ -157,7 +157,7 @@ under the path and a proof to the counterparty chain. Proofs are passed from core IBC to light clients as bytes. It is up to light client implementations to interpret these bytes appropriately. - The paths that all IBC implementations must use for committing IBC messages is defined in -[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). +[ICS-24 Host State Machine Requirements](https://github.com/cosmos/ibc/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/cosmos/ics23) implementation. ### [Ports](https://github.com/cosmos/ibc-go/blob/main/modules/core/05-port) diff --git a/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/09-client.md b/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/09-client.md index 3ba88e6dfc1..80c3910b3de 100644 --- a/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/09-client.md +++ b/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/09-client.md @@ -41,8 +41,8 @@ of amount and denomination (e.g. `100uatom,100uosmo`) in the `coins` option. The additional flags that can be used with the command are: - `--packet-timeout-height` to specify the timeout block height in the format `{revision}-{height}`. The default value is `0-0`, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with `--absolute-timeouts` set to true. -- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (fromthe current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. -- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout timeout is considered relative to current UTC time). +- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (from the current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. +- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout is considered relative to current UTC time). - `--memo` to specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination. - `--forwarding` to specify forwarding information in the form of a comma separated list of source port ID/channel ID pairs at each intermediary chain (e.g. `transfer/channel-0,transfer/channel-1`). - `--unwind` to specify if the tokens must be automatically unwound to there origin chain. This option can be used in combination with `--forwarding` to forward the tokens to the final destination after unwinding. When this flag is true, the tokens specified in the `coins` option must all have the same denomination trace path (i.e. all tokens must be IBC vouchers sharing exactly the same set of destination port/channel IDs in their denomination trace path). Arguments `[src-port]` and `[src-channel]` must not be passed if the `--unwind` flag is specified. diff --git a/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/10-ICS20-v1/09-client.md b/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/10-ICS20-v1/09-client.md index 20d8c2f10a0..2634673adca 100644 --- a/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/10-ICS20-v1/09-client.md +++ b/docs/versioned_docs/version-v9.0.x/02-apps/01-transfer/10-ICS20-v1/09-client.md @@ -44,8 +44,8 @@ The `coins` parameter accepts the amount and denomination (e.g. `100uatom`) of t The additional flags that can be used with the command are: - `--packet-timeout-height` to specify the timeout block height in the format `{revision}-{height}`. The default value is `0-0`, which effectively disables the timeout. Timeout height can only be absolute, therefore this option must be used in combination with `--absolute-timeouts` set to true. -- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (fromthe current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. -- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout timeout is considered relative to current UTC time). +- `--packet-timeout-timestamp` to specify the timeout timestamp in nanoseconds. The timeout can be either relative (from the current UTC time) or absolute. The default value is 10 minutes (and thus relative). The timeout is disabled when set to 0. +- `--absolute-timeouts` to interpret the timeout timestamp as an absolute value (when set to true). The default value is false (and thus the timeout is considered relative to current UTC time). - `--memo` to specify the memo string to be sent along with the transfer packet. If forwarding is used, then the memo string will be carried through the intermediary chains to the final destination. #### `total-escrow` diff --git a/docs/versioned_docs/version-v9.0.x/04-middleware/02-callbacks/01-overview.md b/docs/versioned_docs/version-v9.0.x/04-middleware/02-callbacks/01-overview.md index eae194b2b96..6dce7ed4759 100644 --- a/docs/versioned_docs/version-v9.0.x/04-middleware/02-callbacks/01-overview.md +++ b/docs/versioned_docs/version-v9.0.x/04-middleware/02-callbacks/01-overview.md @@ -51,5 +51,5 @@ And the following diagram shows how a typical `SendPacket` and `WriteAcknowledge - The receive packet callback does not pass IBC Actor's address, this is because the IBC Actor lives in the counterparty chain and cannot be trusted. :::warning -If the callbacks middleware wraps the transfer application, we strongly discourage the usage of source callbacks if [`MsgTransfer` includes forwarding information](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L54-L55) (which is only supported from ICS20 v2). Source callback information will be executed on the last hop before the destination chain, not on the sending chain. The explanation for this behaviour is that, if the tokens are routed through intermediary chains, then the transfer application on the sending chain will construct a packet data where the [`memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L38) is empty, and any [memo string](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L51) included in `MsgTransfer` is placed in the [`destination_memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L48). This makes it impossible to trigger the source callbacks on the sending chain, since the memo string is not available in the `memo` field. Then, on the chain before the final destination chain, the transfer application will construct the packet data with the memo string back in the `memo` field, so that it can be consumed by the callbacks middleware on the destination chain. However, if the `memo` field of `FungibleTokenPacketDataV2` is not empty on the chain before the final destination and the transfer application on that chain is wrapped by callbacks middleware, then the source callbacks would be triggered. Therefore, in order to prevent this unexpected behaviour (i.e. source callbacks triggered not on sending chain, but on the intermediary chain before the final destination) we are strongly recommeding to not include source callbacks information in the `memo` field of `MsgTransfer`. +If the callbacks middleware wraps the transfer application, we strongly discourage the usage of source callbacks if [`MsgTransfer` includes forwarding information](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L54-L55) (which is only supported from ICS20 v2). Source callback information will be executed on the last hop before the destination chain, not on the sending chain. The explanation for this behaviour is that, if the tokens are routed through intermediary chains, then the transfer application on the sending chain will construct a packet data where the [`memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L38) is empty, and any [memo string](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v1/tx.proto#L51) included in `MsgTransfer` is placed in the [`destination_memo` field](https://github.com/cosmos/ibc-go/blob/v9.0.0-rc.0/proto/ibc/applications/transfer/v2/packet.proto#L48). This makes it impossible to trigger the source callbacks on the sending chain, since the memo string is not available in the `memo` field. Then, on the chain before the final destination chain, the transfer application will construct the packet data with the memo string back in the `memo` field, so that it can be consumed by the callbacks middleware on the destination chain. However, if the `memo` field of `FungibleTokenPacketDataV2` is not empty on the chain before the final destination and the transfer application on that chain is wrapped by callbacks middleware, then the source callbacks would be triggered. Therefore, in order to prevent this unexpected behaviour (i.e. source callbacks triggered not on sending chain, but on the intermediary chain before the final destination) we are strongly recommending to not include source callbacks information in the `memo` field of `MsgTransfer`. ::: diff --git a/e2e/README.md b/e2e/README.md index 5aca98902ea..abaeea20c87 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -190,7 +190,7 @@ And providing the git tag. To trigger the compatibility tests for a release branch, you can trigger these manually from the Github UI. This will build an image from the tip of the release branch and run all tests specified in the corresponding -json matrix files under [.github/compatibility-test-matrices](../.github/compatibility-test-matrices). +E2E test annotations. Navigate to `Actions` -> `Compatibility E2E` -> `Run Workflow` -> `release/v8.0.x` diff --git a/e2e/ci-e2e-config.yaml b/e2e/ci-e2e-config.yaml new file mode 100644 index 00000000000..bb94e1cc50f --- /dev/null +++ b/e2e/ci-e2e-config.yaml @@ -0,0 +1,68 @@ +# This file contains configuration for running e2e tests. +# Many of these fields can be overridden with environment variables. +# All fields that support this have the corresponding environment variable name in a comment beside the field. + +# | Environment Variable | Description | Default Value | +# |----------------------|-------------------------------------------|------------------------------| +# | CHAIN_IMAGE | The image that will be used for the chain | ghcr.io/cosmos/ibc-go-simd | +# | CHAIN_A_TAG | The tag used for chain A | N/A (must be set) | +# | CHAIN_B_TAG | The tag used for chain B | N/A (must be set) | +# | CHAIN_BINARY | The binary used in the container | simd | +# | RELAYER_TAG | The tag used for the relayer | 1.10.4 | +# | RELAYER_ID | The type of relayer to use (rly/hermes) | hermes | + +# see sample.config.yaml for a bare minimum configuration example. +# set env E2E_CONFIG_PATH to point to this file to use it. +--- +chains: + # the entry at index 0 corresponds to CHAIN_A + - chainId: chainA-1 + numValidators: 4 + numFullNodes: 1 + image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE + binary: simd # override with CHAIN_BINARY + + # the entry at index 1 corresponds to CHAIN_B + - chainId: chainB-1 + numValidators: 4 + numFullNodes: 1 + image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE + binary: simd # override with CHAIN_BINARY + +# activeRelayer must match the id of a relayer specified in the relayers list below. +activeRelayer: hermes # override with RELAYER_ID + +relayers: + - id: hermes + image: ghcr.io/informalsystems/hermes + tag: "1.10.4" + - id: rly + image: ghcr.io/cosmos/relayer + tag: "latest" + - id: hyperspace + image: ghcr.io/misko9/hyperspace + tag: "20231122v39" + +cometbft: + logLevel: info + +debug: + # setting this value to true will force log collection even if the test passes. + dumpLogs: false + # settings this value to true will keep the containers running after the test finishes. + keepContainers: true + +upgradePlanName: "" +upgrades: + - planName: "v7" + tag: "v7.0.0" + - planName: "v7.1" + tag: "v7.1.0" + - planName: "v8" + tag: "v8.0.0" + - planName: "v8.1" + tag: "v8.1.0" + - planName: "v9" + tag: "v9.0.0" + - planName: "ibcwasm-v8" + tag: "v8.0.0-e2e-upgrade" diff --git a/e2e/go.mod b/e2e/go.mod index d2975ab144f..34876ccae4d 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -1,8 +1,6 @@ module github.com/cosmos/ibc-go/e2e -go 1.23.2 - -toolchain go1.23.3 +go 1.23.3 // needed temporarily for v9. replace ( @@ -25,25 +23,25 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 golang.org/x/mod v0.22.0 - google.golang.org/grpc v1.68.0 + google.golang.org/grpc v1.69.0 gopkg.in/yaml.v2 v2.4.0 ) require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.42.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect cosmossdk.io/api v0.8.0 // indirect - cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b // indirect cosmossdk.io/core v1.0.0 // indirect cosmossdk.io/depinject v1.1.0 // indirect cosmossdk.io/log v1.5.0 // indirect - cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/schema v0.4.0 // indirect cosmossdk.io/store v1.1.1 // indirect cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf @@ -57,7 +55,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf // indirect cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf // indirect - cosmossdk.io/x/tx v1.0.0-alpha.2 // indirect + cosmossdk.io/x/tx v1.0.0-alpha.3 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -67,15 +65,13 @@ require ( github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/avast/retry-go/v4 v4.5.1 // indirect - github.com/aws/aws-sdk-go v1.54.6 // indirect + github.com/aws/aws-sdk-go v1.55.5 // 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.2.0 // indirect github.com/bits-and-blooms/bitset v1.12.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -123,10 +119,10 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -134,7 +130,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.6 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect @@ -159,7 +155,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -180,7 +176,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect @@ -209,27 +205,27 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.6.0 // indirect golang.org/x/tools v0.27.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect - google.golang.org/protobuf v1.35.2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -247,7 +243,7 @@ require ( require cosmossdk.io/x/group v0.0.0-00010101000000-000000000000 require ( - cosmossdk.io/client/v2 v2.0.0-beta.5 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.6 // indirect cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect cosmossdk.io/x/accounts v0.0.0-20240913065641-0064ccbce64e // indirect cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 // indirect @@ -258,11 +254,13 @@ require ( cosmossdk.io/x/nft v0.0.0-00010101000000-000000000000 // indirect github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bytedance/sonic v1.12.4 // indirect github.com/bytedance/sonic/loader v0.2.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect github.com/klauspost/cpuid/v2 v2.2.9 // indirect @@ -293,32 +291,32 @@ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.2021 replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf + cosmossdk.io/api => cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // pseudo version lower than the latest tag - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b ) diff --git a/e2e/go.sum b/e2e/go.sum index 27a411711d8..28a0154915f 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -76,8 +76,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -115,14 +115,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -179,8 +179,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -192,14 +192,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 h1:yNrJKENUaZuFTkNmwP4KgXQqk2boGNUAzVyXLdFJNXU= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9/go.mod h1:pPUWNdsU8ghYzPOeVD2sAzPVh2yniq215XjRYubdO4I= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf h1:ofV6lCxevAZvr9iRpFQLkMucYbojplFS3/ACnq6JsoY= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf/go.mod h1:iu6iZy/kgiWTvIxO1Dn49JWTE32qorpGysRVDoMG8uY= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 h1:F8emcx9K/aJHoyEan8FgEA0RaDrsIBVXxtkHOtbm9AI= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 h1:0266beLan2snXZMeELYMpTVcFjlSgzHhLBKxSuNVZUI= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608/go.mod h1:edvI8tMINqCH75EgkOEMnCZEQ3iKJgOlZ+ZxOu4gmXU= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 h1:umN3k+AZ91ZjYv3CDiTgFDaWe22w3JxpeJmepUwKXV8= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608/go.mod h1:Xxz5u4rK+ArCsRo9TMSirg6jPMdva6BHv9Db65OkN/Q= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b h1:smupoVhpdK+5pztIylyIGkCc+0QaAaGLEvnM7Wnrq18= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 h1:w+/cxqYHud1plzCTIvEBtab6RqpgAl2C5Hgn1l4p+oo= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608/go.mod h1:gCTZBT00tI2zTQy65aSolV3aUnQDqpVgz5yOp96LpGg= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= @@ -210,54 +210,54 @@ cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d h1:KQM4Q6kjwlM4HuDZRV8/ZDXX3whjfStndYNTsRrbboQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf h1:iDymYoV4/JayuquNG5niu4JR0/ylaX+bmXk8wGlqG74= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf/go.mod h1:NhLpCB056huDyXxcLDbCgm4deO293HO9b6/Xl1Ha2nQ= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 h1:NaFVgzmO3YFX+l7696SdDTtvJR0MTjjwSe0sX+inAI4= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 h1:No84LXBp0kEzJfAqorxrgqzmzqOpHhbs8IK2nBpVQJY= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608/go.mod h1:wADXnci9qeFwOQ09qiyf1uLdI4n/RSSTG8mSM9hmxys= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 h1:bCBkUT3caCwOf5U9Os96dUETHPs6Cdv9oF5LCjt1tJs= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9/go.mod h1:h+11hiXPTGV6hl8ifSaJLMXoVhCsSKoF+l0/baqRGAU= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf h1:zeaEXUGi0Kcp64F7aRRwtHcv9INO92am+FX4hHVj454= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf/go.mod h1:LDTXn+hTfFjvvtbnyRl4exZbVXMXc9BbjCp+hA75GLE= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf h1:7saWRiQfcQZN5WDUHRlulO4zWyPsnaG1GEAzBw0U6Qs= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf/go.mod h1:9bf6NM/PjLLUpiKsxG6SsEO7De9xPR9cNDbAkvWhFf8= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf h1:sO9pf67Lvb4nWOfpVv1i9K5rbGhEFWGn7O5C1m/A4fo= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ie8fti1Nb5TtqJYw76c3eySQIDh5p5420ofUQ3/t3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf h1:omz9Z670B5GLvRx5qvkEn2NIxPm21VEvB+kLdmNQK3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf/go.mod h1:wf99TK+GDbcmmUnHnY9Mfiu9WnlxNAx539QMTqTkmv8= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf h1:IfC2LFM+55i/cl0gy6C5kTwr8QoUFtuyoMSPvbJUUSc= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf/go.mod h1:qg/3LeOxuIF9RTUJG0tTfd+vKgqApP6CLyEAsd1dgc0= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf h1:+mmMU6rrI9+jg3U1eCQcNWr374HbkZjLLNmLi1UmN70= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf/go.mod h1:PKBXn9aWiMI52CIz24mtH/TpXaPiSakjZeOBl9ZaIpc= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf h1:hjO5z2eKV74A1/nNru7RzgOSZscG1axIgJLUXIlc6wg= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf/go.mod h1:aXyiBgzFj7FhePk+SfIAOKSPUuNnx688hfeQz1lEeWc= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf h1:dWxbr7c/Xve6nmyMjolMYdtc2dQ/T2XMsXd/Umu6Ho4= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ZYQlnfBVLXR04RLNbeUfw43WefbdDQXFHBnyPPis3E= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf h1:XvRnVzXgwDKE6BL2jfo23qSkoIzNTDTsF4h2T7n1Ln8= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf/go.mod h1:dntwkEmxj/nQ6BX333tomRyQ/fOn0Y/EEF/7xrDyTww= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf h1:RES8jCRYKRL1YQS+BTdQfcjQW4y/TotcZcBLfxMVWOc= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf/go.mod h1:pGpOv+bdskHPT4KDfqB73QEEN7rvVi3rDbnGXh8LOAM= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf h1:TdJDBD9G6vuBMIwjkWPYIb1Y2xiZqpOhshGWQpZ81XE= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf/go.mod h1:VPlvp0gqaXApHsRrYgfZ00aqfqsFOUG6Qt2GffMlWhI= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf h1:FUFA1OjFrL9aXrh7ZuvcgVAg1kgtUFnFfL91thNH0Zw= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf/go.mod h1:Ljvt4ihdiSMW3aXXG1ZziMchdHxhoUlzxF/o2pPU7sA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf h1:HyaQnRlvruD/l4X8HJtKA3TDcX4CLL00qE3YtUOgcIA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf/go.mod h1:QgMu/n+FOfr7DRGI4Mg9R8JRNDl4E+/G+eGWqwrHOfo= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf h1:/vSXgbYHI4VxeXuXYw/vQiS/2y1iFBu9vJ6MgG6DX0w= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf/go.mod h1:BTBxeoWmU90YHa8icMHtyNJ4yi4S7K4Q0i1Nel4fOhM= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf h1:XJIgfIUY2k4PjrCg2x7tkj3sYp2pHXdM6DuwrhSX7yE= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf/go.mod h1:KfTlw+p2yHRNtWa/K/4hEjs1zuZTUYR61l+FReNrrtM= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf h1:9o1WYkNzZxNyAFldIDPIshFtXz6OiZWhZ8gBV0yleyQ= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf/go.mod h1:YUc0YB3WFrUo/vqQhzOOfb73D+U2Yho7xqnvdAWc2Qs= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf h1:vaFB6CMx+qFjoZWq7fgthRuAhPfObptlf03Cv9bz5XE= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf/go.mod h1:EQMZV9XM15sogrzz404akhvb9BNCpyyR/U5ZIyDnsio= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf h1:q0r0DFzP4nDkArKEj8o5eJIbihgxIOJMranGyJv1iiw= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf/go.mod h1:o5LKEyzicUjBF0Xzixb5yva9y9SBAFo6o752nE/QDAM= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf h1:QmDmYiOWHkBoRdT2j76G6Gj42XVyxn5qUaiTYPcemcM= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf/go.mod h1:izXYqFcs/+AgFnik31IQYIzYHPifj2ay6Eenv9UEzwI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 h1:nMu0DD9qutZ7dzIySxTRnLYvZtockBghVkwBHyuwBLI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608/go.mod h1:m0eg/A4J5fmXFNGEldQpeTrMr9PFWaVIFjbDYes0j9I= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 h1:JL+VXHmb8xqwU7ToR2RG0V2BTmE+t1PkJ880xKi46Tc= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608/go.mod h1:huNjmnJuvPXAT5zvK8S29X0u9DpCa3X9ZCUd3bJ8bng= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 h1:MzRTC+W0Uv40yfFNegDskcisgui9lQdeG9FZxOixATk= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608/go.mod h1:GMLM+m3Il+QTfOrQG08sFJXlKw95UDKPIOYcuSwjbzQ= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 h1:lbtU7rYltk2axJ5h1DgPamVosuZEeyOAaqYPQpQBH4g= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608/go.mod h1:GN02Rosc2O/vCNBnXqY35vA2hoMmRQeCKd81FuoMzmE= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 h1:ATB7FV12GCjS+KN2Fx8B878LbwzNP4bkzsznRqMmn3k= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608/go.mod h1:d4a/F6pXE2KWJdshiRxCPKyW6h5gAnAWmSCtlRrhcYk= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 h1:lstvqRuVEDtRxiF9+LM16SpRriq0O+5lMHzsGKheXH4= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608/go.mod h1:ib+kqbNMsj6n7/LvW+qi24/1kp/ApWJpsnCWY5yN6Mk= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 h1:hYFPPs5WsMWj/1sRpw6Aqmioph3qw5VN76geVxtaWtI= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608/go.mod h1:bG9SiC6YsVOpsKgOd+b+t3Kl4GLb9T6RjhBKesPn+Gg= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 h1:UZSqhiAi1mKi8DE+OLGMrXSoenSl4PkyQT7xxNfr9Bw= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608/go.mod h1:PLdiJlSC0XveXA3vJ0E4n1NCG78UeHXwEk0razSnEk4= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 h1:KqJ+F0YVwFlu06gEoWHvGvdC1DYXDL5Rykra61/pY4Q= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608/go.mod h1:YBMj0T87xliEfldeZHC60AqyZoLoy1wJzAAgaaQubBM= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 h1:iSOOM7vAa0LuJ9xKZ7k34g5uyy9WQyfKbnAPmnf8Abc= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608/go.mod h1:yIgJCAGBnM3sull2qACQP+uMsEoogyNO6OXz82z3tVg= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 h1:F+w/ofuUDxFyyk6t7kt7cdcBsTa2gA7zuvCEplB871A= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608/go.mod h1:ynGp02hnYhVidQiL9KOKeiZnn0h+PSEJb+XjgKH6+v4= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 h1:ll6Pk+WoPlusW2uy8HTXupL+mees6mNohS4dfGYJsZ0= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608/go.mod h1:L8fBvuIwBQzABO/cYEOpekmaKlR4ELclrrGNZ6r//sg= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 h1:t0A/ip5m09OuAY0bvpnfxJhD1/dL44JYNwffy5boqB4= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608/go.mod h1:apbBgC0mKZTbgvW2ACPcNBl0z8HjCp7R9ZBns7F6J2E= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 h1:bB3FhjvPZfkS3EksYB3YR7muxGk0/rr6U993a7ETHx0= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608/go.mod h1:H1QoaISMz78OyBwXKU4gp8Gmwd1EVWq+Lb9P3BUfXUM= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 h1:ZD/gSJbfpC2WzXr17xq5UkJBQd/BfBVajzKrieu6zjQ= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608/go.mod h1:btgbNMPZJWZLd03ef2AblrpJ7e9ocpTvA0xUw0hIHew= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 h1:3rdbR/782gMtQo+1yxH+wuhJKd1jm/4X0pBgQX7pDp4= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608/go.mod h1:xLb6tQ33fgSOmwlMui9UjLzI9xmOclfjG2g+/z4XiUc= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 h1:+GBTBLH54gKT2dFlUgN/XzawdBG/9U5djPecjr7meas= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608/go.mod h1:BlYhkjtZZdKXQP9mBiVwRbaduXtDKEJHQC3dZ6fZBS0= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 h1:aycIQRLzdtuI99FkTRo4Y2QerkfKqZRYNN2BPESEc8A= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608/go.mod h1:4Zyt59oTQdaKitlYyz9K7d8Mi32e+K5NliOf9HAj5Wo= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 h1:kqbOiJpmSBE03Isw7KY27N4oCSaOcG28oaJgCLh9Rhk= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 h1:80l+duTMRKnszkWXolEs1n+1j4RFYd41mrV24P79vcY= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608/go.mod h1:5GIkumZszCtSzsXcTtL2YP4mIU25Rn3t0y51JWzzUDI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -301,8 +301,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/avast/retry-go/v4 v4.5.1 h1:AxIx0HGi4VZ3I02jr78j5lZ3M6x1E0Ivxa6b0pUUh7o= github.com/avast/retry-go/v4 v4.5.1/go.mod h1:/sipNsvNB3RRuT5iNcb6h73nw3IBmXJ/H3XrCQYSOpc= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= 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= @@ -364,8 +364,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -397,8 +397,8 @@ github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDz github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 h1:NJ4oI0UP0Qzt5gSgxuut4PrTaI0Ae0J1GKY9HuS7Zyo= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1/go.mod h1:rHr3gIOU3dJIjpnFCUeJyG4ItADlXMjI4NBwS4+YeMA= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b h1:ZaEAV5tsUTnyWEC/Gt8DXHKBANDyx70PVCiPOEVnuHk= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b/go.mod h1:ecJnx3s3oQK5BR7vu25fYSD2/ND9YLGkVpST7uiBkT0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -596,8 +596,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -616,8 +616,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -636,8 +636,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.6 h1:5jHuM+aH373XNtXl9TNTUH5Qd69Trve11tHIrB+6yj4= +github.com/hashicorp/go-getter v1.7.6/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -720,8 +720,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -821,8 +821,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -934,10 +934,10 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac= @@ -948,6 +948,8 @@ go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZk go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -976,8 +978,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1070,8 +1072,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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= @@ -1097,8 +1099,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1113,8 +1115,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -1198,13 +1200,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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= @@ -1215,13 +1217,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1288,8 +1290,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.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= @@ -1338,8 +1338,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1452,12 +1452,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1493,8 +1493,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= +google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1511,8 +1511,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/e2e/internal/directories/directories.go b/e2e/internal/directories/directories.go index d4724ec280e..339adab1bcf 100644 --- a/e2e/internal/directories/directories.go +++ b/e2e/internal/directories/directories.go @@ -5,7 +5,6 @@ import ( "os" "path" "strings" - "testing" ) const ( @@ -16,9 +15,7 @@ const ( ) // E2E finds the e2e directory above the test. -func E2E(t *testing.T) (string, error) { - t.Helper() - +func E2E() (string, error) { wd, err := os.Getwd() if err != nil { return "", err @@ -32,7 +29,7 @@ func E2E(t *testing.T) (string, error) { // arbitrary value to avoid getting stuck in an infinite loop if this is called // in a context where the e2e directory does not exist. - if count > maxAttempts { + if count == maxAttempts { return "", fmt.Errorf("unable to find e2e directory after %d tries", maxAttempts) } diff --git a/e2e/sample.config.extended.yaml b/e2e/sample.config.extended.yaml index f14db4912dd..9cc94302cac 100644 --- a/e2e/sample.config.extended.yaml +++ b/e2e/sample.config.extended.yaml @@ -2,37 +2,36 @@ # Many of these fields can be overridden with environment variables. # All fields that support this have the corresponding environment variable name in a comment beside the field. - # | Environment Variable | Description | Default Value | # |----------------------|-------------------------------------------|------------------------------| # | CHAIN_IMAGE | The image that will be used for the chain | ghcr.io/cosmos/ibc-go-simd | # | CHAIN_A_TAG | The tag used for chain A | N/A (must be set) | # | CHAIN_B_TAG | The tag used for chain B | N/A (must be set) | # | CHAIN_BINARY | The binary used in the container | simd | -# | RELAYER_TAG | The tag used for the relayer | 1.10.0 | +# | RELAYER_TAG | The tag used for the relayer | 1.10.4 | # | RELAYER_ID | The type of relayer to use (rly/hermes) | hermes | - # see sample.config.yaml for a bare minimum configuration example. # set env E2E_CONFIG_PATH to point to this file to use it. --- chains: # the entry at index 0 corresponds to CHAIN_A -- chainId: chainA-1 - numValidators: 4 - numFullNodes: 1 - image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE - tag: main # override with CHAIN_A_TAG - binary: simd # override with CHAIN_BINARY + - chainId: chainA-1 + numValidators: 4 + numFullNodes: 1 + image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE + tag: main # override with CHAIN_A_TAG + binary: simd # override with CHAIN_BINARY - # the entry at index 1 corresponds to CHAIN_B -- chainId: chainB-1 - numValidators: 4 - numFullNodes: 1 - image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE - tag: main # override with CHAIN_B_TAG - binary: simd # override with CHAIN_BINARY + # the entry at index 1 corresponds to CHAIN_B + - chainId: chainB-1 + numValidators: 4 + numFullNodes: 1 + image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE + tag: main # override with CHAIN_B_TAG + binary: simd # override with CHAIN_BINARY +# activeRelayer must match the id of a relayer specified in the relayers list below. activeRelayer: hermes # override with RELAYER_ID # relayers provides a list all possible relayers that will be usable within a test @@ -41,7 +40,7 @@ activeRelayer: hermes # override with RELAYER_ID relayers: - id: hermes image: ghcr.io/informalsystems/hermes - tag: "1.10.0" # override with RELAYER_TAG + tag: "1.10.4" # override with RELAYER_TAG - id: rly image: ghcr.io/cosmos/relayer tag: "latest" # override with RELAYER_TAG @@ -58,9 +57,17 @@ debug: # settings this value to true will keep the containers running after the test finishes. keepContainers: true -# Required only for upgrade tests. -# Chain A will be upgraded the specified tag. -# The plan name must be registered as an upgrade handler in the given tag. -upgrade: - planName: "" # override with CHAIN_UPGRADE_PLAN - tag: "" # override with CHAIN_UPGRADE_TAG +upgradePlanName: "" # specify a value that matches a planName in the upgrades list below. +upgrades: + - planName: "v7" + tag: "v7.0.0" + - planName: "v7.1" + tag: "v7.1.0" + - planName: "v8" + tag: "v8.0.0" + - planName: "v8.1" + tag: "v8.1.0" + - planName: "v9" + tag: "v9.0.0" + - planName: "ibcwasm-v8" + tag: "v8.0.0-e2e-upgrade" diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index 117cca2be20..f3a7a5ac5d6 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -506,7 +506,7 @@ func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulGovProposal(order c msg, err := govv1.NewMsgSubmitProposal( []sdk.Msg{testProposal}, sdk.NewCoins(sdk.NewCoin(chainB.Config().Denom, sdkmath.NewInt(10_000_000))), - hostAccount, "e2e", "e2e", "e2e", 1, + hostAccount, "e2e", "e2e", "e2e", govv1.ProposalType_PROPOSAL_TYPE_STANDARD, ) s.Require().NoError(err) diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 0addf144fff..d5751f5639a 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -46,8 +46,8 @@ const ( func TestUpgradeTestSuite(t *testing.T) { testCfg := testsuite.LoadConfig() - if testCfg.UpgradeConfig.Tag == "" || testCfg.UpgradeConfig.PlanName == "" { - t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv) + if testCfg.UpgradePlanName == "" { + t.Fatalf("%s must be set when running an upgrade test", testsuite.ChainUpgradePlanEnv) } testifysuite.Run(t, new(UpgradeTestSuite)) @@ -180,7 +180,7 @@ func (s *UpgradeTestSuite) TestIBCChainUpgrade() { s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") t.Run("upgrade chainA", func(t *testing.T) { - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("restart relayer", func(t *testing.T) { @@ -263,7 +263,7 @@ func (s *UpgradeTestSuite) TestChainUpgrade() { testCfg := testsuite.LoadConfig() proposerWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), proposerWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), proposerWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("send funds to test wallet", func(t *testing.T) { @@ -403,7 +403,7 @@ func (s *UpgradeTestSuite) TestV6ToV7ChainUpgrade() { chainAUpgradeProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) t.Run("upgrade chainA", func(t *testing.T) { - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) // see this issue https://github.com/informalsystems/hermes/issues/3579 @@ -500,7 +500,7 @@ func (s *UpgradeTestSuite) TestV7ToV7_1ChainUpgrade() { t.Run("upgrade chain", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("ensure the localhost client is active and sentinel connection is stored in state", func(t *testing.T) { @@ -594,7 +594,7 @@ func (s *UpgradeTestSuite) TestV7ToV8ChainUpgrade() { t.Run("upgrade chain", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("update params", func(t *testing.T) { @@ -701,7 +701,7 @@ func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade() { t.Run("upgrade chain", func(t *testing.T) { testCfg := testsuite.LoadConfig() proposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), proposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), proposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("29-fee migration partially refunds escrowed tokens", func(t *testing.T) { @@ -832,7 +832,7 @@ func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade_FeeMiddlewareChannelUpgrade( t.Run("chain A", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) }() @@ -842,7 +842,7 @@ func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade_FeeMiddlewareChannelUpgrade( t.Run("chain B", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[1].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[1].Tag, testCfg.GetUpgradeConfig().Tag) }) }() @@ -1094,7 +1094,7 @@ func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade() { t.Run("upgrade chain", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("start relayer", func(t *testing.T) { @@ -1224,7 +1224,7 @@ func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade_Localhost() { t.Run("upgrade chain", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("localhost does not exist in state after upgrade", func(t *testing.T) { @@ -1330,7 +1330,7 @@ func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade_ICS20v2ChannelUpgrade() { t.Run("upgrade chain", func(t *testing.T) { govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("upgrade channel to ics20-2", func(t *testing.T) { @@ -1342,7 +1342,7 @@ func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade_ICS20v2ChannelUpgrade() { }) t.Run("verify channel A upgraded and transfer version is ics20-2", func(t *testing.T) { - err := test.WaitForCondition(time.Minute*2, time.Second*2, func() (bool, error) { + err := test.WaitForCondition(time.Minute*3, time.Second*2, func() (bool, error) { channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) if err != nil { return false, err diff --git a/e2e/tests/wasm/upgrade_test.go b/e2e/tests/wasm/upgrade_test.go index b01be269d22..dd848b7c79c 100644 --- a/e2e/tests/wasm/upgrade_test.go +++ b/e2e/tests/wasm/upgrade_test.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "os" + "strings" "testing" "time" @@ -35,8 +36,8 @@ const ( func TestIBCWasmUpgradeTestSuite(t *testing.T) { testCfg := testsuite.LoadConfig() - if testCfg.UpgradeConfig.Tag == "" || testCfg.UpgradeConfig.PlanName == "" { - t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv) + if strings.TrimSpace(testCfg.UpgradePlanName) == "" { + t.Fatalf("%s must be set when running an upgrade test", testsuite.ChainUpgradePlanEnv) } // wasm tests require a longer voting period to account for the time it takes to upload a contract. @@ -69,7 +70,7 @@ func (s *IBCWasmUpgradeTestSuite) TestIBCWasmChainUpgrade() { t.Run("upgrade chain", func(t *testing.T) { testCfg := testsuite.LoadConfig() - s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), userWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), userWallet, testCfg.GetUpgradeConfig().PlanName, testCfg.ChainConfigs[0].Tag, testCfg.GetUpgradeConfig().Tag) }) t.Run("query wasm checksums", func(t *testing.T) { diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go index 6619b844979..e00d670e14d 100644 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ b/e2e/testsuite/diagnostics/diagnostics.go @@ -37,7 +37,7 @@ func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, suite t.Logf("writing logs for test: %s", t.Name()) ctx := context.TODO() - e2eDir, err := directories.E2E(t) + e2eDir, err := directories.E2E() if err != nil { t.Logf("failed finding log directory: %s", err) return diff --git a/e2e/testsuite/testconfig.go b/e2e/testsuite/testconfig.go index a1a32b93904..5ea0fe157e2 100644 --- a/e2e/testsuite/testconfig.go +++ b/e2e/testsuite/testconfig.go @@ -27,6 +27,7 @@ import ( cmtjson "github.com/cometbft/cometbft/libs/json" + "github.com/cosmos/ibc-go/e2e/internal/directories" "github.com/cosmos/ibc-go/e2e/relayer" "github.com/cosmos/ibc-go/e2e/semverutil" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -49,11 +50,10 @@ const ( RelayerIDEnv = "RELAYER_ID" // ChainBinaryEnv binary is the binary that will be used for both chains. ChainBinaryEnv = "CHAIN_BINARY" - // ChainUpgradeTagEnv specifies the upgrade version tag - ChainUpgradeTagEnv = "CHAIN_UPGRADE_TAG" // ChainUpgradePlanEnv specifies the upgrade plan name ChainUpgradePlanEnv = "CHAIN_UPGRADE_PLAN" - // E2EConfigFilePathEnv allows you to specify a custom path for the config file to be used. + // E2EConfigFilePathEnv allows you to specify a custom path for the config file to be used. It can be relative + // or absolute. E2EConfigFilePathEnv = "E2E_CONFIG_PATH" // KeepContainersEnv instructs interchaintest to not delete the containers after a test has run. // this ensures that chain containers are not deleted after a test suite is run if other tests @@ -75,6 +75,8 @@ const ( // defaultConfigFileName is the default filename for the config file that can be used to configure // e2e tests. See sample.config.yaml or sample.config.extended.yaml as an example for what this should look like. defaultConfigFileName = ".ibc-go-e2e-config.yaml" + // defaultCIConfigFileName is the default filename for the config file that should be used for CI. + defaultCIConfigFileName = "ci-e2e-config.yaml" ) // defaultChainNames contains the default name for chainA and chainB. @@ -95,12 +97,15 @@ type TestConfig struct { RelayerConfigs []relayer.Config `yaml:"relayers"` // ActiveRelayer specifies the relayer that will be used. It must match the ID of one of the entries in RelayerConfigs. ActiveRelayer string `yaml:"activeRelayer"` - // UpgradeConfig holds values used only for the upgrade tests. - UpgradeConfig UpgradeConfig `yaml:"upgrade"` // CometBFTConfig holds values for configuring CometBFT. CometBFTConfig CometBFTConfig `yaml:"cometbft"` // DebugConfig holds configuration for miscellaneous options. DebugConfig DebugConfig `yaml:"debug"` + // UpgradePlanName specifies which upgrade plan to use. It must match a plan name for an entry in the + // list of UpgradeConfigs. + UpgradePlanName string `yaml:"upgradePlanName"` + // UpgradeConfigs provides a list of all possible upgrades. + UpgradeConfigs []UpgradeConfig `yaml:"upgrades"` } // Validate validates the test configuration is valid for use within the tests. @@ -117,6 +122,11 @@ func (tc TestConfig) Validate() error { if err := tc.validateGenesisDebugConfig(); err != nil { return fmt.Errorf("invalid Genesis debug configuration: %w", err) } + + if err := tc.validateUpgradeConfig(); err != nil { + return fmt.Errorf("invalid upgrade configuration: %w", err) + } + return nil } @@ -133,20 +143,8 @@ func (tc TestConfig) validateChains() error { return fmt.Errorf("chain config missing tag: %+v", cfg) } - // TODO: validate chainID in https://github.com/cosmos/ibc-go/issues/4697 - // these are not passed in the CI at the moment. Defaults are used. - if !IsCI() { - if cfg.ChainID == "" { - return fmt.Errorf("chain config missing chainID: %+v", cfg) - } - } - - // TODO: validate number of nodes in https://github.com/cosmos/ibc-go/issues/4697 - // these are not passed in the CI at the moment. - if !IsCI() { - if cfg.NumValidators == 0 && cfg.NumFullNodes == 0 { - return fmt.Errorf("chain config missing number of validators or full nodes: %+v", cfg) - } + if cfg.NumValidators == 0 && cfg.NumFullNodes == 0 { + return fmt.Errorf("chain config missing number of validators or full nodes: %+v", cfg) } } @@ -184,6 +182,16 @@ func (tc TestConfig) validateRelayers() error { return nil } +// GetUpgradeConfig returns the upgrade configuration for the current test configuration. +func (tc TestConfig) GetUpgradeConfig() UpgradeConfig { + for _, upgrade := range tc.UpgradeConfigs { + if upgrade.PlanName == tc.UpgradePlanName { + return upgrade + } + } + panic("upgrade plan not found in upgrade configs, this test config should not have passed validation") +} + // GetChainIndex returns the index of the chain with the given name, if it // exists. func (tc TestConfig) GetChainIndex(name string) (int, error) { @@ -209,6 +217,35 @@ func (tc TestConfig) validateGenesisDebugConfig() error { return err } +// validateUpgradeConfig ensures the upgrade configuration is valid. +func (tc TestConfig) validateUpgradeConfig() error { + if strings.TrimSpace(tc.UpgradePlanName) == "" { + return nil + } + + // the upgrade plan name specified must match one of the upgrade plans in the upgrade configs. + foundPlan := false + for _, upgrade := range tc.UpgradeConfigs { + if strings.TrimSpace(upgrade.Tag) == "" { + return fmt.Errorf("upgrade config missing tag: %+v", upgrade) + } + + if strings.TrimSpace(upgrade.PlanName) == "" { + return fmt.Errorf("upgrade config missing plan name: %+v", upgrade) + } + + if upgrade.PlanName == tc.UpgradePlanName { + foundPlan = true + } + } + + if foundPlan { + return nil + } + + return fmt.Errorf("upgrade plan %s not found in upgrade configs: %+v", tc.UpgradePlanName, tc.UpgradeConfigs) +} + // GetActiveRelayerConfig returns the currently specified relayer config. func (tc TestConfig) GetActiveRelayerConfig() *relayer.Config { for _, r := range tc.RelayerConfigs { @@ -359,9 +396,15 @@ func fromFile() (TestConfig, bool) { // populateDefaults populates default values for the test config if // certain required fields are not specified. func populateDefaults(tc TestConfig) TestConfig { + chainIDs := []string{ + "chainA-1", + "chainB-1", + "chainC-1", + } + for i := range tc.ChainConfigs { if tc.ChainConfigs[i].ChainID == "" { - tc.ChainConfigs[i].ChainID = fmt.Sprintf("chain-%d", i+1) + tc.ChainConfigs[i].ChainID = chainIDs[i] } if tc.ChainConfigs[i].Binary == "" { tc.ChainConfigs[i].Binary = defaultBinary @@ -423,11 +466,7 @@ func applyEnvironmentVariableOverrides(fromFile TestConfig) TestConfig { } if os.Getenv(ChainUpgradePlanEnv) != "" { - fromFile.UpgradeConfig.PlanName = envTc.UpgradeConfig.PlanName - } - - if os.Getenv(ChainUpgradeTagEnv) != "" { - fromFile.UpgradeConfig.Tag = envTc.UpgradeConfig.Tag + fromFile.UpgradePlanName = envTc.UpgradePlanName } if isEnvTrue(KeepContainersEnv) { @@ -440,18 +479,10 @@ func applyEnvironmentVariableOverrides(fromFile TestConfig) TestConfig { // fromEnv returns a TestConfig constructed from environment variables. func fromEnv() TestConfig { return TestConfig{ - ChainConfigs: getChainConfigsFromEnv(), - UpgradeConfig: getUpgradePlanConfigFromEnv(), - ActiveRelayer: os.Getenv(RelayerIDEnv), - - // TODO: we can remove this, and specify these values in a config file for the CI - // in https://github.com/cosmos/ibc-go/issues/4697 - RelayerConfigs: []relayer.Config{ - getDefaultRlyRelayerConfig(), - getDefaultHermesRelayerConfig(), - getDefaultHyperspaceRelayerConfig(), - }, - CometBFTConfig: CometBFTConfig{LogLevel: "info"}, + ChainConfigs: getChainConfigsFromEnv(), + UpgradePlanName: os.Getenv(ChainUpgradePlanEnv), + ActiveRelayer: os.Getenv(RelayerIDEnv), + CometBFTConfig: CometBFTConfig{LogLevel: "info"}, } } @@ -502,10 +533,27 @@ func getChainConfigsFromEnv() []ChainConfig { // getConfigFilePath returns the absolute path where the e2e config file should be. func getConfigFilePath() string { - if absoluteConfigPath := os.Getenv(E2EConfigFilePathEnv); absoluteConfigPath != "" { - return absoluteConfigPath + if specifiedConfigPath := os.Getenv(E2EConfigFilePathEnv); specifiedConfigPath != "" { + if path.IsAbs(specifiedConfigPath) { + return specifiedConfigPath + } + + e2eDir, err := directories.E2E() + if err != nil { + panic(err) + } + + return path.Join(e2eDir, specifiedConfigPath) + } + + if IsCI() { + if err := os.Setenv(E2EConfigFilePathEnv, defaultCIConfigFileName); err != nil { + panic(err) + } + return getConfigFilePath() } + // running locally. homeDir, err := os.UserHomeDir() if err != nil { panic(err) @@ -543,23 +591,6 @@ func getDefaultHyperspaceRelayerConfig() relayer.Config { } } -// getUpgradePlanConfigFromEnv returns the upgrade config from environment variables. -func getUpgradePlanConfigFromEnv() UpgradeConfig { - upgradeTag, ok := os.LookupEnv(ChainUpgradeTagEnv) - if !ok { - upgradeTag = "" - } - - upgradePlan, ok := os.LookupEnv(ChainUpgradePlanEnv) - if !ok { - upgradePlan = "" - } - return UpgradeConfig{ - PlanName: upgradePlan, - Tag: upgradeTag, - } -} - func GetChainATag() string { return LoadConfig().ChainConfigs[0].Tag } diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 057c4287a02..ebbbd548998 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -125,7 +125,7 @@ func (s *E2ETestSuite) configureGenesisDebugExport() { // If no path is provided, use the default (e2e/diagnostics/genesis.json). if exportPath == "" { - e2eDir, err := directories.E2E(t) + e2eDir, err := directories.E2E() s.Require().NoError(err, "can't get e2edir") exportPath = path.Join(e2eDir, directories.DefaultGenesisExportPath) } @@ -150,11 +150,11 @@ func (s *E2ETestSuite) configureGenesisDebugExport() { t.Setenv("EXPORT_GENESIS_CHAIN", genesisChainName) } -// initalizeRelayerPool pre-loads the relayer pool with n relayers. +// initializeRelayerPool pre-loads the relayer pool with n relayers. // this is a workaround due to the restriction on relayer creation during the test // ref: https://github.com/strangelove-ventures/interchaintest/issues/1153 // if the above issue is resolved, it should be possible to lazily create relayers in each test. -func (s *E2ETestSuite) initalizeRelayerPool(n int) []ibc.Relayer { +func (s *E2ETestSuite) initializeRelayerPool(n int) []ibc.Relayer { var relayers []ibc.Relayer for i := 0; i < n; i++ { relayers = append(relayers, relayer.New(s.T(), *LoadConfig().GetActiveRelayerConfig(), s.logger, s.DockerClient, s.network)) @@ -181,7 +181,7 @@ func (s *E2ETestSuite) SetupChains(ctx context.Context, channelOptionsModifier C s.chains = s.createChains(chainOptions) - s.relayerPool = s.initalizeRelayerPool(chainOptions.RelayerCount) + s.relayerPool = s.initializeRelayerPool(chainOptions.RelayerCount) ic := s.newInterchain(s.relayerPool, s.chains, channelOptionsModifier) @@ -747,9 +747,6 @@ func GetIBCToken(fullTokenDenom string, portID, channelID string) transfertypes. // use less resources and allow the tests to run faster. // both the number of validators and full nodes can be overwritten in a config file. func getValidatorsAndFullNodes(chainIdx int) (int, int) { - if IsCI() { - return 4, 1 - } tc := LoadConfig() return tc.GetChainNumValidators(chainIdx), tc.GetChainNumFullNodes(chainIdx) } diff --git a/go.mod b/go.mod index bf9b8c8846a..e0eef104782 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,10 @@ -go 1.23.2 - -toolchain go1.23.3 +go 1.23.3 module github.com/cosmos/ibc-go/v9 require ( cosmossdk.io/api v0.8.0 - cosmossdk.io/client/v2 v2.0.0-00010101000000-000000000000 + cosmossdk.io/client/v2 v2.0.0-beta.6 cosmossdk.io/core v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.5.0 @@ -32,7 +30,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v1.0.0-alpha.2 + cosmossdk.io/x/tx v1.0.0-alpha.3 cosmossdk.io/x/upgrade v0.1.4 github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 github.com/cometbft/cometbft/api v1.0.0-rc2 @@ -47,32 +45,32 @@ require ( github.com/spf13/cast v1.7.0 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.10.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.68.0 - google.golang.org/protobuf v1.35.2 + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 + google.golang.org/grpc v1.69.0 + google.golang.org/protobuf v1.36.0 gopkg.in/yaml.v2 v2.4.0 ) require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.42.0 // indirect - cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect + cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b // indirect cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect cosmossdk.io/depinject v1.1.0 // indirect - cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/schema v0.4.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go v1.54.6 // indirect + github.com/aws/aws-sdk-go v1.55.5 // 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.2.0 // indirect @@ -84,7 +82,7 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -124,17 +122,17 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.6 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-plugin v1.6.2 // indirect @@ -156,7 +154,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -175,7 +173,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect @@ -201,25 +199,26 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect + go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.12.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.6.0 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -229,37 +228,33 @@ require ( replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 -//TODO: remove everything below after tags are created -// v0.0.0-20241108061010-a0458127fccf = sdk release/v0.52.x branch -// v0.0.0-20241106165340-4eb943897eaa = ibc-go marko/gomod_change branch -// v1.0.0-alpha.5.0.20241108095921-406f977be0b9 = sdk main branch replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf + cosmossdk.io/api => cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // pseudo version lower than the latest tag - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b ) diff --git a/go.sum b/go.sum index 6c3ead89040..a3312dfb9ce 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -76,8 +76,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -115,14 +115,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -179,8 +179,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -192,14 +192,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 h1:yNrJKENUaZuFTkNmwP4KgXQqk2boGNUAzVyXLdFJNXU= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9/go.mod h1:pPUWNdsU8ghYzPOeVD2sAzPVh2yniq215XjRYubdO4I= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf h1:ofV6lCxevAZvr9iRpFQLkMucYbojplFS3/ACnq6JsoY= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf/go.mod h1:iu6iZy/kgiWTvIxO1Dn49JWTE32qorpGysRVDoMG8uY= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 h1:F8emcx9K/aJHoyEan8FgEA0RaDrsIBVXxtkHOtbm9AI= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 h1:0266beLan2snXZMeELYMpTVcFjlSgzHhLBKxSuNVZUI= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608/go.mod h1:edvI8tMINqCH75EgkOEMnCZEQ3iKJgOlZ+ZxOu4gmXU= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 h1:umN3k+AZ91ZjYv3CDiTgFDaWe22w3JxpeJmepUwKXV8= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608/go.mod h1:Xxz5u4rK+ArCsRo9TMSirg6jPMdva6BHv9Db65OkN/Q= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b h1:smupoVhpdK+5pztIylyIGkCc+0QaAaGLEvnM7Wnrq18= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 h1:w+/cxqYHud1plzCTIvEBtab6RqpgAl2C5Hgn1l4p+oo= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608/go.mod h1:gCTZBT00tI2zTQy65aSolV3aUnQDqpVgz5yOp96LpGg= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= @@ -210,54 +210,54 @@ cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d h1:KQM4Q6kjwlM4HuDZRV8/ZDXX3whjfStndYNTsRrbboQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf h1:iDymYoV4/JayuquNG5niu4JR0/ylaX+bmXk8wGlqG74= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf/go.mod h1:NhLpCB056huDyXxcLDbCgm4deO293HO9b6/Xl1Ha2nQ= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 h1:NaFVgzmO3YFX+l7696SdDTtvJR0MTjjwSe0sX+inAI4= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 h1:No84LXBp0kEzJfAqorxrgqzmzqOpHhbs8IK2nBpVQJY= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608/go.mod h1:wADXnci9qeFwOQ09qiyf1uLdI4n/RSSTG8mSM9hmxys= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 h1:bCBkUT3caCwOf5U9Os96dUETHPs6Cdv9oF5LCjt1tJs= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9/go.mod h1:h+11hiXPTGV6hl8ifSaJLMXoVhCsSKoF+l0/baqRGAU= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf h1:zeaEXUGi0Kcp64F7aRRwtHcv9INO92am+FX4hHVj454= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf/go.mod h1:LDTXn+hTfFjvvtbnyRl4exZbVXMXc9BbjCp+hA75GLE= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf h1:7saWRiQfcQZN5WDUHRlulO4zWyPsnaG1GEAzBw0U6Qs= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf/go.mod h1:9bf6NM/PjLLUpiKsxG6SsEO7De9xPR9cNDbAkvWhFf8= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf h1:sO9pf67Lvb4nWOfpVv1i9K5rbGhEFWGn7O5C1m/A4fo= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ie8fti1Nb5TtqJYw76c3eySQIDh5p5420ofUQ3/t3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf h1:omz9Z670B5GLvRx5qvkEn2NIxPm21VEvB+kLdmNQK3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf/go.mod h1:wf99TK+GDbcmmUnHnY9Mfiu9WnlxNAx539QMTqTkmv8= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf h1:IfC2LFM+55i/cl0gy6C5kTwr8QoUFtuyoMSPvbJUUSc= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf/go.mod h1:qg/3LeOxuIF9RTUJG0tTfd+vKgqApP6CLyEAsd1dgc0= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf h1:+mmMU6rrI9+jg3U1eCQcNWr374HbkZjLLNmLi1UmN70= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf/go.mod h1:PKBXn9aWiMI52CIz24mtH/TpXaPiSakjZeOBl9ZaIpc= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf h1:hjO5z2eKV74A1/nNru7RzgOSZscG1axIgJLUXIlc6wg= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf/go.mod h1:aXyiBgzFj7FhePk+SfIAOKSPUuNnx688hfeQz1lEeWc= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf h1:dWxbr7c/Xve6nmyMjolMYdtc2dQ/T2XMsXd/Umu6Ho4= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ZYQlnfBVLXR04RLNbeUfw43WefbdDQXFHBnyPPis3E= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf h1:XvRnVzXgwDKE6BL2jfo23qSkoIzNTDTsF4h2T7n1Ln8= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf/go.mod h1:dntwkEmxj/nQ6BX333tomRyQ/fOn0Y/EEF/7xrDyTww= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf h1:RES8jCRYKRL1YQS+BTdQfcjQW4y/TotcZcBLfxMVWOc= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf/go.mod h1:pGpOv+bdskHPT4KDfqB73QEEN7rvVi3rDbnGXh8LOAM= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf h1:TdJDBD9G6vuBMIwjkWPYIb1Y2xiZqpOhshGWQpZ81XE= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf/go.mod h1:VPlvp0gqaXApHsRrYgfZ00aqfqsFOUG6Qt2GffMlWhI= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf h1:FUFA1OjFrL9aXrh7ZuvcgVAg1kgtUFnFfL91thNH0Zw= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf/go.mod h1:Ljvt4ihdiSMW3aXXG1ZziMchdHxhoUlzxF/o2pPU7sA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf h1:HyaQnRlvruD/l4X8HJtKA3TDcX4CLL00qE3YtUOgcIA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf/go.mod h1:QgMu/n+FOfr7DRGI4Mg9R8JRNDl4E+/G+eGWqwrHOfo= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf h1:/vSXgbYHI4VxeXuXYw/vQiS/2y1iFBu9vJ6MgG6DX0w= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf/go.mod h1:BTBxeoWmU90YHa8icMHtyNJ4yi4S7K4Q0i1Nel4fOhM= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf h1:XJIgfIUY2k4PjrCg2x7tkj3sYp2pHXdM6DuwrhSX7yE= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf/go.mod h1:KfTlw+p2yHRNtWa/K/4hEjs1zuZTUYR61l+FReNrrtM= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf h1:9o1WYkNzZxNyAFldIDPIshFtXz6OiZWhZ8gBV0yleyQ= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf/go.mod h1:YUc0YB3WFrUo/vqQhzOOfb73D+U2Yho7xqnvdAWc2Qs= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf h1:vaFB6CMx+qFjoZWq7fgthRuAhPfObptlf03Cv9bz5XE= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf/go.mod h1:EQMZV9XM15sogrzz404akhvb9BNCpyyR/U5ZIyDnsio= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf h1:q0r0DFzP4nDkArKEj8o5eJIbihgxIOJMranGyJv1iiw= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf/go.mod h1:o5LKEyzicUjBF0Xzixb5yva9y9SBAFo6o752nE/QDAM= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf h1:QmDmYiOWHkBoRdT2j76G6Gj42XVyxn5qUaiTYPcemcM= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf/go.mod h1:izXYqFcs/+AgFnik31IQYIzYHPifj2ay6Eenv9UEzwI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 h1:nMu0DD9qutZ7dzIySxTRnLYvZtockBghVkwBHyuwBLI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608/go.mod h1:m0eg/A4J5fmXFNGEldQpeTrMr9PFWaVIFjbDYes0j9I= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 h1:JL+VXHmb8xqwU7ToR2RG0V2BTmE+t1PkJ880xKi46Tc= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608/go.mod h1:huNjmnJuvPXAT5zvK8S29X0u9DpCa3X9ZCUd3bJ8bng= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 h1:MzRTC+W0Uv40yfFNegDskcisgui9lQdeG9FZxOixATk= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608/go.mod h1:GMLM+m3Il+QTfOrQG08sFJXlKw95UDKPIOYcuSwjbzQ= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 h1:lbtU7rYltk2axJ5h1DgPamVosuZEeyOAaqYPQpQBH4g= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608/go.mod h1:GN02Rosc2O/vCNBnXqY35vA2hoMmRQeCKd81FuoMzmE= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 h1:ATB7FV12GCjS+KN2Fx8B878LbwzNP4bkzsznRqMmn3k= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608/go.mod h1:d4a/F6pXE2KWJdshiRxCPKyW6h5gAnAWmSCtlRrhcYk= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 h1:lstvqRuVEDtRxiF9+LM16SpRriq0O+5lMHzsGKheXH4= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608/go.mod h1:ib+kqbNMsj6n7/LvW+qi24/1kp/ApWJpsnCWY5yN6Mk= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 h1:hYFPPs5WsMWj/1sRpw6Aqmioph3qw5VN76geVxtaWtI= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608/go.mod h1:bG9SiC6YsVOpsKgOd+b+t3Kl4GLb9T6RjhBKesPn+Gg= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 h1:UZSqhiAi1mKi8DE+OLGMrXSoenSl4PkyQT7xxNfr9Bw= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608/go.mod h1:PLdiJlSC0XveXA3vJ0E4n1NCG78UeHXwEk0razSnEk4= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 h1:KqJ+F0YVwFlu06gEoWHvGvdC1DYXDL5Rykra61/pY4Q= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608/go.mod h1:YBMj0T87xliEfldeZHC60AqyZoLoy1wJzAAgaaQubBM= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 h1:iSOOM7vAa0LuJ9xKZ7k34g5uyy9WQyfKbnAPmnf8Abc= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608/go.mod h1:yIgJCAGBnM3sull2qACQP+uMsEoogyNO6OXz82z3tVg= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 h1:F+w/ofuUDxFyyk6t7kt7cdcBsTa2gA7zuvCEplB871A= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608/go.mod h1:ynGp02hnYhVidQiL9KOKeiZnn0h+PSEJb+XjgKH6+v4= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 h1:ll6Pk+WoPlusW2uy8HTXupL+mees6mNohS4dfGYJsZ0= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608/go.mod h1:L8fBvuIwBQzABO/cYEOpekmaKlR4ELclrrGNZ6r//sg= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 h1:t0A/ip5m09OuAY0bvpnfxJhD1/dL44JYNwffy5boqB4= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608/go.mod h1:apbBgC0mKZTbgvW2ACPcNBl0z8HjCp7R9ZBns7F6J2E= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 h1:bB3FhjvPZfkS3EksYB3YR7muxGk0/rr6U993a7ETHx0= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608/go.mod h1:H1QoaISMz78OyBwXKU4gp8Gmwd1EVWq+Lb9P3BUfXUM= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 h1:ZD/gSJbfpC2WzXr17xq5UkJBQd/BfBVajzKrieu6zjQ= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608/go.mod h1:btgbNMPZJWZLd03ef2AblrpJ7e9ocpTvA0xUw0hIHew= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 h1:3rdbR/782gMtQo+1yxH+wuhJKd1jm/4X0pBgQX7pDp4= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608/go.mod h1:xLb6tQ33fgSOmwlMui9UjLzI9xmOclfjG2g+/z4XiUc= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 h1:+GBTBLH54gKT2dFlUgN/XzawdBG/9U5djPecjr7meas= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608/go.mod h1:BlYhkjtZZdKXQP9mBiVwRbaduXtDKEJHQC3dZ6fZBS0= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 h1:aycIQRLzdtuI99FkTRo4Y2QerkfKqZRYNN2BPESEc8A= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608/go.mod h1:4Zyt59oTQdaKitlYyz9K7d8Mi32e+K5NliOf9HAj5Wo= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 h1:kqbOiJpmSBE03Isw7KY27N4oCSaOcG28oaJgCLh9Rhk= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 h1:80l+duTMRKnszkWXolEs1n+1j4RFYd41mrV24P79vcY= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608/go.mod h1:5GIkumZszCtSzsXcTtL2YP4mIU25Rn3t0y51JWzzUDI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -289,8 +289,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= 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= @@ -348,8 +348,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -379,8 +379,8 @@ github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDz github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 h1:NJ4oI0UP0Qzt5gSgxuut4PrTaI0Ae0J1GKY9HuS7Zyo= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1/go.mod h1:rHr3gIOU3dJIjpnFCUeJyG4ItADlXMjI4NBwS4+YeMA= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b h1:ZaEAV5tsUTnyWEC/Gt8DXHKBANDyx70PVCiPOEVnuHk= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b/go.mod h1:ecJnx3s3oQK5BR7vu25fYSD2/ND9YLGkVpST7uiBkT0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -573,8 +573,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -593,8 +593,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -611,8 +611,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.6 h1:5jHuM+aH373XNtXl9TNTUH5Qd69Trve11tHIrB+6yj4= +github.com/hashicorp/go-getter v1.7.6/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -692,8 +692,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -783,8 +783,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -885,18 +885,20 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -916,8 +918,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1008,8 +1010,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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= @@ -1035,8 +1037,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1051,8 +1053,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -1136,13 +1138,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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= @@ -1153,13 +1155,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1225,8 +1227,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.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= @@ -1275,8 +1275,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1388,12 +1388,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1429,8 +1429,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= +google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1447,8 +1447,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.work.example b/go.work.example index c9297b1ace8..2a7a225b146 100644 --- a/go.work.example +++ b/go.work.example @@ -1,6 +1,6 @@ -go 1.22.0 +go 1.23.3 -toolchain go1.22.3 +toolchain go1.23.3 use ( ./ diff --git a/internal/validate/validate_test.go b/internal/validate/validate_test.go index ce49cf42475..8f543ccfeb7 100644 --- a/internal/validate/validate_test.go +++ b/internal/validate/validate_test.go @@ -5,6 +5,8 @@ import ( "testing" "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "github.com/cosmos/ibc-go/v9/internal/validate" ) @@ -18,35 +20,37 @@ func TestGRPCRequest(t *testing.T) { msg string portID string channelID string - expPass bool + expErr error }{ { "success", validID, validID, - true, + nil, }, { "invalid portID", invalidID, validID, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, { "invalid channelID", validID, invalidID, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, } for _, tc := range testCases { t.Run(fmt.Sprintf("Case %s", tc.msg), func(t *testing.T) { err := validate.GRPCRequest(tc.portID, tc.channelID) - if tc.expPass { + + if tc.expErr == nil { require.NoError(t, err, tc.msg) } else { require.Error(t, err, tc.msg) + require.EqualError(t, err, tc.expErr.Error(), tc.msg) } }) } diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index b7662ad0215..c6168c552a2 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -180,9 +180,11 @@ func (im IBCMiddleware) OnRecvPacket( packet channeltypes.Packet, _ sdk.AccAddress, ) ibcexported.Acknowledgement { - err := errorsmod.Wrapf(icatypes.ErrInvalidChannelFlow, "cannot receive packet on controller chain") - ack := channeltypes.NewErrorAcknowledgement(err) - im.keeper.EmitAcknowledgementEvent(ctx, packet, ack, err) + errInvalidFlow := errorsmod.Wrapf(icatypes.ErrInvalidChannelFlow, "cannot receive packet on controller chain") + ack := channeltypes.NewErrorAcknowledgement(errInvalidFlow) + if err := im.keeper.EmitAcknowledgementEvent(ctx, packet, ack, errInvalidFlow); err != nil { + return channeltypes.NewErrorAcknowledgement(errorsmod.Wrap(err, errInvalidFlow.Error())) + } return ack } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/events.go b/modules/apps/27-interchain-accounts/controller/keeper/events.go index ca05ad90fa9..6271778c706 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/events.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/events.go @@ -15,7 +15,7 @@ import ( // EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error // details if any. -func (k *Keeper) EmitAcknowledgementEvent(ctx context.Context, packet channeltypes.Packet, ack exported.Acknowledgement, err error) { +func (k *Keeper) EmitAcknowledgementEvent(ctx context.Context, packet channeltypes.Packet, ack exported.Acknowledgement, err error) error { attributes := []event.Attribute{ event.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), event.NewAttribute(icatypes.AttributeKeyControllerChannelID, packet.GetDestChannel()), @@ -26,7 +26,5 @@ func (k *Keeper) EmitAcknowledgementEvent(ctx context.Context, packet channeltyp attributes = append(attributes, event.NewAttribute(icatypes.AttributeKeyAckError, err.Error())) } - if err := k.EventService.EventManager(ctx).EmitKV(icatypes.EventTypePacket, attributes...); err != nil { - panic(err) - } + return k.EventService.EventManager(ctx).EmitKV(icatypes.EventTypePacket, attributes...) } 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 70ec159d0b0..974e12f852c 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/genesis_test.go @@ -21,7 +21,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { }, } - interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, TestPortID) + interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext().HeaderInfo(), ibctesting.FirstConnectionID, TestPortID) genesisState := genesistypes.ControllerGenesisState{ ActiveChannels: []genesistypes.ActiveChannel{ { 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 4d8e14c6d76..acd61e199da 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/grpc_query.go @@ -6,8 +6,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" ) @@ -15,13 +13,11 @@ import ( var _ types.QueryServer = (*Keeper)(nil) // InterchainAccount implements the Query/InterchainAccount gRPC method -func (k Keeper) InterchainAccount(goCtx context.Context, req *types.QueryInterchainAccountRequest) (*types.QueryInterchainAccountResponse, error) { +func (k Keeper) InterchainAccount(ctx context.Context, req *types.QueryInterchainAccountRequest) (*types.QueryInterchainAccountResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } - ctx := sdk.UnwrapSDKContext(goCtx) - portID, err := icatypes.NewControllerPortID(req.Owner) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "failed to generate portID from owner address: %s", err) @@ -38,10 +34,8 @@ func (k Keeper) InterchainAccount(goCtx context.Context, req *types.QueryInterch } // Params implements the Query/Params gRPC method -func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) +func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { params := k.GetParams(ctx) - return &types.QueryParamsResponse{ Params: ¶ms, }, nil 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 cc2002a2540..e5d73cfe5c6 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 @@ -36,7 +36,7 @@ func (suite *KeeperTestSuite) TestQueryInterchainAccount() { { "invalid connection, account address not found", func() { - req.ConnectionId = "invalid-connection-id" + req.ConnectionId = ibctesting.InvalidID }, "failed to retrieve account address", }, 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 9ed3dd5a22f..e841feba14e 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/handshake_test.go @@ -170,7 +170,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { { "connection not found", func() { - channel.ConnectionHops = []string{"invalid-connnection-id"} + channel.ConnectionHops = []string{ibctesting.InvalidID} path.EndpointA.SetChannel(*channel) }, connectiontypes.ErrConnectionNotFound, @@ -186,7 +186,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { { "invalid controller connection ID", func() { - metadata.ControllerConnectionId = "invalid-connnection-id" + metadata.ControllerConnectionId = ibctesting.InvalidID versionBytes, err := icatypes.ModuleCdc.MarshalJSON(&metadata) suite.Require().NoError(err) @@ -199,7 +199,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenInit() { { "invalid host connection ID", func() { - metadata.HostConnectionId = "invalid-connnection-id" + metadata.HostConnectionId = ibctesting.InvalidID versionBytes, err := icatypes.ModuleCdc.MarshalJSON(&metadata) suite.Require().NoError(err) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/migrations.go b/modules/apps/27-interchain-accounts/controller/keeper/migrations.go index 8a4b28ec449..c361362e6c1 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/migrations.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/migrations.go @@ -25,8 +25,8 @@ func (m Migrator) MigrateParams(ctx context.Context) error { if m.keeper != nil { params := controllertypes.DefaultParams() if m.keeper.legacySubspace != nil { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/7223 - m.keeper.legacySubspace.GetParamSetIfExists(sdkCtx, ¶ms) + // NOTE: legacy params still rely on sdk context + m.keeper.legacySubspace.GetParamSetIfExists(sdk.UnwrapSDKContext(ctx), ¶ms) } m.keeper.SetParams(ctx, params) m.keeper.Logger.Info("successfully migrated ica/controller submodule to self-manage params") diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go index cc97aff5c16..d9e4d8500c1 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go @@ -5,8 +5,6 @@ import ( errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" @@ -26,9 +24,7 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer { } // RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount -func (s msgServer) RegisterInterchainAccount(goCtx context.Context, msg *types.MsgRegisterInterchainAccount) (*types.MsgRegisterInterchainAccountResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - +func (s msgServer) RegisterInterchainAccount(ctx context.Context, msg *types.MsgRegisterInterchainAccount) (*types.MsgRegisterInterchainAccountResponse, error) { portID, err := icatypes.NewControllerPortID(msg.Owner) if err != nil { return nil, err @@ -61,9 +57,7 @@ func (s msgServer) RegisterInterchainAccount(goCtx context.Context, msg *types.M } // SendTx defines a rpc handler for MsgSendTx -func (s msgServer) SendTx(goCtx context.Context, msg *types.MsgSendTx) (*types.MsgSendTxResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - +func (s msgServer) SendTx(ctx context.Context, msg *types.MsgSendTx) (*types.MsgSendTxResponse, error) { portID, err := icatypes.NewControllerPortID(msg.Owner) if err != nil { return nil, err @@ -71,7 +65,8 @@ func (s msgServer) SendTx(goCtx context.Context, msg *types.MsgSendTx) (*types.M // the absolute timeout value is calculated using the controller chain block time + the relative timeout value // this assumes time synchrony to a certain degree between the controller and counterparty host chain - absoluteTimeout := uint64(ctx.BlockTime().UnixNano()) + msg.RelativeTimeout + blockTime := s.HeaderService.HeaderInfo(ctx).Time.UnixNano() + absoluteTimeout := uint64(blockTime) + msg.RelativeTimeout seq, err := s.sendTx(ctx, msg.ConnectionId, portID, msg.PacketData, absoluteTimeout) if err != nil { return nil, err @@ -81,12 +76,11 @@ func (s msgServer) SendTx(goCtx context.Context, msg *types.MsgSendTx) (*types.M } // UpdateParams defines an rpc handler method for MsgUpdateParams. Updates the ica/controller submodule's parameters. -func (k Keeper) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { +func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Signer { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } - ctx := sdk.UnwrapSDKContext(goCtx) k.SetParams(ctx, msg.Params) return &types.MsgUpdateParamsResponse{}, nil diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay.go b/modules/apps/27-interchain-accounts/controller/keeper/relay.go index 7b072bdea2f..40111168a14 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay.go @@ -5,8 +5,6 @@ import ( errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" @@ -36,8 +34,8 @@ func (k Keeper) sendTx(ctx context.Context, connectionID, portID string, icaPack return 0, errorsmod.Wrapf(icatypes.ErrActiveChannelNotFound, "failed to retrieve active channel on connection %s for port %s", connectionID, portID) } - sdkCtx := sdk.UnwrapSDKContext(ctx) - if uint64(sdkCtx.BlockTime().UnixNano()) >= timeoutTimestamp { + blockTime := k.HeaderService.HeaderInfo(ctx).Time.UnixNano() + if uint64(blockTime) >= timeoutTimestamp { return 0, icatypes.ErrInvalidTimeoutTimestamp } diff --git a/modules/apps/27-interchain-accounts/controller/types/codec.go b/modules/apps/27-interchain-accounts/controller/types/codec.go index 700bd6ff014..2df0a6f7087 100644 --- a/modules/apps/27-interchain-accounts/controller/types/codec.go +++ b/modules/apps/27-interchain-accounts/controller/types/codec.go @@ -1,14 +1,14 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" ) // RegisterInterfaces registers the interchain accounts controller message types using the provided InterfaceRegistry -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgRegisterInterchainAccount{}, diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go index 1c18cdb63e0..5a500e6ec66 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" banktypes "cosmossdk.io/x/bank/types" stakingtypes "cosmossdk.io/x/staking/types" @@ -48,7 +48,7 @@ func TestGeneratePacketData(t *testing.T) { memo string expectedPass bool message string - registerInterfaceFn func(registry registry.InterfaceRegistrar) + registerInterfaceFn func(registry coreregistry.InterfaceRegistrar) assertionFn func(t *testing.T, msgs []sdk.Msg) }{ { @@ -56,7 +56,7 @@ func TestGeneratePacketData(t *testing.T) { memo: "", expectedPass: true, message: multiMsg, - registerInterfaceFn: func(registry registry.InterfaceRegistrar) { + registerInterfaceFn: func(registry coreregistry.InterfaceRegistrar) { stakingtypes.RegisterInterfaces(registry) banktypes.RegisterInterfaces(registry) }, diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index e23b0514e59..77c7060ae34 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -116,8 +116,11 @@ func (im IBCModule) OnRecvPacket( _ sdk.AccAddress, ) ibcexported.Acknowledgement { if !im.keeper.GetParams(ctx).HostEnabled { - im.keeper.Logger(ctx).Info("host submodule is disabled") - keeper.EmitHostDisabledEvent(ctx, packet) + im.keeper.Logger.Info("host submodule is disabled") + if err := im.keeper.EmitHostDisabledEvent(ctx, packet); err != nil { + return channeltypes.NewErrorAcknowledgement(err) + } + return channeltypes.NewErrorAcknowledgement(types.ErrHostSubModuleDisabled) } @@ -125,13 +128,15 @@ func (im IBCModule) OnRecvPacket( ack := channeltypes.NewResultAcknowledgement(txResponse) if err != nil { ack = channeltypes.NewErrorAcknowledgement(err) - im.keeper.Logger(ctx).Error(fmt.Sprintf("%s sequence %d", err.Error(), packet.Sequence)) + im.keeper.Logger.Error(fmt.Sprintf("%s sequence %d", err.Error(), packet.Sequence)) } else { - im.keeper.Logger(ctx).Info("successfully handled packet", "sequence", packet.Sequence) + im.keeper.Logger.Info("successfully handled packet", "sequence", packet.Sequence) } // Emit an event indicating a successful or failed acknowledgement. - keeper.EmitAcknowledgementEvent(ctx, packet, ack, err) + if err := im.keeper.EmitAcknowledgementEvent(ctx, packet, ack, err); err != nil { + return channeltypes.NewErrorAcknowledgement(err) + } // NOTE: acknowledgement will be written synchronously during IBC handler execution. return ack 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 f636098f710..900dd6c383c 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -149,7 +149,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() { }, { "account address generation is block dependent", func() { - interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) + interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext().HeaderInfo(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) interchainAcc := icatypes.NewInterchainAccount(authtypes.NewBaseAccountWithAddress(interchainAccAddr), path.EndpointA.ChannelConfig.PortID) suite.chainB.GetSimApp().AuthKeeper.NewAccount(suite.chainB.GetContext(), interchainAcc) suite.chainB.GetSimApp().AuthKeeper.SetAccount(suite.chainB.GetContext(), interchainAcc) diff --git a/modules/apps/27-interchain-accounts/host/keeper/account.go b/modules/apps/27-interchain-accounts/host/keeper/account.go index c6b239232bb..42509530e89 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/account.go +++ b/modules/apps/27-interchain-accounts/host/keeper/account.go @@ -15,9 +15,9 @@ import ( // and block dependent information. An error is returned if an account already exists for the generated account. // An interchain account type is set in the account keeper and the interchain account address mapping is updated. func (k Keeper) createInterchainAccount(ctx context.Context, connectionID, controllerPortID string) (sdk.AccAddress, error) { - accAddress := icatypes.GenerateAddress(ctx, connectionID, controllerPortID) + accAddress := icatypes.GenerateAddress(k.HeaderService.HeaderInfo(ctx), connectionID, controllerPortID) - if acc := k.accountKeeper.GetAccount(ctx, accAddress); acc != nil { + if acc := k.authKeeper.GetAccount(ctx, accAddress); acc != nil { return nil, errorsmod.Wrapf(icatypes.ErrAccountAlreadyExist, "existing account for newly generated interchain account address %s", accAddress) } @@ -26,8 +26,8 @@ func (k Keeper) createInterchainAccount(ctx context.Context, connectionID, contr controllerPortID, ) - k.accountKeeper.NewAccount(ctx, interchainAccount) - k.accountKeeper.SetAccount(ctx, interchainAccount) + k.authKeeper.NewAccount(ctx, interchainAccount) + k.authKeeper.SetAccount(ctx, interchainAccount) k.SetInterchainAccountAddress(ctx, connectionID, controllerPortID, interchainAccount.Address) diff --git a/modules/apps/27-interchain-accounts/host/keeper/events.go b/modules/apps/27-interchain-accounts/host/keeper/events.go index fb497ec2ca3..f4d6e8e1429 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/events.go +++ b/modules/apps/27-interchain-accounts/host/keeper/events.go @@ -4,6 +4,8 @@ import ( "context" "strconv" + "cosmossdk.io/core/event" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" @@ -14,35 +16,30 @@ import ( // EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error // details if any. -func EmitAcknowledgementEvent(ctx context.Context, packet channeltypes.Packet, ack exported.Acknowledgement, err error) { - attributes := []sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), - sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), - sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, strconv.FormatBool(ack.Success())), +func (k *Keeper) EmitAcknowledgementEvent(ctx context.Context, packet channeltypes.Packet, ack exported.Acknowledgement, err error) error { + attributes := []event.Attribute{ + event.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), + event.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), + event.NewAttribute(icatypes.AttributeKeyAckSuccess, strconv.FormatBool(ack.Success())), } if err != nil { - attributes = append(attributes, sdk.NewAttribute(icatypes.AttributeKeyAckError, err.Error())) + attributes = append(attributes, event.NewAttribute(icatypes.AttributeKeyAckError, err.Error())) } - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - sdkCtx.EventManager().EmitEvent( - sdk.NewEvent( - icatypes.EventTypePacket, - attributes..., - ), + + return k.EventService.EventManager(ctx).EmitKV( + icatypes.EventTypePacket, + attributes..., ) } // EmitHostDisabledEvent emits an event signalling that the host submodule is disabled. -func EmitHostDisabledEvent(ctx context.Context, packet channeltypes.Packet) { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - sdkCtx.EventManager().EmitEvent( - sdk.NewEvent( - icatypes.EventTypePacket, - sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), - sdk.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), - sdk.NewAttribute(icatypes.AttributeKeyAckError, types.ErrHostSubModuleDisabled.Error()), - sdk.NewAttribute(icatypes.AttributeKeyAckSuccess, "false"), - ), +func (k *Keeper) EmitHostDisabledEvent(ctx context.Context, packet channeltypes.Packet) error { + return k.EventService.EventManager(ctx).EmitKV( + icatypes.EventTypePacket, + event.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), + event.NewAttribute(icatypes.AttributeKeyHostChannelID, packet.GetDestChannel()), + event.NewAttribute(icatypes.AttributeKeyAckError, types.ErrHostSubModuleDisabled.Error()), + event.NewAttribute(icatypes.AttributeKeyAckSuccess, "false"), ) } 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 079e2aa7903..fe0a2cbb368 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go @@ -10,7 +10,7 @@ import ( ) func (suite *KeeperTestSuite) TestInitGenesis() { - interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, TestPortID) + interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext().HeaderInfo(), ibctesting.FirstConnectionID, TestPortID) genesisState := genesistypes.HostGenesisState{ ActiveChannels: []genesistypes.ActiveChannel{ { @@ -65,7 +65,7 @@ func (suite *KeeperTestSuite) TestGenesisParams() { suite.Run(tc.name, func() { suite.SetupTest() // reset - interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, TestPortID) + interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext().HeaderInfo(), ibctesting.FirstConnectionID, TestPortID) genesisState := genesistypes.HostGenesisState{ ActiveChannels: []genesistypes.ActiveChannel{ { 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 c6616c455bd..107853a252e 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go +++ b/modules/apps/27-interchain-accounts/host/keeper/grpc_query.go @@ -3,18 +3,14 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" ) var _ types.QueryServer = (*Keeper)(nil) // Params implements the Query/Params gRPC method -func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(c) +func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { params := k.GetParams(ctx) - return &types.QueryParamsResponse{ Params: ¶ms, }, nil diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake.go b/modules/apps/27-interchain-accounts/host/keeper/handshake.go index 19d126218b3..ee4fbba0509 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake.go @@ -40,7 +40,7 @@ func (k Keeper) OnChanOpenTry( return "", errorsmod.Wrapf(err, "failed to retrieve connection %s", connectionHops[0]) } - k.Logger(ctx).Debug("counterparty version is invalid, proposing default metadata") + k.Logger.Debug("counterparty version is invalid, proposing default metadata") metadata = icatypes.NewDefaultMetadata(connection.Counterparty.ConnectionId, connectionHops[0]) } @@ -72,9 +72,9 @@ func (k Keeper) OnChanOpenTry( interchainAccAddr, found := k.GetInterchainAccountAddress(ctx, metadata.HostConnectionId, counterparty.PortId) if found { // reopening an interchain account - k.Logger(ctx).Info("reopening existing interchain account", "address", interchainAccAddr) + k.Logger.Info("reopening existing interchain account", "address", interchainAccAddr) accAddress = sdk.MustAccAddressFromBech32(interchainAccAddr) - if _, ok := k.accountKeeper.GetAccount(ctx, accAddress).(*icatypes.InterchainAccount); !ok { + if _, ok := k.authKeeper.GetAccount(ctx, accAddress).(*icatypes.InterchainAccount); !ok { return "", errorsmod.Wrapf(icatypes.ErrInvalidAccountReopening, "existing account address %s, does not have interchain account type", accAddress) } @@ -83,7 +83,7 @@ func (k Keeper) OnChanOpenTry( if err != nil { return "", err } - k.Logger(ctx).Info("successfully created new interchain account", "host-connection-id", metadata.HostConnectionId, "port-id", counterparty.PortId, "address", accAddress) + k.Logger.Info("successfully created new interchain account", "host-connection-id", metadata.HostConnectionId, "port-id", counterparty.PortId, "address", accAddress) } metadata.Address = accAddress.String() 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 7c119b248ee..7fea0c075f3 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go @@ -171,7 +171,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { { "account already exists", func() { - interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) + interchainAccAddr := icatypes.GenerateAddress(suite.chainB.GetContext().HeaderInfo(), path.EndpointB.ConnectionID, path.EndpointA.ChannelConfig.PortID) interchainAcc := icatypes.NewInterchainAccount(authtypes.NewBaseAccountWithAddress(interchainAccAddr), path.EndpointA.ChannelConfig.PortID) suite.chainB.GetSimApp().AuthKeeper.NewAccount(suite.chainB.GetContext(), interchainAcc) suite.chainB.GetSimApp().AuthKeeper.SetAccount(suite.chainB.GetContext(), interchainAcc) @@ -188,7 +188,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { { "connection not found", func() { - channel.ConnectionHops = []string{"invalid-connnection-id"} + channel.ConnectionHops = []string{ibctesting.InvalidID} path.EndpointB.SetChannel(*channel) }, connectiontypes.ErrConnectionNotFound, @@ -220,7 +220,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { { "invalid controller connection ID", func() { - metadata.ControllerConnectionId = "invalid-connnection-id" + metadata.ControllerConnectionId = ibctesting.InvalidID versionBytes, err := icatypes.ModuleCdc.MarshalJSON(&metadata) suite.Require().NoError(err) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index f426eb28f57..bc137083883 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -12,14 +12,12 @@ import ( msgv1 "cosmossdk.io/api/cosmos/msg/v1" queryv1 "cosmossdk.io/api/cosmos/query/v1" - corestore "cosmossdk.io/core/store" + "cosmossdk.io/core/appmodule" errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" genesistypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/genesis/types" "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" @@ -27,22 +25,19 @@ import ( channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" - "github.com/cosmos/ibc-go/v9/modules/core/exported" coretypes "github.com/cosmos/ibc-go/v9/modules/core/types" ) // Keeper defines the IBC interchain accounts host keeper type Keeper struct { - storeService corestore.KVStoreService + appmodule.Environment + cdc codec.Codec legacySubspace icatypes.ParamSubspace ics4Wrapper porttypes.ICS4Wrapper channelKeeper icatypes.ChannelKeeper - accountKeeper icatypes.AccountKeeper - - msgRouter icatypes.MessageRouter - queryRouter icatypes.QueryRouter + authKeeper icatypes.AuthKeeper // mqsAllowList is a list of all module safe query paths mqsAllowList []string @@ -54,12 +49,12 @@ type Keeper struct { // NewKeeper creates a new interchain accounts host Keeper instance func NewKeeper( - cdc codec.Codec, storeService corestore.KVStoreService, legacySubspace icatypes.ParamSubspace, + cdc codec.Codec, env appmodule.Environment, legacySubspace icatypes.ParamSubspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, - accountKeeper icatypes.AccountKeeper, msgRouter icatypes.MessageRouter, queryRouter icatypes.QueryRouter, authority string, + authKeeper icatypes.AuthKeeper, authority string, ) Keeper { // ensure ibc interchain accounts module account is set - if addr := accountKeeper.GetModuleAddress(icatypes.ModuleName); addr == nil { + if addr := authKeeper.GetModuleAddress(icatypes.ModuleName); addr == nil { panic(errors.New("the Interchain Accounts module account has not been set")) } @@ -68,14 +63,12 @@ func NewKeeper( } return Keeper{ - storeService: storeService, + Environment: env, cdc: cdc, legacySubspace: legacySubspace, ics4Wrapper: ics4Wrapper, channelKeeper: channelKeeper, - accountKeeper: accountKeeper, - msgRouter: msgRouter, - queryRouter: queryRouter, + authKeeper: authKeeper, mqsAllowList: newModuleQuerySafeAllowList(), authority: authority, } @@ -93,12 +86,6 @@ func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { return k.ics4Wrapper } -// Logger returns the application logger, scoped to the associated module -func (Keeper) Logger(ctx context.Context) log.Logger { - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: remove after context.Context is removed from core IBC - return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s-%s", exported.ModuleName, icatypes.ModuleName)) -} - // getConnectionID returns the connection id for the given port and channelIDs. func (k Keeper) getConnectionID(ctx context.Context, portID, channelID string) (string, error) { channel, found := k.channelKeeper.GetChannel(ctx, portID, channelID) @@ -110,7 +97,7 @@ func (k Keeper) getConnectionID(ctx context.Context, portID, channelID string) ( // setPort sets the provided portID in state. func (k Keeper) setPort(ctx context.Context, portID string) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) if err := store.Set(icatypes.KeyPort(portID), []byte{0x01}); err != nil { panic(err) } @@ -133,7 +120,7 @@ func (k Keeper) getAppMetadata(ctx context.Context, portID, channelID string) (i // GetActiveChannelID retrieves the active channelID from the store keyed by the provided connectionID and portID func (k Keeper) GetActiveChannelID(ctx context.Context, connectionID, portID string) (string, bool) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) key := icatypes.KeyActiveChannel(portID, connectionID) bz, err := store.Get(key) @@ -165,9 +152,9 @@ func (k Keeper) GetOpenActiveChannel(ctx context.Context, connectionID, portID s // GetAllActiveChannels returns a list of all active interchain accounts host channels and their associated connection and port identifiers func (k Keeper) GetAllActiveChannels(ctx context.Context) []genesistypes.ActiveChannel { - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.ActiveChannelKeyPrefix)) - defer coretypes.LogDeferred(k.Logger(ctx), func() error { return iterator.Close() }) + defer coretypes.LogDeferred(k.Logger, func() error { return iterator.Close() }) var activeChannels []genesistypes.ActiveChannel for ; iterator.Valid(); iterator.Next() { @@ -187,7 +174,7 @@ func (k Keeper) GetAllActiveChannels(ctx context.Context) []genesistypes.ActiveC // SetActiveChannelID stores the active channelID, keyed by the provided connectionID and portID func (k Keeper) SetActiveChannelID(ctx context.Context, connectionID, portID, channelID string) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) if err := store.Set(icatypes.KeyActiveChannel(portID, connectionID), []byte(channelID)); err != nil { panic(err) } @@ -201,7 +188,7 @@ func (k Keeper) IsActiveChannel(ctx context.Context, connectionID, portID string // GetInterchainAccountAddress retrieves the InterchainAccount address from the store associated with the provided connectionID and portID func (k Keeper) GetInterchainAccountAddress(ctx context.Context, connectionID, portID string) (string, bool) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) key := icatypes.KeyOwnerAccount(portID, connectionID) bz, err := store.Get(key) @@ -217,7 +204,7 @@ func (k Keeper) GetInterchainAccountAddress(ctx context.Context, connectionID, p // GetAllInterchainAccounts returns a list of all registered interchain account addresses and their associated connection and controller port identifiers func (k Keeper) GetAllInterchainAccounts(ctx context.Context) []genesistypes.RegisteredInterchainAccount { - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := runtime.KVStoreAdapter(k.KVStoreService.OpenKVStore(ctx)) iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.OwnerKeyPrefix)) var interchainAccounts []genesistypes.RegisteredInterchainAccount @@ -238,7 +225,7 @@ func (k Keeper) GetAllInterchainAccounts(ctx context.Context) []genesistypes.Reg // SetInterchainAccountAddress stores the InterchainAccount address, keyed by the associated connectionID and portID func (k Keeper) SetInterchainAccountAddress(ctx context.Context, connectionID, portID, address string) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) if err := store.Set(icatypes.KeyOwnerAccount(portID, connectionID), []byte(address)); err != nil { panic(err) } @@ -251,7 +238,7 @@ func (k Keeper) GetAuthority() string { // GetParams returns the total set of the host submodule parameters. func (k Keeper) GetParams(ctx context.Context) types.Params { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) bz, err := store.Get([]byte(types.ParamsKey)) if err != nil { panic(err) @@ -267,7 +254,7 @@ func (k Keeper) GetParams(ctx context.Context) types.Params { // SetParams sets the total set of the host submodule parameters. func (k Keeper) SetParams(ctx context.Context, params types.Params) { - store := k.storeService.OpenKVStore(ctx) + store := k.KVStoreService.OpenKVStore(ctx) bz := k.cdc.MustMarshal(¶ms) if err := store.Set([]byte(types.ParamsKey), bz); err != nil { panic(err) 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 bf595d96869..42cd66c2a15 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -6,6 +6,8 @@ import ( testifysuite "github.com/stretchr/testify/suite" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/runtime" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" @@ -142,39 +144,33 @@ func (suite *KeeperTestSuite) TestNewKeeper() { {"success", func() { keeper.NewKeeper( suite.chainA.GetSimApp().AppCodec(), - runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), + runtime.NewEnvironment(runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), log.NewNopLogger()), suite.chainA.GetSimApp().GetSubspace(types.SubModuleName), suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().AuthKeeper, - suite.chainA.GetSimApp().MsgServiceRouter(), - suite.chainA.GetSimApp().GRPCQueryRouter(), suite.chainA.GetSimApp().ICAHostKeeper.GetAuthority(), ) }, ""}, {"failure: interchain accounts module account does not exist", func() { keeper.NewKeeper( suite.chainA.GetSimApp().AppCodec(), - runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), + runtime.NewEnvironment(runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), log.NewNopLogger()), suite.chainA.GetSimApp().GetSubspace(types.SubModuleName), suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, authkeeper.AccountKeeper{}, // empty account keeper - suite.chainA.GetSimApp().MsgServiceRouter(), - suite.chainA.GetSimApp().GRPCQueryRouter(), suite.chainA.GetSimApp().ICAHostKeeper.GetAuthority(), ) }, "the Interchain Accounts module account has not been set"}, {"failure: empty mock staking keeper", func() { keeper.NewKeeper( suite.chainA.GetSimApp().AppCodec(), - runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), + runtime.NewEnvironment(runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(types.StoreKey)), log.NewNopLogger()), suite.chainA.GetSimApp().GetSubspace(types.SubModuleName), suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().AuthKeeper, - suite.chainA.GetSimApp().MsgServiceRouter(), - suite.chainA.GetSimApp().GRPCQueryRouter(), "", // authority ) }, "authority must be non-empty"}, diff --git a/modules/apps/27-interchain-accounts/host/keeper/migrations.go b/modules/apps/27-interchain-accounts/host/keeper/migrations.go index ea0fb9374f5..b229d23c116 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/migrations.go +++ b/modules/apps/27-interchain-accounts/host/keeper/migrations.go @@ -25,14 +25,14 @@ func (m Migrator) MigrateParams(ctx context.Context) error { if m.keeper != nil { params := types.DefaultParams() if m.keeper.legacySubspace != nil { - sdkCtx := sdk.UnwrapSDKContext(ctx) - m.keeper.legacySubspace.GetParamSetIfExists(sdkCtx, ¶ms) + // NOTE: legacy params still rely on sdk context + m.keeper.legacySubspace.GetParamSetIfExists(sdk.UnwrapSDKContext(ctx), ¶ms) } if err := params.Validate(); err != nil { return err } m.keeper.SetParams(ctx, params) - m.keeper.Logger(ctx).Info("successfully migrated ica/host submodule to self-manage params") + m.keeper.Logger.Info("successfully migrated ica/host submodule to self-manage params") } return nil } diff --git a/modules/apps/27-interchain-accounts/host/keeper/migrations_test.go b/modules/apps/27-interchain-accounts/host/keeper/migrations_test.go index 0d5746d45d6..9b0e44fbbe7 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/migrations_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/migrations_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "fmt" + "cosmossdk.io/log" govtypes "cosmossdk.io/x/gov/types" "github.com/cosmos/cosmos-sdk/runtime" @@ -32,13 +33,11 @@ func (suite *KeeperTestSuite) TestMigratorMigrateParams() { func() { suite.chainA.GetSimApp().ICAHostKeeper = icahostkeeper.NewKeeper( suite.chainA.Codec, - runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(icahosttypes.StoreKey)), + runtime.NewEnvironment(runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(icahosttypes.StoreKey)), log.NewNopLogger()), nil, // assign a nil legacy param subspace suite.chainA.GetSimApp().IBCFeeKeeper, suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper, suite.chainA.GetSimApp().AuthKeeper, - suite.chainA.GetSimApp().MsgServiceRouter(), - suite.chainA.GetSimApp().GRPCQueryRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) }, diff --git a/modules/apps/27-interchain-accounts/host/keeper/msg_server.go b/modules/apps/27-interchain-accounts/host/keeper/msg_server.go index afa952f6a02..7e9806a9626 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/msg_server.go +++ b/modules/apps/27-interchain-accounts/host/keeper/msg_server.go @@ -2,13 +2,15 @@ package keeper import ( "context" + "fmt" + "reflect" "slices" + "strings" - errorsmod "cosmossdk.io/errors" - - sdk "github.com/cosmos/cosmos-sdk/types" + gogoproto "github.com/cosmos/gogoproto/proto" + "google.golang.org/protobuf/reflect/protoreflect" - abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" @@ -28,9 +30,7 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer { // ModuleQuerySafe routes the queries to the keeper's query router if they are module_query_safe. // This handler doesn't use the signer. -func (m msgServer) ModuleQuerySafe(goCtx context.Context, msg *types.MsgModuleQuerySafe) (*types.MsgModuleQuerySafeResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - +func (m msgServer) ModuleQuerySafe(ctx context.Context, msg *types.MsgModuleQuerySafe) (*types.MsgModuleQuerySafeResponse, error) { responses := make([][]byte, len(msg.Requests)) for i, query := range msg.Requests { isModuleQuerySafe := slices.Contains(m.mqsAllowList, query.Path) @@ -38,27 +38,57 @@ func (m msgServer) ModuleQuerySafe(goCtx context.Context, msg *types.MsgModuleQu return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "not module query safe: %s", query.Path) } - route := m.queryRouter.Route(query.Path) - if route == nil { - return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "no route to query: %s", query.Path) + path := strings.TrimPrefix(query.Path, "/") + pathFullName := protoreflect.FullName(strings.ReplaceAll(path, "/", ".")) + + desc, err := gogoproto.GogoResolver.FindDescriptorByName(pathFullName) + if err != nil { + return nil, err + } + + md, isGRPC := desc.(protoreflect.MethodDescriptor) + if !isGRPC { + return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "no descriptor found for query path: %s", string(desc.FullName())) } - res, err := route(ctx, &abci.QueryRequest{ - Path: query.Path, - Data: query.Data, - }) + msg, err := forgeProtoTypeFromName(string(md.Input().FullName())) if err != nil { - m.Logger(ctx).Debug("query failed", "path", query.Path, "error", err) return nil, err } - if res == nil || res.Value == nil { + + if err := m.cdc.Unmarshal(query.Data, msg); err != nil { + return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidType, "cannot unmarshal query request data to: %s", md.Input().FullName()) + } + + res, err := m.QueryRouterService.Invoke(ctx, msg) + if err != nil { + m.Logger.Debug("query failed", "path", query.Path, "error", err) + return nil, err + } + if res == nil { return nil, errorsmod.Wrapf(ibcerrors.ErrInvalidRequest, "no response for query: %s", query.Path) } - responses[i] = res.Value + responses[i] = m.cdc.MustMarshal(res) + } + + height := m.HeaderService.HeaderInfo(ctx).Height + return &types.MsgModuleQuerySafeResponse{Responses: responses, Height: uint64(height)}, nil +} + +// see: https://github.com/cosmos/cosmos-sdk/issues/22833 +func forgeProtoTypeFromName(msgName string) (gogoproto.Message, error) { + typ := gogoproto.MessageType(msgName) + if typ == nil { + return nil, fmt.Errorf("no message type found for %s", msgName) + } + + msg, ok := reflect.New(typ.Elem()).Interface().(gogoproto.Message) + if !ok { + return nil, fmt.Errorf("could not create response message %s", msgName) } - return &types.MsgModuleQuerySafeResponse{Responses: responses, Height: uint64(ctx.BlockHeight())}, nil + return msg, nil } // UpdateParams updates the host submodule's params. diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index 42e685738c8..46932c9af24 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -66,10 +66,6 @@ func (k Keeper) executeTx(ctx context.Context, sourcePort, destPort, destChannel MsgResponses: make([]*codectypes.Any, len(msgs)), } - // CacheContext returns a new context with the multi-store branched into a cached storage object - // writeCache is called only if all msgs succeed, performing state transitions atomically - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - cacheCtx, writeCache := sdkCtx.CacheContext() for i, msg := range msgs { if m, ok := msg.(sdk.HasValidateBasic); ok { if err := m.ValidateBasic(); err != nil { @@ -77,16 +73,19 @@ func (k Keeper) executeTx(ctx context.Context, sourcePort, destPort, destChannel } } - protoAny, err := k.executeMsg(cacheCtx, msg) - if err != nil { + if err := k.BranchService.Execute(ctx, func(ctx context.Context) error { + protoAny, err := k.executeMsg(ctx, msg) + if err != nil { + return err + } + + txMsgData.MsgResponses[i] = protoAny + return nil + }); err != nil { return nil, err } - - txMsgData.MsgResponses[i] = protoAny } - writeCache() - txResponse, err := proto.Marshal(txMsgData) if err != nil { return nil, errorsmod.Wrap(err, "failed to marshal tx data") @@ -110,7 +109,7 @@ func (k Keeper) authenticateTx(ctx context.Context, msgs []sdk.Msg, connectionID } // obtain the message signers using the proto signer annotations - // the msgv2 return value is discarded as it is not used + // the protoreflect msg return value is discarded as it is not used signers, _, err := k.cdc.GetMsgSigners(msg) if err != nil { return errorsmod.Wrapf(err, "failed to obtain message signers for message type %s", sdk.MsgTypeURL(msg)) @@ -131,24 +130,19 @@ func (k Keeper) authenticateTx(ctx context.Context, msgs []sdk.Msg, connectionID // 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) (*codectypes.Any, error) { // TODO: https://github.com/cosmos/ibc-go/issues/7223 - handler := k.msgRouter.Handler(msg) - if handler == nil { - return nil, icatypes.ErrInvalidRoute +func (k Keeper) executeMsg(ctx context.Context, msg sdk.Msg) (*codectypes.Any, error) { + if err := k.MsgRouterService.CanInvoke(ctx, sdk.MsgTypeURL(msg)); err != nil { + return nil, errorsmod.Wrap(err, icatypes.ErrInvalidRoute.Error()) } - res, err := handler(ctx, msg) + res, err := k.MsgRouterService.Invoke(ctx, msg) if err != nil { return nil, err } - // 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()) - - // Each individual sdk.Result has exactly one Msg response. We aggregate here. - msgResponse := res.MsgResponses[0] - if msgResponse == nil { - return nil, errorsmod.Wrapf(ibcerrors.ErrLogic, "got nil Msg response for msg %s", sdk.MsgTypeURL(msg)) + msgResponse, err := codectypes.NewAnyWithValue(res) + if err != nil { + return nil, errorsmod.Wrapf(ibcerrors.ErrPackAny, "failed to pack msg response as Any: %T", res) } return msgResponse, nil diff --git a/modules/apps/27-interchain-accounts/module.go b/modules/apps/27-interchain-accounts/module.go index 2d218207fbf..6e7b838184c 100644 --- a/modules/apps/27-interchain-accounts/module.go +++ b/modules/apps/27-interchain-accounts/module.go @@ -40,6 +40,22 @@ var ( _ porttypes.IBCModule = (*host.IBCModule)(nil) ) +// AppModule is the application module for the IBC interchain accounts module +type AppModule struct { + cdc codec.Codec + controllerKeeper *controllerkeeper.Keeper + hostKeeper *hostkeeper.Keeper +} + +// NewAppModule creates a new IBC interchain accounts module +func NewAppModule(cdc codec.Codec, controllerKeeper *controllerkeeper.Keeper, hostKeeper *hostkeeper.Keeper) AppModule { + return AppModule{ + cdc: cdc, + controllerKeeper: controllerKeeper, + hostKeeper: hostKeeper, + } +} + // Name implements AppModuleBasic interface func (AppModule) Name() string { return types.ModuleName @@ -100,22 +116,6 @@ func (AppModule) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// AppModule is the application module for the IBC interchain accounts module -type AppModule struct { - cdc codec.Codec - controllerKeeper *controllerkeeper.Keeper - hostKeeper *hostkeeper.Keeper -} - -// NewAppModule creates a new IBC interchain accounts module -func NewAppModule(cdc codec.Codec, controllerKeeper *controllerkeeper.Keeper, hostKeeper *hostkeeper.Keeper) AppModule { - return AppModule{ - cdc: cdc, - controllerKeeper: controllerKeeper, - hostKeeper: hostKeeper, - } -} - // RegisterServices registers module services func (am AppModule) RegisterServices(cfg module.Configurator) { if am.controllerKeeper != nil { diff --git a/modules/apps/27-interchain-accounts/types/account.go b/modules/apps/27-interchain-accounts/types/account.go index d1542f52ace..44cb5142d21 100644 --- a/modules/apps/27-interchain-accounts/types/account.go +++ b/modules/apps/27-interchain-accounts/types/account.go @@ -1,13 +1,13 @@ package types import ( - "context" "encoding/json" "regexp" "strings" yaml "gopkg.in/yaml.v2" + "cosmossdk.io/core/header" errorsmod "cosmossdk.io/errors" crypto "github.com/cosmos/cosmos-sdk/crypto/types" @@ -43,15 +43,13 @@ type interchainAccountPretty struct { } // GenerateAddress returns an sdk.AccAddress derived using a host module account address, host connection ID, the controller portID, -// the current block app hash, and the current block data hash. The sdk.AccAddress returned is a sub-address of the host module account. -func GenerateAddress(ctx context.Context, connectionID, portID string) sdk.AccAddress { +// the current block app hash, and the current block hash (merkle root of block). The sdk.AccAddress returned is a sub-address of the host module account. +func GenerateAddress(headerInfo header.Info, connectionID, portID string) sdk.AccAddress { hostModuleAcc := sdkaddress.Module(ModuleName, []byte(hostAccountsKey)) - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO: https://github.com/cosmos/ibc-go/issues/5917 - header := sdkCtx.BlockHeader() buf := []byte(connectionID + portID) - buf = append(buf, header.AppHash...) - buf = append(buf, header.DataHash...) + buf = append(buf, headerInfo.AppHash...) + buf = append(buf, headerInfo.Hash...) return sdkaddress.Derive(hostModuleAcc, buf) } diff --git a/modules/apps/27-interchain-accounts/types/account_test.go b/modules/apps/27-interchain-accounts/types/account_test.go index 60f4b5f297d..996d5b85e21 100644 --- a/modules/apps/27-interchain-accounts/types/account_test.go +++ b/modules/apps/27-interchain-accounts/types/account_test.go @@ -44,7 +44,7 @@ func TestTypesTestSuite(t *testing.T) { } func (suite *TypesTestSuite) TestGenerateAddress() { - addr := types.GenerateAddress(suite.chainA.GetContext(), "test-connection-id", "test-port-id") + addr := types.GenerateAddress(suite.chainA.GetContext().HeaderInfo(), "test-connection-id", "test-port-id") accAddr, err := sdk.AccAddressFromBech32(addr.String()) suite.Require().NoError(err, "TestGenerateAddress failed") @@ -53,34 +53,34 @@ func (suite *TypesTestSuite) TestGenerateAddress() { func (suite *TypesTestSuite) TestValidateAccountAddress() { testCases := []struct { - name string - address string - expPass bool + name string + address string + expError error }{ { "success", TestOwnerAddress, - true, + nil, }, { "success with single character", "a", - true, + nil, }, { "empty string", "", - false, + types.ErrInvalidAccountAddress, }, { "only spaces", " ", - false, + types.ErrInvalidAccountAddress, }, { "address is too long", ibctesting.GenerateString(uint(types.DefaultMaxAddrLength) + 1), - false, + types.ErrInvalidAccountAddress, }, } @@ -90,10 +90,10 @@ func (suite *TypesTestSuite) TestValidateAccountAddress() { suite.Run(tc.name, func() { err := types.ValidateAccountAddress(tc.address) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError, tc.name) } }) } diff --git a/modules/apps/27-interchain-accounts/types/expected_keepers.go b/modules/apps/27-interchain-accounts/types/expected_keepers.go index 764a187e1ed..ddf171998ff 100644 --- a/modules/apps/27-interchain-accounts/types/expected_keepers.go +++ b/modules/apps/27-interchain-accounts/types/expected_keepers.go @@ -11,8 +11,8 @@ import ( channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" ) -// AccountKeeper defines the expected account keeper -type AccountKeeper interface { +// AuthKeeper defines the expected x/auth keeper +type AuthKeeper interface { NewAccount(ctx context.Context, acc sdk.AccountI) sdk.AccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI SetAccount(ctx context.Context, acc sdk.AccountI) diff --git a/modules/apps/27-interchain-accounts/types/router.go b/modules/apps/27-interchain-accounts/types/router.go deleted file mode 100644 index 6c1dcee6d39..00000000000 --- a/modules/apps/27-interchain-accounts/types/router.go +++ /dev/null @@ -1,20 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// MessageRouter ADR 031 request type routing -// https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-031-msg-service.md -type MessageRouter interface { - Handler(msg sdk.Msg) baseapp.MsgServiceHandler -} - -// QueryRouter ADR 021 query type routing -// https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-021-protobuf-query-encoding.md -type QueryRouter interface { - // Route returns the GRPCQueryHandler for a given query route path or nil - // if not found - Route(path string) baseapp.GRPCQueryHandler -} diff --git a/modules/apps/29-fee/ibc_middleware_test.go b/modules/apps/29-fee/ibc_middleware_test.go index 1a6a8360a78..7a388ac1748 100644 --- a/modules/apps/29-fee/ibc_middleware_test.go +++ b/modules/apps/29-fee/ibc_middleware_test.go @@ -1557,17 +1557,17 @@ func (suite *FeeTestSuite) TestAckUnmarshal() { testCases := []struct { name string ackBytes []byte - expPass bool + expError error }{ { "success", []byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true}`), - true, + nil, }, { "failure: unknown fields", []byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true, "extra_field": "foo"}`), - false, + errors.New("json: unknown field \"extra_field\""), }, } for _, tc := range testCases { @@ -1575,10 +1575,10 @@ func (suite *FeeTestSuite) TestAckUnmarshal() { ack := &types.IncentivizedAcknowledgement{} err := json.Unmarshal(tc.ackBytes, ack) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) } else { - suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expError.Error()) } }) } diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index 3e0da0a1d56..01e8215dfb2 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -27,7 +27,7 @@ type Keeper struct { storeService corestore.KVStoreService cdc codec.BinaryCodec - authKeeper types.AccountKeeper + authKeeper types.AuthKeeper ics4Wrapper porttypes.ICS4Wrapper channelKeeper types.ChannelKeeper bankKeeper types.BankKeeper @@ -37,7 +37,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, storeService corestore.KVStoreService, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper types.ChannelKeeper, - authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, + authKeeper types.AuthKeeper, bankKeeper types.BankKeeper, ) Keeper { return Keeper{ cdc: cdc, diff --git a/modules/apps/29-fee/module.go b/modules/apps/29-fee/module.go index 6dd52b0e918..058078cdc11 100644 --- a/modules/apps/29-fee/module.go +++ b/modules/apps/29-fee/module.go @@ -31,6 +31,20 @@ var ( _ appmodule.AppModule = (*AppModule)(nil) ) +// AppModule represents the AppModule for this module +type AppModule struct { + cdc codec.Codec + keeper keeper.Keeper +} + +// NewAppModule creates a new 29-fee module +func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { + return AppModule{ + cdc: cdc, + keeper: k, + } +} + // Name implements AppModuleBasic interface func (AppModule) Name() string { return types.ModuleName @@ -86,20 +100,6 @@ func (AppModule) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// AppModule represents the AppModule for this module -type AppModule struct { - cdc codec.Codec - keeper keeper.Keeper -} - -// NewAppModule creates a new 29-fee module -func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { - return AppModule{ - cdc: cdc, - keeper: k, - } -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) diff --git a/modules/apps/29-fee/types/expected_keepers.go b/modules/apps/29-fee/types/expected_keepers.go index 0285a2bc683..dab53d2ace2 100644 --- a/modules/apps/29-fee/types/expected_keepers.go +++ b/modules/apps/29-fee/types/expected_keepers.go @@ -8,8 +8,8 @@ import ( channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" ) -// AccountKeeper defines the contract required for account APIs. -type AccountKeeper interface { +// AuthKeeper defines the contract required for the x/auth keeper. +type AuthKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetAccount(context.Context, sdk.AccAddress) sdk.AccountI } diff --git a/modules/apps/29-fee/types/query.pb.go b/modules/apps/29-fee/types/query.pb.go index 520b624b4ae..dd727e891e8 100644 --- a/modules/apps/29-fee/types/query.pb.go +++ b/modules/apps/29-fee/types/query.pb.go @@ -1195,7 +1195,7 @@ type QueryClient interface { IncentivizedPackets(ctx context.Context, in *QueryIncentivizedPacketsRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsResponse, error) // IncentivizedPacket returns all packet fees for a packet given its identifier IncentivizedPacket(ctx context.Context, in *QueryIncentivizedPacketRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketResponse, error) - // Gets all incentivized packets for a specific channel + // IncentivizedPacketsForChannel retrieves all incentivized packets for a specific channel IncentivizedPacketsForChannel(ctx context.Context, in *QueryIncentivizedPacketsForChannelRequest, opts ...grpc.CallOption) (*QueryIncentivizedPacketsForChannelResponse, error) // TotalRecvFees returns the total receive fees for a packet given its identifier TotalRecvFees(ctx context.Context, in *QueryTotalRecvFeesRequest, opts ...grpc.CallOption) (*QueryTotalRecvFeesResponse, error) @@ -1317,7 +1317,7 @@ type QueryServer interface { IncentivizedPackets(context.Context, *QueryIncentivizedPacketsRequest) (*QueryIncentivizedPacketsResponse, error) // IncentivizedPacket returns all packet fees for a packet given its identifier IncentivizedPacket(context.Context, *QueryIncentivizedPacketRequest) (*QueryIncentivizedPacketResponse, error) - // Gets all incentivized packets for a specific channel + // IncentivizedPacketsForChannel retrieves all incentivized packets for a specific channel IncentivizedPacketsForChannel(context.Context, *QueryIncentivizedPacketsForChannelRequest) (*QueryIncentivizedPacketsForChannelResponse, error) // TotalRecvFees returns the total receive fees for a packet given its identifier TotalRecvFees(context.Context, *QueryTotalRecvFeesRequest) (*QueryTotalRecvFeesResponse, error) diff --git a/modules/apps/callbacks/go.mod b/modules/apps/callbacks/go.mod index ab9a0a97777..527883e392c 100644 --- a/modules/apps/callbacks/go.mod +++ b/modules/apps/callbacks/go.mod @@ -1,15 +1,13 @@ module github.com/cosmos/ibc-go/modules/apps/callbacks -go 1.23.2 - -toolchain go1.23.3 +go 1.23.3 replace github.com/cosmos/ibc-go/v9 => ../../../ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( - cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b + cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b cosmossdk.io/core v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.5.0 @@ -29,7 +27,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v1.0.0-alpha.2 + cosmossdk.io/x/tx v1.0.0-alpha.3 cosmossdk.io/x/upgrade v0.1.4 github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 github.com/cometbft/cometbft/api v1.0.0-rc2 @@ -44,17 +42,17 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.42.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect cosmossdk.io/api v0.8.0 // indirect - cosmossdk.io/client/v2 v2.0.0-beta.5 // indirect + cosmossdk.io/client/v2 v2.0.0-beta.6 // indirect cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect cosmossdk.io/depinject v1.1.0 // indirect - cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/schema v0.4.0 // indirect cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/circuit v0.1.1 // indirect cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect @@ -67,7 +65,7 @@ require ( github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go v1.54.6 // indirect + github.com/aws/aws-sdk-go v1.55.5 // 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.2.0 // indirect @@ -79,7 +77,7 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -122,10 +120,10 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -133,7 +131,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.6 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect @@ -156,7 +154,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -174,7 +172,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect @@ -201,28 +199,28 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.12.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect - google.golang.org/grpc v1.68.0 // indirect - google.golang.org/protobuf v1.35.2 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.6.0 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/grpc v1.69.0 // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -231,37 +229,33 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -//TODO: remove everything below after tags are created -// v0.0.0-20241108061010-a0458127fccf = sdk release/v0.52.x branch -// v0.0.0-20241106165340-4eb943897eaa = ibc-go marko/gomod_change branch -// v1.0.0-alpha.5.0.20241108095921-406f977be0b9 = sdk main branch replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf + cosmossdk.io/api => cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // pseudo version lower than the latest tag - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b ) diff --git a/modules/apps/callbacks/go.sum b/modules/apps/callbacks/go.sum index 2db7654b8ee..d5930a40355 100644 --- a/modules/apps/callbacks/go.sum +++ b/modules/apps/callbacks/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -76,8 +76,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -115,14 +115,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -179,8 +179,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -192,14 +192,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 h1:yNrJKENUaZuFTkNmwP4KgXQqk2boGNUAzVyXLdFJNXU= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9/go.mod h1:pPUWNdsU8ghYzPOeVD2sAzPVh2yniq215XjRYubdO4I= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf h1:ofV6lCxevAZvr9iRpFQLkMucYbojplFS3/ACnq6JsoY= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf/go.mod h1:iu6iZy/kgiWTvIxO1Dn49JWTE32qorpGysRVDoMG8uY= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 h1:F8emcx9K/aJHoyEan8FgEA0RaDrsIBVXxtkHOtbm9AI= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 h1:0266beLan2snXZMeELYMpTVcFjlSgzHhLBKxSuNVZUI= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608/go.mod h1:edvI8tMINqCH75EgkOEMnCZEQ3iKJgOlZ+ZxOu4gmXU= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 h1:umN3k+AZ91ZjYv3CDiTgFDaWe22w3JxpeJmepUwKXV8= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608/go.mod h1:Xxz5u4rK+ArCsRo9TMSirg6jPMdva6BHv9Db65OkN/Q= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b h1:smupoVhpdK+5pztIylyIGkCc+0QaAaGLEvnM7Wnrq18= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 h1:w+/cxqYHud1plzCTIvEBtab6RqpgAl2C5Hgn1l4p+oo= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608/go.mod h1:gCTZBT00tI2zTQy65aSolV3aUnQDqpVgz5yOp96LpGg= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= @@ -210,54 +210,54 @@ cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d h1:KQM4Q6kjwlM4HuDZRV8/ZDXX3whjfStndYNTsRrbboQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf h1:iDymYoV4/JayuquNG5niu4JR0/ylaX+bmXk8wGlqG74= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf/go.mod h1:NhLpCB056huDyXxcLDbCgm4deO293HO9b6/Xl1Ha2nQ= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 h1:NaFVgzmO3YFX+l7696SdDTtvJR0MTjjwSe0sX+inAI4= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 h1:No84LXBp0kEzJfAqorxrgqzmzqOpHhbs8IK2nBpVQJY= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608/go.mod h1:wADXnci9qeFwOQ09qiyf1uLdI4n/RSSTG8mSM9hmxys= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 h1:bCBkUT3caCwOf5U9Os96dUETHPs6Cdv9oF5LCjt1tJs= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9/go.mod h1:h+11hiXPTGV6hl8ifSaJLMXoVhCsSKoF+l0/baqRGAU= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf h1:zeaEXUGi0Kcp64F7aRRwtHcv9INO92am+FX4hHVj454= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf/go.mod h1:LDTXn+hTfFjvvtbnyRl4exZbVXMXc9BbjCp+hA75GLE= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf h1:7saWRiQfcQZN5WDUHRlulO4zWyPsnaG1GEAzBw0U6Qs= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf/go.mod h1:9bf6NM/PjLLUpiKsxG6SsEO7De9xPR9cNDbAkvWhFf8= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf h1:sO9pf67Lvb4nWOfpVv1i9K5rbGhEFWGn7O5C1m/A4fo= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ie8fti1Nb5TtqJYw76c3eySQIDh5p5420ofUQ3/t3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf h1:omz9Z670B5GLvRx5qvkEn2NIxPm21VEvB+kLdmNQK3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf/go.mod h1:wf99TK+GDbcmmUnHnY9Mfiu9WnlxNAx539QMTqTkmv8= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf h1:IfC2LFM+55i/cl0gy6C5kTwr8QoUFtuyoMSPvbJUUSc= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf/go.mod h1:qg/3LeOxuIF9RTUJG0tTfd+vKgqApP6CLyEAsd1dgc0= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf h1:+mmMU6rrI9+jg3U1eCQcNWr374HbkZjLLNmLi1UmN70= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf/go.mod h1:PKBXn9aWiMI52CIz24mtH/TpXaPiSakjZeOBl9ZaIpc= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf h1:hjO5z2eKV74A1/nNru7RzgOSZscG1axIgJLUXIlc6wg= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf/go.mod h1:aXyiBgzFj7FhePk+SfIAOKSPUuNnx688hfeQz1lEeWc= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf h1:dWxbr7c/Xve6nmyMjolMYdtc2dQ/T2XMsXd/Umu6Ho4= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ZYQlnfBVLXR04RLNbeUfw43WefbdDQXFHBnyPPis3E= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf h1:XvRnVzXgwDKE6BL2jfo23qSkoIzNTDTsF4h2T7n1Ln8= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf/go.mod h1:dntwkEmxj/nQ6BX333tomRyQ/fOn0Y/EEF/7xrDyTww= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf h1:RES8jCRYKRL1YQS+BTdQfcjQW4y/TotcZcBLfxMVWOc= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf/go.mod h1:pGpOv+bdskHPT4KDfqB73QEEN7rvVi3rDbnGXh8LOAM= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf h1:TdJDBD9G6vuBMIwjkWPYIb1Y2xiZqpOhshGWQpZ81XE= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf/go.mod h1:VPlvp0gqaXApHsRrYgfZ00aqfqsFOUG6Qt2GffMlWhI= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf h1:FUFA1OjFrL9aXrh7ZuvcgVAg1kgtUFnFfL91thNH0Zw= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf/go.mod h1:Ljvt4ihdiSMW3aXXG1ZziMchdHxhoUlzxF/o2pPU7sA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf h1:HyaQnRlvruD/l4X8HJtKA3TDcX4CLL00qE3YtUOgcIA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf/go.mod h1:QgMu/n+FOfr7DRGI4Mg9R8JRNDl4E+/G+eGWqwrHOfo= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf h1:/vSXgbYHI4VxeXuXYw/vQiS/2y1iFBu9vJ6MgG6DX0w= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf/go.mod h1:BTBxeoWmU90YHa8icMHtyNJ4yi4S7K4Q0i1Nel4fOhM= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf h1:XJIgfIUY2k4PjrCg2x7tkj3sYp2pHXdM6DuwrhSX7yE= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf/go.mod h1:KfTlw+p2yHRNtWa/K/4hEjs1zuZTUYR61l+FReNrrtM= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf h1:9o1WYkNzZxNyAFldIDPIshFtXz6OiZWhZ8gBV0yleyQ= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf/go.mod h1:YUc0YB3WFrUo/vqQhzOOfb73D+U2Yho7xqnvdAWc2Qs= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf h1:vaFB6CMx+qFjoZWq7fgthRuAhPfObptlf03Cv9bz5XE= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf/go.mod h1:EQMZV9XM15sogrzz404akhvb9BNCpyyR/U5ZIyDnsio= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf h1:q0r0DFzP4nDkArKEj8o5eJIbihgxIOJMranGyJv1iiw= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf/go.mod h1:o5LKEyzicUjBF0Xzixb5yva9y9SBAFo6o752nE/QDAM= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf h1:QmDmYiOWHkBoRdT2j76G6Gj42XVyxn5qUaiTYPcemcM= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf/go.mod h1:izXYqFcs/+AgFnik31IQYIzYHPifj2ay6Eenv9UEzwI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 h1:nMu0DD9qutZ7dzIySxTRnLYvZtockBghVkwBHyuwBLI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608/go.mod h1:m0eg/A4J5fmXFNGEldQpeTrMr9PFWaVIFjbDYes0j9I= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 h1:JL+VXHmb8xqwU7ToR2RG0V2BTmE+t1PkJ880xKi46Tc= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608/go.mod h1:huNjmnJuvPXAT5zvK8S29X0u9DpCa3X9ZCUd3bJ8bng= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 h1:MzRTC+W0Uv40yfFNegDskcisgui9lQdeG9FZxOixATk= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608/go.mod h1:GMLM+m3Il+QTfOrQG08sFJXlKw95UDKPIOYcuSwjbzQ= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 h1:lbtU7rYltk2axJ5h1DgPamVosuZEeyOAaqYPQpQBH4g= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608/go.mod h1:GN02Rosc2O/vCNBnXqY35vA2hoMmRQeCKd81FuoMzmE= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 h1:ATB7FV12GCjS+KN2Fx8B878LbwzNP4bkzsznRqMmn3k= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608/go.mod h1:d4a/F6pXE2KWJdshiRxCPKyW6h5gAnAWmSCtlRrhcYk= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 h1:lstvqRuVEDtRxiF9+LM16SpRriq0O+5lMHzsGKheXH4= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608/go.mod h1:ib+kqbNMsj6n7/LvW+qi24/1kp/ApWJpsnCWY5yN6Mk= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 h1:hYFPPs5WsMWj/1sRpw6Aqmioph3qw5VN76geVxtaWtI= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608/go.mod h1:bG9SiC6YsVOpsKgOd+b+t3Kl4GLb9T6RjhBKesPn+Gg= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 h1:UZSqhiAi1mKi8DE+OLGMrXSoenSl4PkyQT7xxNfr9Bw= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608/go.mod h1:PLdiJlSC0XveXA3vJ0E4n1NCG78UeHXwEk0razSnEk4= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 h1:KqJ+F0YVwFlu06gEoWHvGvdC1DYXDL5Rykra61/pY4Q= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608/go.mod h1:YBMj0T87xliEfldeZHC60AqyZoLoy1wJzAAgaaQubBM= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 h1:iSOOM7vAa0LuJ9xKZ7k34g5uyy9WQyfKbnAPmnf8Abc= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608/go.mod h1:yIgJCAGBnM3sull2qACQP+uMsEoogyNO6OXz82z3tVg= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 h1:F+w/ofuUDxFyyk6t7kt7cdcBsTa2gA7zuvCEplB871A= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608/go.mod h1:ynGp02hnYhVidQiL9KOKeiZnn0h+PSEJb+XjgKH6+v4= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 h1:ll6Pk+WoPlusW2uy8HTXupL+mees6mNohS4dfGYJsZ0= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608/go.mod h1:L8fBvuIwBQzABO/cYEOpekmaKlR4ELclrrGNZ6r//sg= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 h1:t0A/ip5m09OuAY0bvpnfxJhD1/dL44JYNwffy5boqB4= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608/go.mod h1:apbBgC0mKZTbgvW2ACPcNBl0z8HjCp7R9ZBns7F6J2E= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 h1:bB3FhjvPZfkS3EksYB3YR7muxGk0/rr6U993a7ETHx0= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608/go.mod h1:H1QoaISMz78OyBwXKU4gp8Gmwd1EVWq+Lb9P3BUfXUM= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 h1:ZD/gSJbfpC2WzXr17xq5UkJBQd/BfBVajzKrieu6zjQ= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608/go.mod h1:btgbNMPZJWZLd03ef2AblrpJ7e9ocpTvA0xUw0hIHew= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 h1:3rdbR/782gMtQo+1yxH+wuhJKd1jm/4X0pBgQX7pDp4= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608/go.mod h1:xLb6tQ33fgSOmwlMui9UjLzI9xmOclfjG2g+/z4XiUc= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 h1:+GBTBLH54gKT2dFlUgN/XzawdBG/9U5djPecjr7meas= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608/go.mod h1:BlYhkjtZZdKXQP9mBiVwRbaduXtDKEJHQC3dZ6fZBS0= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 h1:aycIQRLzdtuI99FkTRo4Y2QerkfKqZRYNN2BPESEc8A= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608/go.mod h1:4Zyt59oTQdaKitlYyz9K7d8Mi32e+K5NliOf9HAj5Wo= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 h1:kqbOiJpmSBE03Isw7KY27N4oCSaOcG28oaJgCLh9Rhk= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 h1:80l+duTMRKnszkWXolEs1n+1j4RFYd41mrV24P79vcY= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608/go.mod h1:5GIkumZszCtSzsXcTtL2YP4mIU25Rn3t0y51JWzzUDI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -289,8 +289,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= 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= @@ -348,8 +348,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -379,8 +379,8 @@ github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDz github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 h1:NJ4oI0UP0Qzt5gSgxuut4PrTaI0Ae0J1GKY9HuS7Zyo= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1/go.mod h1:rHr3gIOU3dJIjpnFCUeJyG4ItADlXMjI4NBwS4+YeMA= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b h1:ZaEAV5tsUTnyWEC/Gt8DXHKBANDyx70PVCiPOEVnuHk= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b/go.mod h1:ecJnx3s3oQK5BR7vu25fYSD2/ND9YLGkVpST7uiBkT0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -572,8 +572,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -592,8 +592,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -610,8 +610,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.6 h1:5jHuM+aH373XNtXl9TNTUH5Qd69Trve11tHIrB+6yj4= +github.com/hashicorp/go-getter v1.7.6/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -691,8 +691,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -781,8 +781,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -883,18 +883,20 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -914,8 +916,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1006,8 +1008,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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= @@ -1033,8 +1035,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1049,8 +1051,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -1133,13 +1135,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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= @@ -1150,13 +1152,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1221,8 +1223,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.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= @@ -1271,8 +1271,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1384,12 +1384,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1425,8 +1425,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= +google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1443,8 +1443,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/modules/apps/callbacks/ibc_middleware_test.go b/modules/apps/callbacks/ibc_middleware_test.go index be91d422ad5..a19d85900c2 100644 --- a/modules/apps/callbacks/ibc_middleware_test.go +++ b/modules/apps/callbacks/ibc_middleware_test.go @@ -263,7 +263,7 @@ func (s *CallbacksTestSuite) TestOnAcknowledgementPacket() { nil, }, { - "failure: underlying app OnAcknolwedgePacket fails", + "failure: underlying app OnAcknowledgePacket fails", func() { ack = []byte("invalid ack") }, diff --git a/modules/apps/callbacks/testing/simapp/README.md b/modules/apps/callbacks/testing/simapp/README.md index 7ee00030c45..f485bea2171 100644 --- a/modules/apps/callbacks/testing/simapp/README.md +++ b/modules/apps/callbacks/testing/simapp/README.md @@ -3,5 +3,3 @@ This testing directory is a duplicate of the ibc-go testing directory. It is only here as a way of creating a separate SimApp binary to avoid introducing a dependency on the callbacks module from within ibc-go. - -The simapp can be built with the workflow found [here](../../../../../.github/workflows/build-callbacks-simd-image-from-tag.yml). diff --git a/modules/apps/callbacks/testing/simapp/app.go b/modules/apps/callbacks/testing/simapp/app.go index 61a2f5a2e70..849c4bdcda1 100644 --- a/modules/apps/callbacks/testing/simapp/app.go +++ b/modules/apps/callbacks/testing/simapp/app.go @@ -112,7 +112,6 @@ import ( solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibcmock "github.com/cosmos/ibc-go/v9/testing/mock" - ibctestingtypes "github.com/cosmos/ibc-go/v9/testing/types" ) const appName = "SimApp" @@ -168,7 +167,7 @@ type SimApp struct { FeeGrantKeeper feegrantkeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper + MintKeeper *mintkeeper.Keeper DistrKeeper distrkeeper.Keeper PoolKeeper poolkeeper.Keeper GovKeeper govkeeper.Keeper @@ -374,13 +373,16 @@ func NewSimApp( cometService, ) - app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.StakingKeeper, app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + if err := app.MintKeeper.SetMintFn(mintkeeper.DefaultMintFn(minttypes.DefaultInflationCalculationFn, app.StakingKeeper, app.MintKeeper)); err != nil { + panic(err) + } - app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, govModuleAddr) + app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, govModuleAddr) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, cometService, authtypes.FeeCollectorName, govModuleAddr) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper.AddressCodec()) app.SlashingKeeper = slashingkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), logger.With(log.ModuleKey, "x/slashing")), appCodec, legacyAmino, app.StakingKeeper, govModuleAddr, @@ -442,11 +444,13 @@ func NewSimApp( // ICA Host keeper app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), logger.With(log.ModuleKey, "x/icahost"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.GetSubspace(icahosttypes.SubModuleName), app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack app.IBCKeeper.ChannelKeeper, - app.AuthKeeper, app.MsgServiceRouter(), - app.GRPCQueryRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.AuthKeeper, + govModuleAddr, ) // Create IBC Router @@ -583,7 +587,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), feegrantmodule.NewAppModule(appCodec, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AuthKeeper, app.BankKeeper, app.PoolKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper, nil), + mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.interfaceRegistry, cometService), distr.NewAppModule(appCodec, app.DistrKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper), @@ -930,7 +934,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf // ValidatorKeyProvider returns a function that generates a validator key // Supported key types are those supported by Comet: ed25519, secp256k1, bls12-381 -func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF { +func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF { return func() (cmtcrypto.PrivKey, error) { return cmted25519.GenPrivKey(), nil } @@ -997,11 +1001,6 @@ func (app *SimApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } -// GetStakingKeeper implements the TestingApp interface. -func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - // GetIBCKeeper implements the TestingApp interface. func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper diff --git a/modules/apps/callbacks/types/types_test.go b/modules/apps/callbacks/types/types_test.go index 8627e57f357..060cc534bc6 100644 --- a/modules/apps/callbacks/types/types_test.go +++ b/modules/apps/callbacks/types/types_test.go @@ -8,7 +8,7 @@ import ( ibctesting "github.com/cosmos/ibc-go/v9/testing" ) -// CallbacksTestSuite defines the needed instances and methods to test callbacks +// CallbacksTypesTestSuite defines the needed instances and methods to test callbacks type CallbacksTypesTestSuite struct { suite.Suite diff --git a/modules/apps/transfer/client/cli/tx.go b/modules/apps/transfer/client/cli/tx.go index 2e80f249f88..4850019c841 100644 --- a/modules/apps/transfer/client/cli/tx.go +++ b/modules/apps/transfer/client/cli/tx.go @@ -45,7 +45,7 @@ Note, relative timeout height is not supported. Relative timeout timestamp is ad using the {packet-timeout-timestamp} flag. If no timeout value is set then a default relative timeout value of 10 minutes is used. IBC tokens can be automatically unwound to their native chain using the {unwind} flag. Please note that if the {unwind} flag is used, then all coins must be IBC vouchers and share exactly the same denomination trace path, and the src-port and src-channel arguments must not be specified. Tokens can also be -automatically forwarded through multiple chains using the {fowarding} flag and specifying a comma-separated list of source portID/channelID pairs for +automatically forwarded through multiple chains using the {forwarding} flag and specifying a comma-separated list of source portID/channelID pairs for each intermediary chain. {unwind} and {forwarding} flags can be used together to first unwind IBC tokens to their native chain and then forward them to the final destination.`), Example: fmt.Sprintf("%s tx ibc-transfer transfer [src-port] [src-channel] [receiver] [coins]", version.AppName), Args: cobra.RangeArgs(2, 4), diff --git a/modules/apps/transfer/ibc_module_test.go b/modules/apps/transfer/ibc_module_test.go index 6ff8ab21fee..47cbc1ac554 100644 --- a/modules/apps/transfer/ibc_module_test.go +++ b/modules/apps/transfer/ibc_module_test.go @@ -41,7 +41,7 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() { // connection hops is not used in the transfer application callback, // it is already validated in the core OnChanUpgradeInit. "success: invalid connection hops", func() { - path.EndpointA.ConnectionID = "invalid-connection-id" + path.EndpointA.ConnectionID = ibctesting.InvalidID }, nil, types.V2, }, { diff --git a/modules/apps/transfer/keeper/keeper.go b/modules/apps/transfer/keeper/keeper.go index 5ff5493aad5..786ae1b536c 100644 --- a/modules/apps/transfer/keeper/keeper.go +++ b/modules/apps/transfer/keeper/keeper.go @@ -7,7 +7,7 @@ import ( "strings" "cosmossdk.io/core/appmodule" - "cosmossdk.io/math" + sdkmath "cosmossdk.io/math" "cosmossdk.io/store/prefix" storetypes "cosmossdk.io/store/types" banktypes "cosmossdk.io/x/bank/types" @@ -34,7 +34,7 @@ type Keeper struct { ics4Wrapper porttypes.ICS4Wrapper channelKeeper types.ChannelKeeper - authKeeper types.AccountKeeper + authKeeper types.AuthKeeper bankKeeper types.BankKeeper // the address capable of executing a MsgUpdateParams message. Typically, this @@ -49,7 +49,7 @@ func NewKeeper( legacySubspace types.ParamSubspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper types.ChannelKeeper, - authKeeper types.AccountKeeper, + authKeeper types.AuthKeeper, bankKeeper types.BankKeeper, authority string, ) Keeper { @@ -223,10 +223,10 @@ func (k Keeper) GetTotalEscrowForDenom(ctx context.Context, denom string) sdk.Co panic(err) } if len(bz) == 0 { - return sdk.NewCoin(denom, math.ZeroInt()) + return sdk.NewCoin(denom, sdkmath.ZeroInt()) } - amount := math.Int{} + amount := sdkmath.Int{} if err := amount.Unmarshal(bz); err != nil { panic(err) } @@ -286,7 +286,7 @@ func (k Keeper) IterateTokensInEscrow(ctx context.Context, storeprefix []byte, c continue // denom is empty } - amount := math.Int{} + amount := sdkmath.Int{} if err := amount.Unmarshal(iterator.Value()); err != nil { continue // total escrow amount cannot be unmarshalled to integer } @@ -358,7 +358,7 @@ func (k Keeper) iterateForwardedPackets(ctx context.Context, cb func(packet type // Iterator key consists of types.ForwardedPacketKey/portID/channelID/sequence parts := strings.Split(string(iterator.Key()), "/") if len(parts) != 4 { - panic(fmt.Errorf("key path should always have 4 elements")) + panic(errors.New("key path should always have 4 elements")) } if parts[0] != string(types.ForwardedPacketKey) { panic(fmt.Errorf("key path does not start with expected prefix: %s", types.ForwardedPacketKey)) @@ -366,10 +366,10 @@ func (k Keeper) iterateForwardedPackets(ctx context.Context, cb func(packet type portID, channelID := parts[1], parts[2] if err := host.PortIdentifierValidator(portID); err != nil { - panic(fmt.Errorf("port identifier validation failed while parsing forward key path")) + panic(errors.New("port identifier validation failed while parsing forward key path")) } if err := host.ChannelIdentifierValidator(channelID); err != nil { - panic(fmt.Errorf("channel identifier validation failed while parsing forward key path")) + panic(errors.New("channel identifier validation failed while parsing forward key path")) } forwardPacket.ForwardKey.Sequence = sdk.BigEndianToUint64([]byte(parts[3])) diff --git a/modules/apps/transfer/keeper/msg_server.go b/modules/apps/transfer/keeper/msg_server.go index 3c9f479caa1..b10b21972f7 100644 --- a/modules/apps/transfer/keeper/msg_server.go +++ b/modules/apps/transfer/keeper/msg_server.go @@ -30,7 +30,7 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. coins := msg.GetCoins() if err := k.bankKeeper.IsSendEnabledCoins(ctx, coins...); err != nil { - return nil, errorsmod.Wrapf(types.ErrSendDisabled, err.Error()) + return nil, errorsmod.Wrap(types.ErrSendDisabled, err.Error()) } if k.isBlockedAddr(sender) { diff --git a/modules/apps/transfer/keeper/relay.go b/modules/apps/transfer/keeper/relay.go index 9d105344a7d..a477cd42537 100644 --- a/modules/apps/transfer/keeper/relay.go +++ b/modules/apps/transfer/keeper/relay.go @@ -96,7 +96,10 @@ func (k Keeper) sendTransfer( for _, coin := range coins { // Using types.UnboundedSpendLimit allows us to send the entire balance of a given denom. if coin.Amount.Equal(types.UnboundedSpendLimit()) { - coin.Amount = k.bankKeeper.GetBalance(ctx, sender, coin.Denom).Amount + coin.Amount = k.bankKeeper.SpendableCoin(ctx, sender, coin.Denom).Amount + if coin.Amount.IsZero() { + return 0, errorsmod.Wrapf(types.ErrInvalidAmount, "empty spendable balance for %s", coin.Denom) + } } token, err := k.tokenFromCoin(ctx, coin) diff --git a/modules/apps/transfer/keeper/relay_test.go b/modules/apps/transfer/keeper/relay_test.go index daa95ce76a3..ff3a0d03eab 100644 --- a/modules/apps/transfer/keeper/relay_test.go +++ b/modules/apps/transfer/keeper/relay_test.go @@ -123,6 +123,64 @@ func (suite *KeeperTestSuite) TestSendTransfer() { }, nil, }, + // TODO: Migrate vesting account test cases to use x/accounts lockup accounts as mentioned in v0.52 upgrading doc. + // https://github.com/cosmos/ibc-go/issues/7681 + // { + // "successful transfer of entire spendable balance with vesting account", + // func() { + // // create vesting account + // vestingAccPrivKey := secp256k1.GenPrivKey() + // vestingAccAddress := sdk.AccAddress(vestingAccPrivKey.PubKey().Address()) + + // vestingCoins := sdk.NewCoins(sdk.NewCoin(coins[0].Denom, ibctesting.DefaultCoinAmount)) + // _, err := suite.chainA.SendMsgs(vestingtypes.NewMsgCreateVestingAccount( + // suite.chainA.SenderAccount.GetAddress(), + // vestingAccAddress, + // vestingCoins, + // suite.chainA.GetContext().BlockTime().Add(time.Hour).Unix(), + // false, + // )) + // suite.Require().NoError(err) + // sender = vestingAccAddress + + // // transfer some spendable coins to vesting account + // transferCoins := sdk.NewCoins(sdk.NewCoin(coins[0].Denom, sdkmath.NewInt(42))) + // _, err = suite.chainA.SendMsgs(banktypes.NewMsgSend(suite.chainA.SenderAccount.GetAddress(), vestingAccAddress, transferCoins)) + // suite.Require().NoError(err) + + // coins = sdk.NewCoins(sdk.NewCoin(coins[0].Denom, types.UnboundedSpendLimit())) + // expEscrowAmounts[0] = transferCoins[0].Amount + // }, + // nil, + // }, + // { + // "failure: no spendable coins for vesting account", + // func() { + // // create vesting account + // vestingAccPrivKey := secp256k1.GenPrivKey() + // vestingAccAddress := sdk.AccAddress(vestingAccPrivKey.PubKey().Address()) + + // vestingCoins := sdk.NewCoins(sdk.NewCoin(coins[0].Denom, ibctesting.DefaultCoinAmount)) + // _, err := suite.chainA.SendMsgs(vestingtypes.NewMsgCreateVestingAccount( + // suite.chainA.SenderAccount.GetAddress(), + // vestingAccAddress, + // vestingCoins, + // suite.chainA.GetContext().BlockTime().Add(time.Hour).Unix(), + // false, + // )) + // suite.Require().NoError(err) + // sender = vestingAccAddress + + // // just to prove that the vesting account has a balance (but not spendable) + // vestingAccBalance := suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), vestingAccAddress, coins[0].Denom) + // suite.Require().Equal(vestingCoins[0].Amount.Int64(), vestingAccBalance.Amount.Int64()) + // vestinSpendableBalance := suite.chainA.GetSimApp().BankKeeper.SpendableCoins(suite.chainA.GetContext(), vestingAccAddress) + // suite.Require().Zero(vestinSpendableBalance.AmountOf(coins[0].Denom).Int64()) + + // coins = sdk.NewCoins(sdk.NewCoin(coins[0].Denom, types.UnboundedSpendLimit())) + // }, + // types.ErrInvalidAmount, + // }, { "failure: source channel not found", func() { @@ -223,8 +281,8 @@ func (suite *KeeperTestSuite) TestSendTransfer() { expPass := tc.expError == nil if expPass { - suite.Require().NotNil(res) suite.Require().NoError(err) + suite.Require().NotNil(res) } else { suite.Require().Nil(res) suite.Require().Error(err) diff --git a/modules/apps/transfer/module.go b/modules/apps/transfer/module.go index 36b180c7638..7b1225a873f 100644 --- a/modules/apps/transfer/module.go +++ b/modules/apps/transfer/module.go @@ -37,6 +37,20 @@ var ( _ porttypes.IBCModule = (*IBCModule)(nil) ) +// AppModule represents the AppModule for this module +type AppModule struct { + cdc codec.Codec + keeper keeper.Keeper +} + +// NewAppModule creates a new 20-transfer module +func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { + return AppModule{ + cdc: cdc, + keeper: k, + } +} + // Name implements AppModuleBasic interface func (AppModule) Name() string { return types.ModuleName @@ -95,20 +109,6 @@ func (AppModule) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// AppModule represents the AppModule for this module -type AppModule struct { - cdc codec.Codec - keeper keeper.Keeper -} - -// NewAppModule creates a new 20-transfer module -func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { - return AppModule{ - cdc: cdc, - keeper: k, - } -} - // RegisterInvariants implements the AppModule interface func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, &am.keeper) diff --git a/modules/apps/transfer/types/expected_keepers.go b/modules/apps/transfer/types/expected_keepers.go index 6e737bd82f6..78334dbaf6d 100644 --- a/modules/apps/transfer/types/expected_keepers.go +++ b/modules/apps/transfer/types/expected_keepers.go @@ -13,8 +13,8 @@ import ( ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" ) -// AccountKeeper defines the contract required for account APIs. -type AccountKeeper interface { +// AuthKeeper defines the contract required for x/auth keeper. +type AuthKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI } @@ -23,14 +23,14 @@ type AccountKeeper interface { type BankKeeper interface { SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx context.Context, moduleName []byte, amt sdk.Coins) error + BurnCoins(ctx context.Context, address []byte, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BlockedAddr(addr sdk.AccAddress) bool IsSendEnabledCoins(ctx context.Context, coins ...sdk.Coin) error HasDenomMetaData(ctx context.Context, denom string) bool SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) - GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + SpendableCoin(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins } diff --git a/modules/apps/transfer/types/transfer.pb.go b/modules/apps/transfer/types/transfer.pb.go index 8e65d787930..8f5ed10b56f 100644 --- a/modules/apps/transfer/types/transfer.pb.go +++ b/modules/apps/transfer/types/transfer.pb.go @@ -87,7 +87,7 @@ func (m *Params) GetReceiveEnabled() bool { // through which a packet must be forwarded, and an unwind boolean indicating if // the coin should be unwinded to its native chain before forwarding. type Forwarding struct { - // optional unwinding for the token transfered + // optional unwinding for the token transferred Unwind bool `protobuf:"varint,1,opt,name=unwind,proto3" json:"unwind,omitempty"` // optional intermediate path through which packet will be forwarded Hops []Hop `protobuf:"bytes,2,rep,name=hops,proto3" json:"hops"` diff --git a/modules/core/02-client/keeper/client_test.go b/modules/core/02-client/keeper/client_test.go index 29ecd52aaf3..f1913286925 100644 --- a/modules/core/02-client/keeper/client_test.go +++ b/modules/core/02-client/keeper/client_test.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + errorsmod "cosmossdk.io/errors" upgradetypes "cosmossdk.io/x/upgrade/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -13,6 +14,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/cosmos/ibc-go/v9/modules/core/exported" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" @@ -29,7 +31,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { msg string malleate func() clientType string - expPass bool + expErr error }{ { "success: 07-tendermint client type supported", @@ -39,7 +41,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { consensusState = suite.chainA.App.AppCodec().MustMarshal(suite.consensusState) }, exported.Tendermint, - true, + nil, }, { "failure: 07-tendermint client status is not active", @@ -50,7 +52,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { consensusState = suite.chainA.App.AppCodec().MustMarshal(suite.consensusState) }, exported.Tendermint, - false, + errorsmod.Wrapf(clienttypes.ErrClientNotActive, "cannot create client (07-tendermint-0) with status Frozen"), }, { "success: 06-solomachine client type supported", @@ -61,13 +63,13 @@ func (suite *KeeperTestSuite) TestCreateClient() { consensusState = suite.chainA.App.AppCodec().MustMarshal(smConsensusState) }, exported.Solomachine, - true, + nil, }, { "failure: 09-localhost client type not supported", func() {}, exported.Localhost, - false, + errorsmod.Wrapf(clienttypes.ErrInvalidClientType, "cannot create client of type: 09-localhost"), }, } @@ -84,7 +86,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { // assert correct behaviour based on expected error clientState, found := suite.chainA.GetSimApp().IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientID) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotEmpty(clientID) suite.Require().True(found) @@ -94,6 +96,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { suite.Require().Empty(clientID) suite.Require().False(found) suite.Require().Empty(clientState) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -122,7 +125,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { cases := []struct { name string malleate func() - expPass bool + expErr error expFreeze bool }{ {"valid update", func() { @@ -133,7 +136,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { suite.Require().NoError(err) updateHeader = createFutureUpdateFn(trustedHeight.(clienttypes.Height)) - }, true, false}, + }, nil, false}, {"valid past update", func() { trustedHeight := path.EndpointA.GetClientLatestHeight() @@ -154,7 +157,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { // updateHeader will fill in consensus state between prevConsState and suite.consState // clientState should not be updated updateHeader = createPastUpdateFn(fillHeight, trustedHeight.(clienttypes.Height)) - }, true, false}, + }, nil, false}, {"valid duplicate update", func() { height1 := clienttypes.NewHeight(1, 1) @@ -184,7 +187,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { updateHeader = createPastUpdateFn(height3, height1) // set updateHeader's consensus state in store to create duplicate UpdateClient scenario path.EndpointA.SetConsensusState(updateHeader.ConsensusState(), updateHeader.GetHeight()) - }, true, false}, + }, nil, false}, {"misbehaviour detection: conflicting header", func() { clientID := path.EndpointA.ClientID @@ -212,7 +215,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { conflictConsState := updateHeader.ConsensusState() conflictConsState.Root = commitmenttypes.NewMerkleRoot([]byte("conflicting apphash")) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientConsensusState(suite.chainA.GetContext(), clientID, updateHeader.GetHeight(), conflictConsState) - }, true, true}, + }, nil, true}, {"misbehaviour detection: monotonic time violation", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) @@ -236,14 +239,14 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), clientID, clientState) updateHeader = createFutureUpdateFn(trustedHeight) - }, true, true}, + }, nil, true}, {"client state not found", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) updateHeader = createFutureUpdateFn(clientState.LatestHeight) path.EndpointA.ClientID = ibctesting.InvalidID - }, false, false}, + }, errorsmod.Wrapf(host.ErrInvalidID, "invalid client identifier IDisInvalid is not in format: `{client-type}-{N}`"), false}, {"consensus state not found", func() { clientState := path.EndpointA.GetClientState() tmClient, ok := clientState.(*ibctm.ClientState) @@ -253,21 +256,21 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID, clientState) updateHeader = createFutureUpdateFn(tmClient.LatestHeight) - }, false, false}, + }, errorsmod.Wrapf(clienttypes.ErrClientNotActive, "cannot update client (07-tendermint-0) with status Expired"), false}, {"client is not active", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(1, 1) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID, clientState) updateHeader = createFutureUpdateFn(clientState.LatestHeight) - }, false, false}, + }, errorsmod.Wrapf(clienttypes.ErrClientNotActive, "cannot update client (07-tendermint-0) with status Frozen"), false}, {"invalid header", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) updateHeader = createFutureUpdateFn(clientState.LatestHeight) updateHeader.TrustedHeight, ok = updateHeader.TrustedHeight.Increment().(clienttypes.Height) suite.Require().True(ok) - }, false, false}, + }, errorsmod.Wrapf(clienttypes.ErrConsensusStateNotFound, "could not get trusted consensus state from clientStore for Header at TrustedHeight: 1-3"), false}, } for _, tc := range cases { @@ -281,14 +284,14 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { var clientState *ibctm.ClientState var ok bool - if tc.expPass { + if tc.expErr == nil { clientState, ok = path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) } err := suite.chainA.App.GetIBCKeeper().ClientKeeper.UpdateClient(suite.chainA.GetContext(), path.EndpointA.ClientID, updateHeader) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, err) newClientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) @@ -320,6 +323,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { } } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -336,9 +340,9 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { ) testCases := []struct { - name string - setup func() - expPass bool + name string + setup func() + expErr error }{ { name: "successful upgrade", @@ -365,7 +369,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradedClientProof, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetRevisionHeight())), tmCs.LatestHeight.GetRevisionHeight()) upgradedConsensusStateProof, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedConsStateKey(int64(upgradeHeight.GetRevisionHeight())), tmCs.LatestHeight.GetRevisionHeight()) }, - expPass: true, + expErr: nil, }, { name: "client state not found", @@ -395,7 +399,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { path.EndpointA.ClientID = "wrongclientid" }, - expPass: false, + expErr: errorsmod.Wrap(host.ErrInvalidID, "unable to parse client identifier wrongclientid: invalid client identifier wrongclientid is not in format: `{client-type}-{N}"), }, { name: "client state is not active", @@ -430,7 +434,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { tmClient.FrozenHeight = clienttypes.NewHeight(1, 1) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID, tmClient) }, - expPass: false, + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "cannot upgrade client (07-tendermint-2) with status Frozen"), }, { name: "light client module VerifyUpgradeAndUpdateState fails", @@ -461,7 +465,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradedClientProof, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedClientKey(int64(upgradeHeight.GetRevisionHeight())), tmCs.LatestHeight.GetRevisionHeight()) upgradedConsensusStateProof, _ = suite.chainB.QueryUpgradeProof(upgradetypes.UpgradedConsStateKey(int64(upgradeHeight.GetRevisionHeight())), tmCs.LatestHeight.GetRevisionHeight()) }, - expPass: false, + expErr: errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed to verify membership proof at index 0: provided value doesn't match proof"), }, } @@ -493,10 +497,11 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { err = suite.chainA.App.GetIBCKeeper().ClientKeeper.UpgradeClient(suite.chainA.GetContext(), path.EndpointA.ClientID, upgradedClientAny.Value, upgradedConsStateAny.Value, upgradedClientProof, upgradedConsensusStateProof) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, "verify upgrade failed on valid case: %s", tc.name) } else { suite.Require().Error(err, "verify upgrade passed on invalid case: %s", tc.name) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -666,8 +671,7 @@ func (suite *KeeperTestSuite) TestRecoverClient() { ctx := suite.chainA.GetContext() err = suite.chainA.App.GetIBCKeeper().ClientKeeper.RecoverClient(ctx, subject, substitute) - expPass := tc.expErr == nil - if expPass { + if tc.expErr == nil { suite.Require().NoError(err) expectedEvents := sdk.Events{ diff --git a/modules/core/02-client/keeper/grpc_query_test.go b/modules/core/02-client/keeper/grpc_query_test.go index 5d37a0fdae0..e84323d64d9 100644 --- a/modules/core/02-client/keeper/grpc_query_test.go +++ b/modules/core/02-client/keeper/grpc_query_test.go @@ -7,6 +7,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + errorsmod "cosmossdk.io/errors" upgradetypes "cosmossdk.io/x/upgrade/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -31,21 +32,21 @@ func (suite *KeeperTestSuite) TestQueryClientState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "req is nil", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid clientID", func() { req = &types.QueryClientStateRequest{} }, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, { "client not found", @@ -54,7 +55,10 @@ func (suite *KeeperTestSuite) TestQueryClientState() { ClientId: testClientID, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrClientNotFound, "tendermint-0").Error(), + ), }, { "success", @@ -70,7 +74,7 @@ func (suite *KeeperTestSuite) TestQueryClientState() { ClientId: path.EndpointA.ClientID, } }, - true, + nil, }, } @@ -86,7 +90,7 @@ func (suite *KeeperTestSuite) TestQueryClientState() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ClientState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expClientState, res.ClientState) @@ -96,6 +100,7 @@ func (suite *KeeperTestSuite) TestQueryClientState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -110,14 +115,14 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "req is nil", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "empty pagination", @@ -125,7 +130,7 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { expClientStates = nil req = &types.QueryClientStatesRequest{} }, - true, + nil, }, { "success", @@ -151,7 +156,7 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { }, } }, - true, + nil, }, } @@ -165,13 +170,14 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { ctx := suite.chainA.GetContext() queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ClientStates(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expClientStates.Sort(), res.ClientStates) suite.Require().Equal(len(expClientStates), int(res.Pagination.Total)) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -186,21 +192,21 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "req is nil", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid clientID", func() { req = &types.QueryConsensusStateRequest{} }, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, { "invalid height", @@ -212,7 +218,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { LatestHeight: false, } }, - false, + status.Error(codes.InvalidArgument, "consensus state height cannot be 0"), }, { "consensus state not found", @@ -222,7 +228,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { LatestHeight: true, } }, - false, + status.Error(codes.NotFound, "client-id: 07-tendermint-0, height: 0-0: consensus state not found"), }, { "success latest height", @@ -240,7 +246,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { LatestHeight: true, } }, - true, + nil, }, { "success with height", @@ -264,7 +270,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { RevisionHeight: height.GetRevisionHeight(), } }, - true, + nil, }, } @@ -279,7 +285,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ConsensusState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expConsensusState, res.ConsensusState) @@ -289,6 +295,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -303,7 +310,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "success: without pagination", @@ -312,7 +319,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { ClientId: testClientID, } }, - true, + nil, }, { "success, no results", @@ -325,7 +332,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { }, } }, - true, + nil, }, { "success", @@ -361,14 +368,14 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { }, } }, - true, + nil, }, { "invalid client identifier", func() { req = &types.QueryConsensusStatesRequest{} }, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, } @@ -383,7 +390,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ConsensusStates(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(len(expConsensusStates), len(res.ConsensusStates)) @@ -396,6 +403,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { } } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -410,7 +418,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "success: without pagination", @@ -419,7 +427,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { ClientId: testClientID, } }, - true, + nil, }, { "success: response contains no results", @@ -432,7 +440,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { }, } }, - true, + nil, }, { "success: returns consensus heights", @@ -455,14 +463,14 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { }, } }, - true, + nil, }, { "invalid client identifier", func() { req = &types.QueryConsensusStateHeightsRequest{} }, - false, + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), }, } @@ -477,7 +485,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ConsensusStateHeights(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(len(expConsensusStateHeights), len(res.ConsensusStateHeights)) @@ -487,6 +495,7 @@ func (suite *KeeperTestSuite) TestQueryConsensusStateHeights() { } } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -498,7 +507,7 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { testCases := []struct { msg string malleate func() - expPass bool + expErr error expStatus string }{ { @@ -506,14 +515,14 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { func() { req = nil }, - false, "", + status.Error(codes.InvalidArgument, "empty request"), "", }, { "invalid clientID", func() { req = &types.QueryClientStatusRequest{} }, - false, "", + status.Error(codes.InvalidArgument, "identifier cannot be blank: invalid identifier"), "", }, { "client not found", @@ -522,7 +531,7 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { ClientId: ibctesting.InvalidID, } }, - true, exported.Unauthorized.String(), + nil, exported.Unauthorized.String(), }, { "Active client status", @@ -533,7 +542,7 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { ClientId: path.EndpointA.ClientID, } }, - true, exported.Active.String(), + nil, exported.Active.String(), }, { "Unknown client status", @@ -552,7 +561,7 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { ClientId: path.EndpointA.ClientID, } }, - true, exported.Expired.String(), + nil, exported.Expired.String(), }, { "Frozen client status", @@ -569,7 +578,7 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { ClientId: path.EndpointA.ClientID, } }, - true, exported.Frozen.String(), + nil, exported.Frozen.String(), }, } @@ -584,12 +593,13 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.ClientStatus(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(tc.expStatus, res.Status) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -688,8 +698,7 @@ func (suite *KeeperTestSuite) TestQueryUpgradedClientState() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.UpgradedClientState(suite.chainA.GetContext(), req) - expPass := tc.expError == nil - if expPass { + if tc.expError == nil { suite.Require().NoError(err) upgradedClientState, err := types.UnpackClientState(res.UpgradedClientState) @@ -715,21 +724,21 @@ func (suite *KeeperTestSuite) TestQueryUpgradedConsensusStates() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "req is nil", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "no plan", func() { req = &types.QueryUpgradedConsensusStateRequest{} }, - false, + status.Error(codes.NotFound, "upgraded consensus state not found, height 2"), }, { "valid consensus state", @@ -746,7 +755,7 @@ func (suite *KeeperTestSuite) TestQueryUpgradedConsensusStates() { err := suite.chainA.GetSimApp().GetIBCKeeper().ClientKeeper.SetUpgradedConsensusState(ctx, height, bz) suite.Require().NoError(err) }, - true, + nil, }, } @@ -760,11 +769,12 @@ func (suite *KeeperTestSuite) TestQueryUpgradedConsensusStates() { queryServer := keeper.NewQueryServer(suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) res, err := queryServer.UpgradedConsensusState(suite.chainA.GetContext(), req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().True(expConsensusState.Equal(res.UpgradedConsensusState)) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index 35e8d672976..9b230fec827 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -477,14 +477,14 @@ func (suite *KeeperTestSuite) TestDefaultSetParams() { // TestParams tests that Param setting and retrieval works properly func (suite *KeeperTestSuite) TestParams() { testCases := []struct { - name string - input types.Params - expPass bool + name string + input types.Params + expErr error }{ - {"success: set default params", types.DefaultParams(), true}, - {"success: empty allowedClients", types.NewParams(), true}, - {"success: subset of allowedClients", types.NewParams(exported.Tendermint, exported.Localhost), true}, - {"failure: contains a single empty string value as allowedClient", types.NewParams(exported.Localhost, ""), false}, + {"success: set default params", types.DefaultParams(), nil}, + {"success: empty allowedClients", types.NewParams(), nil}, + {"success: subset of allowedClients", types.NewParams(exported.Tendermint, exported.Localhost), nil}, + {"failure: contains a single empty string value as allowedClient", types.NewParams(exported.Localhost, ""), fmt.Errorf("client type 1 cannot be blank")}, } for _, tc := range testCases { @@ -495,13 +495,14 @@ func (suite *KeeperTestSuite) TestParams() { ctx := suite.chainA.GetContext() err := tc.input.Validate() suite.chainA.GetSimApp().IBCKeeper.ClientKeeper.SetParams(ctx, tc.input) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) expected := tc.input p := suite.chainA.GetSimApp().IBCKeeper.ClientKeeper.GetParams(ctx) suite.Require().Equal(expected, p) } else { suite.Require().Error(err) + suite.Require().Equal(err.Error(), tc.expErr.Error()) } }) } @@ -644,8 +645,7 @@ func (suite *KeeperTestSuite) TestIBCSoftwareUpgrade() { } } -// Added to reproduce test failure seen in e2e. This can be removed after https://github.com/cosmos/cosmos-sdk/issues/22779 -func (suite *KeeperTestSuite) TestIBCScheduledUpgradeProposal() { +func (suite *KeeperTestSuite) TestIBCScheduleUpgradeProposal() { suite.SetupTest() path := ibctesting.NewPath(suite.chainA, suite.chainB) diff --git a/modules/core/02-client/types/client.go b/modules/core/02-client/types/client.go index dabb2af83f2..304b7f16841 100644 --- a/modules/core/02-client/types/client.go +++ b/modules/core/02-client/types/client.go @@ -40,7 +40,7 @@ func NewIdentifiedClientState(clientID string, clientState exported.ClientState) } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (ics IdentifiedClientState) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(ics.ClientState, new(exported.ClientState)) } @@ -83,7 +83,7 @@ func NewConsensusStateWithHeight(height Height, consensusState exported.Consensu } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (cswh ConsensusStateWithHeight) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(cswh.ConsensusState, new(exported.ConsensusState)) } diff --git a/modules/core/02-client/types/codec_test.go b/modules/core/02-client/types/codec_test.go index 9850c557dd2..5430ce8aa6e 100644 --- a/modules/core/02-client/types/codec_test.go +++ b/modules/core/02-client/types/codec_test.go @@ -1,42 +1,47 @@ package types_test import ( + "fmt" + + errorsmod "cosmossdk.io/errors" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v9/testing" ) type caseAny struct { - name string - any *codectypes.Any - expPass bool + name string + any *codectypes.Any + expErr error } func (suite *TypesTestSuite) TestPackClientState() { testCases := []struct { name string clientState exported.ClientState - expPass bool + expErr error }{ { "solo machine client", ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).ClientState(), - true, + nil, }, { "tendermint client", ibctm.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath), - true, + nil, }, { "nil", nil, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, } @@ -45,24 +50,25 @@ func (suite *TypesTestSuite) TestPackClientState() { for _, tc := range testCases { tc := tc protoAny, err := types.PackClientState(tc.clientState) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) } - testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expPass}) + testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expErr}) } for i, tc := range testCasesAny { i, tc := i, tc cs, err := types.UnpackClientState(tc.any) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) suite.Require().Equal(testCases[i].clientState, cs, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -71,22 +77,22 @@ func (suite *TypesTestSuite) TestPackConsensusState() { testCases := []struct { name string consensusState exported.ConsensusState - expPass bool + expErr error }{ { "solo machine consensus", ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).ConsensusState(), - true, + nil, }, { "tendermint consensus", suite.chainA.LatestCommittedHeader.ConsensusState(), - true, + nil, }, { "nil", nil, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, } @@ -95,23 +101,24 @@ func (suite *TypesTestSuite) TestPackConsensusState() { for _, tc := range testCases { tc := tc protoAny, err := types.PackConsensusState(tc.consensusState) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) } - testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expPass}) + testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expErr}) } for i, tc := range testCasesAny { tc := tc cs, err := types.UnpackConsensusState(tc.any) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) suite.Require().Equal(testCases[i].consensusState, cs, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -120,22 +127,22 @@ func (suite *TypesTestSuite) TestPackClientMessage() { testCases := []struct { name string clientMessage exported.ClientMessage - expPass bool + expErr error }{ { "solo machine header", ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).CreateHeader("solomachine"), - true, + nil, }, { "tendermint header", suite.chainA.LatestCommittedHeader, - true, + nil, }, { "nil", nil, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, } @@ -144,23 +151,24 @@ func (suite *TypesTestSuite) TestPackClientMessage() { for _, tc := range testCases { tc := tc protoAny, err := types.PackClientMessage(tc.clientMessage) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) } - testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expPass}) + testCasesAny = append(testCasesAny, caseAny{tc.name, protoAny, tc.expErr}) } for i, tc := range testCasesAny { tc := tc cs, err := types.UnpackClientMessage(tc.any) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) suite.Require().Equal(testCases[i].clientMessage, cs, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -169,47 +177,47 @@ func (suite *TypesTestSuite) TestCodecTypeRegistration() { testCases := []struct { name string typeURL string - expPass bool + expErr error }{ { "success: MsgCreateClient", sdk.MsgTypeURL(&types.MsgCreateClient{}), - true, + nil, }, { "success: MsgUpdateClient", sdk.MsgTypeURL(&types.MsgUpdateClient{}), - true, + nil, }, { "success: MsgUpgradeClient", sdk.MsgTypeURL(&types.MsgUpgradeClient{}), - true, + nil, }, { "success: MsgSubmitMisbehaviour", sdk.MsgTypeURL(&types.MsgSubmitMisbehaviour{}), - true, + nil, }, { "success: MsgRecoverClient", sdk.MsgTypeURL(&types.MsgRecoverClient{}), - true, + nil, }, { "success: MsgIBCSoftwareUpgrade", sdk.MsgTypeURL(&types.MsgIBCSoftwareUpgrade{}), - true, + nil, }, { "success: MsgUpdateParams", sdk.MsgTypeURL(&types.MsgUpdateParams{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -219,12 +227,13 @@ func (suite *TypesTestSuite) TestCodecTypeRegistration() { suite.Run(tc.name, func() { msg, err := suite.chainA.GetSimApp().AppCodec().InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expErr == nil { suite.Require().NotNil(msg) suite.Require().NoError(err) } else { suite.Require().Nil(msg) suite.Require().Error(err) + suite.Require().Equal(err.Error(), tc.expErr.Error()) } }) } diff --git a/modules/core/02-client/types/height.go b/modules/core/02-client/types/height.go index c5d6839588a..82ce3a17a9c 100644 --- a/modules/core/02-client/types/height.go +++ b/modules/core/02-client/types/height.go @@ -162,7 +162,7 @@ func SetRevisionNumber(chainID string, revision uint64) (string, error) { splitStr := strings.Split(chainID, "-") // swap out revision number with given revision - splitStr[len(splitStr)-1] = strconv.Itoa(int(revision)) + splitStr[len(splitStr)-1] = strconv.FormatUint(revision, 10) return strings.Join(splitStr, "-"), nil } diff --git a/modules/core/02-client/types/msgs.go b/modules/core/02-client/types/msgs.go index 81d45528765..a520a46ab7c 100644 --- a/modules/core/02-client/types/msgs.go +++ b/modules/core/02-client/types/msgs.go @@ -163,7 +163,7 @@ func (msg MsgUpgradeClient) ValidateBasic() error { if err != nil { return err } - // will not validate consensus state here since the trusted kernel may not form a valid consenus state. + // will not validate consensus state here since the trusted kernel may not form a valid consensus state. // client implementations are responsible for ensuring client can submit new headers against this consensus state. consensusState, err := UnpackConsensusState(msg.ConsensusState) if err != nil { diff --git a/modules/core/02-client/types/msgs_test.go b/modules/core/02-client/types/msgs_test.go index db9b96c3fd7..f47951c4b1e 100644 --- a/modules/core/02-client/types/msgs_test.go +++ b/modules/core/02-client/types/msgs_test.go @@ -2,6 +2,7 @@ package types_test import ( "errors" + "fmt" "testing" "time" @@ -9,6 +10,7 @@ import ( "github.com/stretchr/testify/require" testifysuite "github.com/stretchr/testify/suite" + errorsmod "cosmossdk.io/errors" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/codec/testutil" @@ -110,7 +112,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ { "valid - tendermint client", @@ -119,7 +121,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - true, + nil, }, { "invalid tendermint client", @@ -127,14 +129,14 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(&ibctm.ClientState{}, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(ibctm.ErrInvalidChainID, "chain id cannot be empty string"), }, { "failed to unpack client", func() { msg.ClientState = nil }, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { "failed to unpack consensus state", @@ -144,14 +146,14 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { suite.Require().NoError(err) msg.ConsensusState = nil }, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { "invalid signer", func() { msg.Signer = "" }, - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, { "valid - solomachine client", @@ -160,7 +162,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(soloMachine.ClientState(), soloMachine.ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - true, + nil, }, { "invalid solomachine client", @@ -169,7 +171,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(&solomachine.ClientState{}, soloMachine.ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(types.ErrInvalidClient, "sequence cannot be 0"), }, { "invalid solomachine consensus state", @@ -178,7 +180,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(soloMachine.ClientState(), &solomachine.ConsensusState{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(types.ErrInvalidConsensus, "timestamp cannot be 0"), }, { "invalid - client state and consensus state client types do not match", @@ -188,17 +190,18 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { msg, err = types.NewMsgCreateClient(tendermintClient, soloMachine.ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(types.ErrInvalidClientType, "client type for client state and consensus state do not match"), }, } for _, tc := range cases { tc.malleate() err = msg.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -263,14 +266,14 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ { "invalid client-id", func() { msg.ClientId = "" }, - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, { "valid - tendermint header", @@ -278,7 +281,7 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentTMClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - true, + nil, }, { "invalid tendermint header", @@ -286,21 +289,21 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { msg, err = types.NewMsgUpdateClient("tendermint", &ibctm.Header{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(types.ErrInvalidHeader, "tendermint signed header cannot be nil"), }, { "failed to unpack header", func() { msg.ClientMessage = nil }, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { "invalid signer", func() { msg.Signer = "" }, - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, { "valid - solomachine header", @@ -310,7 +313,7 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { suite.Require().NoError(err) }, - true, + nil, }, { "invalid solomachine header", @@ -318,17 +321,18 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { msg, err = types.NewMsgUpdateClient("solomachine", &solomachine.Header{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(types.ErrInvalidHeader, "timestamp cannot be zero"), }, } for _, tc := range cases { tc.malleate() err = msg.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -388,40 +392,40 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { cases := []struct { name string malleate func(*types.MsgUpgradeClient) - expPass bool + expErr error }{ { name: "success", malleate: func(msg *types.MsgUpgradeClient) {}, - expPass: true, + expErr: nil, }, { name: "client id empty", malleate: func(msg *types.MsgUpgradeClient) { msg.ClientId = "" }, - expPass: false, + expErr: errorsmod.Wrap(host.ErrInvalidID, "protobuf Any message cannot be nil"), }, { name: "invalid client id", malleate: func(msg *types.MsgUpgradeClient) { msg.ClientId = "invalid~chain/id" }, - expPass: false, + expErr: errorsmod.Wrap(host.ErrInvalidID, "identifier invalid~chain/id cannot contain separator '/'"), }, { name: "unpacking clientstate fails", malleate: func(msg *types.MsgUpgradeClient) { msg.ClientState = nil }, - expPass: false, + expErr: errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { name: "unpacking consensus state fails", malleate: func(msg *types.MsgUpgradeClient) { msg.ConsensusState = nil }, - expPass: false, + expErr: errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { name: "client and consensus type does not match", @@ -431,28 +435,28 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { suite.Require().NoError(err) msg.ConsensusState = soloConsensus }, - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidUpgradeClient, "consensus state's client-type does not match client. expected: 07-tendermint, got: 06-solomachine"), }, { name: "empty client proof", malleate: func(msg *types.MsgUpgradeClient) { msg.ProofUpgradeClient = nil }, - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidUpgradeClient, "proof of upgrade client cannot be empty"), }, { name: "empty consensus state proof", malleate: func(msg *types.MsgUpgradeClient) { msg.ProofUpgradeConsensusState = nil }, - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidUpgradeClient, "proof of upgrade consensus state cannot be empty"), }, { name: "empty signer", malleate: func(msg *types.MsgUpgradeClient) { msg.Signer = " " }, - expPass: false, + expErr: errorsmod.Wrap(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, } @@ -466,10 +470,11 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { tc.malleate(msg) err = msg.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, "valid case %s failed", tc.name) } else { suite.Require().Error(err, "invalid case %s passed", tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -540,14 +545,14 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ { "invalid client-id", func() { msg.ClientId = "" }, - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, { "valid - tendermint misbehaviour", @@ -561,7 +566,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - true, + nil, }, { "invalid tendermint misbehaviour", @@ -569,21 +574,21 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { msg, err = types.NewMsgSubmitMisbehaviour("tendermint", &ibctm.Misbehaviour{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrap(ibctm.ErrInvalidHeader, "misbehaviour Header1 cannot be nil"), }, { "failed to unpack misbehaviourt", func() { msg.Misbehaviour = nil }, - false, + errorsmod.Wrap(ibcerrors.ErrUnpackAny, "protobuf Any message cannot be nil"), }, { "invalid signer", func() { msg.Signer = "" }, - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: empty address string is not allowed"), }, { "valid - solomachine misbehaviour", @@ -592,7 +597,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { msg, err = types.NewMsgSubmitMisbehaviour(soloMachine.ClientID, soloMachine.CreateMisbehaviour(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - true, + nil, }, { "invalid solomachine misbehaviour", @@ -600,7 +605,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { msg, err = types.NewMsgSubmitMisbehaviour("solomachine", &solomachine.Misbehaviour{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrapf(types.ErrInvalidMisbehaviour, "sequence cannot be 0"), }, { "client-id mismatch", @@ -609,17 +614,18 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { msg, err = types.NewMsgSubmitMisbehaviour("external", soloMachineMisbehaviour, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - false, + errorsmod.Wrapf(host.ErrInvalidID, "identifier external has invalid length: 8, must be between 9-64 characters"), }, } for _, tc := range cases { tc.malleate() err = msg.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -720,17 +726,17 @@ func (suite *TypesTestSuite) TestMsgIBCSoftwareUpgrade_NewMsgIBCSoftwareUpgrade( testCases := []struct { name string upgradedClientState exported.ClientState - expPass bool + expErr error }{ { "success", ibctm.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath), - true, + nil, }, { "fail: failed to pack ClientState", nil, - false, + errorsmod.Wrap(ibcerrors.ErrPackAny, "cannot proto marshal "), }, } @@ -745,7 +751,7 @@ func (suite *TypesTestSuite) TestMsgIBCSoftwareUpgrade_NewMsgIBCSoftwareUpgrade( tc.upgradedClientState, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Assert().Equal(ibctesting.TestAccAddress, msg.Signer) suite.Assert().Equal(plan, msg.Plan) @@ -754,6 +760,7 @@ func (suite *TypesTestSuite) TestMsgIBCSoftwareUpgrade_NewMsgIBCSoftwareUpgrade( suite.Assert().Equal(tc.upgradedClientState, unpackedClientState) } else { suite.Require().True(errors.Is(err, ibcerrors.ErrPackAny)) + suite.Require().ErrorIs(err, tc.expErr) } } } @@ -763,17 +770,17 @@ func TestMsgIBCSoftwareUpgrade_GetSigners(t *testing.T) { testCases := []struct { name string address sdk.AccAddress - expPass bool + expErr error }{ { "success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), - true, + nil, }, { "failure: nil address", nil, - false, + fmt.Errorf("empty address string is not allowed"), }, } @@ -792,11 +799,14 @@ func TestMsgIBCSoftwareUpgrade_GetSigners(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) signers, _, err := encodingCfg.Codec.GetMsgSigners(msg) - if tc.expPass { + + expPass := tc.expErr == nil + if expPass { require.NoError(t, err) require.Equal(t, tc.address.Bytes(), signers[0]) } else { require.Error(t, err) + require.Equal(t, err.Error(), tc.expErr.Error()) } } } @@ -904,29 +914,29 @@ func (suite *TypesTestSuite) TestMarshalMsgIBCSoftwareUpgrade() { func (suite *TypesTestSuite) TestMsgUpdateParamsValidateBasic() { signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { - name string - msg *types.MsgUpdateParams - expPass bool + name string + msg *types.MsgUpdateParams + expErr error }{ { "success: valid signer and params", types.NewMsgUpdateParams(signer, types.DefaultParams()), - true, + nil, }, { "success: valid signer empty params", types.NewMsgUpdateParams(signer, types.Params{}), - true, + nil, }, { "failure: invalid signer address", types.NewMsgUpdateParams("invalid", types.DefaultParams()), - false, + errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: decoding bech32 failed: invalid bech32 string length 7"), }, { "failure: invalid allowed client", types.NewMsgUpdateParams(signer, types.NewParams("")), - false, + fmt.Errorf("client type 0 cannot be blank"), }, } @@ -934,10 +944,11 @@ func (suite *TypesTestSuite) TestMsgUpdateParamsValidateBasic() { tc := tc suite.Run(tc.name, func() { err := tc.msg.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, "valid case %s failed", tc.name) } else { suite.Require().Error(err, "invalid case %s passed", tc.name) + suite.Require().Equal(tc.expErr.Error(), err.Error()) } }) } @@ -948,10 +959,10 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { testCases := []struct { name string address sdk.AccAddress - expPass bool + expErr error }{ - {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), true}, - {"failure: nil address", nil, false}, + {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), nil}, + {"failure: nil address", nil, fmt.Errorf("empty address string is not allowed")}, } for _, tc := range testCases { @@ -963,11 +974,14 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { } encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) signers, _, err := encodingCfg.Codec.GetMsgSigners(&msg) - if tc.expPass { + + expPass := tc.expErr == nil + if expPass { require.NoError(t, err) require.Equal(t, tc.address.Bytes(), signers[0]) } else { require.Error(t, err) + require.Equal(t, err.Error(), tc.expErr.Error()) } } } diff --git a/modules/core/02-client/types/query.go b/modules/core/02-client/types/query.go index de8c03e329d..5c0dbf2bae0 100644 --- a/modules/core/02-client/types/query.go +++ b/modules/core/02-client/types/query.go @@ -15,7 +15,7 @@ var ( _ gogoprotoany.UnpackInterfacesMessage = (*QueryConsensusStatesResponse)(nil) ) -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qcsr QueryClientStatesResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { for _, cs := range qcsr.ClientStates { if err := cs.UnpackInterfaces(unpacker); err != nil { @@ -36,12 +36,12 @@ func NewQueryClientStateResponse( } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qcsr QueryClientStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(qcsr.ClientState, new(exported.ClientState)) } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qcsr QueryConsensusStatesResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { for _, cs := range qcsr.ConsensusStates { if err := cs.UnpackInterfaces(unpacker); err != nil { @@ -62,7 +62,7 @@ func NewQueryConsensusStateResponse( } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qcsr QueryConsensusStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(qcsr.ConsensusState, new(exported.ConsensusState)) } diff --git a/modules/core/02-client/types/router_test.go b/modules/core/02-client/types/router_test.go index 095c7fb141e..1d2a0701fc3 100644 --- a/modules/core/02-client/types/router_test.go +++ b/modules/core/02-client/types/router_test.go @@ -61,8 +61,7 @@ func (suite *TypesTestSuite) TestAddRoute() { tc.malleate() - expPass := tc.expError == nil - if expPass { + if tc.expError == nil { router.AddRoute(clientType, &tmLightClientModule) suite.Require().True(router.HasRoute(clientType)) } else { diff --git a/modules/core/03-connection/keeper/grpc_query_test.go b/modules/core/03-connection/keeper/grpc_query_test.go index 925c877ff35..a2349aa0d5b 100644 --- a/modules/core/03-connection/keeper/grpc_query_test.go +++ b/modules/core/03-connection/keeper/grpc_query_test.go @@ -3,11 +3,17 @@ package keeper_test import ( "fmt" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/types/query" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/keeper" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v9/testing" ) @@ -21,21 +27,21 @@ func (suite *KeeperTestSuite) TestQueryConnection() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid connectionID", func() { req = &types.QueryConnectionRequest{} }, - false, + status.Error(codes.InvalidArgument, errorsmod.Wrap(host.ErrInvalidID, "identifier cannot be blank").Error()), }, { "connection not found", @@ -44,7 +50,10 @@ func (suite *KeeperTestSuite) TestQueryConnection() { ConnectionId: ibctesting.InvalidID, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrConnectionNotFound, "IDisInvalid").Error(), + ), }, { "success", @@ -62,7 +71,7 @@ func (suite *KeeperTestSuite) TestQueryConnection() { ConnectionId: path.EndpointA.ConnectionID, } }, - true, + nil, }, } @@ -78,12 +87,13 @@ func (suite *KeeperTestSuite) TestQueryConnection() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ConnectionKeeper) res, err := queryServer.Connection(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(&expConnection, res.Connection) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -104,21 +114,21 @@ func (suite *KeeperTestSuite) TestQueryConnections() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "empty pagination", func() { req = &types.QueryConnectionsRequest{} }, - true, + nil, }, { "success", @@ -155,7 +165,7 @@ func (suite *KeeperTestSuite) TestQueryConnections() { }, } }, - true, + nil, }, } @@ -171,12 +181,13 @@ func (suite *KeeperTestSuite) TestQueryConnections() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ConnectionKeeper) res, err := queryServer.Connections(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expConnections, res.Connections) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -191,21 +202,21 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid connectionID", func() { req = &types.QueryClientConnectionsRequest{} }, - false, + status.Error(codes.InvalidArgument, errorsmod.Wrap(host.ErrInvalidID, "identifier cannot be blank").Error()), }, { "connection not found", @@ -214,7 +225,10 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { ClientId: ibctesting.InvalidID, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrClientConnectionPathsNotFound, "IDisInvalid").Error(), + ), }, { "success", @@ -236,7 +250,7 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { ClientId: path1.EndpointA.ClientID, } }, - true, + nil, }, } @@ -252,12 +266,13 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ConnectionKeeper) res, err := queryServer.ClientConnections(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expPaths, res.ConnectionPaths) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -272,14 +287,14 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid connection ID", @@ -288,7 +303,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { ConnectionId: "", } }, - false, + status.Error(codes.InvalidArgument, errorsmod.Wrap(host.ErrInvalidID, "identifier cannot be blank").Error()), }, { "connection not found", @@ -297,7 +312,10 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { ConnectionId: "test-connection-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrConnectionNotFound, "connection-id: test-connection-id").Error(), + ), }, { "client state not found", @@ -311,7 +329,10 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { req = &types.QueryConnectionClientStateRequest{ ConnectionId: path.EndpointA.ConnectionID, } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrap(clienttypes.ErrClientNotFound, "client-id: ").Error(), + ), }, { "success", @@ -326,7 +347,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { ConnectionId: path.EndpointA.ConnectionID, } }, - true, + nil, }, } @@ -342,7 +363,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ConnectionKeeper) res, err := queryServer.ConnectionClientState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(&expIdentifiedClientState, res.IdentifiedClientState) @@ -352,6 +373,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -367,14 +389,14 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid connection ID", @@ -385,7 +407,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { RevisionHeight: 1, } }, - false, + status.Error(codes.InvalidArgument, errorsmod.Wrap(host.ErrInvalidID, "identifier cannot be blank").Error()), }, { "connection not found", @@ -396,7 +418,10 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { RevisionHeight: 1, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrConnectionNotFound, "connection-id: test-connection-id").Error(), + ), }, { "consensus state not found", @@ -409,7 +434,10 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { RevisionNumber: 0, RevisionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrap(clienttypes.ErrConsensusStateNotFound, "client-id: 07-tendermint-0").Error(), + ), }, { "success", @@ -429,7 +457,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { RevisionHeight: clientHeight.GetRevisionHeight(), } }, - true, + nil, }, } @@ -445,7 +473,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ConnectionKeeper) res, err := queryServer.ConnectionConsensusState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState) @@ -458,6 +486,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/03-connection/keeper/handshake_test.go b/modules/core/03-connection/keeper/handshake_test.go index e233c68fbe3..34a101d87e0 100644 --- a/modules/core/03-connection/keeper/handshake_test.go +++ b/modules/core/03-connection/keeper/handshake_test.go @@ -3,7 +3,11 @@ package keeper_test import ( "time" + errorsmod "cosmossdk.io/errors" + + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ibctesting "github.com/cosmos/ibc-go/v9/testing" ) @@ -22,30 +26,30 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ {"success", func() { - }, true}, + }, nil}, {"success with empty counterparty identifier", func() { emptyConnBID = true - }, true}, + }, nil}, {"success with non empty version", func() { version = types.GetCompatibleVersions()[0] - }, true}, + }, nil}, {"success with non zero delayPeriod", func() { delayPeriod = uint64(time.Hour.Nanoseconds()) - }, true}, + }, nil}, {"invalid version", func() { version = &types.Version{} - }, false}, + }, errorsmod.Wrap(types.ErrInvalidVersion, "version is not supported")}, {"couldn't add connection to client", func() { // set path.EndpointA.ClientID to invalid client identifier path.EndpointA.ClientID = "clientidentifier" - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (clientidentifier) status is Unauthorized")}, { - msg: "unauthorized client", - expPass: false, + msg: "unauthorized client", + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Unauthorized"), malleate: func() { expErrorMsgSubstring = "status is Unauthorized" // remove client from allowed list @@ -75,13 +79,14 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { connectionID, err := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.ConnOpenInit(suite.chainA.GetContext(), path.EndpointA.ClientID, counterparty, version, delayPeriod) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(types.FormatConnectionIdentifier(0), connectionID) } else { suite.Require().Error(err) suite.Contains(err.Error(), expErrorMsgSubstring) suite.Require().Equal("", connectionID) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -99,12 +104,12 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ {"success", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) - }, true}, + }, nil}, {"success with delay period", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -118,23 +123,23 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.coordinator.CommitBlock(suite.chainA) err = path.EndpointB.UpdateClient() suite.Require().NoError(err) - }, true}, + }, nil}, {"counterparty versions is empty", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) versions = nil - }, false}, + }, errorsmod.Wrap(types.ErrVersionNegotiationFailed, "failed to find a matching counterparty version ([]) from the supported version list ([identifier:\"1\" features:\"ORDER_ORDERED\" features:\"ORDER_UNORDERED\" ])")}, {"counterparty versions don't have a match", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) version := types.NewVersion("0.0", nil) versions = []*types.Version{version} - }, false}, + }, errorsmod.Wrap(types.ErrVersionNegotiationFailed, "failed to find a matching counterparty version ([identifier:\"0.0\" ]) from the supported version list ([identifier:\"1\" features:\"ORDER_ORDERED\" features:\"ORDER_UNORDERED\" ])")}, {"connection state verification failed", func() { // chainA connection not created - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed connection state verification for client (07-tendermint-0): commitment proof must be existence proof. got: int at index &{1374402732384}")}, } for _, tc := range testCases { @@ -163,12 +168,13 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { versions, initProof, proofHeight, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(types.FormatConnectionIdentifier(0), connectionID) } else { suite.Require().Error(err) suite.Require().Equal("", connectionID) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -185,7 +191,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ {"success", func() { err := path.EndpointA.ConnOpenInit() @@ -193,10 +199,10 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = path.EndpointB.ConnOpenTry() suite.Require().NoError(err) - }, true}, + }, nil}, {"connection not found", func() { // connections are never created - }, false}, + }, errorsmod.Wrap(types.ErrConnectionNotFound, "")}, {"invalid counterparty connection ID", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -213,7 +219,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = path.EndpointB.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed connection state verification for client (07-tendermint-0): commitment proof must be existence proof. got: int at index &{1374412614704}")}, {"connection state is not INIT", func() { // connection state is already OPEN on chainA err := path.EndpointA.ConnOpenInit() @@ -224,7 +230,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { err = path.EndpointA.ConnOpenAck() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "connection state is not INIT (got STATE_OPEN)")}, {"connection is in INIT but the proposed version is invalid", func() { // chainA is in INIT, chainB is in TRYOPEN err := path.EndpointA.ConnOpenInit() @@ -234,7 +240,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) version = types.NewVersion("2.0", nil) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "the counterparty selected version identifier:\"2.0\" is not supported by versions selected on INIT")}, {"incompatible IBC versions", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -244,7 +250,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { // set version to a non-compatible version version = types.NewVersion("2.0", nil) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "the counterparty selected version identifier:\"2.0\" is not supported by versions selected on INIT")}, {"empty version", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -253,7 +259,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) version = &types.Version{} - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "the counterparty selected version is not supported by versions selected on INIT")}, {"feature set verification failed - unsupported feature", func() { err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) @@ -262,12 +268,12 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) version = types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "the counterparty selected version identifier:\"1\" features:\"ORDER_ORDERED\" features:\"ORDER_UNORDERED\" features:\"ORDER_DAG\" is not supported by versions selected on INIT")}, {"connection state verification failed", func() { // chainB connection is not in INIT err := path.EndpointA.ConnOpenInit() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed connection state verification for client (07-tendermint-0): commitment proof must be existence proof. got: int at index &{1374414228888}")}, } for _, tc := range testCases { @@ -292,10 +298,11 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { path.EndpointB.ConnectionID, tryProof, proofHeight, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -308,7 +315,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ {"success", func() { err := path.EndpointA.ConnOpenInit() @@ -319,14 +326,14 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { err = path.EndpointA.ConnOpenAck() suite.Require().NoError(err) - }, true}, + }, nil}, {"connection not found", func() { // connections are never created - }, false}, + }, errorsmod.Wrap(types.ErrConnectionNotFound, "")}, {"chain B's connection state is not TRYOPEN", func() { // connections are OPEN path.CreateConnections() - }, false}, + }, errorsmod.Wrap(types.ErrInvalidConnectionState, "connection state is not TRYOPEN (got STATE_OPEN)")}, {"connection state verification failed", func() { // chainA is in INIT err := path.EndpointA.ConnOpenInit() @@ -334,7 +341,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { err = path.EndpointB.ConnOpenTry() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed connection state verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof")}, } for _, tc := range testCases { @@ -358,10 +365,11 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { suite.chainB.GetContext(), path.EndpointB.ConnectionID, ackProof, proofHeight, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index ecdcdd3ab59..60b184ad704 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "errors" "testing" testifysuite "github.com/stretchr/testify/suite" @@ -139,13 +140,13 @@ func (suite *KeeperTestSuite) TestDefaultSetParams() { // TestSetAndGetParams tests that param setting and retrieval works properly func (suite *KeeperTestSuite) TestSetAndGetParams() { testCases := []struct { - name string - input types.Params - expPass bool + name string + input types.Params + expErr error }{ - {"success: set default params", types.DefaultParams(), true}, - {"success: valid value for MaxExpectedTimePerBlock", types.NewParams(10), true}, - {"failure: invalid value for MaxExpectedTimePerBlock", types.NewParams(0), false}, + {"success: set default params", types.DefaultParams(), nil}, + {"success: valid value for MaxExpectedTimePerBlock", types.NewParams(10), nil}, + {"failure: invalid value for MaxExpectedTimePerBlock", types.NewParams(0), errors.New("MaxExpectedTimePerBlock cannot be zero")}, } for _, tc := range testCases { @@ -156,13 +157,14 @@ func (suite *KeeperTestSuite) TestSetAndGetParams() { ctx := suite.chainA.GetContext() err := tc.input.Validate() suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.SetParams(ctx, tc.input) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) expected := tc.input p := suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) suite.Require().Equal(expected, p) } else { suite.Require().Error(err) + suite.Require().Equal(err.Error(), tc.expErr.Error()) } }) } diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index 4177aebbbce..83b844a2fec 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -4,10 +4,14 @@ import ( "fmt" "time" + errorsmod "cosmossdk.io/errors" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v9/testing" @@ -26,24 +30,24 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"client state not found - changed client ID", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (IDisInvalid) status is Unauthorized")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed connection state verification for client (07-tendermint-0): client state height < proof height ({1 9} < {1 14}), please ensure the client has been updated")}, {"verification failed - connection state is different than proof", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.State = types.TRYOPEN }) - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed connection state verification for client (07-tendermint-0): client state height < proof height ({1 9} < {1 14}), please ensure the client has been updated")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -69,10 +73,11 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { malleateHeight(proofHeight, heightDiff), proof, path.EndpointB.ConnectionID, expectedConnection, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -88,24 +93,24 @@ func (suite *KeeperTestSuite) TestVerifyChannelState() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"client state not found- changed client ID", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (IDisInvalid) status is Unauthorized")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed channel state verification for client (07-tendermint-0): client state height < proof height ({1 15} < {1 20}), please ensure the client has been updated")}, {"verification failed - changed channel state", func() { path.EndpointA.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.TRYOPEN }) - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed channel state verification for client (07-tendermint-0): client state height < proof height ({1 15} < {1 20}), please ensure the client has been updated")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -130,10 +135,11 @@ func (suite *KeeperTestSuite) TestVerifyChannelState() { path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, channel, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -153,36 +159,36 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"verification success: delay period passed", func() { delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) - }, true}, + }, nil}, {"delay time period has not passed", func() { delayTimePeriod = uint64(1 * time.Hour.Nanoseconds()) - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until time: 1577926940000000000, current time: 1577923345000000000")}, {"delay block period has not passed", func() { // make timePerBlock 1 nanosecond so that block delay is not passed. // must also set a non-zero time delay to ensure block delay is enforced. delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) timePerBlock = 1 - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until height: 1-1000000016, current height: 1-17")}, {"client state not found- changed client ID", func() { path.EndpointB.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed packet commitment verification for client (07-tendermint-0): client state height < proof height ({1 17} < {1 22}), please ensure the client has been updated")}, {"verification failed - changed packet commitment state", func() { packet.Data = []byte(ibctesting.InvalidID) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed packet commitment verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -220,10 +226,11 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -244,36 +251,36 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"verification success: delay period passed", func() { delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) - }, true}, + }, nil}, {"delay time period has not passed", func() { delayTimePeriod = uint64(1 * time.Hour.Nanoseconds()) - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet acknowledgement verification for client (07-tendermint-0): cannot verify packet until time: 1577934160000000000, current time: 1577930565000000000")}, {"delay block period has not passed", func() { // make timePerBlock 1 nanosecond so that block delay is not passed. // must also set a non-zero time delay to ensure block delay is enforced. delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) timePerBlock = 1 - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet acknowledgement verification for client (07-tendermint-0): cannot verify packet until height: 1-1000000018, current height: 1-19")}, {"client state not found- changed client ID", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed packet acknowledgement verification for client (07-tendermint-0): client state height < proof height ({1 19} < {1 24}), please ensure the client has been updated")}, {"verification failed - changed acknowledgement", func() { ack = ibcmock.MockFailAcknowledgement - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed packet acknowledgement verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -320,10 +327,11 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ack.Acknowledgement(), ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.ErrorIs(err, tc.expErr) } }) } @@ -344,27 +352,27 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"verification success: delay period passed", func() { delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) - }, true}, + }, nil}, {"delay time period has not passed", func() { delayTimePeriod = uint64(1 * time.Hour.Nanoseconds()) - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until time: 1577926940000000000, current time: 1577923345000000000")}, {"delay block period has not passed", func() { // make timePerBlock 1 nanosecond so that block delay is not passed. // must also set a non-zero time delay to ensure block delay is enforced. delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) timePerBlock = 1 - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until height: 1-1000000016, current height: 1-17")}, {"client state not found - changed client ID", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed packet commitment verification for client (07-tendermint-0): client state height < proof height ({1 17} < {1 22}), please ensure the client has been updated")}, {"verification failed - acknowledgement was received", func() { // increment receiving chain's (chainB) time by 2 hour to always pass receive suite.coordinator.IncrementTimeBy(time.Hour * 2) @@ -372,13 +380,13 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { err := path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed packet commitment verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -426,10 +434,11 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -450,36 +459,36 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"verification success", func() {}, true}, + {"verification success", func() {}, nil}, {"verification success: delay period passed", func() { delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) - }, true}, + }, nil}, {"delay time period has not passed", func() { delayTimePeriod = uint64(1 * time.Hour.Nanoseconds()) - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until time: 1577926940000000000, current time: 1577923345000000000")}, {"delay block period has not passed", func() { // make timePerBlock 1 nanosecond so that block delay is not passed. // must also set a non-zero time delay to ensure block delay is enforced. delayTimePeriod = uint64(1 * time.Second.Nanoseconds()) timePerBlock = 1 - }, false}, + }, errorsmod.Wrap(ibctm.ErrDelayPeriodNotPassed, "failed packet commitment verification for client (07-tendermint-0): cannot verify packet until height: 1-1000000016, current height: 1-17")}, {"client state not found- changed client ID", func() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, {"consensus state not found - increased proof height", func() { heightDiff = 5 - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed packet commitment verification for client (07-tendermint-0): client state height < proof height ({1 17} < {1 22}), please ensure the client has been updated")}, {"verification failed - wrong expected next seq recv", func() { offsetSeq = 1 - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed packet commitment verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof")}, {"client status is not active - client is expired", func() { clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) - }, false}, + }, errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen")}, } for _, tc := range cases { @@ -524,10 +533,11 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()+offsetSeq, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -542,12 +552,12 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ { name: "success", malleate: func() {}, - expPass: true, + expErr: nil, }, { name: "fails when client state is frozen", @@ -557,14 +567,14 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) }, - expPass: false, + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen"), }, { name: "fails with bad client id", malleate: func() { path.EndpointB.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) }, - expPass: false, + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (IDisInvalid) status is Unauthorized"), }, { name: "verification fails when the key does not exist", @@ -572,7 +582,7 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { suite.chainA.DeleteKey(host.ChannelUpgradeErrorKey(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)) suite.coordinator.CommitBlock(suite.chainA) }, - expPass: false, + expErr: errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "failed upgrade error receipt verification for client (07-tendermint-0): client state height < proof height ({1 17} < {1 18}), please ensure the client has been updated"), }, { name: "verification fails when message differs", @@ -580,7 +590,7 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { originalSequence := upgradeError.GetErrorReceipt().Sequence upgradeError = channeltypes.NewUpgradeError(originalSequence, fmt.Errorf("new error")) }, - expPass: false, + expErr: errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed upgrade error receipt verification for client (07-tendermint-0): failed to verify membership proof at index 0: provided value doesn't match proof"), }, } @@ -606,10 +616,11 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { err := suite.chainB.GetSimApp().IBCKeeper.ConnectionKeeper.VerifyChannelUpgradeError(suite.chainB.GetContext(), path.EndpointB.GetConnection(), proofHeight, proof, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, upgradeError.GetErrorReceipt()) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -624,12 +635,12 @@ func (suite *KeeperTestSuite) TestVerifyUpgrade() { cases := []struct { name string malleate func() - expPass bool + expErr error }{ { name: "success", malleate: func() {}, - expPass: true, + expErr: nil, }, { name: "fails when client state is frozen", @@ -639,21 +650,21 @@ func (suite *KeeperTestSuite) TestVerifyUpgrade() { clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) }, - expPass: false, + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (07-tendermint-0) status is Frozen"), }, { name: "fails with bad client id", malleate: func() { path.EndpointB.UpdateConnection(func(c *types.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) }, - expPass: false, + expErr: errorsmod.Wrap(clienttypes.ErrClientNotActive, "client (IDisInvalid) status is Unauthorized"), }, { name: "fails when the upgrade field is different", malleate: func() { upgrade.Fields.Ordering = channeltypes.ORDERED }, - expPass: false, + expErr: errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "failed upgrade verification for client (07-tendermint-0) on channel (channel-7): failed to verify membership proof at index 0: provided value doesn't match proof"), }, } @@ -684,10 +695,11 @@ func (suite *KeeperTestSuite) TestVerifyUpgrade() { err := suite.chainB.GetSimApp().IBCKeeper.ConnectionKeeper.VerifyChannelUpgrade(suite.chainB.GetContext(), path.EndpointB.GetConnection(), proofHeight, proof, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, upgrade) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/03-connection/types/codec_test.go b/modules/core/03-connection/types/codec_test.go index ed9db95fb65..e70b72cd65b 100644 --- a/modules/core/03-connection/types/codec_test.go +++ b/modules/core/03-connection/types/codec_test.go @@ -1,6 +1,7 @@ package types_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -15,39 +16,39 @@ import ( func TestCodecTypeRegistration(t *testing.T) { testCases := []struct { - name string - typeURL string - expPass bool + name string + typeURL string + expError error }{ { "success: MsgConnectionOpenInit", sdk.MsgTypeURL(&types.MsgConnectionOpenInit{}), - true, + nil, }, { "success: MsgConnectionOpenTry", sdk.MsgTypeURL(&types.MsgConnectionOpenTry{}), - true, + nil, }, { "success: MsgConnectionOpenAck", sdk.MsgTypeURL(&types.MsgConnectionOpenAck{}), - true, + nil, }, { "success: MsgConnectionOpenConfirm", sdk.MsgTypeURL(&types.MsgConnectionOpenConfirm{}), - true, + nil, }, { "success: MsgUpdateParams", sdk.MsgTypeURL(&types.MsgUpdateParams{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -58,12 +59,12 @@ func TestCodecTypeRegistration(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expError == nil { require.NotNil(t, msg) require.NoError(t, err) } else { require.Nil(t, msg) - require.Error(t, err) + require.ErrorContains(t, err, tc.expError.Error()) } }) } diff --git a/modules/core/03-connection/types/connection_test.go b/modules/core/03-connection/types/connection_test.go index ba88f05b8e9..4a9250d1ec2 100644 --- a/modules/core/03-connection/types/connection_test.go +++ b/modules/core/03-connection/types/connection_test.go @@ -8,6 +8,8 @@ import ( clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" ibctesting "github.com/cosmos/ibc-go/v9/testing" ) @@ -24,32 +26,32 @@ func TestConnectionValidateBasic(t *testing.T) { testCases := []struct { name string connection types.ConnectionEnd - expPass bool + expError error }{ { "valid connection", types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}, - true, + nil, }, { "invalid client id", types.ConnectionEnd{"(clientID1)", []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}, - false, + host.ErrInvalidID, }, { "empty versions", types.ConnectionEnd{clientID, nil, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}, - false, + ibcerrors.ErrInvalidVersion, }, { "invalid version", types.ConnectionEnd{clientID, []*types.Version{{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}, - false, + types.ErrInvalidVersion, }, { "invalid counterparty", types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, emptyPrefix}, 500}, - false, + types.ErrInvalidCounterparty, }, } @@ -57,10 +59,10 @@ func TestConnectionValidateBasic(t *testing.T) { tc := tc err := tc.connection.ValidateBasic() - if tc.expPass { + if tc.expError == nil { 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) + require.ErrorIs(t, err, tc.expError) } } } @@ -69,22 +71,22 @@ func TestCounterpartyValidateBasic(t *testing.T) { testCases := []struct { name string counterparty types.Counterparty - expPass bool + expError error }{ - {"valid counterparty", types.Counterparty{clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, true}, - {"invalid client id", types.Counterparty{"(InvalidClient)", connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, false}, - {"invalid connection id", types.Counterparty{clientID, "(InvalidConnection)", commitmenttypes.NewMerklePrefix([]byte("prefix"))}, false}, - {"invalid prefix", types.Counterparty{clientID, connectionID2, emptyPrefix}, false}, + {"valid counterparty", types.Counterparty{clientID, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, nil}, + {"invalid client id", types.Counterparty{"(InvalidClient)", connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, host.ErrInvalidID}, + {"invalid connection id", types.Counterparty{clientID, "(InvalidConnection)", commitmenttypes.NewMerklePrefix([]byte("prefix"))}, host.ErrInvalidID}, + {"invalid prefix", types.Counterparty{clientID, connectionID2, emptyPrefix}, types.ErrInvalidCounterparty}, } for i, tc := range testCases { tc := tc err := tc.counterparty.ValidateBasic() - if tc.expPass { + if tc.expError == nil { 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) + require.ErrorIs(t, err, tc.expError) } } } @@ -93,17 +95,17 @@ func TestIdentifiedConnectionValidateBasic(t *testing.T) { testCases := []struct { name string connection types.IdentifiedConnection - expPass bool + expError error }{ { "valid connection", types.NewIdentifiedConnection(clientID, types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}), - true, + nil, }, { "invalid connection id", types.NewIdentifiedConnection("(connectionIDONE)", types.ConnectionEnd{clientID, []*types.Version{ibctesting.ConnectionVersion}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}, 500}), - false, + host.ErrInvalidID, }, } @@ -111,10 +113,10 @@ func TestIdentifiedConnectionValidateBasic(t *testing.T) { tc := tc err := tc.connection.ValidateBasic() - if tc.expPass { + if tc.expError == nil { 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) + require.ErrorIs(t, err, tc.expError) } } } diff --git a/modules/core/03-connection/types/genesis_test.go b/modules/core/03-connection/types/genesis_test.go index 39a930c1433..0ea3849294b 100644 --- a/modules/core/03-connection/types/genesis_test.go +++ b/modules/core/03-connection/types/genesis_test.go @@ -1,12 +1,14 @@ package types_test import ( + "errors" "testing" "github.com/stretchr/testify/require" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v9/testing" ) @@ -15,12 +17,12 @@ func TestValidateGenesis(t *testing.T) { testCases := []struct { name string genState types.GenesisState - expPass bool + expError error }{ { name: "default", genState: types.DefaultGenesisState(), - expPass: true, + expError: nil, }, { name: "valid genesis", @@ -34,7 +36,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: true, + expError: nil, }, { name: "invalid connection", @@ -48,7 +50,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: false, + expError: host.ErrInvalidID, }, { name: "invalid client id", @@ -62,7 +64,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: false, + expError: host.ErrInvalidID, }, { name: "invalid path", @@ -76,7 +78,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: false, + expError: host.ErrInvalidID, }, { name: "invalid connection identifier", @@ -90,7 +92,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: false, + expError: host.ErrInvalidID, }, { name: "localhost connection identifier", @@ -104,7 +106,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: true, + expError: nil, }, { name: "next connection sequence is not greater than maximum connection identifier sequence provided", @@ -118,7 +120,7 @@ func TestValidateGenesis(t *testing.T) { 0, types.DefaultParams(), ), - expPass: false, + expError: errors.New("next connection sequence 0 must be greater than maximum sequence used in connection identifier 10"), }, { name: "invalid params", @@ -132,17 +134,17 @@ func TestValidateGenesis(t *testing.T) { 0, types.Params{}, ), - expPass: false, + expError: errors.New("MaxExpectedTimePerBlock cannot be zero"), }, } for _, tc := range testCases { tc := tc err := tc.genState.Validate() - if tc.expPass { + if tc.expError == nil { require.NoError(t, err, tc.name) } else { - require.Error(t, err, tc.name) + require.ErrorContains(t, err, tc.expError.Error()) } } } diff --git a/modules/core/03-connection/types/keys_test.go b/modules/core/03-connection/types/keys_test.go index bd929d63a42..816687077e9 100644 --- a/modules/core/03-connection/types/keys_test.go +++ b/modules/core/03-connection/types/keys_test.go @@ -1,12 +1,14 @@ package types_test import ( + "errors" "math" "testing" "github.com/stretchr/testify/require" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // tests ParseConnectionSequence and IsValidConnectionID @@ -15,21 +17,21 @@ func TestParseConnectionSequence(t *testing.T) { name string connectionID string expSeq uint64 - expPass bool + expError error }{ - {"valid 0", "connection-0", 0, true}, - {"valid 1", "connection-1", 1, true}, - {"valid large sequence", types.FormatConnectionIdentifier(math.MaxUint64), math.MaxUint64, true}, + {"valid 0", "connection-0", 0, nil}, + {"valid 1", "connection-1", 1, nil}, + {"valid large sequence", types.FormatConnectionIdentifier(math.MaxUint64), math.MaxUint64, nil}, // one above uint64 max - {"invalid uint64", "connection-18446744073709551616", 0, false}, + {"invalid uint64", "connection-18446744073709551616", 0, errors.New("invalid connection identifier: failed to parse identifier sequence")}, // uint64 == 20 characters - {"invalid large sequence", "connection-2345682193567182931243", 0, false}, - {"capital prefix", "Connection-0", 0, false}, - {"double prefix", "connection-connection-0", 0, false}, - {"missing dash", "connection0", 0, false}, - {"blank id", " ", 0, false}, - {"empty id", "", 0, false}, - {"negative sequence", "connection--1", 0, false}, + {"invalid large sequence", "connection-2345682193567182931243", 0, host.ErrInvalidID}, + {"capital prefix", "Connection-0", 0, host.ErrInvalidID}, + {"double prefix", "connection-connection-0", 0, host.ErrInvalidID}, + {"missing dash", "connection0", 0, host.ErrInvalidID}, + {"blank id", " ", 0, host.ErrInvalidID}, + {"empty id", "", 0, host.ErrInvalidID}, + {"negative sequence", "connection--1", 0, host.ErrInvalidID}, } for _, tc := range testCases { @@ -40,11 +42,11 @@ func TestParseConnectionSequence(t *testing.T) { valid := types.IsValidConnectionID(tc.connectionID) require.Equal(t, tc.expSeq, seq) - if tc.expPass { + if tc.expError == nil { require.NoError(t, err, tc.name) require.True(t, valid) } else { - require.Error(t, err, tc.name) + require.ErrorContains(t, err, tc.expError.Error()) require.False(t, valid) } }) diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index 5504ee7d6d2..4d3e7b067dc 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -1,6 +1,7 @@ package types_test import ( + "errors" "fmt" "testing" @@ -19,8 +20,11 @@ import ( moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ibc "github.com/cosmos/ibc-go/v9/modules/core" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v9/testing" "github.com/cosmos/ibc-go/v9/testing/simapp" @@ -90,28 +94,29 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { var version *types.Version testCases := []struct { - name string - msg *types.MsgConnectionOpenInit - expPass bool + name string + msg *types.MsgConnectionOpenInit + expError error }{ - {"localhost client ID", types.NewMsgConnectionOpenInit(exported.LocalhostClientID, "clienttotest", prefix, version, 500, signer), false}, - {"invalid client ID", types.NewMsgConnectionOpenInit("test/iris", "clienttotest", prefix, version, 500, signer), false}, - {"invalid counterparty client ID", types.NewMsgConnectionOpenInit("clienttotest", "(clienttotest)", prefix, version, 500, signer), false}, - {"invalid counterparty connection ID", &types.MsgConnectionOpenInit{connectionID, types.NewCounterparty("clienttotest", "connectiontotest", prefix), version, 500, signer}, false}, - {"empty counterparty prefix", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", emptyPrefix, version, 500, signer), false}, - {"supplied version fails basic validation", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, &types.Version{}, 500, signer), false}, - {"empty singer", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, version, 500, ""), false}, - {"success", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, version, 500, signer), true}, + {"localhost client ID", types.NewMsgConnectionOpenInit(exported.LocalhostClientID, "clienttotest", prefix, version, 500, signer), clienttypes.ErrInvalidClientType}, + {"invalid client ID", types.NewMsgConnectionOpenInit("test/iris", "clienttotest", prefix, version, 500, signer), host.ErrInvalidID}, + {"invalid counterparty client ID", types.NewMsgConnectionOpenInit("clienttotest", "(clienttotest)", prefix, version, 500, signer), host.ErrInvalidID}, + {"invalid counterparty connection ID", &types.MsgConnectionOpenInit{connectionID, types.NewCounterparty("clienttotest", "connectiontotest", prefix), version, 500, signer}, types.ErrInvalidCounterparty}, + {"empty counterparty prefix", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", emptyPrefix, version, 500, signer), types.ErrInvalidCounterparty}, + {"supplied version fails basic validation", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, &types.Version{}, 500, signer), types.ErrInvalidVersion}, + {"empty singer", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, version, 500, ""), ibcerrors.ErrInvalidAddress}, + {"success", types.NewMsgConnectionOpenInit("clienttotest", "clienttotest", prefix, version, 500, signer), nil}, } for _, tc := range testCases { tc := tc err := tc.msg.ValidateBasic() - if tc.expPass { + + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError) } } } @@ -120,82 +125,85 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { prefix := commitmenttypes.NewMerklePrefix([]byte("storePrefixKey")) testCases := []struct { - name string - msg *types.MsgConnectionOpenTry - expPass bool + name string + msg *types.MsgConnectionOpenTry + expError error }{ - {"success", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), true}, - {"localhost client ID", types.NewMsgConnectionOpenTry(exported.LocalhostClientID, "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), false}, - {"invalid client ID", types.NewMsgConnectionOpenTry("test/iris", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), false}, - {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry("clienttotesta", "ibc/test", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), false}, - {"invalid counterparty client ID", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "test/conn1", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), false}, - {"empty counterparty prefix", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", emptyPrefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), false}, - {"empty counterpartyVersions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{}, 500, suite.proof, clientHeight, signer), false}, - {"empty proofInit", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, emptyProof, clientHeight, signer), false}, - {"empty singer", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, ""), false}, - {"invalid version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{{}}, 500, suite.proof, clientHeight, signer), false}, - {"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, make([]*types.Version, types.MaxCounterpartyVersionsLength+1), 500, suite.proof, clientHeight, signer), false}, - {"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{{"v1", make([]string, types.MaxFeaturesLength+1)}}, 500, suite.proof, clientHeight, signer), false}, + {"success", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), nil}, + {"localhost client ID", types.NewMsgConnectionOpenTry(exported.LocalhostClientID, "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), clienttypes.ErrInvalidClientType}, + {"invalid client ID", types.NewMsgConnectionOpenTry("test/iris", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), host.ErrInvalidID}, + {"invalid counterparty connection ID", types.NewMsgConnectionOpenTry("clienttotesta", "ibc/test", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), host.ErrInvalidID}, + {"invalid counterparty client ID", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "test/conn1", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), host.ErrInvalidID}, + {"empty counterparty prefix", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", emptyPrefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, signer), types.ErrInvalidCounterparty}, + {"empty counterpartyVersions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{}, 500, suite.proof, clientHeight, signer), ibcerrors.ErrInvalidVersion}, + {"empty proofInit", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, emptyProof, clientHeight, signer), commitmenttypes.ErrInvalidProof}, + {"empty singer", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, clientHeight, ""), ibcerrors.ErrInvalidAddress}, + {"invalid version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{{}}, 500, suite.proof, clientHeight, signer), types.ErrInvalidVersion}, + {"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, make([]*types.Version, types.MaxCounterpartyVersionsLength+1), 500, suite.proof, clientHeight, signer), ibcerrors.ErrInvalidVersion}, + {"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", prefix, []*types.Version{{"v1", make([]string, types.MaxFeaturesLength+1)}}, 500, suite.proof, clientHeight, signer), types.ErrInvalidVersion}, } for _, tc := range testCases { tc := tc err := tc.msg.ValidateBasic() - if tc.expPass { + + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError) } } } func (suite *MsgTestSuite) TestNewMsgConnectionOpenAck() { testCases := []struct { - name string - msg *types.MsgConnectionOpenAck - expPass bool + name string + msg *types.MsgConnectionOpenAck + expError error }{ - {"success", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), true}, - {"invalid connection ID", types.NewMsgConnectionOpenAck("test/conn1", connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), false}, - {"invalid counterparty connection ID", types.NewMsgConnectionOpenAck(connectionID, "test/conn1", suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), false}, - {"empty proofTry", types.NewMsgConnectionOpenAck(connectionID, connectionID, emptyProof, clientHeight, ibctesting.ConnectionVersion, signer), false}, - {"invalid version", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, &types.Version{}, signer), false}, - {"empty signer", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, ""), false}, + {"success", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), nil}, + {"invalid connection ID", types.NewMsgConnectionOpenAck("test/conn1", connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), types.ErrInvalidConnectionIdentifier}, + {"invalid counterparty connection ID", types.NewMsgConnectionOpenAck(connectionID, "test/conn1", suite.proof, clientHeight, ibctesting.ConnectionVersion, signer), host.ErrInvalidID}, + {"empty proofTry", types.NewMsgConnectionOpenAck(connectionID, connectionID, emptyProof, clientHeight, ibctesting.ConnectionVersion, signer), commitmenttypes.ErrInvalidProof}, + {"invalid version", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, &types.Version{}, signer), types.ErrInvalidVersion}, + {"empty signer", types.NewMsgConnectionOpenAck(connectionID, connectionID, suite.proof, clientHeight, ibctesting.ConnectionVersion, ""), ibcerrors.ErrInvalidAddress}, } for _, tc := range testCases { tc := tc err := tc.msg.ValidateBasic() - if tc.expPass { + + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError) } } } func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { testCases := []struct { - name string - msg *types.MsgConnectionOpenConfirm - expPass bool + name string + msg *types.MsgConnectionOpenConfirm + expError error }{ - {"invalid connection ID", types.NewMsgConnectionOpenConfirm("test/conn1", suite.proof, clientHeight, signer), false}, - {"empty proofTry", types.NewMsgConnectionOpenConfirm(connectionID, emptyProof, clientHeight, signer), false}, - {"empty signer", types.NewMsgConnectionOpenConfirm(connectionID, suite.proof, clientHeight, ""), false}, - {"success", types.NewMsgConnectionOpenConfirm(connectionID, suite.proof, clientHeight, signer), true}, + {"invalid connection ID", types.NewMsgConnectionOpenConfirm("test/conn1", suite.proof, clientHeight, signer), types.ErrInvalidConnectionIdentifier}, + {"empty proofTry", types.NewMsgConnectionOpenConfirm(connectionID, emptyProof, clientHeight, signer), commitmenttypes.ErrInvalidProof}, + {"empty signer", types.NewMsgConnectionOpenConfirm(connectionID, suite.proof, clientHeight, ""), ibcerrors.ErrInvalidAddress}, + {"success", types.NewMsgConnectionOpenConfirm(connectionID, suite.proof, clientHeight, signer), nil}, } for _, tc := range testCases { tc := tc err := tc.msg.ValidateBasic() - if tc.expPass { + + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expError) } } } @@ -204,24 +212,24 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { func (suite *MsgTestSuite) TestMsgUpdateParamsValidateBasic() { signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { - name string - msg *types.MsgUpdateParams - expPass bool + name string + msg *types.MsgUpdateParams + expError error }{ { "success: valid signer and params", types.NewMsgUpdateParams(signer, types.DefaultParams()), - true, + nil, }, { "failure: invalid signer address", types.NewMsgUpdateParams("invalid", types.DefaultParams()), - false, + ibcerrors.ErrInvalidAddress, }, { "failure: invalid time per block", types.NewMsgUpdateParams(signer, types.NewParams(0)), - false, + errors.New("MaxExpectedTimePerBlock cannot be zero"), }, } @@ -229,10 +237,10 @@ func (suite *MsgTestSuite) TestMsgUpdateParamsValidateBasic() { tc := tc err := tc.msg.ValidateBasic() - if tc.expPass { - suite.Require().NoError(err, "valid case %s failed", tc.name) + if tc.expError == nil { + suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err, "invalid case %s passed", tc.name) + suite.Require().ErrorContains(err, tc.expError.Error()) } } } @@ -242,10 +250,10 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { testCases := []struct { name string address sdk.AccAddress - expPass bool + errMsg string }{ - {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), true}, - {"failure: nil address", nil, false}, + {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), ""}, + {"failure: nil address", nil, "empty address string is not allowed"}, } for _, tc := range testCases { @@ -258,11 +266,11 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) signers, _, err := encodingCfg.Codec.GetMsgSigners(&msg) - if tc.expPass { + if tc.errMsg == "" { require.NoError(t, err) require.Equal(t, tc.address.Bytes(), signers[0]) } else { - require.Error(t, err) + require.ErrorContains(t, err, tc.errMsg) } } } diff --git a/modules/core/03-connection/types/params_test.go b/modules/core/03-connection/types/params_test.go index 62b42b6d71f..0c515ba3ff3 100644 --- a/modules/core/03-connection/types/params_test.go +++ b/modules/core/03-connection/types/params_test.go @@ -1,6 +1,7 @@ package types_test import ( + "errors" "testing" "github.com/stretchr/testify/require" @@ -10,23 +11,23 @@ import ( func TestValidateParams(t *testing.T) { testCases := []struct { - name string - params types.Params - expPass bool + name string + params types.Params + expError error }{ - {"default params", types.DefaultParams(), true}, - {"custom params", types.NewParams(10), true}, - {"blank client", types.NewParams(0), false}, + {"default params", types.DefaultParams(), nil}, + {"custom params", types.NewParams(10), nil}, + {"blank client", types.NewParams(0), errors.New("MaxExpectedTimePerBlock cannot be zero")}, } for _, tc := range testCases { tc := tc err := tc.params.Validate() - if tc.expPass { + if tc.expError == nil { require.NoError(t, err, tc.name) } else { - require.Error(t, err, tc.name) + require.ErrorContains(t, err, tc.expError.Error()) } } } diff --git a/modules/core/03-connection/types/query.go b/modules/core/03-connection/types/query.go index 7ec4917637f..c9858239c6a 100644 --- a/modules/core/03-connection/types/query.go +++ b/modules/core/03-connection/types/query.go @@ -50,7 +50,7 @@ func NewQueryConnectionClientStateResponse(identifiedClientState clienttypes.Ide } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qccsr QueryConnectionClientStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return qccsr.IdentifiedClientState.UnpackInterfaces(unpacker) } @@ -65,7 +65,7 @@ func NewQueryConnectionConsensusStateResponse(clientID string, anyConsensusState } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qccsr QueryConnectionConsensusStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(qccsr.ConsensusState, new(exported.ConsensusState)) } diff --git a/modules/core/03-connection/types/version_test.go b/modules/core/03-connection/types/version_test.go index e718801354c..bc377d6267e 100644 --- a/modules/core/03-connection/types/version_test.go +++ b/modules/core/03-connection/types/version_test.go @@ -11,14 +11,14 @@ import ( func TestValidateVersion(t *testing.T) { testCases := []struct { - name string - version *types.Version - expPass bool + name string + version *types.Version + expError error }{ - {"valid version", types.DefaultIBCVersion, true}, - {"valid empty feature set", types.NewVersion(types.DefaultIBCVersionIdentifier, []string{}), true}, - {"empty version identifier", types.NewVersion(" ", []string{"ORDER_UNORDERED"}), false}, - {"empty feature", types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED", " "}), false}, + {"valid version", types.DefaultIBCVersion, nil}, + {"valid empty feature set", types.NewVersion(types.DefaultIBCVersionIdentifier, []string{}), nil}, + {"empty version identifier", types.NewVersion(" ", []string{"ORDER_UNORDERED"}), types.ErrInvalidVersion}, + {"empty feature", types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED", " "}), types.ErrInvalidVersion}, } for i, tc := range testCases { @@ -26,10 +26,10 @@ func TestValidateVersion(t *testing.T) { err := types.ValidateVersion(tc.version) - if tc.expPass { + if tc.expError == nil { 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) + require.ErrorIs(t, err, tc.expError) } } } @@ -100,14 +100,14 @@ func TestPickVersion(t *testing.T) { supportedVersions []*types.Version counterpartyVersions []*types.Version expVer *types.Version - expPass bool + expError error }{ - {"valid default ibc version", types.GetCompatibleVersions(), types.GetCompatibleVersions(), types.DefaultIBCVersion, true}, - {"valid version in counterparty versions", types.GetCompatibleVersions(), []*types.Version{types.NewVersion("version1", nil), types.NewVersion("2.0.0", []string{"ORDER_UNORDERED-ZK"}), types.DefaultIBCVersion}, types.DefaultIBCVersion, true}, - {"valid identifier match but empty feature set not allowed", types.GetCompatibleVersions(), []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"DAG", "ORDERED-ZK", "UNORDERED-zk]"})}, types.NewVersion(types.DefaultIBCVersionIdentifier, nil), false}, - {"empty counterparty versions", types.GetCompatibleVersions(), []*types.Version{}, &types.Version{}, false}, - {"non-matching counterparty versions", types.GetCompatibleVersions(), []*types.Version{types.NewVersion("2.0.0", nil)}, &types.Version{}, false}, - {"non-matching counterparty versions (uses ordered channels only) contained in supported versions (uses unordered channels only)", []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED"})}, []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED"})}, &types.Version{}, false}, + {"valid default ibc version", types.GetCompatibleVersions(), types.GetCompatibleVersions(), types.DefaultIBCVersion, nil}, + {"valid version in counterparty versions", types.GetCompatibleVersions(), []*types.Version{types.NewVersion("version1", nil), types.NewVersion("2.0.0", []string{"ORDER_UNORDERED-ZK"}), types.DefaultIBCVersion}, types.DefaultIBCVersion, nil}, + {"valid identifier match but empty feature set not allowed", types.GetCompatibleVersions(), []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"DAG", "ORDERED-ZK", "UNORDERED-zk]"})}, types.NewVersion(types.DefaultIBCVersionIdentifier, nil), types.ErrVersionNegotiationFailed}, + {"empty counterparty versions", types.GetCompatibleVersions(), []*types.Version{}, &types.Version{}, types.ErrVersionNegotiationFailed}, + {"non-matching counterparty versions", types.GetCompatibleVersions(), []*types.Version{types.NewVersion("2.0.0", nil)}, &types.Version{}, types.ErrVersionNegotiationFailed}, + {"non-matching counterparty versions (uses ordered channels only) contained in supported versions (uses unordered channels only)", []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_UNORDERED"})}, []*types.Version{types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED"})}, &types.Version{}, types.ErrVersionNegotiationFailed}, } for i, tc := range testCases { @@ -115,10 +115,10 @@ func TestPickVersion(t *testing.T) { version, err := types.PickVersion(tc.supportedVersions, tc.counterpartyVersions) - if tc.expPass { + if tc.expError == nil { 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) + require.ErrorIs(t, err, tc.expError) var emptyVersion *types.Version require.Equal(t, emptyVersion, version, "invalid test case %d passed: %s", i, tc.name) } @@ -130,13 +130,13 @@ func TestVerifyProposedVersion(t *testing.T) { name string proposedVersion *types.Version supportedVersion *types.Version - expPass bool + expError error }{ - {"entire feature set supported", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}), true}, - {"empty feature sets not supported", types.NewVersion("1", []string{}), types.DefaultIBCVersion, false}, - {"one feature missing", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_UNORDERED", "ORDER_DAG"}), false}, - {"both features missing", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_DAG"}), false}, - {"identifiers do not match", types.NewVersion("2", []string{"ORDER_UNORDERED", "ORDER_ORDERED"}), types.DefaultIBCVersion, false}, + {"entire feature set supported", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}), nil}, + {"empty feature sets not supported", types.NewVersion("1", []string{}), types.DefaultIBCVersion, types.ErrVersionNegotiationFailed}, + {"one feature missing", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_UNORDERED", "ORDER_DAG"}), types.ErrVersionNegotiationFailed}, + {"both features missing", types.DefaultIBCVersion, types.NewVersion("1", []string{"ORDER_DAG"}), types.ErrVersionNegotiationFailed}, + {"identifiers do not match", types.NewVersion("2", []string{"ORDER_UNORDERED", "ORDER_ORDERED"}), types.DefaultIBCVersion, types.ErrVersionNegotiationFailed}, } for i, tc := range testCases { @@ -144,10 +144,10 @@ func TestVerifyProposedVersion(t *testing.T) { err := tc.supportedVersion.VerifyProposedVersion(tc.proposedVersion) - if tc.expPass { + if tc.expError == nil { require.NoError(t, err, "test case %d: %s", i, tc.name) } else { - require.Error(t, err, "test case %d: %s", i, tc.name) + require.ErrorIs(t, err, tc.expError) } } } diff --git a/modules/core/04-channel/keeper/grpc_query_test.go b/modules/core/04-channel/keeper/grpc_query_test.go index 632fda80d09..3b42625120a 100644 --- a/modules/core/04-channel/keeper/grpc_query_test.go +++ b/modules/core/04-channel/keeper/grpc_query_test.go @@ -3,6 +3,11 @@ package keeper_test import ( "fmt" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/types/query" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" @@ -26,14 +31,14 @@ func (suite *KeeperTestSuite) TestQueryChannel() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -43,7 +48,10 @@ func (suite *KeeperTestSuite) TestQueryChannel() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -53,7 +61,10 @@ func (suite *KeeperTestSuite) TestQueryChannel() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -63,7 +74,10 @@ func (suite *KeeperTestSuite) TestQueryChannel() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "success", @@ -83,7 +97,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, } @@ -99,12 +113,13 @@ func (suite *KeeperTestSuite) TestQueryChannel() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.Channel(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(&expChannel, res.Channel) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -119,21 +134,21 @@ func (suite *KeeperTestSuite) TestQueryChannels() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "empty pagination", func() { req = &types.QueryChannelsRequest{} }, - true, + nil, }, { "success", @@ -182,7 +197,7 @@ func (suite *KeeperTestSuite) TestQueryChannels() { }, } }, - true, + nil, }, } @@ -198,13 +213,14 @@ func (suite *KeeperTestSuite) TestQueryChannels() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.Channels(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expChannels, res.Channels) suite.Require().Equal(len(expChannels), int(res.Pagination.Total)) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -219,14 +235,14 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid connection ID", @@ -235,7 +251,10 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() { Connection: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "success", @@ -285,7 +304,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() { }, } }, - true, + nil, }, { "success, empty response", @@ -302,7 +321,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() { }, } }, - true, + nil, }, } @@ -318,12 +337,13 @@ func (suite *KeeperTestSuite) TestQueryConnectionChannels() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.ConnectionChannels(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expChannels, res.Channels) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -338,14 +358,14 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -355,7 +375,10 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -365,7 +388,10 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -375,7 +401,10 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id: test-channel-id").Error(), + ), }, { "connection not found", @@ -394,7 +423,10 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { PortId: path.EndpointA.ChannelConfig.PortID, ChannelId: path.EndpointA.ChannelID, } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "connection-id: doesnotexist").Error(), + ), }, { "client state for channel's connection not found", @@ -409,7 +441,10 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { PortId: path.EndpointA.ChannelConfig.PortID, ChannelId: path.EndpointA.ChannelID, } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrapf(clienttypes.ErrClientNotFound, "client-id: ").Error(), + ), }, { "success", @@ -430,7 +465,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, } @@ -446,7 +481,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.ChannelClientState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(&expIdentifiedClientState, res.IdentifiedClientState) @@ -456,6 +491,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -471,14 +507,14 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -490,7 +526,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionHeight: 1, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -502,7 +541,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionHeight: 1, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -514,7 +556,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionHeight: 1, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "connection not found", @@ -535,7 +580,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionNumber: 0, RevisionHeight: 1, } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "connection-id: doesnotexist").Error(), + ), }, { "consensus state for channel's connection not found", @@ -549,7 +597,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionNumber: 0, RevisionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height } - }, false, + }, status.Error( + codes.NotFound, + errorsmod.Wrapf(clienttypes.ErrConsensusStateNotFound, "client-id: 07-tendermint-0").Error(), + ), }, { "success", @@ -573,7 +624,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { RevisionHeight: path.EndpointA.GetClientLatestHeight().GetRevisionHeight(), } }, - true, + nil, }, } @@ -589,7 +640,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.ChannelConsensusState(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState) @@ -602,6 +653,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { suite.Require().NotNil(cachedValue) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -616,14 +668,14 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -634,7 +686,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -645,7 +700,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid sequence", @@ -656,7 +714,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence cannot be 0").Error(), + ), }, { "channel not found", @@ -667,7 +728,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 1, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "commitment not found", @@ -682,7 +746,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 2, } }, - false, + status.Error( + codes.NotFound, + fmt.Errorf("packet commitment hash not found").Error(), + ), }, { "invalid ID", @@ -692,7 +759,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "success", @@ -708,7 +778,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { Sequence: 1, } }, - true, + nil, }, } @@ -724,12 +794,13 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitment() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.PacketCommitment(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expCommitment, res.Commitment) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -744,14 +815,14 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid ID", @@ -761,7 +832,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -771,7 +845,10 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "success", @@ -797,7 +874,7 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { }, } }, - true, + nil, }, } @@ -813,12 +890,13 @@ func (suite *KeeperTestSuite) TestQueryPacketCommitments() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.PacketCommitments(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expCommitments, res.Commitments) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -833,14 +911,14 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -851,7 +929,10 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { Sequence: 1, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -862,7 +943,10 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { Sequence: 1, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid sequence", @@ -873,7 +957,10 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence cannot be 0").Error(), + ), }, { "channel not found", @@ -884,7 +971,10 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { Sequence: 1, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "success: receipt not found", @@ -900,7 +990,7 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { } expReceived = false }, - true, + nil, }, { "success: receipt found", @@ -916,7 +1006,7 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { } expReceived = true }, - true, + nil, }, } @@ -932,12 +1022,13 @@ func (suite *KeeperTestSuite) TestQueryPacketReceipt() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.PacketReceipt(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expReceived, res.Received) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -952,14 +1043,14 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -970,7 +1061,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -981,7 +1075,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid sequence", @@ -992,7 +1089,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 0, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence cannot be 0").Error(), + ), }, { "ack not found", @@ -1008,7 +1108,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 2, } }, - false, + status.Error( + codes.NotFound, + fmt.Errorf("packet acknowledgement hash not found").Error(), + ), }, { "channel not found", @@ -1019,7 +1122,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 1, } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "success", @@ -1035,7 +1141,7 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { Sequence: 1, } }, - true, + nil, }, } @@ -1051,12 +1157,13 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgement() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.PacketAcknowledgement(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expAck, res.Acknowledgement) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1071,14 +1178,14 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid ID", @@ -1088,7 +1195,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1098,7 +1208,10 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "success, filtered res", @@ -1125,7 +1238,7 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { Pagination: nil, } }, - true, + nil, }, { "success", @@ -1151,7 +1264,7 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { }, } }, - true, + nil, }, } @@ -1167,12 +1280,13 @@ func (suite *KeeperTestSuite) TestQueryPacketAcknowledgements() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.PacketAcknowledgements(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expAcknowledgements, res.Acknowledgements) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1187,14 +1301,14 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1204,7 +1318,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1214,7 +1331,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid seq", @@ -1228,7 +1348,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{0}, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence 0 cannot be 0").Error(), + ), }, { "invalid seq, ordered channel", @@ -1243,7 +1366,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{0}, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence 0 cannot be 0").Error(), + ), }, { "channel not found", @@ -1253,7 +1379,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { ChannelId: "invalid-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: invalid-port-id, channel-id invalid-channel-id").Error(), + ), }, { "basic success empty packet commitments", @@ -1268,7 +1397,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{}, } }, - true, + nil, }, { "basic success unreceived packet commitments", @@ -1285,7 +1414,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{1}, } }, - true, + nil, }, { "basic success unreceived packet commitments, nothing to relay", @@ -1302,7 +1431,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{1}, } }, - true, + nil, }, { "success multiple unreceived packet commitments", @@ -1329,7 +1458,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: packetCommitments, } }, - true, + nil, }, { "basic success empty packet commitments, ordered channel", @@ -1345,7 +1474,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{}, } }, - true, + nil, }, { "basic success unreceived packet commitments, ordered channel", @@ -1362,7 +1491,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: []uint64{1}, } }, - true, + nil, }, { "basic success multiple unreceived packet commitments, ordered channel", @@ -1383,7 +1512,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { PacketCommitmentSequences: packetCommitments, } }, - true, + nil, }, } @@ -1399,12 +1528,13 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedPackets() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.UnreceivedPackets(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expSeq, res.Sequences) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1419,14 +1549,14 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1436,7 +1566,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1446,7 +1579,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1456,7 +1592,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (test-port-id) channel ID (test-channel-id)").Error(), + ), }, { "invalid seq", @@ -1470,7 +1609,10 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { PacketAckSequences: []uint64{0}, } }, - false, + status.Error( + codes.InvalidArgument, + fmt.Errorf("packet sequence 0 cannot be 0").Error(), + ), }, { "basic success unreceived packet acks", @@ -1487,7 +1629,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { PacketAckSequences: []uint64{1}, } }, - true, + nil, }, { "basic success unreceived packet acknowledgements, nothing to relay", @@ -1502,7 +1644,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { PacketAckSequences: []uint64{1}, } }, - true, + nil, }, { "success multiple unreceived packet acknowledgements", @@ -1528,7 +1670,7 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { PacketAckSequences: packetAcks, } }, - true, + nil, }, } @@ -1544,12 +1686,13 @@ func (suite *KeeperTestSuite) TestQueryUnreceivedAcks() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.UnreceivedAcks(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expSeq, res.Sequences) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1564,14 +1707,14 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1581,7 +1724,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1591,7 +1737,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1601,7 +1750,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "basic success on unordered channel returns zero", @@ -1615,7 +1767,7 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, { "basic success on ordered channel returns the set receive sequence", @@ -1633,7 +1785,7 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, } @@ -1649,12 +1801,13 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceReceive() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.NextSequenceReceive(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expSeq, res.NextSequenceReceive) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1669,14 +1822,14 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1686,7 +1839,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1696,7 +1852,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1706,7 +1865,10 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrSequenceSendNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "basic success on unordered channel returns the set send sequence", @@ -1722,7 +1884,7 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, { "basic success on ordered channel returns the set send sequence", @@ -1740,7 +1902,7 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, } @@ -1756,12 +1918,13 @@ func (suite *KeeperTestSuite) TestQueryNextSequenceSend() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.NextSequenceSend(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expSeq, res.NextSequenceSend) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1776,14 +1939,14 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1793,7 +1956,10 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1803,7 +1969,10 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1813,7 +1982,10 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "success", @@ -1828,7 +2000,7 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { ChannelId: path.EndpointA.ChannelID, } }, - true, + nil, }, } @@ -1842,12 +2014,13 @@ func (suite *KeeperTestSuite) TestQueryUpgradeError() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.UpgradeError(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(upgradeErr.GetErrorReceipt(), res.ErrorReceipt) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -1862,14 +2035,14 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { testCases := []struct { msg string malleate func() - expPass bool + expErr error }{ { "empty request", func() { req = nil }, - false, + status.Error(codes.InvalidArgument, "empty request"), }, { "invalid port ID", @@ -1879,7 +2052,10 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "invalid channel ID", @@ -1889,7 +2065,10 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { ChannelId: "", } }, - false, + status.Error( + codes.InvalidArgument, + errorsmod.Wrapf(host.ErrInvalidID, "identifier cannot be blank").Error(), + ), }, { "channel not found", @@ -1899,7 +2078,10 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { ChannelId: "test-channel-id", } }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: test-port-id, channel-id test-channel-id").Error(), + ), }, { "upgrade not found", @@ -1908,13 +2090,16 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { kvStore := suite.chainA.GetContext().KVStore(storeKey) kvStore.Delete(host.ChannelUpgradeKey(req.PortId, req.ChannelId)) }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrapf(types.ErrUpgradeNotFound, "port-id: mock, channel-id channel-420").Error(), + ), }, { "success", func() { }, - true, + nil, }, } @@ -1944,12 +2129,13 @@ func (suite *KeeperTestSuite) TestQueryUpgrade() { queryServer := keeper.NewQueryServer(suite.chainA.App.GetIBCKeeper().ChannelKeeper) res, err := queryServer.Upgrade(ctx, req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(expectedUpgrade, res.Upgrade) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/04-channel/keeper/handshake_test.go b/modules/core/04-channel/keeper/handshake_test.go index 4ed5b5abbd6..5e42d673a49 100644 --- a/modules/core/04-channel/keeper/handshake_test.go +++ b/modules/core/04-channel/keeper/handshake_test.go @@ -3,10 +3,14 @@ package keeper_test import ( "fmt" + errorsmod "cosmossdk.io/errors" + clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v9/testing" "github.com/cosmos/ibc-go/v9/testing/mock" @@ -15,7 +19,7 @@ import ( type testCase = struct { msg string malleate func() - expPass bool + expErr error } // TestChanOpenInit tests the OpenInit handshake call for channels. It uses message passing @@ -32,12 +36,12 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { {"success", func() { path.SetupConnections() features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} - }, true}, + }, nil}, {"connection doesn't exist", func() { // any non-empty values path.EndpointA.ConnectionID = "connection-0" path.EndpointB.ConnectionID = "connection-0" - }, false}, + }, connectiontypes.ErrConnectionNotFound}, {"connection version not negotiated", func() { path.SetupConnections() @@ -47,7 +51,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { }) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} - }, false}, + }, connectiontypes.ErrInvalidVersion}, {"connection does not support ORDERED channels", func() { path.SetupConnections() @@ -58,10 +62,10 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { // NOTE: Opening UNORDERED channels is still expected to pass but ORDERED channels should fail features = []string{"ORDER_UNORDERED"} - }, true}, + }, nil}, { - msg: "unauthorized client", - expPass: false, + msg: "unauthorized client", + expErr: clienttypes.ErrClientNotActive, malleate: func() { expErrorMsgSubstring = "status is Unauthorized" path.SetupConnections() @@ -104,7 +108,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { // Testcase must have expectedPass = true AND channel order supported before // asserting the channel handshake initiation succeeded - if tc.expPass && orderSupported { + if (tc.expErr == nil) && orderSupported { suite.Require().NoError(err) suite.Require().Equal(types.FormatChannelIdentifier(0), channelID) } else { @@ -132,17 +136,17 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { path.SetChannelOrdered() err := path.EndpointA.ChanOpenInit() suite.Require().NoError(err) - }, true}, + }, nil}, {"connection doesn't exist", func() { path.EndpointA.ConnectionID = ibctesting.FirstConnectionID path.EndpointB.ConnectionID = ibctesting.FirstConnectionID - }, false}, + }, connectiontypes.ErrConnectionNotFound}, {"connection is not OPEN", func() { path.SetupClients() err := path.EndpointB.ConnOpenInit() suite.Require().NoError(err) - }, false}, + }, connectiontypes.ErrInvalidConnectionState}, {"consensus state not found", func() { path.SetupConnections() path.SetChannelOrdered() @@ -150,11 +154,11 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { suite.Require().NoError(err) heightDiff = 3 // consensus state doesn't exist at this height - }, false}, + }, errorsmod.Wrap(ibcerrors.ErrInvalidHeight, "")}, {"channel verification failed", func() { // not creating a channel on chainA will result in an invalid proof of existence path.SetupConnections() - }, false}, + }, commitmenttypes.ErrInvalidProof}, {"connection version not negotiated", func() { path.SetupConnections() path.SetChannelOrdered() @@ -165,7 +169,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { path.EndpointB.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.Versions = append(c.Versions, connectiontypes.NewVersion("2", []string{"ORDER_ORDERED", "ORDER_UNORDERED"})) }) - }, false}, + }, connectiontypes.ErrInvalidVersion}, {"connection does not support ORDERED channels", func() { path.SetupConnections() path.SetChannelOrdered() @@ -176,7 +180,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { path.EndpointB.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.Versions = []*connectiontypes.Version{connectiontypes.NewVersion("1", []string{"ORDER_UNORDERED"})} }) - }, false}, + }, connectiontypes.ErrInvalidVersion}, } for _, tc := range testCases { @@ -205,11 +209,12 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { proof, malleateHeight(proofHeight, heightDiff), ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotEmpty(channelID) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -234,7 +239,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { err = path.EndpointB.ChanOpenTry() suite.Require().NoError(err) - }, true}, + }, nil}, {"success with empty stored counterparty channel ID", func() { path.SetupConnections() path.SetChannelOrdered() @@ -253,12 +258,12 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { counterpartyChannelID = path.EndpointB.ChannelID suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, channel) - }, true}, - {"channel doesn't exist", func() {}, false}, + }, nil}, + {"channel doesn't exist", func() {}, errorsmod.Wrap(types.ErrChannelNotFound, "")}, {"channel state is not INIT", func() { // create fully open channels on both chains path.Setup() - }, false}, + }, types.ErrInvalidChannelState}, {"connection not found", func() { path.SetupConnections() path.SetChannelOrdered() @@ -272,7 +277,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channel := path.EndpointA.GetChannel() channel.ConnectionHops[0] = doesnotexist suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, channel) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"connection is not OPEN", func() { path.SetupClients() @@ -284,7 +289,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { err = path.EndpointA.ChanOpenInit() suite.Require().NoError(err) - }, false}, + }, connectiontypes.ErrInvalidConnectionState}, {"consensus state not found", func() { path.SetupConnections() path.SetChannelOrdered() @@ -296,7 +301,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { suite.Require().NoError(err) heightDiff = 3 // consensus state doesn't exist at this height - }, false}, + }, ibcerrors.ErrInvalidHeight}, {"invalid counterparty channel identifier", func() { path.SetupConnections() path.SetChannelOrdered() @@ -308,7 +313,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { suite.Require().NoError(err) counterpartyChannelID = "otheridentifier" - }, false}, + }, commitmenttypes.ErrInvalidProof}, {"channel verification failed", func() { // chainB is INIT, chainA in TRYOPEN path.SetupConnections() @@ -319,7 +324,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { err = path.EndpointA.ChanOpenTry() suite.Require().NoError(err) - }, false}, + }, types.ErrInvalidChannelState}, } for _, tc := range testCases { @@ -350,10 +355,11 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { proof, malleateHeight(proofHeight, heightDiff), ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -380,12 +386,12 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { err = path.EndpointA.ChanOpenAck() suite.Require().NoError(err) - }, true}, - {"channel doesn't exist", func() {}, false}, + }, nil}, + {"channel doesn't exist", func() {}, types.ErrChannelNotFound}, {"channel state is not TRYOPEN", func() { // create fully open channels on both chains path.Setup() - }, false}, + }, types.ErrInvalidChannelState}, {"connection not found", func() { path.SetupConnections() path.SetChannelOrdered() @@ -403,13 +409,13 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channel := path.EndpointB.GetChannel() channel.ConnectionHops[0] = doesnotexist suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, channel) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"connection is not OPEN", func() { path.SetupClients() err := path.EndpointB.ConnOpenInit() suite.Require().NoError(err) - }, false}, + }, types.ErrChannelNotFound}, {"consensus state not found", func() { path.SetupConnections() path.SetChannelOrdered() @@ -424,7 +430,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { suite.Require().NoError(err) heightDiff = 3 - }, false}, + }, ibcerrors.ErrInvalidHeight}, {"channel verification failed", func() { // chainA is INIT, chainB in TRYOPEN path.SetupConnections() @@ -435,7 +441,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { err = path.EndpointB.ChanOpenTry() suite.Require().NoError(err) - }, false}, + }, commitmenttypes.ErrInvalidProof}, } for _, tc := range testCases { @@ -462,10 +468,11 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { proof, malleateHeight(proofHeight, heightDiff), ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -482,7 +489,7 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { testCases := []testCase{ {"success", func() { path.Setup() - }, true}, + }, nil}, {"channel doesn't exist", func() { // any non-nil values work for connections path.EndpointA.ConnectionID = ibctesting.FirstConnectionID @@ -490,13 +497,13 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { path.EndpointA.ChannelID = ibctesting.FirstChannelID path.EndpointB.ChannelID = ibctesting.FirstChannelID - }, false}, + }, types.ErrChannelNotFound}, {"channel state is CLOSED", func() { path.Setup() // close channel path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) - }, false}, + }, types.ErrInvalidChannelState}, {"connection not found", func() { path.Setup() @@ -504,7 +511,7 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { channel := path.EndpointA.GetChannel() channel.ConnectionHops[0] = doesnotexist suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, channel) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"connection is not OPEN", func() { path.SetupClients() @@ -515,10 +522,10 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { path.SetChannelOrdered() err = path.EndpointA.ChanOpenInit() suite.Require().NoError(err) - }, false}, + }, connectiontypes.ErrInvalidConnectionState}, { - msg: "unauthorized client", - expPass: false, + msg: "unauthorized client", + expErr: clienttypes.ErrClientNotActive, malleate: func() { path.Setup() @@ -544,11 +551,12 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) suite.Require().Contains(err.Error(), expErrorMsgSubstring) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -568,7 +576,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { {"success", func() { path.Setup() path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) - }, true}, + }, nil}, {"success with upgrade info", func() { path.Setup() @@ -588,17 +596,17 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { path.EndpointB.SetChannelUpgrade(upgrade) path.EndpointB.SetChannelCounterpartyUpgrade(counterpartyUpgrade) - }, true}, + }, nil}, {"channel doesn't exist", func() { // any non-nil values work for connections path.EndpointA.ChannelID = ibctesting.FirstChannelID path.EndpointB.ChannelID = ibctesting.FirstChannelID - }, false}, + }, errorsmod.Wrap(types.ErrChannelNotFound, "")}, {"channel state is CLOSED", func() { path.Setup() path.EndpointB.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) - }, false}, + }, types.ErrInvalidChannelState}, {"connection not found", func() { path.Setup() @@ -606,7 +614,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { channel := path.EndpointB.GetChannel() channel.ConnectionHops[0] = doesnotexist suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, channel) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"connection is not OPEN", func() { path.SetupClients() @@ -617,18 +625,18 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { path.SetChannelOrdered() err = path.EndpointB.ChanOpenInit() suite.Require().NoError(err) - }, false}, + }, connectiontypes.ErrInvalidConnectionState}, {"consensus state not found", func() { path.Setup() path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) heightDiff = 3 - }, false}, + }, ibcerrors.ErrInvalidHeight}, {"channel verification failed", func() { // channel not closed path.Setup() - }, false}, + }, ibcerrors.ErrInvalidHeight}, { "failure: invalid counterparty upgrade sequence", func() { @@ -641,7 +649,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) }, - false, + commitmenttypes.ErrInvalidProof, }, } @@ -664,7 +672,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { proof, malleateHeight(proofHeight, heightDiff), counterpartyUpgradeSequence, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) // if the channel closed during an upgrade, there should not be any upgrade information @@ -674,6 +682,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { suite.Require().False(found) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index fd67c891833..35ee0451afa 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -391,7 +391,7 @@ func (k *Keeper) GetAllPacketCommitments(ctx context.Context) (commitments []typ return commitments } -// IteratePacketCommitmentAtChannel provides an iterator over all PacketCommmitment objects +// IteratePacketCommitmentAtChannel provides an iterator over all PacketCommitment objects // at a specified channel. For each packet commitment, cb will be called. If the cb returns // true, the iterator will close and stop. func (k *Keeper) IteratePacketCommitmentAtChannel(ctx context.Context, portID, channelID string, cb func(_, _ string, sequence uint64, hash []byte) bool) { diff --git a/modules/core/04-channel/keeper/keeper_test.go b/modules/core/04-channel/keeper/keeper_test.go index c6014805af6..c323e29457c 100644 --- a/modules/core/04-channel/keeper/keeper_test.go +++ b/modules/core/04-channel/keeper/keeper_test.go @@ -8,6 +8,8 @@ import ( testifysuite "github.com/stretchr/testify/suite" + errorsmod "cosmossdk.io/errors" + transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" @@ -502,14 +504,14 @@ func (suite *KeeperTestSuite) TestDefaultSetParams() { // TestParams tests that Param setting and retrieval works properly func (suite *KeeperTestSuite) TestParams() { testCases := []struct { - name string - input types.Params - expPass bool + name string + input types.Params + expErr error }{ - {"success: set default params", types.DefaultParams(), true}, - {"success: zero timeout height", types.NewParams(types.NewTimeout(clienttypes.ZeroHeight(), 10000)), true}, - {"fail: zero timeout timestamp", types.NewParams(types.NewTimeout(clienttypes.NewHeight(1, 1000), 0)), false}, - {"fail: zero timeout", types.NewParams(types.NewTimeout(clienttypes.ZeroHeight(), 0)), false}, + {"success: set default params", types.DefaultParams(), nil}, + {"success: zero timeout height", types.NewParams(types.NewTimeout(clienttypes.ZeroHeight(), 10000)), nil}, + {"fail: zero timeout timestamp", types.NewParams(types.NewTimeout(clienttypes.NewHeight(1, 1000), 0)), errorsmod.Wrapf(types.ErrInvalidUpgradeTimeout, "upgrade timeout height must be zero. ")}, + {"fail: zero timeout", types.NewParams(types.NewTimeout(clienttypes.ZeroHeight(), 0)), errorsmod.Wrapf(types.ErrInvalidUpgradeTimeout, "upgrade timeout height must be zero.")}, } for _, tc := range testCases { @@ -520,13 +522,14 @@ func (suite *KeeperTestSuite) TestParams() { ctx := suite.chainA.GetContext() err := tc.input.Validate() suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.SetParams(ctx, tc.input) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) expected := tc.input p := suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.GetParams(ctx) suite.Require().Equal(expected, p) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -915,7 +918,7 @@ func (suite *KeeperTestSuite) UpgradeChannel(path *ibctesting.Path, upgradeField suite.Require().NoError(err) } -// sendMockPacket sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle) +// sendMockPackets sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle) // if acknowledge is true. If acknowledge is false, then the packet will be sent, but timed out. // Question(jim): find a nicer home for this? func (suite *KeeperTestSuite) sendMockPackets(path *ibctesting.Path, numPackets int, acknowledge bool) { diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index bef2fd5b8bb..38fb54b2ad3 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "fmt" - "cosmossdk.io/errors" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,12 +45,12 @@ func (suite *KeeperTestSuite) TestSendPacket() { {"success: UNORDERED channel", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID - }, true}, + }, nil}, {"success: ORDERED channel", func() { path.SetChannelOrdered() path.Setup() sourceChannel = path.EndpointA.ChannelID - }, true}, + }, nil}, {"success with solomachine: UNORDERED channel", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID @@ -60,7 +60,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.EndpointA.ClientID = clienttypes.FormatClientIdentifier(exported.Solomachine, 10) path.EndpointA.SetClientState(solomachine.ClientState()) path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.ClientId = path.EndpointA.ClientID }) - }, true}, + }, nil}, {"success with solomachine: ORDERED channel", func() { path.SetChannelOrdered() path.Setup() @@ -72,50 +72,50 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.EndpointA.SetClientState(solomachine.ClientState()) path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.ClientId = path.EndpointA.ClientID }) - }, true}, + }, nil}, {"packet basic validation failed, empty packet data", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID packetData = []byte{} - }, false}, + }, types.ErrInvalidPacket}, {"channel not found", func() { // use wrong channel naming path.Setup() sourceChannel = ibctesting.InvalidID - }, false}, + }, types.ErrChannelNotFound}, {"channel is in CLOSED state", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) - }, false}, + }, types.ErrInvalidChannelState}, {"channel is in INIT state", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.INIT }) - }, false}, + }, types.ErrInvalidChannelState}, {"channel is in TRYOPEN stage", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.TRYOPEN }) - }, false}, + }, types.ErrInvalidChannelState}, {"connection not found", func() { // pass channel check path.Setup() sourceChannel = path.EndpointA.ChannelID path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.ConnectionHops[0] = "invalid-connection" }) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"client state not found", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID // change connection client ID path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.ClientId = ibctesting.InvalidID }) - }, false}, + }, clienttypes.ErrClientNotActive}, {"client state is frozen", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID @@ -128,7 +128,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { // freeze client cs.FrozenHeight = clienttypes.NewHeight(0, 1) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), connection.ClientId, cs) - }, false}, + }, clienttypes.ErrClientNotActive}, {"client state zero height", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID @@ -144,7 +144,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { cs.LatestHeight = clienttypes.ZeroHeight() suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), connection.ClientId, cs) - }, false}, + }, clienttypes.ErrInvalidHeight}, {"timeout height passed", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID @@ -152,7 +152,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { var ok bool timeoutHeight, ok = path.EndpointA.GetClientLatestHeight().(clienttypes.Height) suite.Require().True(ok) - }, false}, + }, types.ErrTimeoutElapsed}, {"timeout timestamp passed", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID @@ -163,7 +163,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { timeoutHeight = disabledTimeoutHeight timeoutTimestamp = timestamp - }, false}, + }, types.ErrTimeoutElapsed}, {"timeout timestamp passed with solomachine", func() { path.Setup() // swap client with solomachine @@ -180,7 +180,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { sourceChannel = path.EndpointA.ChannelID timeoutHeight = disabledTimeoutHeight timeoutTimestamp = timestamp - }, false}, + }, types.ErrTimeoutElapsed}, {"next sequence send not found", func() { path := ibctesting.NewPath(suite.chainA, suite.chainB) sourceChannel = path.EndpointA.ChannelID @@ -192,7 +192,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{path.EndpointA.ConnectionID}, path.EndpointA.ChannelConfig.Version), ) - }, false}, + }, errorsmod.Wrap(types.ErrSequenceSendNotFound, "")}, { "channel is in FLUSH_COMPLETE state", func() { @@ -201,7 +201,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.FLUSHCOMPLETE }) }, - false, + types.ErrInvalidChannelState, }, { "channel is in FLUSHING state", @@ -217,7 +217,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { err = path.EndpointA.ChanUpgradeTry() suite.Require().NoError(err) }, - false, + types.ErrChannelNotFound, }, } @@ -243,13 +243,14 @@ func (suite *KeeperTestSuite) TestSendPacket() { sequence, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.SendPacket(suite.chainA.GetContext(), sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetData) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) // verify that the returned sequence matches expected value suite.Require().True(ok) suite.Require().Equal(expectedSequence, sequence, "send packet did not return the expected sequence of the outgoing packet") } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -637,7 +638,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) ack = ibcmock.MockAcknowledgement }, - true, + nil, }, { "success: channel flushing", @@ -648,7 +649,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { path.EndpointB.UpdateChannel(func(channel *types.Channel) { channel.State = types.FLUSHING }) }, - true, + nil, }, { "success: channel flush complete", @@ -659,21 +660,21 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { path.EndpointB.UpdateChannel(func(channel *types.Channel) { channel.State = types.FLUSHCOMPLETE }) }, - true, + nil, }, {"channel not found", func() { // use wrong channel naming path.Setup() packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) ack = ibcmock.MockAcknowledgement - }, false}, + }, types.ErrChannelNotFound}, {"channel not open", func() { path.Setup() packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) ack = ibcmock.MockAcknowledgement path.EndpointB.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) - }, false}, + }, types.ErrInvalidChannelState}, { "no-op, already acked", func() { @@ -682,7 +683,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { ack = ibcmock.MockAcknowledgement suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetPacketAcknowledgement(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), ack.Acknowledgement()) }, - false, + types.ErrAcknowledgementExists, }, { "empty acknowledgement", @@ -691,7 +692,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) ack = ibcmock.NewEmptyAcknowledgement() }, - false, + errorsmod.Wrap(types.ErrInvalidAcknowledgement, ""), }, { "acknowledgement is nil", @@ -700,7 +701,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) ack = nil }, - false, + errorsmod.Wrap(types.ErrInvalidAcknowledgement, ""), }, { "packet already received", @@ -715,7 +716,7 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { // set recv seq start to indicate packet was processed in previous upgrade suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetRecvStartSequence(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sequence+1) }, - false, + errorsmod.Wrap(types.ErrPacketReceived, ""), }, } for i, tc := range testCases { @@ -728,10 +729,11 @@ func (suite *KeeperTestSuite) TestWriteAcknowledgement() { err := suite.chainB.App.GetIBCKeeper().ChannelKeeper.WriteAcknowledgement(suite.chainB.GetContext(), packet, ack) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -745,7 +747,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { ack = ibcmock.MockAcknowledgement ) - assertErr := func(errType *errors.Error) func(commitment []byte, channelVersion string, err error) { + assertErr := func(errType *errorsmod.Error) func(commitment []byte, channelVersion string, err error) { return func(commitment []byte, channelVersion string, err error) { suite.Require().Error(err) suite.Require().ErrorIs(err, errType) diff --git a/modules/core/04-channel/keeper/timeout_test.go b/modules/core/04-channel/keeper/timeout_test.go index dd24156f35c..463011f1a3d 100644 --- a/modules/core/04-channel/keeper/timeout_test.go +++ b/modules/core/04-channel/keeper/timeout_test.go @@ -13,7 +13,9 @@ import ( clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v9/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v9/testing" "github.com/cosmos/ibc-go/v9/testing/mock" @@ -46,7 +48,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, true}, + }, nil}, {"success: UNORDERED", func() { ordered = false path.Setup() @@ -59,7 +61,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { // need to update chainA's client representing chainB to prove missing ack err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, true}, + }, nil}, {"packet already timed out: ORDERED", func() { expError = types.ErrNoOpMsg ordered = true @@ -78,7 +80,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrNoOpMsg, "")}, {"packet already timed out: UNORDERED", func() { expError = types.ErrNoOpMsg ordered = false @@ -95,25 +97,25 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.TimeoutPacket(packet) suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrNoOpMsg, "")}, {"channel not found", func() { expError = types.ErrChannelNotFound // use wrong channel naming path.Setup() packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, types.ErrChannelNotFound}, {"packet destination port ≠ channel counterparty port", func() { expError = types.ErrInvalidPacket path.Setup() // use wrong port for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"packet destination channel ID ≠ channel counterparty channel ID", func() { expError = types.ErrInvalidPacket path.Setup() // use wrong channel for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"connection not found", func() { expError = connectiontypes.ErrConnectionNotFound // pass channel check @@ -123,7 +125,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{connIDA}, path.EndpointA.ChannelConfig.Version), ) packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"timeout", func() { expError = types.ErrTimeoutNotReached path.Setup() @@ -132,7 +134,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrTimeoutNotReached, "")}, {"packet already received ", func() { expError = types.ErrPacketReceived ordered = true @@ -147,7 +149,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, timeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrPacketReceived, "")}, {"packet hasn't been sent", func() { expError = types.ErrNoOpMsg ordered = true @@ -157,7 +159,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) err := path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(types.ErrNoOpMsg, "")}, {"next seq receive verification failed", func() { // skip error check, error occurs in light-clients @@ -174,7 +176,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "")}, {"packet ack verification failed", func() { // skip error check, error occurs in light-clients @@ -190,7 +192,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) err = path.EndpointA.UpdateClient() suite.Require().NoError(err) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "")}, } for _, tc := range testCases { @@ -221,11 +223,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { channelVersion, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutPacket(suite.chainA.GetContext(), packet, proof, proofHeight, nextSeqRecv) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) suite.Require().Equal("", channelVersion) // only check if expError is set, since not all error codes can be known if expError != nil { @@ -533,7 +536,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) - }, true}, + }, nil}, {"success: UNORDERED", func() { ordered = false path.Setup() @@ -548,22 +551,22 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) - }, true}, + }, nil}, {"channel not found", func() { // use wrong channel naming path.Setup() packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, types.ErrChannelNotFound}, {"packet dest port ≠ channel counterparty port", func() { path.Setup() // use wrong port for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"packet dest channel ID ≠ channel counterparty channel ID", func() { path.Setup() // use wrong channel for dest packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"connection not found", func() { // pass channel check suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel( @@ -572,13 +575,13 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{connIDA}, path.EndpointA.ChannelConfig.Version), ) packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, "")}, {"packet hasn't been sent ORDERED", func() { path.SetChannelOrdered() path.Setup() packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) - }, false}, + }, errorsmod.Wrap(types.ErrNoOpMsg, "")}, {"packet already received ORDERED", func() { path.SetChannelOrdered() nextSeqRecv = 2 @@ -596,7 +599,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"channel verification failed ORDERED", func() { ordered = true path.SetChannelOrdered() @@ -608,7 +611,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { sequence, err := path.EndpointA.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData) suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) - }, false}, + }, ibcerrors.ErrInvalidHeight}, {"next seq receive verification failed ORDERED", func() { // set ordered to false providing the wrong proof for ORDERED case ordered = false @@ -625,7 +628,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) - }, false}, + }, errorsmod.Wrap(types.ErrInvalidPacket, "")}, {"packet ack verification failed", func() { // set ordered to true providing the wrong proof for UNORDERED case ordered = true @@ -640,7 +643,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.Require().NoError(err) packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) - }, false}, + }, errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "")}, { "failure: invalid counterparty upgrade sequence", func() { @@ -665,7 +668,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, disabledTimeoutTimestamp) }, - false, + errorsmod.Wrap(commitmenttypes.ErrInvalidProof, ""), }, } @@ -703,12 +706,13 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { counterpartyUpgradeSequence, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion) } else { suite.Require().Error(err) suite.Require().Equal("", channelVersion) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index 8189e2d9bd8..8565f12a195 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -28,12 +28,12 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "success", func() {}, - true, + nil, }, { "success with later upgrade sequence", @@ -41,7 +41,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.UpgradeSequence = 4 }) expSequence = 5 }, - true, + nil, }, { "upgrade fields are identical to channel end", @@ -49,7 +49,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { channel := path.EndpointA.GetChannel() upgradeFields = types.NewUpgradeFields(channel.Ordering, channel.ConnectionHops, channel.Version) }, - false, + errorsmod.Wrapf(types.ErrInvalidUpgrade, "existing channel end is identical to proposed upgrade channel end: got {ORDER_UNORDERED [connection-0] mock-version}"), }, { "channel not found", @@ -57,21 +57,21 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { path.EndpointA.ChannelID = "invalid-channel" path.EndpointA.ChannelConfig.PortID = "invalid-port" }, - false, + errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (invalid-port) channel ID (invalid-channel)"), }, { "channel state is not in OPEN state", func() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.CLOSED }) }, - false, + errorsmod.Wrapf(types.ErrInvalidChannelState, "expected STATE_OPEN, got STATE_CLOSED"), }, { "proposed channel connection not found", func() { upgradeFields.ConnectionHops = []string{"connection-100"} }, - false, + errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "failed to retrieve connection: connection-100"), }, { "invalid proposed channel connection state", @@ -79,7 +79,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.State = connectiontypes.UNINITIALIZED }) upgradeFields.ConnectionHops = []string{"connection-100"} }, - false, + errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "failed to retrieve connection: connection-100"), }, } @@ -101,7 +101,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, upgradeFields, ) - if tc.expPass { + if tc.expErr == nil { ctx := suite.chainA.GetContext() suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.WriteUpgradeInitChannel(ctx, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, upgrade, upgrade.Fields.Version) channel := path.EndpointA.GetChannel() @@ -112,6 +112,7 @@ func (suite *KeeperTestSuite) TestChanUpgradeInit() { suite.Require().Equal(types.OPEN, channel.State) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -2309,14 +2310,14 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { tests := []struct { name string malleate func() - expPass bool + expErr error }{ { name: "change channel version", malleate: func() { proposedUpgrade.Version = mock.UpgradeVersion }, - expPass: true, + expErr: nil, }, { name: "change connection hops", @@ -2325,12 +2326,12 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { path.Setup() proposedUpgrade.ConnectionHops = []string{path.EndpointA.ConnectionID} }, - expPass: true, + expErr: nil, }, { name: "fails with unmodified fields", malleate: func() {}, - expPass: false, + expErr: errorsmod.Wrapf(types.ErrInvalidUpgrade, "existing channel end is identical to proposed upgrade channel end: got {ORDER_UNORDERED [connection-0] mock-version}"), }, { name: "fails when connection is not set", @@ -2339,14 +2340,14 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { kvStore := suite.chainA.GetContext().KVStore(storeKey) kvStore.Delete(host.ConnectionKey(ibctesting.FirstConnectionID)) }, - expPass: false, + expErr: errorsmod.Wrapf(types.ErrInvalidUpgrade, "existing channel end is identical to proposed upgrade channel end: got {ORDER_UNORDERED [connection-0] mock-version}"), }, { name: "fails when connection is not open", malleate: func() { path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.State = connectiontypes.UNINITIALIZED }) }, - expPass: false, + expErr: errorsmod.Wrapf(types.ErrInvalidUpgrade, "existing channel end is identical to proposed upgrade channel end: got {ORDER_UNORDERED [connection-0] mock-version}"), }, { name: "fails when connection versions do not exist", @@ -2358,7 +2359,7 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { c.Versions = []*connectiontypes.Version{} }) }, - expPass: false, + expErr: errorsmod.Wrapf(connectiontypes.ErrInvalidVersion, "single version must be negotiated on connection before opening channel, got: []"), }, { name: "fails when connection version does not support the new ordering", @@ -2370,7 +2371,7 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { c.Versions = []*connectiontypes.Version{connectiontypes.NewVersion("1", []string{"ORDER_ORDERED"})} }) }, - expPass: false, + expErr: errorsmod.Wrapf(connectiontypes.ErrInvalidVersion, "connection version identifier:\"1\" features:\"ORDER_ORDERED\" does not support channel ordering: ORDER_UNORDERED"), }, } @@ -2391,10 +2392,11 @@ func (suite *KeeperTestSuite) TestValidateUpgradeFields() { tc.malleate() err := suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper.ValidateSelfUpgradeFields(suite.chainA.GetContext(), *proposedUpgrade, existingChannel) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -2424,12 +2426,12 @@ func (suite *KeeperTestSuite) TestAbortUpgrade() { tests := []struct { name string malleate func() - expPass bool + expErr error }{ { name: "success", malleate: func() {}, - expPass: true, + expErr: nil, }, { name: "regular error", @@ -2438,21 +2440,21 @@ func (suite *KeeperTestSuite) TestAbortUpgrade() { // i.e. not an instance of `types.UpgradeError` upgradeError = types.ErrInvalidUpgrade }, - expPass: true, + expErr: nil, }, { name: "channel does not exist", malleate: func() { suite.chainA.DeleteKey(host.ChannelKey(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)) }, - expPass: false, + expErr: types.ErrChannelNotFound, }, { name: "fails with nil upgrade error", malleate: func() { upgradeError = nil }, - expPass: false, + expErr: types.ErrInvalidUpgradeError, }, } @@ -2476,7 +2478,7 @@ func (suite *KeeperTestSuite) TestAbortUpgrade() { tc.malleate() - if tc.expPass { + if tc.expErr == nil { ctx := suite.chainA.GetContext() diff --git a/modules/core/04-channel/types/acknowledgement_test.go b/modules/core/04-channel/types/acknowledgement_test.go index 01711327fb9..4354735392c 100644 --- a/modules/core/04-channel/types/acknowledgement_test.go +++ b/modules/core/04-channel/types/acknowledgement_test.go @@ -5,12 +5,20 @@ import ( errorsmod "cosmossdk.io/errors" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" + cmtstate "github.com/cometbft/cometbft/state" + "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" ) +const ( + gasUsed = uint64(100) + gasWanted = uint64(100) +) + // tests acknowledgement.ValidateBasic and acknowledgement.Acknowledgement -func (suite TypesTestSuite) TestAcknowledgement() { //nolint:govet // this is a test, we are okay with copying locks +func (suite *TypesTestSuite) TestAcknowledgement() { testCases := []struct { name string ack types.Acknowledgement @@ -83,6 +91,51 @@ func (suite TypesTestSuite) TestAcknowledgement() { //nolint:govet // this is a } } +// The safety of including ABCI error codes in the acknowledgement rests +// on the inclusion of these ABCI error codes in the abcitypes.ResponseDeliverTx +// 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 := errorsmod.Wrap(ibcerrors.ErrOutOfGas, "error string 1") + errSameABCICode := errorsmod.Wrap(ibcerrors.ErrOutOfGas, "error string 2") + + // different ABCI error code used + errDifferentABCICode := ibcerrors.ErrNotFound + + deliverTx := responseExecTxResultWithEvents(err, gasUsed, gasWanted, []abci.Event{}, false) + execTxResults := []*abci.ExecTxResult{deliverTx} + + deliverTxSameABCICode := responseExecTxResultWithEvents(errSameABCICode, gasUsed, gasWanted, []abci.Event{}, false) + resultsSameABCICode := []*abci.ExecTxResult{deliverTxSameABCICode} + + deliverTxDifferentABCICode := responseExecTxResultWithEvents(errDifferentABCICode, gasUsed, gasWanted, []abci.Event{}, false) + resultsDifferentABCICode := []*abci.ExecTxResult{deliverTxDifferentABCICode} + + hash := cmtstate.TxResultsHash(execTxResults) + hashSameABCICode := cmtstate.TxResultsHash(resultsSameABCICode) + hashDifferentABCICode := cmtstate.TxResultsHash(resultsDifferentABCICode) + + suite.Require().Equal(hash, hashSameABCICode) + suite.Require().NotEqual(hash, hashDifferentABCICode) +} + +// responseExecTxResultWithEvents returns an ABCI ExecTxResult object with fields +// filled in from the given error, gas values and events. +func responseExecTxResultWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) *abci.ExecTxResult { + space, code, log := errorsmod.ABCIInfo(err, debug) + return &abci.ExecTxResult{ + Codespace: space, + Code: code, + Log: log, + GasWanted: int64(gw), + GasUsed: int64(gu), + Events: events, + } +} + // TestAcknowledgementError will verify that only a constant string and // ABCI error code are used in constructing the acknowledgement error string func (suite *TypesTestSuite) TestAcknowledgementError() { @@ -101,7 +154,7 @@ func (suite *TypesTestSuite) TestAcknowledgementError() { suite.Require().NotEqual(ack, ackDifferentABCICode) } -func (suite TypesTestSuite) TestAcknowledgementWithCodespace() { //nolint:govet // this is a test, we are okay with copying locks +func (suite *TypesTestSuite) TestAcknowledgementWithCodespace() { testCases := []struct { name string ack types.Acknowledgement diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index 6f10573a41f..2263ee69c4e 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -603,134 +603,6 @@ func (m *Params) GetUpgradeTimeout() Timeout { return Timeout{} } -// Upgrade is a verifiable type which contains the relevant information -// for an attempted upgrade. It provides the proposed changes to the channel -// end, the timeout for this upgrade attempt and the next packet sequence -// which allows the counterparty to efficiently know the highest sequence it has received. -// The next sequence send is used for pruning and upgrading from unordered to ordered channels. -type Upgrade struct { - Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` - Timeout Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` - NextSequenceSend uint64 `protobuf:"varint,3,opt,name=next_sequence_send,json=nextSequenceSend,proto3" json:"next_sequence_send,omitempty"` -} - -func (m *Upgrade) Reset() { *m = Upgrade{} } -func (m *Upgrade) String() string { return proto.CompactTextString(m) } -func (*Upgrade) ProtoMessage() {} -func (*Upgrade) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{9} -} -func (m *Upgrade) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Upgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Upgrade.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 *Upgrade) XXX_Merge(src proto.Message) { - xxx_messageInfo_Upgrade.Merge(m, src) -} -func (m *Upgrade) XXX_Size() int { - return m.Size() -} -func (m *Upgrade) XXX_DiscardUnknown() { - xxx_messageInfo_Upgrade.DiscardUnknown(m) -} - -var xxx_messageInfo_Upgrade proto.InternalMessageInfo - -// UpgradeFields are the fields in a channel end which may be changed -// during a channel upgrade. -type UpgradeFields struct { - Ordering Order `protobuf:"varint,1,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"` - ConnectionHops []string `protobuf:"bytes,2,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (m *UpgradeFields) Reset() { *m = UpgradeFields{} } -func (m *UpgradeFields) String() string { return proto.CompactTextString(m) } -func (*UpgradeFields) ProtoMessage() {} -func (*UpgradeFields) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{10} -} -func (m *UpgradeFields) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpgradeFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpgradeFields.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 *UpgradeFields) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeFields.Merge(m, src) -} -func (m *UpgradeFields) XXX_Size() int { - return m.Size() -} -func (m *UpgradeFields) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeFields.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeFields proto.InternalMessageInfo - -// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the -// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the -// next sequence. -type ErrorReceipt struct { - // the channel upgrade sequence - Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` - // the error message detailing the cause of failure - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (m *ErrorReceipt) Reset() { *m = ErrorReceipt{} } -func (m *ErrorReceipt) String() string { return proto.CompactTextString(m) } -func (*ErrorReceipt) ProtoMessage() {} -func (*ErrorReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_c3a07336710636a0, []int{11} -} -func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ErrorReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ErrorReceipt.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 *ErrorReceipt) XXX_Merge(src proto.Message) { - xxx_messageInfo_ErrorReceipt.Merge(m, src) -} -func (m *ErrorReceipt) XXX_Size() int { - return m.Size() -} -func (m *ErrorReceipt) XXX_DiscardUnknown() { - xxx_messageInfo_ErrorReceipt.DiscardUnknown(m) -} - -var xxx_messageInfo_ErrorReceipt proto.InternalMessageInfo - func init() { proto.RegisterEnum("ibc.core.channel.v1.State", State_name, State_value) proto.RegisterEnum("ibc.core.channel.v1.Order", Order_name, Order_value) @@ -743,81 +615,71 @@ func init() { proto.RegisterType((*Acknowledgement)(nil), "ibc.core.channel.v1.Acknowledgement") proto.RegisterType((*Timeout)(nil), "ibc.core.channel.v1.Timeout") proto.RegisterType((*Params)(nil), "ibc.core.channel.v1.Params") - proto.RegisterType((*Upgrade)(nil), "ibc.core.channel.v1.Upgrade") - proto.RegisterType((*UpgradeFields)(nil), "ibc.core.channel.v1.UpgradeFields") - proto.RegisterType((*ErrorReceipt)(nil), "ibc.core.channel.v1.ErrorReceipt") } func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 1052 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x3a, 0xfe, 0xfb, 0x62, 0x3b, 0xdb, 0x09, 0x84, 0xd5, 0x2a, 0x38, 0x5b, 0x0b, 0x44, - 0x1a, 0xa8, 0xdd, 0x14, 0x84, 0x28, 0xe2, 0x40, 0xfe, 0x6c, 0x9a, 0xa5, 0xc1, 0x8e, 0xd6, 0xf6, - 0x81, 0x5e, 0xac, 0xcd, 0xee, 0xd4, 0x59, 0xd5, 0xde, 0x59, 0x76, 0xc6, 0x29, 0x15, 0x67, 0xa4, - 0xca, 0xa7, 0x7e, 0x01, 0x4b, 0x48, 0x7c, 0x05, 0xae, 0xdc, 0x7b, 0xec, 0xb1, 0x27, 0x84, 0x92, - 0xef, 0xc0, 0x19, 0xed, 0xcc, 0xac, 0xff, 0x44, 0x56, 0x28, 0x48, 0xdc, 0x38, 0x79, 0xde, 0xef, - 0xfd, 0xde, 0xef, 0xbd, 0x79, 0x6f, 0xf2, 0xb2, 0x70, 0xdb, 0x3f, 0x73, 0x1b, 0x2e, 0x89, 0x70, - 0xc3, 0x3d, 0x77, 0x82, 0x00, 0x0f, 0x1a, 0x17, 0xbb, 0xc9, 0xb1, 0x1e, 0x46, 0x84, 0x11, 0xb4, - 0xee, 0x9f, 0xb9, 0xf5, 0x98, 0x52, 0x4f, 0xf0, 0x8b, 0x5d, 0xfd, 0x9d, 0x3e, 0xe9, 0x13, 0xee, - 0x6f, 0xc4, 0x27, 0x41, 0xd5, 0xb7, 0x66, 0x6a, 0x03, 0x1f, 0x07, 0x8c, 0x8b, 0xf1, 0x93, 0x20, - 0xd4, 0x7e, 0x4d, 0x43, 0xfe, 0x40, 0xa8, 0xa0, 0x7b, 0x90, 0xa5, 0xcc, 0x61, 0x58, 0x53, 0x0c, - 0x65, 0xbb, 0x72, 0x5f, 0xaf, 0x2f, 0xc9, 0x53, 0x6f, 0xc7, 0x0c, 0x5b, 0x10, 0xd1, 0xe7, 0x50, - 0x20, 0x91, 0x87, 0x23, 0x3f, 0xe8, 0x6b, 0xe9, 0x1b, 0x82, 0x5a, 0x31, 0xc9, 0x9e, 0x72, 0xd1, - 0x23, 0x28, 0xb9, 0x64, 0x14, 0x30, 0x1c, 0x85, 0x4e, 0xc4, 0x9e, 0x6b, 0x2b, 0x86, 0xb2, 0xbd, - 0x7a, 0xff, 0xf6, 0xd2, 0xd8, 0x83, 0x39, 0xe2, 0x7e, 0xe6, 0xd5, 0xef, 0x5b, 0x29, 0x7b, 0x21, - 0x18, 0x7d, 0x04, 0x6b, 0x2e, 0x09, 0x02, 0xec, 0x32, 0x9f, 0x04, 0xbd, 0x73, 0x12, 0x52, 0x2d, - 0x63, 0xac, 0x6c, 0x17, 0xed, 0xca, 0x0c, 0x3e, 0x26, 0x21, 0x45, 0x1a, 0xe4, 0x2f, 0x70, 0x44, - 0x7d, 0x12, 0x68, 0x59, 0x43, 0xd9, 0x2e, 0xda, 0x89, 0x89, 0xee, 0x80, 0x3a, 0x0a, 0xfb, 0x91, - 0xe3, 0xe1, 0x1e, 0xc5, 0xdf, 0x8f, 0x70, 0xe0, 0x62, 0x2d, 0x67, 0x28, 0xdb, 0x19, 0x7b, 0x4d, - 0xe2, 0x6d, 0x09, 0x7f, 0x99, 0x79, 0xf1, 0xf3, 0x56, 0xaa, 0xf6, 0x67, 0x1a, 0x6e, 0x59, 0x1e, - 0x0e, 0x98, 0xff, 0xc4, 0xc7, 0xde, 0xff, 0x0d, 0x7c, 0x0f, 0xf2, 0x21, 0x89, 0x58, 0xcf, 0xf7, - 0x78, 0xdf, 0x8a, 0x76, 0x2e, 0x36, 0x2d, 0x0f, 0xbd, 0x0f, 0x20, 0x4b, 0x89, 0x7d, 0x79, 0xee, - 0x2b, 0x4a, 0xc4, 0xf2, 0x96, 0x36, 0xbe, 0x70, 0x53, 0xe3, 0x4f, 0xa0, 0x34, 0x7f, 0x9f, 0xf9, - 0xc4, 0xca, 0x0d, 0x89, 0xd3, 0xd7, 0x12, 0x4b, 0xb5, 0x37, 0x69, 0xc8, 0x9d, 0x3a, 0xee, 0x53, - 0xcc, 0x90, 0x0e, 0x85, 0x69, 0x05, 0x0a, 0xaf, 0x60, 0x6a, 0xa3, 0x2d, 0x58, 0xa5, 0x64, 0x14, - 0xb9, 0xb8, 0x17, 0x8b, 0x4b, 0x31, 0x10, 0xd0, 0x29, 0x89, 0x18, 0xfa, 0x10, 0x2a, 0x92, 0x20, - 0x33, 0xf0, 0x81, 0x14, 0xed, 0xb2, 0x40, 0x93, 0xf7, 0x71, 0x07, 0x54, 0x0f, 0x53, 0xe6, 0x07, - 0x0e, 0xef, 0x34, 0x17, 0xcb, 0x70, 0xe2, 0xda, 0x1c, 0xce, 0x15, 0x1b, 0xb0, 0x3e, 0x4f, 0x4d, - 0x64, 0x45, 0xdb, 0xd1, 0x9c, 0x2b, 0xd1, 0x46, 0x90, 0xf1, 0x1c, 0xe6, 0xf0, 0xf6, 0x97, 0x6c, - 0x7e, 0x46, 0x0f, 0xa1, 0xc2, 0xfc, 0x21, 0x26, 0x23, 0xd6, 0x3b, 0xc7, 0x7e, 0xff, 0x9c, 0xf1, - 0x01, 0xac, 0x2e, 0xbc, 0x31, 0xb1, 0x0c, 0x2e, 0x76, 0xeb, 0xc7, 0x9c, 0x21, 0x1f, 0x48, 0x59, - 0xc6, 0x09, 0x10, 0x7d, 0x0c, 0xb7, 0x12, 0xa1, 0xf8, 0x97, 0x32, 0x67, 0x18, 0xca, 0x39, 0xa9, - 0xd2, 0xd1, 0x49, 0x70, 0xd9, 0xda, 0x1f, 0x61, 0x55, 0x74, 0x96, 0xbf, 0xf7, 0x7f, 0x3b, 0xa7, - 0x85, 0xb1, 0xac, 0x5c, 0x1b, 0x4b, 0x72, 0xe5, 0xcc, 0xec, 0xca, 0x32, 0xb9, 0x07, 0x05, 0x91, - 0xdc, 0xf2, 0xfe, 0x8b, 0xcc, 0x32, 0x4b, 0x0b, 0xd6, 0xf6, 0xdc, 0xa7, 0x01, 0x79, 0x36, 0xc0, - 0x5e, 0x1f, 0x0f, 0x71, 0xc0, 0x90, 0x06, 0xb9, 0x08, 0xd3, 0xd1, 0x80, 0x69, 0xef, 0xc6, 0x45, - 0x1d, 0xa7, 0x6c, 0x69, 0xa3, 0x0d, 0xc8, 0xe2, 0x28, 0x22, 0x91, 0xb6, 0x11, 0x27, 0x3a, 0x4e, - 0xd9, 0xc2, 0xdc, 0x07, 0x28, 0x44, 0x98, 0x86, 0x24, 0xa0, 0xb8, 0xe6, 0x40, 0xbe, 0x23, 0xba, - 0x89, 0xbe, 0x80, 0x9c, 0x1c, 0x99, 0xf2, 0x96, 0x23, 0x93, 0x7c, 0xb4, 0x09, 0xc5, 0xd9, 0x8c, - 0xd2, 0xbc, 0xf0, 0x19, 0x50, 0xeb, 0xc6, 0x0f, 0x3e, 0x72, 0x86, 0x14, 0x3d, 0x82, 0xe4, 0x4f, - 0xac, 0x27, 0x47, 0x28, 0x53, 0x6d, 0x2e, 0xdd, 0x22, 0xb2, 0x30, 0x99, 0xac, 0x22, 0x43, 0x25, - 0x5a, 0xfb, 0x4d, 0x81, 0x7c, 0x57, 0x40, 0xe8, 0x6b, 0xc8, 0x3d, 0xf1, 0xf1, 0xc0, 0xa3, 0x52, - 0xaf, 0xb6, 0x54, 0x4f, 0xb2, 0x8f, 0x38, 0x33, 0xb9, 0x82, 0x88, 0x43, 0x5f, 0x41, 0x3e, 0x29, - 0x29, 0xfd, 0xd6, 0x25, 0x25, 0x21, 0xe8, 0x13, 0x40, 0x01, 0xfe, 0x81, 0x4d, 0x17, 0x4a, 0x8f, - 0xe2, 0xc0, 0x93, 0x23, 0x54, 0x63, 0x4f, 0xb2, 0x52, 0xda, 0x38, 0x48, 0x16, 0xc1, 0x4b, 0x05, - 0xca, 0x0b, 0x15, 0x2d, 0x6c, 0x66, 0xe5, 0x1f, 0x6c, 0xe6, 0x25, 0xcb, 0x34, 0xfd, 0x77, 0xcb, - 0x74, 0x65, 0x61, 0x99, 0xca, 0x92, 0xbe, 0x81, 0x92, 0x19, 0xbf, 0x10, 0x1b, 0xbb, 0xd8, 0x0f, - 0x6f, 0x5e, 0x50, 0x1a, 0xe4, 0x87, 0x98, 0x52, 0xa7, 0x8f, 0xe5, 0x3b, 0x4e, 0x4c, 0xa1, 0xb5, - 0xf3, 0x53, 0x1a, 0xb2, 0x6d, 0xf9, 0x0f, 0x67, 0xab, 0xdd, 0xd9, 0xeb, 0x98, 0xbd, 0x6e, 0xd3, - 0x6a, 0x5a, 0x1d, 0x6b, 0xef, 0xc4, 0x7a, 0x6c, 0x1e, 0xf6, 0xba, 0xcd, 0xf6, 0xa9, 0x79, 0x60, - 0x1d, 0x59, 0xe6, 0xa1, 0x9a, 0xd2, 0x6f, 0x8d, 0x27, 0x46, 0x79, 0x81, 0x80, 0x34, 0x00, 0x11, - 0x17, 0x83, 0xaa, 0xa2, 0x17, 0xc6, 0x13, 0x23, 0x13, 0x9f, 0x51, 0x15, 0xca, 0xc2, 0xd3, 0xb1, - 0xbf, 0x6b, 0x9d, 0x9a, 0x4d, 0x35, 0xad, 0xaf, 0x8e, 0x27, 0x46, 0x5e, 0x9a, 0xb3, 0x48, 0xee, - 0x5c, 0x11, 0x91, 0xdc, 0xb3, 0x09, 0x25, 0xe1, 0x39, 0x38, 0x69, 0xb5, 0xcd, 0x43, 0x35, 0xa3, - 0xc3, 0x78, 0x62, 0xe4, 0x84, 0x85, 0x0c, 0xa8, 0x08, 0xef, 0xd1, 0x49, 0xb7, 0x7d, 0x6c, 0x35, - 0x1f, 0xaa, 0x59, 0xbd, 0x34, 0x9e, 0x18, 0x85, 0xc4, 0x46, 0x3b, 0xb0, 0x3e, 0xc7, 0x38, 0x68, - 0x7d, 0x7b, 0x7a, 0x62, 0x76, 0x4c, 0x35, 0x27, 0xea, 0x5f, 0x00, 0xf5, 0xcc, 0x8b, 0x5f, 0xaa, - 0xa9, 0x9d, 0x67, 0x90, 0xe5, 0xf3, 0x42, 0x1f, 0xc0, 0x46, 0xcb, 0x3e, 0x34, 0xed, 0x5e, 0xb3, - 0xd5, 0x34, 0xaf, 0xdd, 0x9e, 0x17, 0x18, 0xe3, 0xa8, 0x06, 0x6b, 0x82, 0xd5, 0x6d, 0xf2, 0x5f, - 0xf3, 0x50, 0x55, 0xf4, 0xf2, 0x78, 0x62, 0x14, 0xa7, 0x40, 0x7c, 0x7d, 0xc1, 0x49, 0x18, 0xf2, - 0xfa, 0xd2, 0x14, 0x89, 0xf7, 0xdb, 0xaf, 0x2e, 0xab, 0xca, 0xeb, 0xcb, 0xaa, 0xf2, 0xc7, 0x65, - 0x55, 0x79, 0x79, 0x55, 0x4d, 0xbd, 0xbe, 0xaa, 0xa6, 0xde, 0x5c, 0x55, 0x53, 0x8f, 0x1f, 0xf4, - 0x7d, 0x76, 0x3e, 0x3a, 0xab, 0xbb, 0x64, 0xd8, 0x70, 0x09, 0x1d, 0x12, 0xda, 0xf0, 0xcf, 0xdc, - 0xbb, 0x7d, 0xd2, 0xb8, 0x78, 0xd0, 0x18, 0x12, 0x6f, 0x34, 0xc0, 0x54, 0x7c, 0xc1, 0xdd, 0xfb, - 0xec, 0x6e, 0xf2, 0x49, 0xc8, 0x9e, 0x87, 0x98, 0x9e, 0xe5, 0xf8, 0x27, 0xdc, 0xa7, 0x7f, 0x05, - 0x00, 0x00, 0xff, 0xff, 0xb8, 0x38, 0xb6, 0xd2, 0x33, 0x0a, 0x00, 0x00, + // 937 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xe2, 0xc6, + 0x1b, 0xc6, 0xc4, 0xfc, 0x7b, 0x93, 0x80, 0x33, 0xf9, 0xfd, 0x52, 0xcb, 0x4a, 0xc1, 0x8b, 0x5a, + 0x95, 0x4d, 0xb5, 0xb0, 0xd9, 0x56, 0x55, 0xb7, 0xb7, 0x04, 0xbc, 0x8b, 0xb5, 0x14, 0x90, 0x81, + 0x43, 0xf7, 0x82, 0x8c, 0x3d, 0x05, 0x6b, 0xc1, 0x43, 0xed, 0x81, 0xd5, 0xaa, 0xe7, 0x4a, 0x2b, + 0x4e, 0xfd, 0x02, 0x48, 0x95, 0xfa, 0x15, 0xfa, 0x21, 0xf6, 0xb8, 0xc7, 0x3d, 0x55, 0x55, 0xf2, + 0x1d, 0x7a, 0xae, 0x3c, 0x33, 0x0e, 0x10, 0x45, 0x51, 0x55, 0xa9, 0xb7, 0x9e, 0x98, 0xf7, 0x79, + 0x9f, 0xf7, 0x7d, 0xde, 0x3f, 0xc3, 0xc8, 0xf0, 0xc0, 0x1b, 0x39, 0x35, 0x87, 0x04, 0xb8, 0xe6, + 0x4c, 0x6c, 0xdf, 0xc7, 0xd3, 0xda, 0xf2, 0x3c, 0x3e, 0x56, 0xe7, 0x01, 0xa1, 0x04, 0x1d, 0x7b, + 0x23, 0xa7, 0x1a, 0x51, 0xaa, 0x31, 0xbe, 0x3c, 0xd7, 0xfe, 0x37, 0x26, 0x63, 0xc2, 0xfc, 0xb5, + 0xe8, 0xc4, 0xa9, 0x5a, 0x69, 0x93, 0x6d, 0xea, 0x61, 0x9f, 0xb2, 0x64, 0xec, 0xc4, 0x09, 0xe5, + 0xdf, 0x92, 0x90, 0xa9, 0xf3, 0x2c, 0xe8, 0x31, 0xa4, 0x42, 0x6a, 0x53, 0xac, 0x4a, 0xba, 0x54, + 0xc9, 0x3f, 0xd1, 0xaa, 0x77, 0xe8, 0x54, 0x7b, 0x11, 0xc3, 0xe2, 0x44, 0xf4, 0x15, 0x64, 0x49, + 0xe0, 0xe2, 0xc0, 0xf3, 0xc7, 0x6a, 0xf2, 0x9e, 0xa0, 0x4e, 0x44, 0xb2, 0x6e, 0xb8, 0xe8, 0x05, + 0x1c, 0x38, 0x64, 0xe1, 0x53, 0x1c, 0xcc, 0xed, 0x80, 0xbe, 0x51, 0xf7, 0x74, 0xa9, 0xb2, 0xff, + 0xe4, 0xc1, 0x9d, 0xb1, 0xf5, 0x2d, 0xe2, 0xa5, 0xfc, 0xee, 0xf7, 0x52, 0xc2, 0xda, 0x09, 0x46, + 0x9f, 0x41, 0xc1, 0x21, 0xbe, 0x8f, 0x1d, 0xea, 0x11, 0x7f, 0x38, 0x21, 0xf3, 0x50, 0x95, 0xf5, + 0xbd, 0x4a, 0xce, 0xca, 0x6f, 0xe0, 0x26, 0x99, 0x87, 0x48, 0x85, 0xcc, 0x12, 0x07, 0xa1, 0x47, + 0x7c, 0x35, 0xa5, 0x4b, 0x95, 0x9c, 0x15, 0x9b, 0xe8, 0x21, 0x28, 0x8b, 0xf9, 0x38, 0xb0, 0x5d, + 0x3c, 0x0c, 0xf1, 0x0f, 0x0b, 0xec, 0x3b, 0x58, 0x4d, 0xeb, 0x52, 0x45, 0xb6, 0x0a, 0x02, 0xef, + 0x09, 0xf8, 0x1b, 0xf9, 0xed, 0x2f, 0xa5, 0x44, 0xf9, 0xcf, 0x24, 0x1c, 0x99, 0x2e, 0xf6, 0xa9, + 0xf7, 0xbd, 0x87, 0xdd, 0xff, 0x06, 0xf8, 0x11, 0x64, 0xe6, 0x24, 0xa0, 0x43, 0xcf, 0x65, 0x73, + 0xcb, 0x59, 0xe9, 0xc8, 0x34, 0x5d, 0xf4, 0x31, 0x80, 0x28, 0x25, 0xf2, 0x65, 0x98, 0x2f, 0x27, + 0x10, 0xd3, 0xbd, 0x73, 0xf0, 0xd9, 0xfb, 0x06, 0xdf, 0x82, 0x83, 0xed, 0x7e, 0xb6, 0x85, 0xa5, + 0x7b, 0x84, 0x93, 0xb7, 0x84, 0x45, 0xb6, 0x0f, 0x49, 0x48, 0x77, 0x6d, 0xe7, 0x15, 0xa6, 0x48, + 0x83, 0xec, 0x4d, 0x05, 0x12, 0xab, 0xe0, 0xc6, 0x46, 0x25, 0xd8, 0x0f, 0xc9, 0x22, 0x70, 0xf0, + 0x30, 0x4a, 0x2e, 0x92, 0x01, 0x87, 0xba, 0x24, 0xa0, 0xe8, 0x53, 0xc8, 0x0b, 0x82, 0x50, 0x60, + 0x0b, 0xc9, 0x59, 0x87, 0x1c, 0x8d, 0xef, 0xc7, 0x43, 0x50, 0x5c, 0x1c, 0x52, 0xcf, 0xb7, 0xd9, + 0xa4, 0x59, 0x32, 0x99, 0x11, 0x0b, 0x5b, 0x38, 0xcb, 0x58, 0x83, 0xe3, 0x6d, 0x6a, 0x9c, 0x96, + 0x8f, 0x1d, 0x6d, 0xb9, 0xe2, 0xdc, 0x08, 0x64, 0xd7, 0xa6, 0x36, 0x1b, 0xff, 0x81, 0xc5, 0xce, + 0xe8, 0x39, 0xe4, 0xa9, 0x37, 0xc3, 0x64, 0x41, 0x87, 0x13, 0xec, 0x8d, 0x27, 0x94, 0x2d, 0x60, + 0x7f, 0xe7, 0x8e, 0xf1, 0xc7, 0x60, 0x79, 0x5e, 0x6d, 0x32, 0x86, 0xb8, 0x20, 0x87, 0x22, 0x8e, + 0x83, 0xe8, 0x73, 0x38, 0x8a, 0x13, 0x45, 0xbf, 0x21, 0xb5, 0x67, 0x73, 0xb1, 0x27, 0x45, 0x38, + 0xfa, 0x31, 0x2e, 0x46, 0xfb, 0x23, 0xec, 0xf3, 0xc9, 0xb2, 0xfb, 0xfe, 0x4f, 0xf7, 0xb4, 0xb3, + 0x96, 0xbd, 0x5b, 0x6b, 0x89, 0x5b, 0x96, 0x37, 0x2d, 0x0b, 0x71, 0x17, 0xb2, 0x5c, 0xdc, 0x74, + 0xff, 0x0d, 0x65, 0xa1, 0xd2, 0x81, 0xc2, 0x85, 0xf3, 0xca, 0x27, 0xaf, 0xa7, 0xd8, 0x1d, 0xe3, + 0x19, 0xf6, 0x29, 0x52, 0x21, 0x1d, 0xe0, 0x70, 0x31, 0xa5, 0xea, 0xff, 0xa3, 0xa2, 0x9a, 0x09, + 0x4b, 0xd8, 0xe8, 0x04, 0x52, 0x38, 0x08, 0x48, 0xa0, 0x9e, 0x44, 0x42, 0xcd, 0x84, 0xc5, 0xcd, + 0x4b, 0x80, 0x6c, 0x80, 0xc3, 0x39, 0xf1, 0x43, 0x5c, 0xb6, 0x21, 0xd3, 0xe7, 0xd3, 0x44, 0x5f, + 0x43, 0x5a, 0xac, 0x4c, 0xfa, 0x9b, 0x2b, 0x13, 0x7c, 0x74, 0x0a, 0xb9, 0xcd, 0x8e, 0x92, 0xac, + 0xf0, 0x0d, 0x50, 0x1e, 0x44, 0x17, 0x3e, 0xb0, 0x67, 0x21, 0x7a, 0x01, 0xf1, 0x5f, 0x6c, 0x28, + 0x56, 0x28, 0xa4, 0x4e, 0xef, 0x7c, 0x45, 0x44, 0x61, 0x42, 0x2c, 0x2f, 0x42, 0x05, 0x7a, 0xf6, + 0x53, 0x12, 0x52, 0x3d, 0xf1, 0xa2, 0x95, 0x7a, 0xfd, 0x8b, 0xbe, 0x31, 0x1c, 0xb4, 0xcd, 0xb6, + 0xd9, 0x37, 0x2f, 0x5a, 0xe6, 0x4b, 0xa3, 0x31, 0x1c, 0xb4, 0x7b, 0x5d, 0xa3, 0x6e, 0x3e, 0x33, + 0x8d, 0x86, 0x92, 0xd0, 0x8e, 0x56, 0x6b, 0xfd, 0x70, 0x87, 0x80, 0x54, 0x00, 0x1e, 0x17, 0x81, + 0x8a, 0xa4, 0x65, 0x57, 0x6b, 0x5d, 0x8e, 0xce, 0xa8, 0x08, 0x87, 0xdc, 0xd3, 0xb7, 0xbe, 0xeb, + 0x74, 0x8d, 0xb6, 0x92, 0xd4, 0xf6, 0x57, 0x6b, 0x3d, 0x23, 0xcc, 0x4d, 0x24, 0x73, 0xee, 0xf1, + 0x48, 0xe6, 0x39, 0x85, 0x03, 0xee, 0xa9, 0xb7, 0x3a, 0x3d, 0xa3, 0xa1, 0xc8, 0x1a, 0xac, 0xd6, + 0x7a, 0x9a, 0x5b, 0x48, 0x87, 0x3c, 0xf7, 0x3e, 0x6b, 0x0d, 0x7a, 0x4d, 0xb3, 0xfd, 0x5c, 0x49, + 0x69, 0x07, 0xab, 0xb5, 0x9e, 0x8d, 0x6d, 0x74, 0x06, 0xc7, 0x5b, 0x8c, 0x7a, 0xe7, 0xdb, 0x6e, + 0xcb, 0xe8, 0x1b, 0x4a, 0x9a, 0xd7, 0xbf, 0x03, 0x6a, 0xf2, 0xdb, 0x5f, 0x8b, 0x89, 0xb3, 0xd7, + 0x90, 0x62, 0x4f, 0x35, 0xfa, 0x04, 0x4e, 0x3a, 0x56, 0xc3, 0xb0, 0x86, 0xed, 0x4e, 0xdb, 0xb8, + 0xd5, 0x3d, 0x2b, 0x30, 0xc2, 0x51, 0x19, 0x0a, 0x9c, 0x35, 0x68, 0xb3, 0x5f, 0xa3, 0xa1, 0x48, + 0xda, 0xe1, 0x6a, 0xad, 0xe7, 0x6e, 0x80, 0xa8, 0x7d, 0xce, 0x89, 0x19, 0xa2, 0x7d, 0x61, 0x72, + 0xe1, 0xcb, 0xde, 0xbb, 0xab, 0xa2, 0xf4, 0xfe, 0xaa, 0x28, 0xfd, 0x71, 0x55, 0x94, 0x7e, 0xbe, + 0x2e, 0x26, 0xde, 0x5f, 0x17, 0x13, 0x1f, 0xae, 0x8b, 0x89, 0x97, 0x4f, 0xc7, 0x1e, 0x9d, 0x2c, + 0x46, 0x55, 0x87, 0xcc, 0x6a, 0x0e, 0x09, 0x67, 0x24, 0xac, 0x79, 0x23, 0xe7, 0xd1, 0x98, 0xd4, + 0x96, 0x4f, 0x6b, 0x33, 0xe2, 0x2e, 0xa6, 0x38, 0xe4, 0x9f, 0x08, 0x8f, 0xbf, 0x7c, 0x14, 0x7f, + 0x73, 0xd0, 0x37, 0x73, 0x1c, 0x8e, 0xd2, 0xec, 0x1b, 0xe1, 0x8b, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x39, 0xda, 0x3d, 0x84, 0x94, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { @@ -1305,133 +1167,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Upgrade) 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 *Upgrade) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Upgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NextSequenceSend != 0 { - i = encodeVarintChannel(dAtA, i, uint64(m.NextSequenceSend)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintChannel(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintChannel(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *UpgradeFields) 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 *UpgradeFields) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintChannel(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if len(m.ConnectionHops) > 0 { - for iNdEx := len(m.ConnectionHops) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConnectionHops[iNdEx]) - copy(dAtA[i:], m.ConnectionHops[iNdEx]) - i = encodeVarintChannel(dAtA, i, uint64(len(m.ConnectionHops[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Ordering != 0 { - i = encodeVarintChannel(dAtA, i, uint64(m.Ordering)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ErrorReceipt) 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 *ErrorReceipt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ErrorReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintChannel(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - if m.Sequence != 0 { - i = encodeVarintChannel(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintChannel(dAtA []byte, offset int, v uint64) int { offset -= sovChannel(v) base := offset @@ -1668,60 +1403,6 @@ func (m *Params) Size() (n int) { return n } -func (m *Upgrade) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Fields.Size() - n += 1 + l + sovChannel(uint64(l)) - l = m.Timeout.Size() - n += 1 + l + sovChannel(uint64(l)) - if m.NextSequenceSend != 0 { - n += 1 + sovChannel(uint64(m.NextSequenceSend)) - } - return n -} - -func (m *UpgradeFields) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ordering != 0 { - n += 1 + sovChannel(uint64(m.Ordering)) - } - if len(m.ConnectionHops) > 0 { - for _, s := range m.ConnectionHops { - l = len(s) - n += 1 + l + sovChannel(uint64(l)) - } - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovChannel(uint64(l)) - } - return n -} - -func (m *ErrorReceipt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sequence != 0 { - n += 1 + sovChannel(uint64(m.Sequence)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovChannel(uint64(l)) - } - return n -} - func sovChannel(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3197,375 +2878,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } -func (m *Upgrade) 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 ErrIntOverflowChannel - } - 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: Upgrade: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Upgrade: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthChannel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthChannel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextSequenceSend", wireType) - } - m.NextSequenceSend = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextSequenceSend |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipChannel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthChannel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpgradeFields) 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 ErrIntOverflowChannel - } - 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: UpgradeFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradeFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Ordering", wireType) - } - m.Ordering = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Ordering |= Order(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionHops", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - 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 ErrInvalidLengthChannel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionHops = append(m.ConnectionHops, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - 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 ErrInvalidLengthChannel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipChannel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthChannel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ErrorReceipt) 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 ErrIntOverflowChannel - } - 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: ErrorReceipt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ErrorReceipt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowChannel - } - 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 ErrInvalidLengthChannel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthChannel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipChannel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthChannel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipChannel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/modules/core/04-channel/types/channel_test.go b/modules/core/04-channel/types/channel_test.go index d8fe010933d..a589fe8a2d8 100644 --- a/modules/core/04-channel/types/channel_test.go +++ b/modules/core/04-channel/types/channel_test.go @@ -14,24 +14,25 @@ func TestChannelValidateBasic(t *testing.T) { testCases := []struct { name string channel types.Channel - expPass bool + expErr error }{ - {"valid channel", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, connHops, version), true}, - {"invalid state", types.NewChannel(types.UNINITIALIZED, types.ORDERED, counterparty, connHops, version), false}, - {"invalid order", types.NewChannel(types.TRYOPEN, types.NONE, counterparty, connHops, version), false}, - {"more than 1 connection hop", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"connection1", "connection2"}, version), false}, - {"invalid connection hop identifier", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"(invalid)"}, version), false}, - {"invalid counterparty", types.NewChannel(types.TRYOPEN, types.ORDERED, types.NewCounterparty("(invalidport)", "channelidone"), connHops, version), false}, + {"valid channel", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, connHops, version), nil}, + {"invalid state", types.NewChannel(types.UNINITIALIZED, types.ORDERED, counterparty, connHops, version), types.ErrInvalidChannelState}, + {"invalid order", types.NewChannel(types.TRYOPEN, types.NONE, counterparty, connHops, version), types.ErrInvalidChannelOrdering}, + {"more than 1 connection hop", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"connection1", "connection2"}, version), types.ErrTooManyConnectionHops}, + {"invalid connection hop identifier", types.NewChannel(types.TRYOPEN, types.ORDERED, counterparty, []string{"(invalid)"}, version), host.ErrInvalidID}, + {"invalid counterparty", types.NewChannel(types.TRYOPEN, types.ORDERED, types.NewCounterparty("(invalidport)", "channelidone"), connHops, version), host.ErrInvalidID}, } for i, tc := range testCases { tc := tc err := tc.channel.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { 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) + require.ErrorIs(t, err, tc.expErr) } } } @@ -40,21 +41,22 @@ func TestCounterpartyValidateBasic(t *testing.T) { testCases := []struct { name string counterparty types.Counterparty - expPass bool + expErr error }{ - {"valid counterparty", types.Counterparty{"portidone", "channelidone"}, true}, - {"invalid port id", types.Counterparty{"(InvalidPort)", "channelidone"}, false}, - {"invalid channel id", types.Counterparty{"portidone", "(InvalidChannel)"}, false}, + {"valid counterparty", types.Counterparty{"portidone", "channelidone"}, nil}, + {"invalid port id", types.Counterparty{"(InvalidPort)", "channelidone"}, host.ErrInvalidID}, + {"invalid channel id", types.Counterparty{"portidone", "(InvalidChannel)"}, host.ErrInvalidID}, } for i, tc := range testCases { tc := tc err := tc.counterparty.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { 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) + require.ErrorIs(t, err, tc.expErr) } } } diff --git a/modules/core/04-channel/types/codec_test.go b/modules/core/04-channel/types/codec_test.go index b32e8439e05..54666b7179f 100644 --- a/modules/core/04-channel/types/codec_test.go +++ b/modules/core/04-channel/types/codec_test.go @@ -1,6 +1,7 @@ package types_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -15,114 +16,114 @@ import ( func TestCodecTypeRegistration(t *testing.T) { testCases := []struct { - name string - typeURL string - expPass bool + name string + typeURL string + expError error }{ { "success: Packet", sdk.MsgTypeURL(&types.Packet{}), - true, + nil, }, { "success: MsgChannelOpenInit", sdk.MsgTypeURL(&types.MsgChannelOpenInit{}), - true, + nil, }, { "success: MsgChannelOpenTry", sdk.MsgTypeURL(&types.MsgChannelOpenTry{}), - true, + nil, }, { "success: MsgChannelOpenAck", sdk.MsgTypeURL(&types.MsgChannelOpenAck{}), - true, + nil, }, { "success: MsgChannelOpenConfirm", sdk.MsgTypeURL(&types.MsgChannelOpenConfirm{}), - true, + nil, }, { "success: MsgChannelCloseInit", sdk.MsgTypeURL(&types.MsgChannelCloseInit{}), - true, + nil, }, { "success: MsgChannelCloseConfirm", sdk.MsgTypeURL(&types.MsgChannelCloseConfirm{}), - true, + nil, }, { "success: MsgRecvPacket", sdk.MsgTypeURL(&types.MsgRecvPacket{}), - true, + nil, }, { "success: MsgAcknowledgement", sdk.MsgTypeURL(&types.MsgAcknowledgement{}), - true, + nil, }, { "success: MsgTimeout", sdk.MsgTypeURL(&types.MsgTimeout{}), - true, + nil, }, { "success: MsgTimeoutOnClose", sdk.MsgTypeURL(&types.MsgTimeoutOnClose{}), - true, + nil, }, { "success: MsgChannelUpgradeInit", sdk.MsgTypeURL(&types.MsgChannelUpgradeInit{}), - true, + nil, }, { "success: MsgChannelUpgradeTry", sdk.MsgTypeURL(&types.MsgChannelUpgradeTry{}), - true, + nil, }, { "success: MsgChannelUpgradeAck", sdk.MsgTypeURL(&types.MsgChannelUpgradeAck{}), - true, + nil, }, { "success: MsgChannelUpgradeConfirm", sdk.MsgTypeURL(&types.MsgChannelUpgradeConfirm{}), - true, + nil, }, { "success: MsgChannelUpgradeOpen", sdk.MsgTypeURL(&types.MsgChannelUpgradeOpen{}), - true, + nil, }, { "success: MsgChannelUpgradeTimeout", sdk.MsgTypeURL(&types.MsgChannelUpgradeTimeout{}), - true, + nil, }, { "success: MsgChannelUpgradeCancel", sdk.MsgTypeURL(&types.MsgChannelUpgradeCancel{}), - true, + nil, }, { "success: MsgPruneAcknowledgements", sdk.MsgTypeURL(&types.MsgPruneAcknowledgements{}), - true, + nil, }, { "success: MsgUpdateParams", sdk.MsgTypeURL(&types.MsgUpdateParams{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -133,12 +134,12 @@ func TestCodecTypeRegistration(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expError == nil { require.NotNil(t, msg) require.NoError(t, err) } else { require.Nil(t, msg) - require.Error(t, err) + require.ErrorContains(t, err, tc.expError.Error()) } }) } diff --git a/modules/core/04-channel/types/keys_test.go b/modules/core/04-channel/types/keys_test.go index 16da18aee53..a8a0abfc15f 100644 --- a/modules/core/04-channel/types/keys_test.go +++ b/modules/core/04-channel/types/keys_test.go @@ -1,11 +1,13 @@ package types_test import ( + "errors" "testing" "github.com/stretchr/testify/require" "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v9/modules/core/24-host" ) // tests ParseChannelSequence and IsValidChannelID @@ -14,20 +16,20 @@ func TestParseChannelSequence(t *testing.T) { name string channelID string expSeq uint64 - expPass bool + expErr error }{ - {"valid 0", "channel-0", 0, true}, - {"valid 1", "channel-1", 1, true}, - {"valid large sequence", "channel-234568219356718293", 234568219356718293, true}, + {"valid 0", "channel-0", 0, nil}, + {"valid 1", "channel-1", 1, nil}, + {"valid large sequence", "channel-234568219356718293", 234568219356718293, nil}, // one above uint64 max - {"invalid uint64", "channel-18446744073709551616", 0, false}, + {"invalid uint64", "channel-18446744073709551616", 0, errors.New("invalid channel identifier: failed to parse identifier sequence")}, // uint64 == 20 characters - {"invalid large sequence", "channel-2345682193567182931243", 0, false}, - {"capital prefix", "Channel-0", 0, false}, - {"missing dash", "channel0", 0, false}, - {"blank id", " ", 0, false}, - {"empty id", "", 0, false}, - {"negative sequence", "channel--1", 0, false}, + {"invalid large sequence", "channel-2345682193567182931243", 0, host.ErrInvalidID}, + {"capital prefix", "Channel-0", 0, host.ErrInvalidID}, + {"missing dash", "channel0", 0, host.ErrInvalidID}, + {"blank id", " ", 0, host.ErrInvalidID}, + {"empty id", "", 0, host.ErrInvalidID}, + {"negative sequence", "channel--1", 0, host.ErrInvalidID}, } for _, tc := range testCases { @@ -37,12 +39,13 @@ func TestParseChannelSequence(t *testing.T) { valid := types.IsValidChannelID(tc.channelID) require.Equal(t, tc.expSeq, seq) - if tc.expPass { + if tc.expErr == nil { require.NoError(t, err, tc.name) require.True(t, valid) } else { require.Error(t, err, tc.name) require.False(t, valid) + require.ErrorContains(t, err, tc.expErr.Error()) } } } diff --git a/modules/core/04-channel/types/query.go b/modules/core/04-channel/types/query.go index e4ab05cb907..1bff1497c39 100644 --- a/modules/core/04-channel/types/query.go +++ b/modules/core/04-channel/types/query.go @@ -30,7 +30,7 @@ func NewQueryChannelClientStateResponse(identifiedClientState clienttypes.Identi } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qccsr QueryChannelClientStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return qccsr.IdentifiedClientState.UnpackInterfaces(unpacker) } @@ -45,7 +45,7 @@ func NewQueryChannelConsensusStateResponse(clientID string, anyConsensusState *g } } -// UnpackInterfaces implements UnpackInterfacesMesssage.UnpackInterfaces +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (qccsr QueryChannelConsensusStateResponse) UnpackInterfaces(unpacker gogoprotoany.AnyUnpacker) error { return unpacker.UnpackAny(qccsr.ConsensusState, new(exported.ConsensusState)) } diff --git a/modules/core/04-channel/types/query.pb.go b/modules/core/04-channel/types/query.pb.go index e9def5c07e7..37deaeaf68f 100644 --- a/modules/core/04-channel/types/query.pb.go +++ b/modules/core/04-channel/types/query.pb.go @@ -2152,7 +2152,7 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/query.proto", fileDescriptor_1034a1e9abc4cca1) } var fileDescriptor_1034a1e9abc4cca1 = []byte{ - // 1751 bytes of a gzipped FileDescriptorProto + // 1756 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0xcf, 0x6f, 0x14, 0x47, 0x16, 0x76, 0xd9, 0xc6, 0x3f, 0x0a, 0x03, 0xa6, 0x6c, 0x2f, 0xa6, 0x6d, 0x8f, 0xcd, 0xa0, 0x5d, 0x0c, 0x5a, 0xba, 0xb1, 0xcd, 0xb2, 0xb0, 0x62, 0x91, 0xb0, 0x77, 0x17, 0x8c, 0x16, 0x30, 0xed, @@ -2165,104 +2165,104 @@ var fileDescriptor_1034a1e9abc4cca1 = []byte{ 0xae, 0x6c, 0x97, 0x2d, 0xd7, 0x22, 0x03, 0x46, 0x5e, 0x97, 0xbd, 0x09, 0x32, 0x4c, 0x90, 0xab, 0x53, 0x52, 0xc0, 0x6a, 0xc5, 0xa0, 0xa6, 0xeb, 0x19, 0xf1, 0x5f, 0xdc, 0x4a, 0x3a, 0xa2, 0x5b, 0x4e, 0xc9, 0x72, 0x94, 0xbc, 0xe6, 0x50, 0xee, 0x4e, 0xa9, 0x4e, 0xe5, 0xa9, 0xab, 0x4d, 0x29, - 0xb6, 0x56, 0x34, 0x4c, 0xcd, 0x35, 0x2c, 0x13, 0xe6, 0x1e, 0x88, 0x82, 0x20, 0x16, 0xe3, 0x53, - 0x46, 0x8b, 0x96, 0x55, 0x5c, 0xa1, 0x8a, 0x66, 0x1b, 0x8a, 0x66, 0x9a, 0x96, 0xcb, 0xec, 0x1d, - 0x78, 0xbb, 0x1f, 0xde, 0xb2, 0xa7, 0x7c, 0xe5, 0xa6, 0xa2, 0x99, 0x80, 0x5e, 0x1a, 0x2c, 0x5a, - 0x45, 0x8b, 0xfd, 0x54, 0xbc, 0x5f, 0x7c, 0x34, 0x7b, 0x11, 0x0f, 0x5c, 0xf1, 0x30, 0xcd, 0xf1, - 0x45, 0x54, 0x7a, 0xab, 0x42, 0x1d, 0x97, 0xec, 0xc3, 0xdd, 0xb6, 0x55, 0x76, 0x73, 0x46, 0x61, - 0x18, 0x4d, 0xa0, 0xc9, 0x5e, 0xb5, 0xcb, 0x7b, 0x9c, 0x2f, 0x90, 0x31, 0x8c, 0x01, 0x8f, 0xf7, - 0xae, 0x9d, 0xbd, 0xeb, 0x85, 0x91, 0xf9, 0x42, 0xf6, 0x21, 0xc2, 0x83, 0x61, 0x7f, 0x8e, 0x6d, - 0x99, 0x0e, 0x25, 0x27, 0x70, 0x37, 0xcc, 0x62, 0x0e, 0x77, 0x4e, 0x8f, 0xca, 0x11, 0x6a, 0xca, - 0xc2, 0x4c, 0x4c, 0x26, 0x83, 0x78, 0x87, 0x5d, 0xb6, 0xac, 0x9b, 0x6c, 0xa9, 0x3e, 0x95, 0x3f, - 0x90, 0x39, 0xdc, 0xc7, 0x7e, 0xe4, 0x96, 0xa8, 0x51, 0x5c, 0x72, 0x87, 0x3b, 0x98, 0x4b, 0x29, - 0xe0, 0x92, 0x47, 0xa0, 0x3a, 0x25, 0x9f, 0x67, 0x33, 0x66, 0x3b, 0x1f, 0x3d, 0x1b, 0x6f, 0x53, - 0x77, 0x32, 0x2b, 0x3e, 0x94, 0x7d, 0x2b, 0x0c, 0xd5, 0x11, 0xdc, 0xff, 0x87, 0x71, 0x2d, 0x30, - 0x80, 0xf6, 0x6f, 0x32, 0x8f, 0xa2, 0xec, 0x45, 0x51, 0xe6, 0x9b, 0x02, 0xa2, 0x28, 0x2f, 0x68, - 0x45, 0x0a, 0xb6, 0x6a, 0xc0, 0x32, 0xfb, 0x0c, 0xe1, 0xa1, 0xba, 0x05, 0x40, 0x8c, 0x59, 0xdc, - 0x03, 0xfc, 0x9c, 0x61, 0x34, 0xd1, 0xc1, 0xfc, 0x47, 0xa9, 0x31, 0x5f, 0xa0, 0xa6, 0x6b, 0xdc, - 0x34, 0x68, 0x41, 0xe8, 0xe2, 0xdb, 0x91, 0x73, 0x21, 0x94, 0xed, 0x0c, 0xe5, 0xa1, 0x0d, 0x51, - 0x72, 0x00, 0x41, 0x98, 0xe4, 0x24, 0xee, 0x6a, 0x52, 0x45, 0x98, 0x9f, 0xbd, 0x8f, 0x70, 0x86, - 0x13, 0xb4, 0x4c, 0x93, 0xea, 0x9e, 0xb7, 0x7a, 0x2d, 0x33, 0x18, 0xeb, 0xfe, 0x4b, 0xd8, 0x4a, - 0x81, 0x91, 0x3a, 0xad, 0xdb, 0xb7, 0xac, 0xf5, 0xaf, 0x08, 0x8f, 0xc7, 0x42, 0xf9, 0x73, 0xa9, - 0x7e, 0x4d, 0x88, 0xce, 0x31, 0xcd, 0xb1, 0xd9, 0x8b, 0xae, 0xe6, 0xd2, 0xb4, 0x87, 0xf7, 0x27, - 0x5f, 0xc4, 0x08, 0xd7, 0x20, 0xa2, 0x86, 0xf7, 0x19, 0xbe, 0x3e, 0x39, 0x0e, 0x35, 0xe7, 0x78, - 0x53, 0xe0, 0xa4, 0x1c, 0x8e, 0x22, 0x12, 0x90, 0x34, 0xe0, 0x73, 0xc8, 0x88, 0x1a, 0x6e, 0xe5, - 0x91, 0xff, 0x0a, 0xe1, 0x03, 0x21, 0x86, 0x1e, 0x27, 0xd3, 0xa9, 0x38, 0xdb, 0xa1, 0x1f, 0x39, - 0x84, 0xf7, 0x94, 0x69, 0xd5, 0x70, 0x0c, 0xcb, 0xcc, 0x99, 0x95, 0x52, 0x9e, 0x96, 0x19, 0xca, - 0x4e, 0x75, 0xb7, 0x18, 0xbe, 0xc4, 0x46, 0x43, 0x13, 0x81, 0x4e, 0x67, 0x78, 0x22, 0xe0, 0x7d, - 0x8a, 0x70, 0x36, 0x09, 0x2f, 0x04, 0xe5, 0xdf, 0x78, 0x8f, 0x2e, 0xde, 0x84, 0x82, 0x31, 0x28, - 0xf3, 0xef, 0x81, 0x2c, 0xbe, 0x07, 0xf2, 0x59, 0xf3, 0xae, 0xba, 0x5b, 0x0f, 0xb9, 0x21, 0x23, - 0xb8, 0x17, 0x02, 0xe9, 0xb3, 0xea, 0xe1, 0x03, 0xf3, 0x85, 0x5a, 0x34, 0x3a, 0x92, 0xa2, 0xd1, - 0xb9, 0x95, 0x68, 0x94, 0xf1, 0x28, 0x23, 0xb7, 0xa0, 0xe9, 0xcb, 0xd4, 0x9d, 0xb3, 0x4a, 0x25, - 0xc3, 0x2d, 0x51, 0xd3, 0x4d, 0x1b, 0x07, 0x09, 0xf7, 0x38, 0x9e, 0x0b, 0x53, 0xa7, 0x10, 0x00, - 0xff, 0x39, 0xfb, 0x29, 0xc2, 0x63, 0x31, 0x8b, 0x82, 0x98, 0x2c, 0x65, 0x89, 0x51, 0xb6, 0x70, - 0x9f, 0x1a, 0x18, 0x69, 0xe5, 0xf6, 0xfc, 0x2c, 0x0e, 0x9c, 0x93, 0x56, 0x92, 0x70, 0x9e, 0xed, - 0xd8, 0x72, 0x9e, 0x7d, 0x29, 0x52, 0x7e, 0x04, 0x42, 0x3f, 0xcd, 0xee, 0xac, 0xa9, 0x25, 0x32, - 0xed, 0x44, 0x64, 0xa6, 0xe5, 0x4e, 0xf8, 0x5e, 0x0e, 0x1a, 0xbd, 0x0a, 0x69, 0xd6, 0xc2, 0xfb, - 0x03, 0x44, 0x55, 0xaa, 0x53, 0xc3, 0x6e, 0xe9, 0xce, 0x7c, 0x80, 0xb0, 0x14, 0xb5, 0x22, 0xc8, - 0x2a, 0xe1, 0x9e, 0xb2, 0x37, 0x54, 0xa5, 0xdc, 0x6f, 0x8f, 0xea, 0x3f, 0xb7, 0xf2, 0x8c, 0xde, - 0x86, 0x84, 0xc9, 0x41, 0x9d, 0xd5, 0x97, 0x4d, 0xeb, 0xf6, 0x0a, 0x2d, 0x14, 0x69, 0xab, 0x0f, - 0xea, 0x43, 0x91, 0xfa, 0x62, 0x56, 0x06, 0x59, 0x26, 0xf1, 0x1e, 0x2d, 0xfc, 0x0a, 0x8e, 0x6c, - 0xfd, 0x70, 0x2b, 0xcf, 0xed, 0x8b, 0x44, 0xac, 0xaf, 0xca, 0xe1, 0x25, 0x67, 0xf0, 0x88, 0xcd, - 0x00, 0xe6, 0x6a, 0x67, 0x2d, 0x27, 0x04, 0x77, 0x86, 0x3b, 0x27, 0x3a, 0x26, 0x3b, 0xd5, 0xfd, - 0x76, 0xdd, 0xc9, 0x5e, 0x14, 0x13, 0xb2, 0xbf, 0x23, 0x7c, 0x30, 0x91, 0x26, 0xc4, 0xe4, 0xff, - 0xb8, 0xbf, 0x4e, 0xfc, 0xcd, 0xa7, 0x81, 0x06, 0xcb, 0x57, 0x21, 0x17, 0x7c, 0x22, 0xf2, 0xf2, - 0x55, 0x53, 0x9c, 0x39, 0x8e, 0x39, 0x75, 0x68, 0x37, 0x08, 0x49, 0xc7, 0x46, 0x21, 0xb9, 0x03, - 0xe9, 0x38, 0x02, 0x18, 0x04, 0x63, 0x14, 0xf7, 0xd6, 0xfc, 0x21, 0xe6, 0xaf, 0x36, 0x10, 0xd0, - 0xa4, 0xbd, 0x49, 0x4d, 0xee, 0x89, 0x74, 0x55, 0x5b, 0xfa, 0xac, 0xbe, 0x9c, 0x5a, 0x90, 0x63, - 0x78, 0x10, 0x04, 0xd1, 0xf4, 0xe5, 0x06, 0x25, 0x88, 0x2d, 0x76, 0x5e, 0x4d, 0x82, 0x0a, 0x1e, - 0x89, 0xc4, 0xd1, 0x62, 0xfe, 0xd7, 0xe1, 0xae, 0x7c, 0x89, 0xde, 0xf1, 0xe3, 0xa1, 0x72, 0x00, - 0x69, 0xef, 0xe1, 0xdf, 0x20, 0x3c, 0x11, 0xef, 0x1b, 0x78, 0x4d, 0xe3, 0x21, 0x93, 0xde, 0xa9, - 0x6d, 0x96, 0x1c, 0xb0, 0x67, 0x4b, 0x75, 0xaa, 0x03, 0x66, 0xa3, 0x6d, 0x2b, 0x53, 0xe0, 0xeb, - 0x70, 0x97, 0x0b, 0x42, 0x5e, 0xa4, 0x66, 0x21, 0xad, 0x16, 0x5f, 0x88, 0xa3, 0xd7, 0xe8, 0x18, - 0x84, 0xf8, 0x3b, 0x26, 0x61, 0x21, 0x1c, 0x6a, 0x16, 0x40, 0x85, 0x7e, 0xb3, 0xce, 0xaa, 0x95, - 0x12, 0xa8, 0x78, 0x98, 0x6f, 0x44, 0xbb, 0x58, 0xd6, 0x0a, 0xf4, 0xbf, 0xe5, 0xb2, 0x55, 0x4e, - 0x4b, 0xff, 0x3b, 0x04, 0xd7, 0x90, 0xb0, 0x53, 0x3f, 0xd1, 0xee, 0xa2, 0xde, 0x00, 0x8f, 0xbd, - 0xed, 0xc2, 0xad, 0xff, 0x40, 0x64, 0x96, 0x05, 0x53, 0x36, 0x11, 0xe0, 0xf7, 0xd1, 0xc0, 0x58, - 0x2b, 0xa5, 0x11, 0x5d, 0x26, 0x60, 0x91, 0x56, 0x95, 0xaf, 0x45, 0x97, 0xc9, 0xf7, 0x07, 0x82, - 0x9c, 0xc6, 0xdd, 0x15, 0x3e, 0x94, 0xd8, 0x65, 0x02, 0x33, 0x40, 0x2a, 0x4c, 0x5a, 0x29, 0xc0, - 0x08, 0x84, 0x11, 0xea, 0xb8, 0x05, 0xad, 0xac, 0x95, 0x44, 0xae, 0xcc, 0x5e, 0x81, 0x4c, 0x5a, - 0xf7, 0x12, 0x38, 0xcd, 0xe0, 0x2e, 0x9b, 0x8d, 0x00, 0xa5, 0x91, 0x98, 0x6f, 0x28, 0x33, 0x82, - 0xa9, 0xd3, 0xbf, 0x8c, 0xe0, 0x1d, 0xcc, 0x27, 0xf9, 0x1c, 0xe1, 0x6e, 0x70, 0x4c, 0x26, 0x23, - 0x4d, 0x23, 0xfa, 0x7f, 0xd2, 0xe1, 0x4d, 0xcc, 0xe4, 0xf8, 0xb2, 0xb3, 0xef, 0x3f, 0x79, 0xf1, - 0xa0, 0xfd, 0x34, 0xf9, 0x97, 0x92, 0xd0, 0xbc, 0x74, 0x94, 0xd5, 0x5a, 0x40, 0xd7, 0x14, 0x2f, - 0xcc, 0x8e, 0xb2, 0x0a, 0xc1, 0x5f, 0x23, 0xf7, 0x11, 0xee, 0x11, 0xfd, 0x1a, 0xb2, 0xf1, 0xda, - 0x42, 0x39, 0xe9, 0xc8, 0x66, 0xa6, 0x02, 0xce, 0xbf, 0x32, 0x9c, 0xe3, 0x64, 0x2c, 0x11, 0x27, - 0xf9, 0x16, 0x61, 0xd2, 0xd8, 0x44, 0x22, 0x33, 0x09, 0x2b, 0xc5, 0x75, 0xbf, 0xa4, 0xe3, 0xcd, - 0x19, 0x01, 0xd0, 0x33, 0x0c, 0xe8, 0x49, 0x72, 0x22, 0x1a, 0xa8, 0x6f, 0xe8, 0x69, 0xea, 0x3f, - 0xac, 0xd5, 0x18, 0x3c, 0xf6, 0x18, 0x34, 0x74, 0x70, 0x12, 0x19, 0xc4, 0xb5, 0x92, 0x12, 0x19, - 0xc4, 0x36, 0x89, 0xb2, 0x97, 0x19, 0x83, 0x79, 0x72, 0x6e, 0xeb, 0x5b, 0x42, 0x09, 0xb6, 0x96, - 0xc8, 0x47, 0xed, 0x78, 0x28, 0xb2, 0x05, 0x42, 0x4e, 0x6c, 0x0c, 0x30, 0xaa, 0xc7, 0x23, 0xfd, - 0xb3, 0x69, 0x3b, 0xe0, 0xf6, 0x01, 0x62, 0xe4, 0xde, 0x43, 0xe4, 0xdd, 0x34, 0xec, 0xc2, 0xed, - 0x1a, 0x45, 0xf4, 0x7d, 0x94, 0xd5, 0xba, 0x0e, 0xd2, 0x9a, 0xc2, 0xd3, 0x4e, 0xe0, 0x05, 0x1f, - 0x58, 0x23, 0x4f, 0x11, 0xee, 0xaf, 0x2f, 0xc3, 0xc9, 0x54, 0x3c, 0xaf, 0x98, 0x36, 0x8b, 0x34, - 0xdd, 0x8c, 0x09, 0xa8, 0xf0, 0x36, 0x13, 0xe1, 0x06, 0xb9, 0x96, 0x42, 0x83, 0x86, 0x8b, 0xaf, - 0xa3, 0xac, 0x8a, 0x8f, 0xf8, 0x1a, 0x79, 0x82, 0xf0, 0xde, 0x86, 0x26, 0x03, 0x69, 0x02, 0xab, - 0x7f, 0x0a, 0x67, 0x9a, 0xb2, 0x01, 0x82, 0x57, 0x19, 0xc1, 0xcb, 0xe4, 0xe2, 0xb6, 0x12, 0x24, - 0xdf, 0x23, 0xbc, 0x2b, 0x54, 0xdf, 0x13, 0x79, 0x23, 0x74, 0xe1, 0xd6, 0x83, 0xa4, 0x6c, 0x7a, - 0x3e, 0x30, 0x79, 0x93, 0x31, 0x79, 0x83, 0x5c, 0x4d, 0xcf, 0x04, 0xae, 0x19, 0xa1, 0x38, 0xad, - 0x23, 0x3c, 0x14, 0x59, 0x0f, 0x26, 0x1d, 0xcd, 0xa4, 0x6e, 0x42, 0xd2, 0xd1, 0x4c, 0xec, 0x05, - 0x64, 0xaf, 0x33, 0xa6, 0x8b, 0xe4, 0x4a, 0x7a, 0xa6, 0x9a, 0xbe, 0x1c, 0x62, 0xf9, 0x12, 0xe1, - 0xbf, 0x44, 0x57, 0xbd, 0xa4, 0x59, 0xb8, 0xfe, 0xbe, 0x3c, 0xd9, 0xbc, 0x21, 0x10, 0xbd, 0xc1, - 0x88, 0xbe, 0x46, 0xd4, 0x6d, 0x21, 0x1a, 0xa6, 0x73, 0xaf, 0x1d, 0xef, 0x6d, 0xa8, 0x26, 0x93, - 0xce, 0x5d, 0x5c, 0x4d, 0x9c, 0x74, 0xee, 0x62, 0xcb, 0xd5, 0x6d, 0x4a, 0xaf, 0x51, 0xa9, 0x25, - 0xa1, 0xce, 0x5e, 0x53, 0x2a, 0x3e, 0xa0, 0x9c, 0x0d, 0x94, 0x7f, 0x43, 0x78, 0x77, 0xb8, 0xa6, - 0x24, 0xca, 0x66, 0x18, 0x05, 0xaa, 0x60, 0xe9, 0xd8, 0xe6, 0x0d, 0x80, 0xff, 0x3b, 0x8c, 0x7e, - 0x95, 0xb8, 0xad, 0x61, 0x1f, 0x2a, 0xaa, 0x43, 0xb4, 0xbd, 0x1d, 0x4f, 0x7e, 0x40, 0x78, 0x20, - 0xa2, 0xe8, 0x24, 0x09, 0xd7, 0x80, 0xf8, 0xfa, 0x57, 0xfa, 0x47, 0x93, 0x56, 0x20, 0xc1, 0x02, - 0x93, 0xe0, 0x02, 0x39, 0x9f, 0x42, 0x82, 0x50, 0x45, 0xe8, 0xdd, 0x88, 0xfa, 0xeb, 0xeb, 0xc7, - 0xa4, 0x2f, 0x65, 0x4c, 0x11, 0x9b, 0xf4, 0xa5, 0x8c, 0x2b, 0x4f, 0xb7, 0xe5, 0x43, 0xd2, 0x58, - 0xdf, 0x7a, 0xd7, 0xd4, 0xbe, 0x60, 0x4d, 0x48, 0x8e, 0x26, 0x6c, 0xb5, 0xc6, 0x82, 0x54, 0x92, - 0x37, 0x3b, 0x7d, 0x1b, 0x83, 0x02, 0x75, 0x56, 0x8e, 0x55, 0x9d, 0xe4, 0x4b, 0x84, 0xbb, 0x61, - 0xa9, 0xa4, 0xc2, 0x24, 0x5c, 0x32, 0x26, 0x15, 0x26, 0x75, 0xc5, 0x60, 0xf6, 0x02, 0x83, 0xfc, - 0x1f, 0x32, 0x9b, 0x1e, 0x32, 0xf9, 0x18, 0xe1, 0x5d, 0xa1, 0xf2, 0x2c, 0xe9, 0xbb, 0x1d, 0x55, - 0xe4, 0x25, 0x7d, 0xb7, 0x23, 0xeb, 0xbe, 0xec, 0x41, 0x06, 0x7f, 0x8c, 0x8c, 0x44, 0xc2, 0xe7, - 0x75, 0xde, 0xec, 0xe2, 0xa3, 0xe7, 0x19, 0xf4, 0xf8, 0x79, 0x06, 0xfd, 0xfc, 0x3c, 0x83, 0x3e, - 0x5c, 0xcf, 0xb4, 0x3d, 0x5e, 0xcf, 0xb4, 0xfd, 0xb8, 0x9e, 0x69, 0xbb, 0x71, 0xaa, 0x68, 0xb8, - 0x4b, 0x95, 0xbc, 0xac, 0x5b, 0x25, 0x05, 0xfe, 0x03, 0xc5, 0xc8, 0xeb, 0x47, 0x8b, 0x96, 0x52, - 0x3d, 0xa5, 0x94, 0xac, 0x42, 0x65, 0x85, 0x3a, 0xdc, 0xeb, 0xb1, 0xe3, 0x47, 0x85, 0x63, 0xf7, - 0xae, 0x4d, 0x9d, 0x7c, 0x17, 0xfb, 0x6b, 0xe1, 0xcc, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x01, - 0xa9, 0xd1, 0xb8, 0x11, 0x23, 0x00, 0x00, + 0xb6, 0x56, 0x34, 0x4c, 0xcd, 0x35, 0x2c, 0x13, 0xe6, 0x1e, 0x88, 0x82, 0x20, 0x16, 0x4b, 0x98, + 0x52, 0xb1, 0x8b, 0x65, 0xad, 0x40, 0x61, 0xca, 0x68, 0xd1, 0xb2, 0x8a, 0x2b, 0x54, 0xd1, 0x6c, + 0x43, 0xd1, 0x4c, 0xd3, 0x72, 0xd9, 0x12, 0x0e, 0xbc, 0xdd, 0x0f, 0x6f, 0xd9, 0x53, 0xbe, 0x72, + 0x53, 0xd1, 0x4c, 0x20, 0x28, 0x0d, 0x16, 0xad, 0xa2, 0xc5, 0x7e, 0x2a, 0xde, 0x2f, 0x3e, 0x9a, + 0xbd, 0x88, 0x07, 0xae, 0x78, 0xb0, 0xe7, 0xf8, 0x7a, 0x2a, 0xbd, 0x55, 0xa1, 0x8e, 0x4b, 0xf6, + 0xe1, 0x6e, 0xdb, 0x2a, 0xbb, 0x39, 0xa3, 0x30, 0x8c, 0x26, 0xd0, 0x64, 0xaf, 0xda, 0xe5, 0x3d, + 0xce, 0x17, 0xc8, 0x18, 0xc6, 0x00, 0xcd, 0x7b, 0xd7, 0xce, 0xde, 0xf5, 0xc2, 0xc8, 0x7c, 0x21, + 0xfb, 0x10, 0xe1, 0xc1, 0xb0, 0x3f, 0xc7, 0xb6, 0x4c, 0x87, 0x92, 0x13, 0xb8, 0x1b, 0x66, 0x31, + 0x87, 0x3b, 0xa7, 0x47, 0xe5, 0x08, 0xc1, 0x65, 0x61, 0x26, 0x26, 0x93, 0x41, 0xbc, 0xc3, 0x2e, + 0x5b, 0xd6, 0x4d, 0xb6, 0x54, 0x9f, 0xca, 0x1f, 0xc8, 0x1c, 0xee, 0x63, 0x3f, 0x72, 0x4b, 0xd4, + 0x28, 0x2e, 0xb9, 0xc3, 0x1d, 0xcc, 0xa5, 0x14, 0x70, 0xc9, 0x83, 0x54, 0x9d, 0x92, 0xcf, 0xb3, + 0x19, 0xb3, 0x9d, 0x8f, 0x9e, 0x8d, 0xb7, 0xa9, 0x3b, 0x99, 0x15, 0x1f, 0xca, 0xbe, 0x15, 0x86, + 0xea, 0x08, 0xee, 0xff, 0xc3, 0xb8, 0x16, 0x3b, 0x40, 0xfb, 0x37, 0x99, 0x07, 0x5a, 0xf6, 0x02, + 0x2d, 0xf3, 0x7d, 0x03, 0x81, 0x96, 0x17, 0xb4, 0x22, 0x05, 0x5b, 0x35, 0x60, 0x99, 0x7d, 0x86, + 0xf0, 0x50, 0xdd, 0x02, 0x20, 0xc6, 0x2c, 0xee, 0x01, 0x7e, 0xce, 0x30, 0x9a, 0xe8, 0x60, 0xfe, + 0xa3, 0xd4, 0x98, 0x2f, 0x50, 0xd3, 0x35, 0x6e, 0x1a, 0xb4, 0x20, 0x74, 0xf1, 0xed, 0xc8, 0xb9, + 0x10, 0xca, 0x76, 0x86, 0xf2, 0xd0, 0x86, 0x28, 0x39, 0x80, 0x20, 0x4c, 0x72, 0x12, 0x77, 0x35, + 0xa9, 0x22, 0xcc, 0xcf, 0xde, 0x47, 0x38, 0xc3, 0x09, 0x5a, 0xa6, 0x49, 0x75, 0xcf, 0x5b, 0xbd, + 0x96, 0x19, 0x8c, 0x75, 0xff, 0x25, 0x6c, 0xa5, 0xc0, 0x48, 0x9d, 0xd6, 0xed, 0x5b, 0xd6, 0xfa, + 0x57, 0x84, 0xc7, 0x63, 0xa1, 0xfc, 0xb9, 0x54, 0xbf, 0x26, 0x44, 0xe7, 0x98, 0xe6, 0xd8, 0xec, + 0x45, 0x57, 0x73, 0x69, 0xda, 0xc3, 0xfb, 0x93, 0x2f, 0x62, 0x84, 0x6b, 0x10, 0x51, 0xc3, 0xfb, + 0x0c, 0x5f, 0x9f, 0x1c, 0x87, 0x9a, 0x73, 0xbc, 0x29, 0x70, 0x52, 0x0e, 0x47, 0x11, 0x09, 0x48, + 0x1a, 0xf0, 0x39, 0x64, 0x44, 0x0d, 0xb7, 0xf2, 0xc8, 0x7f, 0x85, 0xf0, 0x81, 0x10, 0x43, 0x8f, + 0x93, 0xe9, 0x54, 0x9c, 0xed, 0xd0, 0x8f, 0x1c, 0xc2, 0x7b, 0xca, 0xb4, 0x6a, 0x38, 0x86, 0x65, + 0xe6, 0xcc, 0x4a, 0x29, 0x4f, 0xcb, 0x0c, 0x65, 0xa7, 0xba, 0x5b, 0x0c, 0x5f, 0x62, 0xa3, 0xa1, + 0x89, 0x40, 0xa7, 0x33, 0x3c, 0x11, 0xf0, 0x3e, 0x45, 0x38, 0x9b, 0x84, 0x17, 0x82, 0xf2, 0x6f, + 0xbc, 0x47, 0x17, 0x6f, 0x42, 0xc1, 0x18, 0x94, 0xf9, 0xf7, 0x40, 0x16, 0xdf, 0x03, 0xf9, 0xac, + 0x79, 0x57, 0xdd, 0xad, 0x87, 0xdc, 0x90, 0x11, 0xdc, 0x0b, 0x81, 0xf4, 0x59, 0xf5, 0xf0, 0x81, + 0xf9, 0x42, 0x2d, 0x1a, 0x1d, 0x49, 0xd1, 0xe8, 0xdc, 0x4a, 0x34, 0xca, 0x78, 0x94, 0x91, 0x5b, + 0xd0, 0xf4, 0x65, 0xea, 0xce, 0x59, 0xa5, 0x92, 0xe1, 0x96, 0xa8, 0xe9, 0xa6, 0x8d, 0x83, 0x84, + 0x7b, 0x1c, 0xcf, 0x85, 0xa9, 0x53, 0x08, 0x80, 0xff, 0x9c, 0xfd, 0x14, 0xe1, 0xb1, 0x98, 0x45, + 0x41, 0x4c, 0x96, 0xb2, 0xc4, 0x28, 0x5b, 0xb8, 0x4f, 0x0d, 0x8c, 0xb4, 0x72, 0x7b, 0x7e, 0x16, + 0x07, 0xce, 0x49, 0x2b, 0x49, 0x38, 0xcf, 0x76, 0x6c, 0x39, 0xcf, 0xbe, 0x14, 0x29, 0x3f, 0x02, + 0xa1, 0x9f, 0x66, 0x77, 0xd6, 0xd4, 0x12, 0x99, 0x76, 0x22, 0x32, 0xd3, 0x72, 0x27, 0x7c, 0x2f, + 0x07, 0x8d, 0x5e, 0x85, 0x34, 0x6b, 0xe1, 0xfd, 0x01, 0xa2, 0x2a, 0xd5, 0xa9, 0x61, 0xb7, 0x74, + 0x67, 0x3e, 0x40, 0x58, 0x8a, 0x5a, 0x11, 0x64, 0x95, 0x70, 0x4f, 0xd9, 0x1b, 0xaa, 0x52, 0xee, + 0xb7, 0x47, 0xf5, 0x9f, 0x5b, 0x79, 0x46, 0x6f, 0x43, 0xc2, 0xe4, 0xa0, 0xce, 0xea, 0xcb, 0xa6, + 0x75, 0x7b, 0x85, 0x16, 0x8a, 0xb4, 0xd5, 0x07, 0xf5, 0xa1, 0x48, 0x7d, 0x31, 0x2b, 0x83, 0x2c, + 0x93, 0x78, 0x8f, 0x16, 0x7e, 0x05, 0x47, 0xb6, 0x7e, 0xb8, 0x95, 0xe7, 0xf6, 0x45, 0x22, 0xd6, + 0x57, 0xe5, 0xf0, 0x92, 0x33, 0x78, 0xc4, 0x66, 0x00, 0x73, 0xb5, 0xb3, 0x96, 0x13, 0x82, 0x3b, + 0xc3, 0x9d, 0x13, 0x1d, 0x93, 0x9d, 0xea, 0x7e, 0xbb, 0xee, 0x64, 0x2f, 0x8a, 0x09, 0xd9, 0xdf, + 0x11, 0x3e, 0x98, 0x48, 0x13, 0x62, 0xf2, 0x7f, 0xdc, 0x5f, 0x27, 0xfe, 0xe6, 0xd3, 0x40, 0x83, + 0xe5, 0xab, 0x90, 0x0b, 0x3e, 0x11, 0x79, 0xf9, 0xaa, 0x29, 0xce, 0x1c, 0xc7, 0x9c, 0x3a, 0xb4, + 0x1b, 0x84, 0xa4, 0x63, 0xa3, 0x90, 0xdc, 0x81, 0x74, 0x1c, 0x01, 0x0c, 0x82, 0x31, 0x8a, 0x7b, + 0x6b, 0xfe, 0x10, 0xf3, 0x57, 0x1b, 0x08, 0x68, 0xd2, 0xde, 0xa4, 0x26, 0xf7, 0x44, 0xba, 0xaa, + 0x2d, 0x7d, 0x56, 0x5f, 0x4e, 0x2d, 0xc8, 0x31, 0x3c, 0x08, 0x82, 0x68, 0xfa, 0x72, 0x83, 0x12, + 0xc4, 0x16, 0x3b, 0xaf, 0x26, 0x41, 0x05, 0x8f, 0x44, 0xe2, 0x68, 0x31, 0xff, 0xeb, 0x70, 0x57, + 0xbe, 0x44, 0xef, 0xf8, 0xf1, 0x50, 0x39, 0x80, 0xb4, 0xf7, 0xf0, 0x6f, 0x10, 0x9e, 0x88, 0xf7, + 0x0d, 0xbc, 0xa6, 0xf1, 0x90, 0x49, 0xef, 0xd4, 0x36, 0x4b, 0x0e, 0xd8, 0xb3, 0xa5, 0x3a, 0xd5, + 0x01, 0xb3, 0xd1, 0xb6, 0x95, 0x29, 0xf0, 0x75, 0xb8, 0xcb, 0x05, 0x21, 0x2f, 0x52, 0xb3, 0x90, + 0x56, 0x8b, 0x2f, 0xc4, 0xd1, 0x6b, 0x74, 0x0c, 0x42, 0xfc, 0x1d, 0x93, 0xb0, 0x10, 0x0e, 0x35, + 0x0b, 0xa0, 0x42, 0xbf, 0x59, 0x67, 0xd5, 0x4a, 0x09, 0x54, 0x3c, 0xcc, 0x37, 0x22, 0xef, 0xd7, + 0xfc, 0xb7, 0x5c, 0xb6, 0xca, 0x69, 0xe9, 0x7f, 0x87, 0xe0, 0x1a, 0x12, 0x76, 0xea, 0x27, 0xda, + 0x5d, 0xd4, 0x1b, 0xe0, 0xb1, 0xb7, 0x5d, 0xb8, 0xf5, 0x1f, 0x88, 0xcc, 0xb2, 0x60, 0xca, 0x26, + 0x02, 0xfc, 0x3e, 0x1a, 0x18, 0x6b, 0xa5, 0x34, 0xa2, 0xcb, 0x04, 0x2c, 0xd2, 0xaa, 0xf2, 0xb5, + 0xe8, 0x32, 0xf9, 0xfe, 0x40, 0x90, 0xd3, 0xb8, 0x1b, 0xba, 0x65, 0x89, 0x5d, 0x26, 0x30, 0x03, + 0xa4, 0xc2, 0xa4, 0x95, 0x02, 0x8c, 0x40, 0x18, 0xa1, 0x8e, 0x5b, 0xd0, 0xca, 0x5a, 0x49, 0xe4, + 0xca, 0xec, 0x15, 0xc8, 0xa4, 0x75, 0x2f, 0x81, 0xd3, 0x0c, 0xee, 0xb2, 0xd9, 0x08, 0x50, 0x1a, + 0x89, 0xf9, 0x86, 0x32, 0x23, 0x98, 0x3a, 0xfd, 0xcb, 0x08, 0xde, 0xc1, 0x7c, 0x92, 0xcf, 0x11, + 0xee, 0x06, 0xc7, 0x64, 0x32, 0xd2, 0x34, 0xa2, 0xff, 0x27, 0x1d, 0xde, 0xc4, 0x4c, 0x8e, 0x2f, + 0x3b, 0xfb, 0xfe, 0x93, 0x17, 0x0f, 0xda, 0x4f, 0x93, 0x7f, 0x29, 0x09, 0xfd, 0x4d, 0x47, 0x59, + 0xad, 0x05, 0x74, 0x4d, 0xf1, 0xc2, 0xec, 0x28, 0xab, 0x10, 0xfc, 0x35, 0x72, 0x1f, 0xe1, 0x1e, + 0xd1, 0xaf, 0x21, 0x1b, 0xaf, 0x2d, 0x94, 0x93, 0x8e, 0x6c, 0x66, 0x2a, 0xe0, 0xfc, 0x2b, 0xc3, + 0x39, 0x4e, 0xc6, 0x12, 0x71, 0x92, 0x6f, 0x11, 0x26, 0x8d, 0x4d, 0x24, 0x32, 0x93, 0xb0, 0x52, + 0x5c, 0xf7, 0x4b, 0x3a, 0xde, 0x9c, 0x11, 0x00, 0x3d, 0xc3, 0x80, 0x9e, 0x24, 0x27, 0xa2, 0x81, + 0xfa, 0x86, 0x9e, 0xa6, 0xfe, 0xc3, 0x5a, 0x8d, 0xc1, 0x63, 0x8f, 0x41, 0x43, 0x07, 0x27, 0x91, + 0x41, 0x5c, 0x2b, 0x29, 0x91, 0x41, 0x6c, 0x93, 0x28, 0x7b, 0x99, 0x31, 0x98, 0x27, 0xe7, 0xb6, + 0xbe, 0x25, 0x94, 0x60, 0x6b, 0x89, 0x7c, 0xd4, 0x8e, 0x87, 0x22, 0x5b, 0x20, 0xe4, 0xc4, 0xc6, + 0x00, 0xa3, 0x7a, 0x3c, 0xd2, 0x3f, 0x9b, 0xb6, 0x03, 0x6e, 0x1f, 0x20, 0x46, 0xee, 0x3d, 0x44, + 0xde, 0x4d, 0xc3, 0x2e, 0xdc, 0xae, 0x51, 0x44, 0xdf, 0x47, 0x59, 0xad, 0xeb, 0x20, 0xad, 0x29, + 0x3c, 0xed, 0x04, 0x5e, 0xf0, 0x81, 0x35, 0xf2, 0x14, 0xe1, 0xfe, 0xfa, 0x32, 0x9c, 0x4c, 0xc5, + 0xf3, 0x8a, 0x69, 0xb3, 0x48, 0xd3, 0xcd, 0x98, 0x80, 0x0a, 0x6f, 0x33, 0x11, 0x6e, 0x90, 0x6b, + 0x29, 0x34, 0x68, 0xb8, 0xf8, 0x3a, 0xca, 0xaa, 0xf8, 0x88, 0xaf, 0x91, 0x27, 0x08, 0xef, 0x6d, + 0x68, 0x32, 0x90, 0x26, 0xb0, 0xfa, 0xa7, 0x70, 0xa6, 0x29, 0x1b, 0x20, 0x78, 0x95, 0x11, 0xbc, + 0x4c, 0x2e, 0x6e, 0x2b, 0x41, 0xf2, 0x3d, 0xc2, 0xbb, 0x42, 0xf5, 0x3d, 0x91, 0x37, 0x42, 0x17, + 0x6e, 0x3d, 0x48, 0xca, 0xa6, 0xe7, 0x03, 0x93, 0x37, 0x19, 0x93, 0x37, 0xc8, 0xd5, 0xf4, 0x4c, + 0xe0, 0x9a, 0x11, 0x8a, 0xd3, 0x3a, 0xc2, 0x43, 0x91, 0xf5, 0x60, 0xd2, 0xd1, 0x4c, 0xea, 0x26, + 0x24, 0x1d, 0xcd, 0xc4, 0x5e, 0x40, 0xf6, 0x3a, 0x63, 0xba, 0x48, 0xae, 0xa4, 0x67, 0xaa, 0xe9, + 0xcb, 0x21, 0x96, 0x2f, 0x11, 0xfe, 0x4b, 0x74, 0xd5, 0x4b, 0x9a, 0x85, 0xeb, 0xef, 0xcb, 0x93, + 0xcd, 0x1b, 0x02, 0xd1, 0x1b, 0x8c, 0xe8, 0x6b, 0x44, 0xdd, 0x16, 0xa2, 0x61, 0x3a, 0xf7, 0xda, + 0xf1, 0xde, 0x86, 0x6a, 0x32, 0xe9, 0xdc, 0xc5, 0xd5, 0xc4, 0x49, 0xe7, 0x2e, 0xb6, 0x5c, 0xdd, + 0xa6, 0xf4, 0x1a, 0x95, 0x5a, 0x12, 0xea, 0xec, 0x35, 0xa5, 0xe2, 0x03, 0xca, 0xd9, 0x40, 0xf9, + 0x37, 0x84, 0x77, 0x87, 0x6b, 0x4a, 0xa2, 0x6c, 0x86, 0x51, 0xa0, 0x0a, 0x96, 0x8e, 0x6d, 0xde, + 0x00, 0xf8, 0xbf, 0xc3, 0xe8, 0x57, 0x89, 0xdb, 0x1a, 0xf6, 0xa1, 0xa2, 0x3a, 0x44, 0xdb, 0xdb, + 0xf1, 0xe4, 0x07, 0x84, 0x07, 0x22, 0x8a, 0x4e, 0x92, 0x70, 0x0d, 0x88, 0xaf, 0x7f, 0xa5, 0x7f, + 0x34, 0x69, 0x05, 0x12, 0x2c, 0x30, 0x09, 0x2e, 0x90, 0xf3, 0x29, 0x24, 0x08, 0x55, 0x84, 0xde, + 0x8d, 0xa8, 0xbf, 0xbe, 0x7e, 0x4c, 0xfa, 0x52, 0xc6, 0x14, 0xb1, 0x49, 0x5f, 0xca, 0xb8, 0xf2, + 0x74, 0x5b, 0x3e, 0x24, 0x8d, 0xf5, 0xad, 0x77, 0x4d, 0xed, 0x0b, 0xd6, 0x84, 0xe4, 0x68, 0xc2, + 0x56, 0x6b, 0x2c, 0x48, 0x25, 0x79, 0xb3, 0xd3, 0xb7, 0x31, 0x28, 0x50, 0x67, 0xe5, 0x58, 0xd5, + 0x49, 0xbe, 0x44, 0xb8, 0x1b, 0x96, 0x4a, 0x2a, 0x4c, 0xc2, 0x25, 0x63, 0x52, 0x61, 0x52, 0x57, + 0x0c, 0x66, 0x2f, 0x30, 0xc8, 0xff, 0x21, 0xb3, 0xe9, 0x21, 0x93, 0x8f, 0x11, 0xde, 0x15, 0x2a, + 0xcf, 0x92, 0xbe, 0xdb, 0x51, 0x45, 0x5e, 0xd2, 0x77, 0x3b, 0xb2, 0xee, 0xcb, 0x1e, 0x64, 0xf0, + 0xc7, 0xc8, 0x48, 0x24, 0x7c, 0x5e, 0xe7, 0xcd, 0x2e, 0x3e, 0x7a, 0x9e, 0x41, 0x8f, 0x9f, 0x67, + 0xd0, 0xcf, 0xcf, 0x33, 0xe8, 0xc3, 0xf5, 0x4c, 0xdb, 0xe3, 0xf5, 0x4c, 0xdb, 0x8f, 0xeb, 0x99, + 0xb6, 0x1b, 0xa7, 0x8a, 0x86, 0xbb, 0x54, 0xc9, 0xcb, 0xba, 0x55, 0x52, 0xe0, 0x9f, 0x54, 0x8c, + 0xbc, 0x7e, 0xb4, 0x68, 0x29, 0xd5, 0x53, 0x4a, 0xc9, 0x2a, 0x54, 0x56, 0xa8, 0xc3, 0xbd, 0x1e, + 0x3b, 0x7e, 0x54, 0x38, 0x76, 0xef, 0xda, 0xd4, 0xc9, 0x77, 0xb1, 0xbf, 0x16, 0xce, 0xfc, 0x11, + 0x00, 0x00, 0xff, 0xff, 0xdb, 0x66, 0x8f, 0x32, 0x34, 0x23, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/timeout_test.go b/modules/core/04-channel/types/timeout_test.go index 8e564e56abc..842e5ac8fc1 100644 --- a/modules/core/04-channel/types/timeout_test.go +++ b/modules/core/04-channel/types/timeout_test.go @@ -13,7 +13,7 @@ func (suite *TypesTestSuite) TestIsValid() { testCases := []struct { name string malleate func() - expPass bool + isValid bool }{ { "success: valid timeout with height and timestamp", @@ -51,11 +51,7 @@ func (suite *TypesTestSuite) TestIsValid() { tc.malleate() isValid := timeout.IsValid() - if tc.expPass { - suite.Require().True(isValid) - } else { - suite.Require().False(isValid) - } + suite.Require().Equal(tc.isValid, isValid) }) } } diff --git a/modules/core/04-channel/types/tx.pb.go b/modules/core/04-channel/types/tx.pb.go index 0f3ede5e8a1..71157b18e4b 100644 --- a/modules/core/04-channel/types/tx.pb.go +++ b/modules/core/04-channel/types/tx.pb.go @@ -1675,7 +1675,7 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1970 bytes of a gzipped FileDescriptorProto + // 1975 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcf, 0x6f, 0xdb, 0xc8, 0x15, 0x36, 0xf5, 0x33, 0x7e, 0x4e, 0xd6, 0x0a, 0xe5, 0xc4, 0x32, 0x6d, 0x4b, 0x8a, 0x5a, 0x6c, 0xbc, 0x6e, 0x22, 0xad, 0xbd, 0x49, 0x81, 0x04, 0x0b, 0xb4, 0x8e, 0xaa, 0x74, 0x0d, 0xc4, 0xb1, @@ -1688,118 +1688,118 @@ var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ 0x96, 0xc6, 0x67, 0x95, 0x33, 0xa9, 0x6c, 0xf7, 0x96, 0x69, 0x6f, 0x79, 0xb8, 0x27, 0xac, 0xc9, 0x9a, 0xac, 0xe1, 0xfe, 0x8a, 0xfd, 0x8b, 0x40, 0x85, 0x75, 0x49, 0x33, 0xfb, 0x9a, 0x59, 0xe9, 0x9b, 0xb2, 0x6d, 0xa2, 0x6f, 0xca, 0xb4, 0xa3, 0x30, 0xf2, 0xd0, 0x53, 0x90, 0x6a, 0xd9, 0xbd, - 0xe4, 0x17, 0x05, 0xdc, 0x62, 0x85, 0xe0, 0xf8, 0xc3, 0x90, 0xd2, 0x67, 0x1c, 0xf0, 0x47, 0xa6, - 0x5c, 0x25, 0x8d, 0xc7, 0x3a, 0x52, 0x0f, 0x55, 0xc5, 0xe2, 0xd7, 0x21, 0xad, 0x6b, 0x86, 0xd5, - 0x54, 0xda, 0x39, 0xae, 0xc8, 0xed, 0x2c, 0x8b, 0x29, 0xfb, 0xf1, 0xb0, 0xcd, 0xbf, 0x0b, 0x69, - 0x6a, 0x20, 0x17, 0x2b, 0x72, 0x3b, 0x2b, 0xfb, 0x5b, 0x65, 0xc6, 0x4c, 0xca, 0xd4, 0xde, 0xa3, - 0xc4, 0x17, 0x5f, 0x17, 0x96, 0x44, 0x67, 0x08, 0x7f, 0x13, 0x52, 0xa6, 0x22, 0xab, 0xc8, 0xc8, - 0xc5, 0x89, 0x55, 0xf2, 0xf4, 0x70, 0xf5, 0xf9, 0xef, 0x0b, 0x4b, 0xbf, 0xf9, 0xe6, 0xf3, 0x5d, - 0xda, 0x50, 0xfa, 0x00, 0x84, 0x60, 0x54, 0x22, 0x32, 0x75, 0x4d, 0x35, 0x11, 0xbf, 0x0d, 0x40, - 0x2d, 0x8e, 0x02, 0x5c, 0xa6, 0x2d, 0x87, 0x6d, 0x3e, 0x07, 0xe9, 0x21, 0x32, 0x4c, 0x45, 0x53, - 0x71, 0x8c, 0xcb, 0xa2, 0xf3, 0xf8, 0x30, 0x61, 0xfb, 0x29, 0x7d, 0x1d, 0x83, 0xeb, 0xe3, 0xd6, - 0x4f, 0x8d, 0xf3, 0xf0, 0x29, 0xef, 0x43, 0x56, 0x37, 0xd0, 0x50, 0xd1, 0x06, 0x66, 0xd3, 0xe3, - 0x16, 0x9b, 0x7e, 0x14, 0xcb, 0x71, 0xe2, 0x75, 0xa7, 0xbb, 0xea, 0x86, 0xe0, 0xa1, 0x29, 0x3e, - 0x3b, 0x4d, 0x7b, 0xb0, 0x26, 0x69, 0x03, 0xd5, 0x42, 0x86, 0xde, 0x32, 0xac, 0xf3, 0xa6, 0x33, - 0x9b, 0x04, 0x8e, 0x2b, 0xeb, 0xed, 0xfb, 0x09, 0xe9, 0xb2, 0x29, 0xd1, 0x0d, 0x4d, 0x7b, 0xd6, - 0x54, 0x54, 0xc5, 0xca, 0x25, 0x8b, 0xdc, 0xce, 0x55, 0x71, 0x19, 0xb7, 0x60, 0x3d, 0xab, 0x70, - 0x95, 0x74, 0x77, 0x90, 0x22, 0x77, 0xac, 0x5c, 0x0a, 0x07, 0x25, 0x78, 0x82, 0x22, 0x79, 0x33, - 0xdc, 0x2b, 0xbf, 0x87, 0x11, 0x34, 0xa4, 0x15, 0x3c, 0x8a, 0x34, 0x79, 0xd4, 0x4b, 0x4f, 0x56, - 0xef, 0x7d, 0xd8, 0x08, 0xf0, 0xeb, 0x8a, 0xe7, 0x51, 0x87, 0x1b, 0x53, 0xc7, 0x27, 0x6b, 0xcc, - 0x27, 0x2b, 0x15, 0xef, 0x6f, 0x01, 0xf1, 0x0e, 0xa4, 0x6e, 0xb8, 0x78, 0x93, 0x6d, 0xf2, 0xdf, - 0x87, 0xf5, 0x31, 0xa6, 0x3d, 0x58, 0x92, 0xa1, 0x37, 0xbc, 0xdd, 0x23, 0x7d, 0x2f, 0xa0, 0xd0, - 0x26, 0x10, 0x3d, 0x9a, 0x96, 0x71, 0x4e, 0x05, 0xba, 0x82, 0x1b, 0xec, 0xe4, 0xbb, 0x5c, 0x7d, - 0x36, 0xfd, 0xfa, 0x1c, 0x48, 0x5d, 0x47, 0x9f, 0xd2, 0x3f, 0x38, 0xb8, 0x31, 0xde, 0x5b, 0xd5, - 0xd4, 0x67, 0x8a, 0xd1, 0xbf, 0x30, 0xc9, 0xee, 0xcc, 0x5b, 0x52, 0x17, 0xd3, 0xea, 0xcc, 0xdc, - 0x56, 0xce, 0x3f, 0xf3, 0xc4, 0x7c, 0x33, 0x4f, 0x4e, 0x9e, 0x79, 0x01, 0xb6, 0x99, 0x73, 0x73, - 0x67, 0x3f, 0x84, 0xec, 0x08, 0x50, 0xed, 0x69, 0x26, 0x9a, 0x5c, 0x0f, 0xa7, 0x4c, 0x3d, 0x72, - 0xc1, 0xdb, 0x86, 0x4d, 0x86, 0x5f, 0x37, 0xac, 0x3f, 0xc4, 0xe0, 0xa6, 0xaf, 0x7f, 0x5e, 0x55, - 0xc6, 0x2b, 0x46, 0x7c, 0x5a, 0xc5, 0x58, 0xa4, 0x2e, 0xfc, 0x23, 0xd8, 0x1e, 0x5b, 0x3e, 0x03, - 0x5d, 0x36, 0x5a, 0x6d, 0xd4, 0x34, 0xd1, 0x87, 0x03, 0xa4, 0x4a, 0x08, 0xe7, 0x7f, 0x42, 0xdc, - 0xf4, 0x82, 0x1a, 0x04, 0x53, 0xa7, 0x90, 0x20, 0x85, 0x45, 0xc8, 0xb3, 0x29, 0x72, 0x59, 0x7c, - 0xcd, 0xc1, 0xb5, 0x23, 0x53, 0x16, 0x91, 0x34, 0x3c, 0x69, 0x49, 0x5d, 0x64, 0xf1, 0x0f, 0x20, - 0xa5, 0xe3, 0x5f, 0x98, 0xbb, 0x95, 0xfd, 0x4d, 0x66, 0x99, 0x26, 0x60, 0x3a, 0x41, 0x3a, 0x80, - 0x7f, 0x0b, 0x32, 0x84, 0x20, 0x49, 0xeb, 0xf7, 0x15, 0xab, 0x8f, 0x54, 0x0b, 0x93, 0x7c, 0x55, - 0x5c, 0xc5, 0xed, 0x55, 0xb7, 0x39, 0xc0, 0x65, 0x7c, 0x3e, 0x2e, 0x13, 0x93, 0x53, 0xe9, 0x17, - 0x78, 0xfd, 0x8e, 0x26, 0xe9, 0x56, 0xde, 0x1f, 0x40, 0xca, 0x40, 0xe6, 0xa0, 0x47, 0x26, 0xfb, - 0xc6, 0xfe, 0x6d, 0xe6, 0x64, 0x1d, 0xb8, 0x88, 0xa1, 0xa7, 0xe7, 0x3a, 0x12, 0xe9, 0x30, 0x5a, - 0x81, 0x3f, 0x8d, 0x01, 0x1c, 0x99, 0xf2, 0xa9, 0xd2, 0x47, 0xda, 0x60, 0x31, 0x14, 0x0e, 0x54, - 0x03, 0x49, 0x48, 0x19, 0xa2, 0xf6, 0x18, 0x85, 0x0d, 0xb7, 0x79, 0x31, 0x14, 0xde, 0x01, 0x5e, - 0x45, 0x1f, 0x5b, 0x6e, 0x9a, 0x35, 0x0d, 0x24, 0x0d, 0x31, 0x9d, 0x09, 0x31, 0x63, 0xf7, 0x38, - 0xc9, 0x65, 0x93, 0x17, 0xbd, 0xa8, 0x7c, 0x80, 0xb7, 0x50, 0x94, 0x8f, 0x45, 0xb3, 0xfd, 0x1f, - 0xf2, 0xbe, 0xa3, 0xd6, 0x8f, 0x55, 0x9c, 0xd8, 0x97, 0x44, 0x7a, 0x01, 0x56, 0x68, 0x8a, 0xdb, - 0x4e, 0x69, 0x8d, 0x20, 0x55, 0x83, 0x84, 0xb1, 0x90, 0x22, 0xc1, 0x56, 0x25, 0x39, 0x55, 0x95, - 0xd4, 0x6c, 0x25, 0x25, 0x7d, 0x81, 0x92, 0x72, 0x86, 0x5f, 0x94, 0xe3, 0xdc, 0x2f, 0x5a, 0xe0, - 0xe7, 0x31, 0x9c, 0x3e, 0x07, 0x52, 0x57, 0xd5, 0x3e, 0xea, 0xa1, 0xb6, 0x8c, 0x70, 0xcd, 0x98, - 0x43, 0xe1, 0x1d, 0x58, 0x6d, 0x8d, 0x5b, 0x73, 0x04, 0xf6, 0x35, 0x8f, 0x04, 0xb6, 0x07, 0xb6, - 0xc7, 0x04, 0x3e, 0xb0, 0x5b, 0x2e, 0xf9, 0xed, 0x2c, 0xe1, 0x5d, 0xbf, 0x8f, 0x89, 0x45, 0xf3, - 0xfd, 0xa7, 0xb1, 0xfd, 0x0d, 0x4d, 0x81, 0xb9, 0x5e, 0xf2, 0x3f, 0x84, 0xd4, 0x33, 0x05, 0xf5, - 0xda, 0x26, 0xad, 0x4a, 0x25, 0x66, 0x60, 0xd4, 0xd3, 0x63, 0x8c, 0x74, 0x14, 0x23, 0xe3, 0xa2, - 0xd7, 0xf6, 0x4f, 0x39, 0xef, 0x06, 0xc6, 0x13, 0xbc, 0xcb, 0xd2, 0xbb, 0x90, 0xa6, 0xa9, 0x4f, - 0x13, 0x67, 0x6b, 0x52, 0x34, 0xce, 0xc9, 0x83, 0x0e, 0xb1, 0x8b, 0x43, 0x60, 0xe1, 0xc4, 0xf0, - 0xc2, 0x59, 0x1d, 0xf8, 0x16, 0x0b, 0x61, 0xf3, 0xbf, 0x71, 0x58, 0x0b, 0x04, 0x34, 0xf1, 0x38, - 0x35, 0x85, 0xcc, 0x1f, 0x43, 0x51, 0x37, 0x34, 0x5d, 0x33, 0x51, 0xdb, 0x5d, 0xc3, 0x92, 0xa6, - 0xaa, 0x48, 0xb2, 0x14, 0x4d, 0x6d, 0x76, 0x34, 0xdd, 0xa6, 0x39, 0xbe, 0xb3, 0x2c, 0x6e, 0x3b, - 0x38, 0xea, 0xb5, 0xea, 0xa2, 0xde, 0xd3, 0x74, 0x93, 0xef, 0xc0, 0x26, 0xb3, 0x20, 0x50, 0xa9, - 0x12, 0x33, 0x4a, 0xb5, 0xc1, 0x28, 0x1c, 0x04, 0x30, 0xbd, 0xf4, 0x24, 0xa7, 0x96, 0x1e, 0xfe, - 0x3b, 0x70, 0x8d, 0x96, 0x5a, 0x7a, 0x6c, 0x4c, 0xe1, 0xb5, 0x48, 0x56, 0x1f, 0x65, 0x77, 0x04, - 0x72, 0x14, 0x4e, 0x7b, 0x40, 0xd4, 0x62, 0x60, 0xc9, 0x5e, 0x99, 0x6f, 0xc9, 0x2e, 0x4f, 0x4e, - 0xc8, 0xbf, 0x73, 0xb0, 0xc5, 0xd2, 0xff, 0xd2, 0xf3, 0xd1, 0x53, 0x1e, 0xe2, 0xf3, 0x94, 0x87, - 0x7f, 0xc6, 0x18, 0x09, 0x3d, 0xcf, 0x11, 0xb3, 0xe1, 0x3b, 0x2a, 0x3a, 0x6c, 0xc4, 0x23, 0xb3, - 0x91, 0x65, 0x24, 0x4e, 0x30, 0x61, 0x12, 0x51, 0x12, 0x26, 0x19, 0x21, 0x61, 0xfe, 0xbf, 0x67, - 0x4f, 0xc4, 0xc8, 0x17, 0xcf, 0xf1, 0x73, 0x51, 0x55, 0xfe, 0xcf, 0x71, 0xc8, 0x05, 0xfc, 0xcc, - 0x7b, 0x64, 0xfa, 0x29, 0x08, 0xcc, 0xdb, 0x02, 0xd3, 0x6a, 0x59, 0x88, 0xa6, 0x9d, 0xc0, 0x8c, - 0xb7, 0x6e, 0x23, 0xc4, 0x1c, 0xe3, 0x32, 0x01, 0xf7, 0x84, 0x26, 0x49, 0x62, 0xc1, 0x49, 0x92, - 0x8c, 0x92, 0x24, 0xa9, 0x08, 0x49, 0x92, 0x9e, 0x2f, 0x49, 0xae, 0x4c, 0x4e, 0x12, 0x05, 0x8a, - 0x61, 0xe2, 0x2d, 0x3a, 0x51, 0x3e, 0x89, 0x33, 0xb6, 0x03, 0xc7, 0x3a, 0x52, 0xbf, 0x85, 0x59, - 0x32, 0xf5, 0x45, 0x93, 0xb8, 0xc0, 0x8b, 0x86, 0x95, 0x12, 0x97, 0x5b, 0x12, 0x0a, 0x8c, 0x3d, - 0x8d, 0xad, 0x80, 0x7b, 0x6e, 0xff, 0x4b, 0x8c, 0xb1, 0x98, 0x9d, 0xf3, 0xe7, 0xa2, 0xea, 0xf2, - 0xec, 0xf7, 0xb5, 0x59, 0x86, 0x50, 0xd1, 0xea, 0xb2, 0x9f, 0xdf, 0xe4, 0x7c, 0xfc, 0xa6, 0x26, - 0xf3, 0x5b, 0x62, 0xac, 0x26, 0xdf, 0x69, 0xb5, 0xf4, 0xd7, 0x18, 0xac, 0x07, 0x97, 0x5c, 0x4b, - 0x95, 0x50, 0xef, 0xc2, 0x0c, 0x3f, 0x81, 0x6b, 0xc8, 0x30, 0x34, 0xa3, 0x89, 0x0f, 0x94, 0xba, - 0x73, 0x68, 0xbf, 0xc5, 0xa4, 0xb6, 0x66, 0x23, 0x45, 0x02, 0xa4, 0xb3, 0xbd, 0x8a, 0x3c, 0x6d, - 0x7c, 0x19, 0xb2, 0x84, 0xb3, 0x71, 0x9b, 0x84, 0xde, 0xeb, 0xb8, 0xcb, 0x6b, 0xe3, 0x92, 0x39, - 0xbe, 0x05, 0x85, 0x10, 0xfa, 0x5c, 0x8a, 0x7f, 0x0d, 0xab, 0x47, 0xa6, 0xdc, 0xd0, 0xdb, 0x2d, - 0x0b, 0x9d, 0xb4, 0x8c, 0x56, 0xdf, 0xe4, 0xb7, 0x60, 0xb9, 0x35, 0xb0, 0x3a, 0x9a, 0xa1, 0x58, - 0xe7, 0xce, 0x77, 0x0c, 0xb7, 0x81, 0x1c, 0x01, 0x6d, 0x1c, 0xfd, 0xd4, 0x12, 0x76, 0x04, 0xb4, - 0x21, 0xa3, 0x23, 0xa0, 0xfd, 0xf4, 0x90, 0x77, 0xe2, 0x1b, 0x99, 0x2b, 0x6d, 0x60, 0x85, 0xbd, - 0xfe, 0xdd, 0xd0, 0x7e, 0xc7, 0xe1, 0x05, 0x76, 0x62, 0x0c, 0x54, 0xe4, 0x3b, 0x7e, 0x99, 0x17, - 0x96, 0x7f, 0x0d, 0x92, 0x3d, 0xa5, 0x4f, 0xef, 0x16, 0x13, 0x22, 0x79, 0x88, 0x7e, 0xd4, 0xf9, - 0x8c, 0xc3, 0x69, 0xcb, 0x8c, 0xc9, 0x7d, 0x09, 0xdc, 0x83, 0x9b, 0x96, 0x66, 0xb5, 0x7a, 0x4d, - 0xdd, 0x86, 0xb5, 0xdd, 0x4a, 0x68, 0xe2, 0x50, 0x13, 0xe2, 0x1a, 0xee, 0xc5, 0x36, 0xda, 0x4e, - 0x09, 0x34, 0xf9, 0x87, 0xb0, 0x41, 0x46, 0x19, 0xa8, 0xdf, 0x52, 0x54, 0x45, 0x95, 0x3d, 0x03, - 0xc9, 0xf6, 0x72, 0x1d, 0x03, 0x44, 0xa7, 0xdf, 0x1d, 0xbb, 0xfb, 0x15, 0x07, 0x7c, 0xf0, 0xa5, - 0xc2, 0xdf, 0x87, 0xa2, 0x58, 0xab, 0x9f, 0x1c, 0x3f, 0xad, 0xd7, 0x9a, 0x62, 0xad, 0xde, 0x78, - 0x72, 0xda, 0x3c, 0xfd, 0xd9, 0x49, 0xad, 0xd9, 0x78, 0x5a, 0x3f, 0xa9, 0x55, 0x0f, 0x1f, 0x1f, - 0xd6, 0x7e, 0x94, 0x59, 0x12, 0x56, 0x5f, 0xbc, 0x2c, 0xae, 0x78, 0x9a, 0xf8, 0xdb, 0xb0, 0xc1, - 0x1c, 0xf6, 0xf4, 0xf8, 0xf8, 0x24, 0xc3, 0x09, 0x57, 0x5e, 0xbc, 0x2c, 0x26, 0xec, 0xdf, 0xfc, - 0x5d, 0xd8, 0x62, 0x02, 0xeb, 0x8d, 0x6a, 0xb5, 0x56, 0xaf, 0x67, 0x62, 0xc2, 0xca, 0x8b, 0x97, - 0xc5, 0x34, 0x7d, 0x0c, 0x85, 0x3f, 0x3e, 0x38, 0x7c, 0xd2, 0x10, 0x6b, 0x99, 0x38, 0x81, 0xd3, - 0x47, 0x21, 0xf1, 0xfc, 0x8f, 0xf9, 0xa5, 0xfd, 0x7f, 0x67, 0x20, 0x7e, 0x64, 0xca, 0x7c, 0x17, - 0x56, 0xfd, 0xdf, 0x03, 0xd9, 0x2f, 0xd7, 0xe0, 0x27, 0x3a, 0xa1, 0x12, 0x11, 0xe8, 0x2a, 0xd8, - 0x81, 0x37, 0x7c, 0x1f, 0xe2, 0xde, 0x8c, 0x60, 0xe2, 0xd4, 0x38, 0x17, 0xca, 0xd1, 0x70, 0x21, - 0x9e, 0xec, 0x2d, 0x7d, 0x14, 0x4f, 0x07, 0x52, 0x37, 0x92, 0x27, 0xef, 0x1e, 0xd6, 0x02, 0x9e, - 0xf1, 0xf9, 0x64, 0x37, 0x82, 0x15, 0x8a, 0x15, 0xf6, 0xa3, 0x63, 0x5d, 0xaf, 0x2a, 0x64, 0x02, - 0xdf, 0x2d, 0x76, 0xa6, 0xd8, 0x71, 0x91, 0xc2, 0xdb, 0x51, 0x91, 0xae, 0xbf, 0x8f, 0x20, 0xcb, - 0xfa, 0x1e, 0xf1, 0xbd, 0x28, 0x86, 0x9c, 0x79, 0xbe, 0x33, 0x03, 0xd8, 0x75, 0xfc, 0x73, 0x00, - 0xcf, 0x15, 0x7e, 0x29, 0xcc, 0xc4, 0x08, 0x23, 0xec, 0x4e, 0xc7, 0xb8, 0xd6, 0xeb, 0x90, 0x76, - 0xb6, 0x16, 0x85, 0xb0, 0x61, 0x14, 0x20, 0xdc, 0x9e, 0x02, 0xf0, 0xe6, 0x9e, 0xef, 0x06, 0xf7, - 0xcd, 0x29, 0x43, 0x29, 0x2e, 0x3c, 0xf7, 0x42, 0x6e, 0x25, 0xbb, 0xb0, 0xea, 0xbf, 0x4a, 0x0c, - 0x8d, 0xd2, 0x07, 0x0c, 0x5f, 0xbc, 0x61, 0x57, 0x72, 0xa3, 0x44, 0xf7, 0xde, 0xa3, 0x4d, 0x4b, - 0x74, 0x0f, 0x76, 0x6a, 0xa2, 0xb3, 0xae, 0xb8, 0x3e, 0x84, 0xeb, 0xc1, 0xfb, 0xa6, 0xb7, 0xa2, - 0x19, 0xb2, 0x0b, 0xc7, 0x5e, 0x64, 0x68, 0xb8, 0x4b, 0xbb, 0x7c, 0x44, 0x74, 0x69, 0x57, 0x90, - 0xbd, 0xc8, 0x50, 0xd7, 0xe5, 0xaf, 0xe0, 0x06, 0xfb, 0xf4, 0x7a, 0x37, 0x9a, 0x2d, 0x67, 0x89, - 0xdd, 0x9f, 0x09, 0x1e, 0x2e, 0x2d, 0x3e, 0x13, 0x45, 0x94, 0xd6, 0xc6, 0x46, 0x95, 0xd6, 0xbb, - 0xd3, 0x0f, 0x4e, 0xda, 0x59, 0x8a, 0x11, 0x27, 0xed, 0x2c, 0xcc, 0xfb, 0x33, 0xc1, 0x5d, 0xf7, - 0xbf, 0x84, 0x35, 0xe6, 0x0e, 0xf8, 0x4e, 0x44, 0x0e, 0x31, 0x5a, 0xb8, 0x37, 0x0b, 0xda, 0xf5, - 0xad, 0x40, 0x96, 0xec, 0xcd, 0x28, 0x8a, 0x6e, 0x11, 0xbf, 0x1b, 0x66, 0xcc, 0xbb, 0x91, 0x13, - 0xee, 0x44, 0x41, 0x79, 0x59, 0x66, 0x6f, 0xf5, 0x42, 0x59, 0x66, 0xc2, 0xc3, 0x59, 0x9e, 0xb8, - 0x69, 0x13, 0x92, 0x9f, 0x7c, 0xf3, 0xf9, 0x2e, 0xf7, 0xa8, 0xfe, 0xc5, 0xab, 0x3c, 0xf7, 0xe5, - 0xab, 0x3c, 0xf7, 0xaf, 0x57, 0x79, 0xee, 0xb7, 0xaf, 0xf3, 0x4b, 0x5f, 0xbe, 0xce, 0x2f, 0x7d, - 0xf5, 0x3a, 0xbf, 0xf4, 0xfe, 0x03, 0x59, 0xb1, 0x3a, 0x83, 0xb3, 0xb2, 0xa4, 0xf5, 0x2b, 0xf4, - 0xcf, 0x4f, 0xca, 0x99, 0x74, 0x57, 0xd6, 0x2a, 0xc3, 0x07, 0x95, 0xbe, 0xd6, 0x1e, 0xf4, 0x90, - 0x49, 0xfe, 0xd7, 0xf4, 0xf6, 0xbd, 0xbb, 0xce, 0x5f, 0x9b, 0xac, 0x73, 0x1d, 0x99, 0x67, 0x29, - 0xfc, 0xb7, 0xa6, 0x77, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x89, 0x8e, 0x79, 0x15, 0x7e, 0x25, - 0x00, 0x00, + 0xe4, 0x17, 0x05, 0xdc, 0x62, 0x85, 0xe0, 0xf8, 0x9b, 0x00, 0x19, 0xe8, 0xb2, 0xd1, 0x6a, 0x23, + 0x02, 0x29, 0x7d, 0xc6, 0x01, 0x7f, 0x64, 0xca, 0x55, 0xd2, 0x7f, 0xac, 0x23, 0xf5, 0x50, 0x55, + 0x2c, 0x7e, 0x1d, 0xd2, 0xba, 0x66, 0x58, 0x4d, 0xa5, 0x9d, 0xe3, 0x8a, 0xdc, 0xce, 0xb2, 0x98, + 0xb2, 0x1f, 0x0f, 0xdb, 0xfc, 0xbb, 0x90, 0xa6, 0xb6, 0x72, 0xb1, 0x22, 0xb7, 0xb3, 0xb2, 0xbf, + 0x55, 0x66, 0x4c, 0xb6, 0x4c, 0xed, 0x3d, 0x4a, 0x7c, 0xf1, 0x75, 0x61, 0x49, 0x74, 0x86, 0xf0, + 0x37, 0x21, 0x65, 0x2a, 0xb2, 0x8a, 0x8c, 0x5c, 0x9c, 0x58, 0x25, 0x4f, 0x0f, 0x57, 0x9f, 0xff, + 0xbe, 0xb0, 0xf4, 0x9b, 0x6f, 0x3e, 0xdf, 0xa5, 0x0d, 0xa5, 0x0f, 0x40, 0x08, 0x46, 0x25, 0x22, + 0x53, 0xd7, 0x54, 0x13, 0xf1, 0xdb, 0x00, 0xd4, 0xe2, 0x28, 0xc0, 0x65, 0xda, 0x72, 0xd8, 0xe6, + 0x73, 0x90, 0x1e, 0x22, 0xc3, 0x54, 0x34, 0x15, 0xc7, 0xb8, 0x2c, 0x3a, 0x8f, 0x0f, 0x13, 0xb6, + 0x9f, 0xd2, 0xd7, 0x31, 0xb8, 0x3e, 0x6e, 0xfd, 0xd4, 0x38, 0x0f, 0x9f, 0xf2, 0x3e, 0x64, 0x75, + 0x03, 0x0d, 0x15, 0x6d, 0x60, 0x36, 0x3d, 0x6e, 0xb1, 0xe9, 0x47, 0xb1, 0x1c, 0x27, 0x5e, 0x77, + 0xba, 0xab, 0x6e, 0x08, 0x1e, 0x9a, 0xe2, 0xb3, 0xd3, 0xb4, 0x07, 0x6b, 0x92, 0x36, 0x50, 0x2d, + 0x64, 0xe8, 0x2d, 0xc3, 0x3a, 0x6f, 0x3a, 0xb3, 0x49, 0xe0, 0xb8, 0xb2, 0xde, 0xbe, 0x9f, 0x90, + 0x2e, 0x9b, 0x12, 0xdd, 0xd0, 0xb4, 0x67, 0x4d, 0x45, 0x55, 0xac, 0x5c, 0xb2, 0xc8, 0xed, 0x5c, + 0x15, 0x97, 0x71, 0x0b, 0xd6, 0xb3, 0x0a, 0x57, 0x49, 0x77, 0x07, 0x29, 0x72, 0xc7, 0xca, 0xa5, + 0x70, 0x50, 0x82, 0x27, 0x28, 0x92, 0x5a, 0xc3, 0xbd, 0xf2, 0x7b, 0x18, 0x41, 0x43, 0x5a, 0xc1, + 0xa3, 0x48, 0x93, 0x47, 0xbd, 0xf4, 0x64, 0xf5, 0xde, 0x87, 0x8d, 0x00, 0xbf, 0xae, 0x78, 0x1e, + 0x75, 0xb8, 0x31, 0x75, 0x7c, 0xb2, 0xc6, 0x7c, 0xb2, 0x52, 0xf1, 0xfe, 0x16, 0x10, 0xef, 0x40, + 0xea, 0x86, 0x8b, 0x37, 0xd9, 0x26, 0xff, 0x7d, 0x58, 0x1f, 0x63, 0xda, 0x83, 0x25, 0x19, 0x7a, + 0xc3, 0xdb, 0x3d, 0xd2, 0xf7, 0x02, 0x0a, 0x6d, 0x02, 0xd1, 0xa3, 0x69, 0x19, 0xe7, 0x54, 0xa0, + 0x2b, 0xb8, 0xc1, 0x4e, 0xbe, 0xcb, 0xd5, 0x67, 0xd3, 0xaf, 0xcf, 0x81, 0xd4, 0x75, 0xf4, 0x29, + 0xfd, 0x83, 0x83, 0x1b, 0xe3, 0xbd, 0x55, 0x4d, 0x7d, 0xa6, 0x18, 0xfd, 0x0b, 0x93, 0xec, 0xce, + 0xbc, 0x25, 0x75, 0x31, 0xad, 0xce, 0xcc, 0x6d, 0xe5, 0xfc, 0x33, 0x4f, 0xcc, 0x37, 0xf3, 0xe4, + 0xe4, 0x99, 0x17, 0x60, 0x9b, 0x39, 0x37, 0x77, 0xf6, 0x43, 0xc8, 0x8e, 0x00, 0xd5, 0x9e, 0x66, + 0xa2, 0xc9, 0xf5, 0x70, 0xca, 0xd4, 0x23, 0x17, 0xbc, 0x6d, 0xd8, 0x64, 0xf8, 0x75, 0xc3, 0xfa, + 0x43, 0x0c, 0x6e, 0xfa, 0xfa, 0xe7, 0x55, 0x65, 0xbc, 0x62, 0xc4, 0xa7, 0x55, 0x8c, 0x45, 0xea, + 0xc2, 0x3f, 0x82, 0xed, 0xb1, 0xe5, 0x43, 0xdf, 0x49, 0x4d, 0x13, 0x7d, 0x38, 0x40, 0xaa, 0x84, + 0x70, 0xfe, 0x27, 0xc4, 0x4d, 0x2f, 0xa8, 0x41, 0x30, 0x75, 0x0a, 0x09, 0x52, 0x58, 0x84, 0x3c, + 0x9b, 0x22, 0x97, 0xc5, 0xd7, 0x1c, 0x5c, 0x3b, 0x32, 0x65, 0x11, 0x49, 0xc3, 0x93, 0x96, 0xd4, + 0x45, 0x16, 0xff, 0x00, 0x52, 0x3a, 0xfe, 0x85, 0xb9, 0x5b, 0xd9, 0xdf, 0x64, 0x96, 0x69, 0x02, + 0xa6, 0x13, 0xa4, 0x03, 0xf8, 0xb7, 0x20, 0x43, 0x08, 0x92, 0xb4, 0x7e, 0x5f, 0xb1, 0xfa, 0x48, + 0xb5, 0x30, 0xc9, 0x57, 0xc5, 0x55, 0xdc, 0x5e, 0x75, 0x9b, 0x03, 0x5c, 0xc6, 0xe7, 0xe3, 0x32, + 0x31, 0x39, 0x95, 0x7e, 0x81, 0xd7, 0xef, 0x68, 0x92, 0x6e, 0xe5, 0xfd, 0x01, 0xa4, 0x0c, 0x64, + 0x0e, 0x7a, 0x64, 0xb2, 0x6f, 0xec, 0xdf, 0x66, 0x4e, 0xd6, 0x81, 0x8b, 0x18, 0x7a, 0x7a, 0xae, + 0x23, 0x91, 0x0e, 0xa3, 0x15, 0xf8, 0xd3, 0x18, 0xc0, 0x91, 0x29, 0x9f, 0x2a, 0x7d, 0xa4, 0x0d, + 0x16, 0x43, 0xe1, 0x40, 0x35, 0x90, 0x84, 0x94, 0x21, 0x6a, 0x8f, 0x51, 0xd8, 0x70, 0x9b, 0x17, + 0x43, 0xe1, 0x1d, 0xe0, 0x55, 0xf4, 0xb1, 0xe5, 0xa6, 0x59, 0xd3, 0x40, 0xd2, 0x10, 0xd3, 0x99, + 0x10, 0x33, 0x76, 0x8f, 0x93, 0x5c, 0x36, 0x79, 0xd1, 0x8b, 0xca, 0x07, 0x78, 0x0b, 0x45, 0xf9, + 0x58, 0x34, 0xdb, 0xff, 0x21, 0xef, 0x3b, 0x6a, 0xfd, 0x58, 0xc5, 0x89, 0x7d, 0x49, 0xa4, 0x17, + 0x60, 0x85, 0xa6, 0xb8, 0xed, 0x94, 0xd6, 0x08, 0x52, 0x35, 0x48, 0x18, 0x0b, 0x29, 0x12, 0x6c, + 0x55, 0x92, 0x53, 0x55, 0x49, 0xcd, 0x56, 0x52, 0xd2, 0x17, 0x28, 0x29, 0x67, 0xf8, 0x45, 0x39, + 0xce, 0xfd, 0xa2, 0x05, 0x7e, 0x1e, 0xc3, 0xe9, 0x73, 0x20, 0x75, 0x55, 0xed, 0xa3, 0x1e, 0x6a, + 0xcb, 0x08, 0xd7, 0x8c, 0x39, 0x14, 0xde, 0x81, 0xd5, 0xd6, 0xb8, 0x35, 0x47, 0x60, 0x5f, 0xf3, + 0x48, 0x60, 0x7b, 0x60, 0x7b, 0x4c, 0xe0, 0x03, 0xbb, 0xe5, 0x92, 0xdf, 0xce, 0x12, 0xde, 0xf5, + 0xfb, 0x98, 0x58, 0x34, 0xdf, 0x7f, 0x1a, 0xdb, 0xdf, 0xd0, 0x14, 0x98, 0xeb, 0x25, 0xff, 0x43, + 0x48, 0x3d, 0x53, 0x50, 0xaf, 0x6d, 0xd2, 0xaa, 0x54, 0x62, 0x06, 0x46, 0x3d, 0x3d, 0xc6, 0x48, + 0x47, 0x31, 0x32, 0x2e, 0x7a, 0x6d, 0xff, 0x94, 0xf3, 0x6e, 0x60, 0x3c, 0xc1, 0xbb, 0x2c, 0xbd, + 0x0b, 0x69, 0x9a, 0xfa, 0x34, 0x71, 0xb6, 0x26, 0x45, 0xe3, 0x9c, 0x3c, 0xe8, 0x10, 0xbb, 0x38, + 0x04, 0x16, 0x4e, 0x0c, 0x2f, 0x9c, 0xd5, 0x81, 0x6f, 0xb1, 0x10, 0x36, 0xff, 0x1b, 0x87, 0xb5, + 0x40, 0x40, 0x13, 0x8f, 0x53, 0x53, 0xc8, 0xfc, 0x31, 0x14, 0x75, 0x43, 0xd3, 0x35, 0x13, 0xb5, + 0xdd, 0x35, 0x2c, 0x69, 0xaa, 0x8a, 0x24, 0x4b, 0xd1, 0xd4, 0x66, 0x47, 0xd3, 0x6d, 0x9a, 0xe3, + 0x3b, 0xcb, 0xe2, 0xb6, 0x83, 0xa3, 0x5e, 0xab, 0x2e, 0xea, 0x3d, 0x4d, 0x37, 0xf9, 0x0e, 0x6c, + 0x32, 0x0b, 0x02, 0x95, 0x2a, 0x31, 0xa3, 0x54, 0x1b, 0x8c, 0xc2, 0x41, 0x00, 0xd3, 0x4b, 0x4f, + 0x72, 0x6a, 0xe9, 0xe1, 0xbf, 0x03, 0xd7, 0x68, 0xa9, 0xa5, 0xc7, 0xc6, 0x14, 0x5e, 0x8b, 0x64, + 0xf5, 0x51, 0x76, 0x47, 0x20, 0x47, 0xe1, 0xb4, 0x07, 0x44, 0x2d, 0x06, 0x96, 0xec, 0x95, 0xf9, + 0x96, 0xec, 0xf2, 0xe4, 0x84, 0xfc, 0x3b, 0x07, 0x5b, 0x2c, 0xfd, 0x2f, 0x3d, 0x1f, 0x3d, 0xe5, + 0x21, 0x3e, 0x4f, 0x79, 0xf8, 0x67, 0x8c, 0x91, 0xd0, 0xf3, 0x1c, 0x31, 0x1b, 0xbe, 0xa3, 0xa2, + 0xc3, 0x46, 0x3c, 0x32, 0x1b, 0x59, 0x46, 0xe2, 0x04, 0x13, 0x26, 0x11, 0x25, 0x61, 0x92, 0x11, + 0x12, 0xe6, 0xff, 0x7b, 0xf6, 0x44, 0x8c, 0x7c, 0xf1, 0x1c, 0x3f, 0x17, 0x55, 0xe5, 0xff, 0x1c, + 0x87, 0x5c, 0xc0, 0xcf, 0xbc, 0x47, 0xa6, 0x9f, 0x82, 0xc0, 0xbc, 0x2d, 0x30, 0xad, 0x96, 0x85, + 0x68, 0xda, 0x09, 0xcc, 0x78, 0xeb, 0x36, 0x42, 0xcc, 0x31, 0x2e, 0x13, 0x70, 0x4f, 0x68, 0x92, + 0x24, 0x16, 0x9c, 0x24, 0xc9, 0x28, 0x49, 0x92, 0x8a, 0x90, 0x24, 0xe9, 0xf9, 0x92, 0xe4, 0xca, + 0xe4, 0x24, 0x51, 0xa0, 0x18, 0x26, 0xde, 0xa2, 0x13, 0xe5, 0x93, 0x38, 0x63, 0x3b, 0x70, 0xac, + 0x23, 0xf5, 0x5b, 0x98, 0x25, 0x53, 0x5f, 0x34, 0x89, 0x0b, 0xbc, 0x68, 0x58, 0x29, 0x71, 0xb9, + 0x25, 0xa1, 0xc0, 0xd8, 0xd3, 0xd8, 0x0a, 0xb8, 0xe7, 0xf6, 0xbf, 0xc4, 0x18, 0x8b, 0xd9, 0x39, + 0x7f, 0x2e, 0xaa, 0x2e, 0xcf, 0x7e, 0x5f, 0x9b, 0x65, 0x08, 0x15, 0xad, 0x2e, 0xfb, 0xf9, 0x4d, + 0xce, 0xc7, 0x6f, 0x6a, 0x32, 0xbf, 0x25, 0xc6, 0x6a, 0xf2, 0x9d, 0x56, 0x4b, 0x7f, 0x8d, 0xc1, + 0x7a, 0x70, 0xc9, 0xb5, 0x54, 0x09, 0xf5, 0x2e, 0xcc, 0xf0, 0x13, 0xb8, 0x86, 0x0c, 0x43, 0x33, + 0x9a, 0xf8, 0x40, 0xa9, 0x3b, 0x87, 0xf6, 0x5b, 0x4c, 0x6a, 0x6b, 0x36, 0x52, 0x24, 0x40, 0x3a, + 0xdb, 0xab, 0xc8, 0xd3, 0xc6, 0x97, 0x21, 0x4b, 0x38, 0x1b, 0xb7, 0x49, 0xe8, 0xbd, 0x8e, 0xbb, + 0xbc, 0x36, 0x2e, 0x99, 0xe3, 0x5b, 0x50, 0x08, 0xa1, 0xcf, 0xa5, 0xf8, 0xd7, 0xb0, 0x7a, 0x64, + 0xca, 0x0d, 0xbd, 0xdd, 0xb2, 0xd0, 0x49, 0xcb, 0x68, 0xf5, 0x4d, 0x7e, 0x0b, 0x96, 0x5b, 0x03, + 0xab, 0xa3, 0x19, 0x8a, 0x75, 0xee, 0x7c, 0xc7, 0x70, 0x1b, 0xc8, 0x11, 0xd0, 0xc6, 0xd1, 0x4f, + 0x2d, 0x61, 0x47, 0x40, 0x1b, 0x32, 0x3a, 0x02, 0xda, 0x4f, 0x0f, 0x79, 0x27, 0xbe, 0x91, 0xb9, + 0xd2, 0x06, 0x56, 0xd8, 0xeb, 0xdf, 0x0d, 0xed, 0x77, 0x1c, 0x5e, 0x60, 0x27, 0xc6, 0x40, 0x45, + 0xbe, 0xe3, 0x97, 0x79, 0x61, 0xf9, 0xd7, 0x20, 0xd9, 0x53, 0xfa, 0xf4, 0x6e, 0x31, 0x21, 0x92, + 0x87, 0xe8, 0x47, 0x9d, 0xcf, 0x38, 0x9c, 0xb6, 0xcc, 0x98, 0xdc, 0x97, 0xc0, 0x3d, 0xb8, 0x69, + 0x69, 0x56, 0xab, 0xd7, 0xd4, 0x6d, 0x58, 0xdb, 0xad, 0x84, 0x26, 0x0e, 0x35, 0x21, 0xae, 0xe1, + 0x5e, 0x6c, 0xa3, 0xed, 0x94, 0x40, 0x93, 0x7f, 0x08, 0x1b, 0x64, 0x94, 0x81, 0xfa, 0x2d, 0x45, + 0x55, 0x54, 0xd9, 0x33, 0x90, 0x6c, 0x2f, 0xd7, 0x31, 0x40, 0x74, 0xfa, 0xdd, 0xb1, 0xbb, 0x5f, + 0x71, 0xc0, 0x07, 0x5f, 0x2a, 0xfc, 0x7d, 0x28, 0x8a, 0xb5, 0xfa, 0xc9, 0xf1, 0xd3, 0x7a, 0xad, + 0x29, 0xd6, 0xea, 0x8d, 0x27, 0xa7, 0xcd, 0xd3, 0x9f, 0x9d, 0xd4, 0x9a, 0x8d, 0xa7, 0xf5, 0x93, + 0x5a, 0xf5, 0xf0, 0xf1, 0x61, 0xed, 0x47, 0x99, 0x25, 0x61, 0xf5, 0xc5, 0xcb, 0xe2, 0x8a, 0xa7, + 0x89, 0xbf, 0x0d, 0x1b, 0xcc, 0x61, 0x4f, 0x8f, 0x8f, 0x4f, 0x32, 0x9c, 0x70, 0xe5, 0xc5, 0xcb, + 0x62, 0xc2, 0xfe, 0xcd, 0xdf, 0x85, 0x2d, 0x26, 0xb0, 0xde, 0xa8, 0x56, 0x6b, 0xf5, 0x7a, 0x26, + 0x26, 0xac, 0xbc, 0x78, 0x59, 0x4c, 0xd3, 0xc7, 0x50, 0xf8, 0xe3, 0x83, 0xc3, 0x27, 0x0d, 0xb1, + 0x96, 0x89, 0x13, 0x38, 0x7d, 0x14, 0x12, 0xcf, 0xff, 0x98, 0x5f, 0xda, 0xff, 0x77, 0x06, 0xe2, + 0x47, 0xa6, 0xcc, 0x77, 0x61, 0xd5, 0xff, 0x3d, 0x90, 0xfd, 0x72, 0x0d, 0x7e, 0xa2, 0x13, 0x2a, + 0x11, 0x81, 0xae, 0x82, 0x1d, 0x78, 0xc3, 0xf7, 0x21, 0xee, 0xcd, 0x08, 0x26, 0x4e, 0x8d, 0x73, + 0xa1, 0x1c, 0x0d, 0x17, 0xe2, 0xc9, 0xde, 0xd2, 0x47, 0xf1, 0x74, 0x20, 0x75, 0x23, 0x79, 0xf2, + 0xee, 0x61, 0x2d, 0xe0, 0x19, 0x9f, 0x4f, 0x76, 0x23, 0x58, 0xa1, 0x58, 0x61, 0x3f, 0x3a, 0xd6, + 0xf5, 0xaa, 0x42, 0x26, 0xf0, 0xdd, 0x62, 0x67, 0x8a, 0x1d, 0x17, 0x29, 0xbc, 0x1d, 0x15, 0xe9, + 0xfa, 0xfb, 0x08, 0xb2, 0xac, 0xef, 0x11, 0xdf, 0x8b, 0x62, 0xc8, 0x99, 0xe7, 0x3b, 0x33, 0x80, + 0x5d, 0xc7, 0x3f, 0x07, 0xf0, 0x5c, 0xe1, 0x97, 0xc2, 0x4c, 0x8c, 0x30, 0xc2, 0xee, 0x74, 0x8c, + 0x6b, 0xbd, 0x0e, 0x69, 0x67, 0x6b, 0x51, 0x08, 0x1b, 0x46, 0x01, 0xc2, 0xed, 0x29, 0x00, 0x6f, + 0xee, 0xf9, 0x6e, 0x70, 0xdf, 0x9c, 0x32, 0x94, 0xe2, 0xc2, 0x73, 0x2f, 0xe4, 0x56, 0xb2, 0x0b, + 0xab, 0xfe, 0xab, 0xc4, 0xd0, 0x28, 0x7d, 0xc0, 0xf0, 0xc5, 0x1b, 0x76, 0x25, 0x37, 0x4a, 0x74, + 0xef, 0x3d, 0xda, 0xb4, 0x44, 0xf7, 0x60, 0xa7, 0x26, 0x3a, 0xeb, 0x8a, 0xeb, 0x43, 0xb8, 0x1e, + 0xbc, 0x6f, 0x7a, 0x2b, 0x9a, 0x21, 0xbb, 0x70, 0xec, 0x45, 0x86, 0x86, 0xbb, 0xb4, 0xcb, 0x47, + 0x44, 0x97, 0x76, 0x05, 0xd9, 0x8b, 0x0c, 0x75, 0x5d, 0xfe, 0x0a, 0x6e, 0xb0, 0x4f, 0xaf, 0x77, + 0xa3, 0xd9, 0x72, 0x96, 0xd8, 0xfd, 0x99, 0xe0, 0xe1, 0xd2, 0xe2, 0x33, 0x51, 0x44, 0x69, 0x6d, + 0x6c, 0x54, 0x69, 0xbd, 0x3b, 0xfd, 0xe0, 0xa4, 0x9d, 0xa5, 0x18, 0x71, 0xd2, 0xce, 0xc2, 0xbc, + 0x3f, 0x13, 0xdc, 0x75, 0xff, 0x4b, 0x58, 0x63, 0xee, 0x80, 0xef, 0x44, 0xe4, 0x10, 0xa3, 0x85, + 0x7b, 0xb3, 0xa0, 0x5d, 0xdf, 0x0a, 0x64, 0xc9, 0xde, 0x8c, 0xa2, 0xe8, 0x16, 0xf1, 0xbb, 0x61, + 0xc6, 0xbc, 0x1b, 0x39, 0xe1, 0x4e, 0x14, 0x94, 0x97, 0x65, 0xf6, 0x56, 0x2f, 0x94, 0x65, 0x26, + 0x3c, 0x9c, 0xe5, 0x89, 0x9b, 0x36, 0x21, 0xf9, 0xc9, 0x37, 0x9f, 0xef, 0x72, 0x8f, 0xea, 0x5f, + 0xbc, 0xca, 0x73, 0x5f, 0xbe, 0xca, 0x73, 0xff, 0x7a, 0x95, 0xe7, 0x7e, 0xfb, 0x3a, 0xbf, 0xf4, + 0xe5, 0xeb, 0xfc, 0xd2, 0x57, 0xaf, 0xf3, 0x4b, 0xef, 0x3f, 0x90, 0x15, 0xab, 0x33, 0x38, 0x2b, + 0x4b, 0x5a, 0xbf, 0x42, 0xff, 0x1f, 0xa5, 0x9c, 0x49, 0x77, 0x65, 0xad, 0x32, 0x7c, 0x50, 0xe9, + 0x6b, 0xed, 0x41, 0x0f, 0x99, 0xe4, 0x7f, 0x4d, 0x6f, 0xdf, 0xbb, 0xeb, 0xfc, 0xb5, 0xc9, 0x3a, + 0xd7, 0x91, 0x79, 0x96, 0xc2, 0x7f, 0x6b, 0x7a, 0xe7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, + 0x64, 0x1e, 0xc4, 0xa1, 0x25, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/core/04-channel/types/upgrade.go b/modules/core/04-channel/types/upgrade.go index 8e192be7e72..55119a0ed7f 100644 --- a/modules/core/04-channel/types/upgrade.go +++ b/modules/core/04-channel/types/upgrade.go @@ -114,7 +114,7 @@ func (u *UpgradeError) GetErrorReceipt() ErrorReceipt { // NOTE: Changing this const is state machine breaking as it is written into state. const restoreErrorString = "restored channel to pre-upgrade state" - _, code, _ := errorsmod.ABCIInfo(u, false) // discard non-determinstic codespace and log values + _, code, _ := errorsmod.ABCIInfo(u, false) // discard non-deterministic codespace and log values return ErrorReceipt{ Sequence: u.sequence, Message: fmt.Sprintf("ABCI code: %d: %s", code, restoreErrorString), diff --git a/modules/core/04-channel/types/upgrade.pb.go b/modules/core/04-channel/types/upgrade.pb.go new file mode 100644 index 00000000000..19ae2ae3e1f --- /dev/null +++ b/modules/core/04-channel/types/upgrade.pb.go @@ -0,0 +1,842 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ibc/core/channel/v1/upgrade.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Upgrade is a verifiable type which contains the relevant information +// for an attempted upgrade. It provides the proposed changes to the channel +// end, the timeout for this upgrade attempt and the next packet sequence +// which allows the counterparty to efficiently know the highest sequence it has received. +// The next sequence send is used for pruning and upgrading from unordered to ordered channels. +type Upgrade struct { + Fields UpgradeFields `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields"` + Timeout Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` + NextSequenceSend uint64 `protobuf:"varint,3,opt,name=next_sequence_send,json=nextSequenceSend,proto3" json:"next_sequence_send,omitempty"` +} + +func (m *Upgrade) Reset() { *m = Upgrade{} } +func (m *Upgrade) String() string { return proto.CompactTextString(m) } +func (*Upgrade) ProtoMessage() {} +func (*Upgrade) Descriptor() ([]byte, []int) { + return fileDescriptor_fb1cef68588848b2, []int{0} +} +func (m *Upgrade) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Upgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Upgrade.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 *Upgrade) XXX_Merge(src proto.Message) { + xxx_messageInfo_Upgrade.Merge(m, src) +} +func (m *Upgrade) XXX_Size() int { + return m.Size() +} +func (m *Upgrade) XXX_DiscardUnknown() { + xxx_messageInfo_Upgrade.DiscardUnknown(m) +} + +var xxx_messageInfo_Upgrade proto.InternalMessageInfo + +// UpgradeFields are the fields in a channel end which may be changed +// during a channel upgrade. +type UpgradeFields struct { + Ordering Order `protobuf:"varint,1,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"` + ConnectionHops []string `protobuf:"bytes,2,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (m *UpgradeFields) Reset() { *m = UpgradeFields{} } +func (m *UpgradeFields) String() string { return proto.CompactTextString(m) } +func (*UpgradeFields) ProtoMessage() {} +func (*UpgradeFields) Descriptor() ([]byte, []int) { + return fileDescriptor_fb1cef68588848b2, []int{1} +} +func (m *UpgradeFields) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpgradeFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpgradeFields.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 *UpgradeFields) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpgradeFields.Merge(m, src) +} +func (m *UpgradeFields) XXX_Size() int { + return m.Size() +} +func (m *UpgradeFields) XXX_DiscardUnknown() { + xxx_messageInfo_UpgradeFields.DiscardUnknown(m) +} + +var xxx_messageInfo_UpgradeFields proto.InternalMessageInfo + +// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the +// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the +// next sequence. +type ErrorReceipt struct { + // the channel upgrade sequence + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + // the error message detailing the cause of failure + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *ErrorReceipt) Reset() { *m = ErrorReceipt{} } +func (m *ErrorReceipt) String() string { return proto.CompactTextString(m) } +func (*ErrorReceipt) ProtoMessage() {} +func (*ErrorReceipt) Descriptor() ([]byte, []int) { + return fileDescriptor_fb1cef68588848b2, []int{2} +} +func (m *ErrorReceipt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ErrorReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ErrorReceipt.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 *ErrorReceipt) XXX_Merge(src proto.Message) { + xxx_messageInfo_ErrorReceipt.Merge(m, src) +} +func (m *ErrorReceipt) XXX_Size() int { + return m.Size() +} +func (m *ErrorReceipt) XXX_DiscardUnknown() { + xxx_messageInfo_ErrorReceipt.DiscardUnknown(m) +} + +var xxx_messageInfo_ErrorReceipt proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Upgrade)(nil), "ibc.core.channel.v1.Upgrade") + proto.RegisterType((*UpgradeFields)(nil), "ibc.core.channel.v1.UpgradeFields") + proto.RegisterType((*ErrorReceipt)(nil), "ibc.core.channel.v1.ErrorReceipt") +} + +func init() { proto.RegisterFile("ibc/core/channel/v1/upgrade.proto", fileDescriptor_fb1cef68588848b2) } + +var fileDescriptor_fb1cef68588848b2 = []byte{ + // 406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xe3, 0xad, 0x5a, 0x57, 0x03, 0x03, 0x19, 0x0e, 0x51, 0x85, 0xb2, 0xd2, 0x0b, 0x3d, + 0xb0, 0x98, 0x0d, 0x84, 0x34, 0xc4, 0x01, 0x4d, 0x02, 0x21, 0x2e, 0x48, 0x2e, 0x5c, 0xb8, 0x54, + 0x8d, 0xf3, 0x48, 0x2d, 0x35, 0x7e, 0xc1, 0x76, 0x22, 0xf8, 0x06, 0x1c, 0xf7, 0x11, 0xf8, 0x22, + 0xdc, 0x77, 0xdc, 0x91, 0x13, 0x42, 0xed, 0x17, 0x41, 0x71, 0x92, 0xa2, 0x49, 0xb9, 0xf9, 0xf9, + 0xfd, 0xfe, 0x7f, 0xff, 0x9f, 0x1f, 0x7d, 0xa4, 0x12, 0xc9, 0x25, 0x1a, 0xe0, 0x72, 0xb5, 0xd4, + 0x1a, 0xd6, 0xbc, 0x3a, 0xe5, 0x65, 0x91, 0x99, 0x65, 0x0a, 0x71, 0x61, 0xd0, 0x21, 0xbb, 0xaf, + 0x12, 0x19, 0xd7, 0x48, 0xdc, 0x22, 0x71, 0x75, 0x3a, 0x7e, 0x90, 0x61, 0x86, 0xbe, 0xcf, 0xeb, + 0x53, 0x83, 0x8e, 0x7b, 0xdd, 0x3a, 0x95, 0x47, 0xa6, 0xbf, 0x08, 0x1d, 0x7e, 0x6a, 0xfc, 0xd9, + 0x6b, 0x7a, 0xf0, 0x45, 0xc1, 0x3a, 0xb5, 0x21, 0x99, 0x90, 0xd9, 0xad, 0xb3, 0x69, 0xdc, 0xf3, + 0x54, 0xdc, 0xd2, 0x6f, 0x3d, 0x79, 0x31, 0xb8, 0xfa, 0x73, 0x1c, 0x88, 0x56, 0xc7, 0x5e, 0xd1, + 0xa1, 0x53, 0x39, 0x60, 0xe9, 0xc2, 0x3d, 0x6f, 0xf1, 0xb0, 0xd7, 0xe2, 0x63, 0xc3, 0xb4, 0xe2, + 0x4e, 0xc2, 0x9e, 0x50, 0xa6, 0xe1, 0x9b, 0x5b, 0x58, 0xf8, 0x5a, 0x82, 0x96, 0xb0, 0xb0, 0xa0, + 0xd3, 0x70, 0x7f, 0x42, 0x66, 0x03, 0x71, 0xaf, 0xee, 0xcc, 0xdb, 0xc6, 0x1c, 0x74, 0xfa, 0x72, + 0xf0, 0xe3, 0xe7, 0x71, 0x30, 0xbd, 0x24, 0xf4, 0xce, 0x8d, 0x44, 0xec, 0x05, 0x3d, 0x44, 0x93, + 0x82, 0x51, 0x3a, 0xf3, 0x73, 0x1c, 0x9d, 0x8d, 0x7b, 0x43, 0x7c, 0xa8, 0x21, 0xb1, 0x63, 0xd9, + 0x63, 0x7a, 0x57, 0xa2, 0xd6, 0x20, 0x9d, 0x42, 0xbd, 0x58, 0x61, 0x61, 0xc3, 0xbd, 0xc9, 0xfe, + 0x6c, 0x24, 0x8e, 0xfe, 0x5f, 0xbf, 0xc3, 0xc2, 0xb2, 0x90, 0x0e, 0x2b, 0x30, 0x56, 0xa1, 0xf6, + 0xd9, 0x46, 0xa2, 0x2b, 0xdb, 0x48, 0xef, 0xe9, 0xed, 0x37, 0xc6, 0xa0, 0x11, 0x20, 0x41, 0x15, + 0x8e, 0x8d, 0xe9, 0x61, 0x37, 0x91, 0x0f, 0x34, 0x10, 0xbb, 0xba, 0xf6, 0xca, 0xc1, 0xda, 0x65, + 0x06, 0xfe, 0xc3, 0x46, 0xa2, 0x2b, 0x1b, 0xaf, 0x8b, 0xf9, 0xd5, 0x26, 0x22, 0xd7, 0x9b, 0x88, + 0xfc, 0xdd, 0x44, 0xe4, 0x72, 0x1b, 0x05, 0xd7, 0xdb, 0x28, 0xf8, 0xbd, 0x8d, 0x82, 0xcf, 0xe7, + 0x99, 0x72, 0xab, 0x32, 0x89, 0x25, 0xe6, 0x5c, 0xa2, 0xcd, 0xd1, 0x72, 0x95, 0xc8, 0x93, 0x0c, + 0x79, 0x75, 0xce, 0x73, 0x4c, 0xcb, 0x35, 0xd8, 0x66, 0xf7, 0x4f, 0x9f, 0x9f, 0x74, 0xeb, 0x77, + 0xdf, 0x0b, 0xb0, 0xc9, 0x81, 0x5f, 0xfd, 0xb3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x65, 0x3a, + 0x49, 0x88, 0x6d, 0x02, 0x00, 0x00, +} + +func (m *Upgrade) 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 *Upgrade) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Upgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NextSequenceSend != 0 { + i = encodeVarintUpgrade(dAtA, i, uint64(m.NextSequenceSend)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUpgrade(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUpgrade(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *UpgradeFields) 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 *UpgradeFields) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpgradeFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.ConnectionHops) > 0 { + for iNdEx := len(m.ConnectionHops) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConnectionHops[iNdEx]) + copy(dAtA[i:], m.ConnectionHops[iNdEx]) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.ConnectionHops[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Ordering != 0 { + i = encodeVarintUpgrade(dAtA, i, uint64(m.Ordering)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ErrorReceipt) 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 *ErrorReceipt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ErrorReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Sequence != 0 { + i = encodeVarintUpgrade(dAtA, i, uint64(m.Sequence)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintUpgrade(dAtA []byte, offset int, v uint64) int { + offset -= sovUpgrade(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Upgrade) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Fields.Size() + n += 1 + l + sovUpgrade(uint64(l)) + l = m.Timeout.Size() + n += 1 + l + sovUpgrade(uint64(l)) + if m.NextSequenceSend != 0 { + n += 1 + sovUpgrade(uint64(m.NextSequenceSend)) + } + return n +} + +func (m *UpgradeFields) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Ordering != 0 { + n += 1 + sovUpgrade(uint64(m.Ordering)) + } + if len(m.ConnectionHops) > 0 { + for _, s := range m.ConnectionHops { + l = len(s) + n += 1 + l + sovUpgrade(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + return n +} + +func (m *ErrorReceipt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sequence != 0 { + n += 1 + sovUpgrade(uint64(m.Sequence)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + return n +} + +func sovUpgrade(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozUpgrade(x uint64) (n int) { + return sovUpgrade(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Upgrade) 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 ErrIntOverflowUpgrade + } + 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: Upgrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Upgrade: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextSequenceSend", wireType) + } + m.NextSequenceSend = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextSequenceSend |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipUpgrade(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUpgrade + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpgradeFields) 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 ErrIntOverflowUpgrade + } + 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: UpgradeFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpgradeFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ordering", wireType) + } + m.Ordering = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Ordering |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionHops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + 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 ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConnectionHops = append(m.ConnectionHops, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + 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 ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUpgrade(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUpgrade + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ErrorReceipt) 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 ErrIntOverflowUpgrade + } + 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: ErrorReceipt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ErrorReceipt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + m.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + 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 ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUpgrade(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUpgrade + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUpgrade(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthUpgrade + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupUpgrade + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthUpgrade + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthUpgrade = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUpgrade = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupUpgrade = fmt.Errorf("proto: unexpected end of group") +) diff --git a/modules/core/04-channel/types/upgrade_test.go b/modules/core/04-channel/types/upgrade_test.go index dda92c7c335..ef5631f1d85 100644 --- a/modules/core/04-channel/types/upgrade_test.go +++ b/modules/core/04-channel/types/upgrade_test.go @@ -18,33 +18,33 @@ func (suite *TypesTestSuite) TestUpgradeValidateBasic() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "success", func() {}, - true, + nil, }, { "invalid ordering", func() { upgrade.Fields.Ordering = types.NONE }, - false, + types.ErrInvalidChannelOrdering, }, { "connection hops length not equal to 1", func() { upgrade.Fields.ConnectionHops = []string{"connection-0", "connection-1"} }, - false, + types.ErrTooManyConnectionHops, }, { "empty version", func() { upgrade.Fields.Version = " " }, - false, + types.ErrInvalidChannelVersion, }, { "invalid timeout", @@ -52,7 +52,7 @@ func (suite *TypesTestSuite) TestUpgradeValidateBasic() { upgrade.Timeout.Height = clienttypes.ZeroHeight() upgrade.Timeout.Timestamp = 0 }, - false, + types.ErrInvalidUpgrade, }, } @@ -69,10 +69,11 @@ func (suite *TypesTestSuite) TestUpgradeValidateBasic() { err := upgrade.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/core/23-commitment/types/codec_test.go b/modules/core/23-commitment/types/codec_test.go index f8777a147e7..308787bcce7 100644 --- a/modules/core/23-commitment/types/codec_test.go +++ b/modules/core/23-commitment/types/codec_test.go @@ -1,6 +1,8 @@ package types_test import ( + "fmt" + "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -14,27 +16,27 @@ func (suite *MerkleTestSuite) TestCodecTypeRegistration() { testCases := []struct { name string typeURL string - expPass bool + expErr error }{ { "success: MerkleRoot", sdk.MsgTypeURL(&types.MerkleRoot{}), - true, + nil, }, { "success: MerklePrefix", sdk.MsgTypeURL(&types.MerklePrefix{}), - true, + nil, }, { "success: MerklePath", sdk.MsgTypeURL(&v2.MerklePath{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -45,12 +47,12 @@ func (suite *MerkleTestSuite) TestCodecTypeRegistration() { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, ibc.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { - suite.Require().NotNil(msg) + if tc.expErr == nil { + suite.NotNil(msg) suite.Require().NoError(err) } else { - suite.Require().Nil(msg) - suite.Require().Error(err) + suite.Nil(msg) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/core/23-commitment/types/utils_test.go b/modules/core/23-commitment/types/utils_test.go index 9abe7fd64ca..4446daae3d6 100644 --- a/modules/core/23-commitment/types/utils_test.go +++ b/modules/core/23-commitment/types/utils_test.go @@ -7,7 +7,7 @@ import ( storetypes "cosmossdk.io/store/types" - cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" + crypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1" "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types" ) @@ -21,12 +21,12 @@ func (suite *MerkleTestSuite) TestConvertProofs() { nonexistPath := types.NewMerklePath([]byte(suite.storeKey.Name()), []byte("NOTMYKEY")) value := []byte("MYVALUE") - var proofOps *cmtprotocrypto.ProofOps + var proofOps *crypto.ProofOps testcases := []struct { name string malleate func() keyExists bool - expPass bool + expErr error }{ { "success for ExistenceProof", @@ -41,13 +41,13 @@ func (suite *MerkleTestSuite) TestConvertProofs() { proofOps = res.ProofOps }, - true, true, + true, nil, }, { "success for NonexistenceProof", func() { res, err := suite.store.Query(&storetypes.RequestQuery{ - Path: fmt.Sprintf("/%s/key", suite.storeKey.Name()), // required path to get key/value+proof + Path: fmt.Sprintf("/%s/key", suite.storeKey.Name()), Data: []byte("NOTMYKEY"), Prove: true, }) @@ -56,14 +56,14 @@ func (suite *MerkleTestSuite) TestConvertProofs() { proofOps = res.ProofOps }, - false, true, + false, nil, }, { "nil proofOps", func() { proofOps = nil }, - true, false, + true, types.ErrInvalidMerkleProof, }, { "proof op data is nil", @@ -79,7 +79,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { proofOps = res.ProofOps proofOps.Ops[0].Data = nil }, - true, false, + true, types.ErrInvalidMerkleProof, }, } @@ -89,17 +89,18 @@ func (suite *MerkleTestSuite) TestConvertProofs() { tc.malleate() proof, err := types.ConvertProofs(proofOps) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, "ConvertProofs unexpectedly returned error for case: %s", tc.name) if tc.keyExists { err := proof.VerifyMembership(types.GetSDKSpecs(), &root, existsPath, value) suite.Require().NoError(err, "converted proof failed to verify membership for case: %s", tc.name) } else { err := proof.VerifyNonMembership(types.GetSDKSpecs(), &root, nonexistPath) - suite.Require().NoError(err, "converted proof failed to verify membership for case: %s", tc.name) + suite.Require().NoError(err, "converted proof failed to verify non-membership for case: %s", tc.name) } } else { suite.Require().Error(err, "ConvertProofs passed on invalid case for case: %s", tc.name) + suite.Require().ErrorIs(err, tc.expErr, "unexpected error returned for case: %s", tc.name) } } } diff --git a/modules/core/24-host/parse_test.go b/modules/core/24-host/parse_test.go index e7d039be2a4..3bb8ba10017 100644 --- a/modules/core/24-host/parse_test.go +++ b/modules/core/24-host/parse_test.go @@ -1,6 +1,7 @@ package host_test import ( + "errors" "fmt" "math" "testing" @@ -18,22 +19,22 @@ func TestParseIdentifier(t *testing.T) { identifier string prefix string expSeq uint64 - expPass bool + expErr error }{ - {"valid 0", "connection-0", "connection-", 0, true}, - {"valid 1", "connection-1", "connection-", 1, true}, - {"valid large sequence", connectiontypes.FormatConnectionIdentifier(math.MaxUint64), "connection-", math.MaxUint64, true}, + {"valid 0", "connection-0", "connection-", 0, nil}, + {"valid 1", "connection-1", "connection-", 1, nil}, + {"valid large sequence", connectiontypes.FormatConnectionIdentifier(math.MaxUint64), "connection-", math.MaxUint64, nil}, // one above uint64 max - {"invalid uint64", "connection-18446744073709551616", "connection-", 0, false}, + {"invalid uint64", "connection-18446744073709551616", "connection-", 0, errors.New("the value '18446744073709551616' cannot be parsed as a valid uint64")}, // uint64 == 20 characters - {"invalid large sequence", "connection-2345682193567182931243", "connection-", 0, false}, - {"capital prefix", "Connection-0", "connection-", 0, false}, - {"double prefix", "connection-connection-0", "connection-", 0, false}, - {"doesn't have prefix", "connection-0", "prefix", 0, false}, - {"missing dash", "connection0", "connection-", 0, false}, - {"blank id", " ", "connection-", 0, false}, - {"empty id", "", "connection-", 0, false}, - {"negative sequence", "connection--1", "connection-", 0, false}, + {"invalid large sequence", "connection-2345682193567182931243", "connection-", 0, errors.New("the sequence number '2345682193567182931243' exceeds the valid range for a uint64")}, + {"capital prefix", "Connection-0", "connection-", 0, errors.New("the prefix 'Connection' should be in lowercase")}, + {"double prefix", "connection-connection-0", "connection-", 0, errors.New("only a single 'connection-' prefix is allowed")}, + {"doesn't have prefix", "connection-0", "prefix", 0, errors.New("the connection ID is missing the required prefix 'connection-'")}, + {"missing dash", "connection0", "connection-", 0, errors.New("the connection ID is missing the dash ('-') between the prefix 'connection' and the sequence number")}, + {"blank id", " ", "connection-", 0, errors.New("invalid blank connection ID")}, + {"empty id", "", "connection-", 0, errors.New("invalid empty connection id")}, + {"negative sequence", "connection--1", "connection-", 0, errors.New("the sequence number '-1' is negative and invalid")}, } for _, tc := range testCases { @@ -42,7 +43,7 @@ func TestParseIdentifier(t *testing.T) { seq, err := host.ParseIdentifier(tc.identifier, tc.prefix) require.Equal(t, tc.expSeq, seq) - if tc.expPass { + if tc.expErr == nil { require.NoError(t, err, tc.name) } else { require.Error(t, err, tc.name) @@ -52,23 +53,23 @@ func TestParseIdentifier(t *testing.T) { func TestMustParseClientStatePath(t *testing.T) { testCases := []struct { - name string - path string - expPass bool + name string + path string + expErr error }{ - {"valid", string(host.FullClientStateKey(ibctesting.FirstClientID)), true}, - {"path too large", fmt.Sprintf("clients/clients/%s/clientState", ibctesting.FirstClientID), false}, - {"path too small", fmt.Sprintf("clients/%s", ibctesting.FirstClientID), false}, - {"path does not begin with client store", fmt.Sprintf("cli/%s/%s", ibctesting.FirstClientID, host.KeyClientState), false}, - {"path does not end with client state key", fmt.Sprintf("%s/%s/consensus", string(host.KeyClientStorePrefix), ibctesting.FirstClientID), false}, - {"client ID is empty", string(host.FullClientStateKey("")), false}, - {"client ID is only spaces", string(host.FullClientStateKey(" ")), false}, + {"valid", string(host.FullClientStateKey(ibctesting.FirstClientID)), nil}, + {"path too large", fmt.Sprintf("clients/clients/%s/clientState", ibctesting.FirstClientID), errors.New("path exceeds maximum allowed length for a client state path")}, + {"path too small", fmt.Sprintf("clients/%s", ibctesting.FirstClientID), errors.New("path is shorter than the minimum allowed length")}, + {"path does not begin with client store", fmt.Sprintf("cli/%s/%s", ibctesting.FirstClientID, host.KeyClientState), errors.New("the path must start with 'clients/' but starts with 'cli/'")}, + {"path does not end with client state key", fmt.Sprintf("%s/%s/consensus", string(host.KeyClientStorePrefix), ibctesting.FirstClientID), errors.New("the path must end with the client state key 'clientState'")}, + {"client ID is empty", string(host.FullClientStateKey("")), errors.New("the client ID is empty, which is invalid")}, + {"client ID is only spaces", string(host.FullClientStateKey(" ")), errors.New("Ensure the client ID is not empty and does not contain only spaces")}, } for _, tc := range testCases { tc := tc - if tc.expPass { + if tc.expErr == nil { require.NotPanics(t, func() { clientID := host.MustParseClientStatePath(tc.path) require.Equal(t, ibctesting.FirstClientID, clientID) @@ -86,15 +87,15 @@ func TestMustParseConnectionPath(t *testing.T) { name string path string expected string - expPass bool + expErr error }{ - {"valid", "a/connection", "connection", true}, - {"valid localhost", "/connection-localhost", "connection-localhost", true}, - {"invalid empty path", "", "", false}, + {"valid", "a/connection", "connection", nil}, + {"valid localhost", "/connection-localhost", "connection-localhost", nil}, + {"invalid empty path", "", "", errors.New("path cannot be empty")}, } for _, tc := range testCases { - if tc.expPass { + if tc.expErr == nil { require.NotPanics(t, func() { connID := host.MustParseConnectionPath(tc.path) require.Equal(t, connID, tc.expected) diff --git a/modules/core/24-host/validate_test.go b/modules/core/24-host/validate_test.go index c7e96275642..e94b8e69aa4 100644 --- a/modules/core/24-host/validate_test.go +++ b/modules/core/24-host/validate_test.go @@ -1,6 +1,7 @@ package host import ( + "errors" "fmt" "strings" "testing" @@ -12,25 +13,25 @@ import ( var longID = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eros neque, ultricies vel ligula ac, convallis porttitor elit. Maecenas tincidunt turpis elit, vel faucibus nisl pellentesque sodales" type testCase struct { - msg string - id string - expPass bool + msg string + id string + expErr error } func TestDefaultIdentifierValidator(t *testing.T) { testCases := []testCase{ - {"valid lowercase", "lowercaseid", true}, - {"valid id special chars", "._+-#[]<>._+-#[]<>", true}, - {"valid id lower and special chars", "lower._+-#[]<>", true}, - {"numeric id", "1234567890", true}, - {"uppercase id", "NOTLOWERCASE", true}, - {"numeric id", "1234567890", true}, - {"blank id", " ", false}, - {"id length out of range", "1", false}, - {"id is too long", "this identifier is too long to be used as a valid identifier", false}, - {"path-like id", "lower/case/id", false}, - {"invalid id", "(clientid)", false}, - {"empty string", "", false}, + {"valid lowercase", "lowercaseid", nil}, + {"valid id special chars", "._+-#[]<>._+-#[]<>", nil}, + {"valid id lower and special chars", "lower._+-#[]<>", nil}, + {"numeric id", "1234567890", nil}, + {"uppercase id", "NOTLOWERCASE", nil}, + {"numeric id", "1234567890", nil}, + {"blank id", " ", errors.New("the ID is blank - contains only spaces")}, + {"id length out of range", "1", errors.New("the ID length is too short")}, + {"id is too long", "this identifier is too long to be used as a valid identifier", errors.New("the ID exceeds the maximum allowed length")}, + {"path-like id", "lower/case/id", errors.New("the ID contains path-like characters, which are invalid for an ID")}, + {"invalid id", "(clientid)", errors.New("the ID contains invalid characters")}, + {"empty string", "", errors.New("the ID cannot be empty")}, } for _, tc := range testCases { @@ -40,7 +41,7 @@ func TestDefaultIdentifierValidator(t *testing.T) { err1 := ConnectionIdentifierValidator(tc.id) err2 := ChannelIdentifierValidator(tc.id) err3 := PortIdentifierValidator(tc.id) - if tc.expPass { + if tc.expErr == nil { require.NoError(t, err, tc.msg) require.NoError(t, err1, tc.msg) require.NoError(t, err2, tc.msg) @@ -56,25 +57,25 @@ func TestDefaultIdentifierValidator(t *testing.T) { func TestPortIdentifierValidator(t *testing.T) { testCases := []testCase{ - {"valid lowercase", "transfer", true}, - {"valid id special chars", "._+-#[]<>._+-#[]<>", true}, - {"valid id lower and special chars", "lower._+-#[]<>", true}, - {"numeric id", "1234567890", true}, - {"uppercase id", "NOTLOWERCASE", true}, - {"numeric id", "1234567890", true}, - {"blank id", " ", false}, - {"id length out of range", "1", false}, - {"id is too long", longID, false}, - {"path-like id", "lower/case/id", false}, - {"invalid id", "(clientid)", false}, - {"empty string", "", false}, + {"valid lowercase", "transfer", nil}, + {"valid id special chars", "._+-#[]<>._+-#[]<>", nil}, + {"valid id lower and special chars", "lower._+-#[]<>", nil}, + {"numeric id", "1234567890", nil}, + {"uppercase id", "NOTLOWERCASE", nil}, + {"numeric id", "1234567890", nil}, + {"blank id", " ", errors.New("the ID is blank - contains only spaces")}, + {"id length out of range", "1", errors.New("the ID length is too short")}, + {"id is too long", longID, errors.New("the ID exceeds the maximum allowed length")}, + {"path-like id", "lower/case/id", errors.New("the ID contains path-like characters, which are invalid for an ID")}, + {"invalid id", "(clientid)", errors.New("the ID contains invalid characters")}, + {"empty string", "", errors.New("the ID cannot be empty")}, } for _, tc := range testCases { tc := tc err := PortIdentifierValidator(tc.id) - if tc.expPass { + if tc.expErr == nil { require.NoError(t, err, tc.msg) } else { require.Error(t, err, tc.msg) @@ -84,24 +85,24 @@ func TestPortIdentifierValidator(t *testing.T) { func TestPathValidator(t *testing.T) { testCases := []testCase{ - {"valid lowercase", "p/lowercaseid", true}, - {"numeric path", "p/239123", true}, - {"valid id special chars", "p/._+-#[]<>._+-#[]<>", true}, - {"valid id lower and special chars", "lower/._+-#[]<>", true}, - {"id length out of range", "p/l", true}, - {"uppercase id", "p/NOTLOWERCASE", true}, - {"invalid path", "lowercaseid", false}, - {"blank id", "p/ ", false}, - {"id length out of range", "p/12345678901234567890123456789012345678901234567890123456789012345", false}, - {"invalid id", "p/(clientid)", false}, - {"empty string", "", false}, - {"separators only", "////", false}, - {"just separator", "/", false}, - {"begins with separator", "/id", false}, - {"blank before separator", " /id", false}, - {"ends with separator", "id/", false}, - {"blank after separator", "id/ ", false}, - {"blanks with separator", " / ", false}, + {"valid lowercase", "p/lowercaseid", nil}, + {"numeric path", "p/239123", nil}, + {"valid id special chars", "p/._+-#[]<>._+-#[]<>", nil}, + {"valid id lower and special chars", "lower/._+-#[]<>", nil}, + {"id length out of range", "p/l", nil}, + {"uppercase id", "p/NOTLOWERCASE", nil}, + {"invalid path", "lowercaseid", errors.New("the path is invalid")}, + {"blank id", "p/ ", errors.New("the ID is blank or contains only whitespace after the separator")}, + {"id length out of range", "p/12345678901234567890123456789012345678901234567890123456789012345", errors.New("the ID exceeds the maximum allowed length")}, + {"invalid id", "p/(clientid)", errors.New("the ID contains invalid characters, such as parentheses")}, + {"empty string", "", errors.New("the ID cannot be empty")}, + {"separators only", "////", errors.New("the ID contains only separators, which is invalid")}, + {"just separator", "/", errors.New("the ID cannot be just a separator")}, + {"begins with separator", "/id", errors.New("the ID should not begin with a separator")}, + {"blank before separator", " /id", errors.New("the ID cannot have leading spaces before the separator")}, + {"ends with separator", "id/", errors.New("the ID cannot end with a separator")}, + {"blank after separator", "id/ ", errors.New("the ID cannot have trailing spaces after the separator")}, + {"blanks with separator", " / ", errors.New("the ID cannot have spaces before or after the separator")}, } for _, tc := range testCases { @@ -113,7 +114,7 @@ func TestPathValidator(t *testing.T) { err := f(tc.id) - if tc.expPass { + if tc.expErr == nil { seps := strings.Count(tc.id, "/") require.Equal(t, 1, seps) require.NoError(t, err, tc.msg) @@ -132,21 +133,21 @@ func TestCustomPathValidator(t *testing.T) { }) testCases := []testCase{ - {"valid custom path", "id_client/id_one", true}, - {"invalid path", "client", false}, - {"invalid custom path", "id_one/client", false}, - {"invalid identifier", "id_client/id_1234567890123456789012345678901234567890123457890123456789012345", false}, - {"separators only", "////", false}, - {"just separator", "/", false}, - {"ends with separator", "id_client/id_one/", false}, - {"beings with separator", "/id_client/id_one", false}, + {"valid custom path", "id_client/id_one", nil}, + {"invalid path", "client", errors.New("the path is invalid")}, + {"invalid custom path", "id_one/client", errors.New("the path contains an invalid structure")}, + {"invalid identifier", "id_client/id_1234567890123456789012345678901234567890123457890123456789012345", errors.New("the identifier exceeds the maximum allowed length for an ID")}, + {"separators only", "////", errors.New("the path contains only separators, which is invalid")}, + {"just separator", "/", errors.New("the path cannot be just a separator")}, + {"ends with separator", "id_client/id_one/", errors.New("the path cannot end with a separator")}, + {"beings with separator", "/id_client/id_one", errors.New("the path cannot begin with a separator")}, } for _, tc := range testCases { tc := tc err := validateFn(tc.id) - if tc.expPass { + if tc.expErr == nil { require.NoError(t, err, tc.msg) } else { require.Error(t, err, tc.msg) diff --git a/modules/core/genesis_test.go b/modules/core/genesis_test.go index d24c94837c9..f3e5c71148b 100644 --- a/modules/core/genesis_test.go +++ b/modules/core/genesis_test.go @@ -1,6 +1,7 @@ package ibc_test import ( + "errors" "fmt" "testing" @@ -62,12 +63,12 @@ func (suite *IBCTestSuite) TestValidateGenesis() { testCases := []struct { name string genState *types.GenesisState - expPass bool + expError error }{ { name: "default", genState: types.DefaultGenesisState(), - expPass: true, + expError: nil, }, { name: "valid genesis", @@ -145,7 +146,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { channeltypes.Params{UpgradeTimeout: channeltypes.DefaultTimeout}, ), }, - expPass: true, + expError: nil, }, { name: "invalid client genesis", @@ -172,7 +173,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { ), ConnectionGenesis: connectiontypes.DefaultGenesisState(), }, - expPass: false, + expError: errors.New("genesis metadata key cannot be empty"), }, { name: "invalid connection genesis", @@ -189,7 +190,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { connectiontypes.Params{}, ), }, - expPass: false, + expError: errors.New("invalid connection"), }, { name: "invalid channel genesis", @@ -202,17 +203,18 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, }, }, - expPass: false, + expError: errors.New("invalid acknowledgement"), }, } for _, tc := range testCases { tc := tc err := tc.genState.Validate() - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().Contains(err.Error(), tc.expError.Error()) } } } diff --git a/modules/core/keeper/keeper_test.go b/modules/core/keeper/keeper_test.go index f03bd02a0c9..77d11f82c70 100644 --- a/modules/core/keeper/keeper_test.go +++ b/modules/core/keeper/keeper_test.go @@ -51,29 +51,39 @@ func (suite *KeeperTestSuite) TestNewKeeper() { testCases := []struct { name string malleate func() - expPass bool + expPanic string }{ - {"failure: empty upgrade keeper value", func() { - emptyUpgradeKeeperValue := upgradekeeper.Keeper{} - - upgradeKeeper = emptyUpgradeKeeperValue - }, false}, - {"failure: empty upgrade keeper pointer", func() { - emptyUpgradeKeeperPointer := &upgradekeeper.Keeper{} - - upgradeKeeper = emptyUpgradeKeeperPointer - }, false}, - {"failure: empty authority", func() { - newIBCKeeperFn = func() { - ibckeeper.NewKeeper( - suite.chainA.GetSimApp().AppCodec(), - runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(ibcexported.StoreKey)), - suite.chainA.GetSimApp().GetSubspace(ibcexported.ModuleName), - upgradeKeeper, - "", // authority - ) - } - }, false}, + { + name: "failure: empty upgrade keeper value", + malleate: func() { + emptyUpgradeKeeperValue := upgradekeeper.Keeper{} + upgradeKeeper = emptyUpgradeKeeperValue + }, + expPanic: "cannot initialize IBC keeper: empty upgrade keeper", + }, + { + name: "failure: empty upgrade keeper pointer", + malleate: func() { + emptyUpgradeKeeperPointer := &upgradekeeper.Keeper{} + upgradeKeeper = emptyUpgradeKeeperPointer + }, + expPanic: "cannot initialize IBC keeper: empty upgrade keeper", + }, + { + name: "failure: empty authority", + malleate: func() { + newIBCKeeperFn = func() { + ibckeeper.NewKeeper( + suite.chainA.GetSimApp().AppCodec(), + runtime.NewKVStoreService(suite.chainA.GetSimApp().GetKey(ibcexported.StoreKey)), + suite.chainA.GetSimApp().GetSubspace(ibcexported.ModuleName), + upgradeKeeper, + "", // authority + ) + } + }, + expPanic: "authority cannot be empty", + }, } for _, tc := range testCases { @@ -96,14 +106,19 @@ func (suite *KeeperTestSuite) TestNewKeeper() { tc.malleate() - if tc.expPass { - suite.Require().NotPanics( - newIBCKeeperFn, - ) + if tc.expPanic != "" { + suite.Require().Panics(func() { + newIBCKeeperFn() + }, "expected panic but no panic occurred") + + defer func() { + if r := recover(); r != nil { + suite.Require().Contains(r.(error).Error(), tc.expPanic, "unexpected panic message") + } + }() + } else { - suite.Require().Panics( - newIBCKeeperFn, - ) + suite.Require().NotPanics(newIBCKeeperFn, "unexpected panic occurred") } }) } diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 0d7d5c4784c..b8dabeb8bb2 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -16,7 +16,6 @@ import ( ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/internal/telemetry" coretypes "github.com/cosmos/ibc-go/v9/modules/core/types" - ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ) var ( @@ -123,19 +122,12 @@ func (k *Keeper) IBCSoftwareUpgrade(goCtx context.Context, msg *clienttypes.MsgI return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } - // TODO(https://github.com/cosmos/cosmos-sdk/issues/22779): This should be reverted before release pending sdk fix. Accessing GetCachedValue returns nil due to loss of data in internal sdk msg handler. - // For now we can assume tendermint client state here as that's what we expect, but this may not always be the case for other msg handlers - // which use pb.Any encoding of msg types going through msg router service hybrid handler. - // upgradedClientState, err := clienttypes.UnpackClientState(msg.UpgradedClientState) - // if err != nil { - // return nil, errorsmod.Wrapf(clienttypes.ErrInvalidClientType, "cannot unpack client state: %s", err) - // } - var upgradedClientState ibctm.ClientState - if err := k.cdc.Unmarshal(msg.UpgradedClientState.Value, &upgradedClientState); err != nil { - return nil, errorsmod.Wrapf(clienttypes.ErrInvalidClientType, "cannot unmarshal tendermint client state: %s", err) + upgradedClientState, err := clienttypes.UnpackClientState(msg.UpgradedClientState) + if err != nil { + return nil, errorsmod.Wrapf(clienttypes.ErrInvalidClientType, "cannot unpack client state: %s", err) } - if err := k.ClientKeeper.ScheduleIBCSoftwareUpgrade(goCtx, msg.Plan, &upgradedClientState); err != nil { + if err := k.ClientKeeper.ScheduleIBCSoftwareUpgrade(goCtx, msg.Plan, upgradedClientState); err != nil { return nil, errorsmod.Wrap(err, "failed to schedule upgrade") } diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index 424fc10b356..eef4a714060 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "context" + "errors" "fmt" upgradetypes "cosmossdk.io/x/upgrade/types" @@ -46,7 +47,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { testCases := []struct { name string malleate func() - expPass bool + expError error expRevert bool async bool // indicate no ack written replay bool // indicate replay (no-op) @@ -59,7 +60,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, true, false, false, false}, + }, nil, false, false, false}, {"success: UNORDERED", func() { path.Setup() @@ -67,7 +68,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, true, false, false, false}, + }, nil, false, false, false}, {"success: UNORDERED out of order packet", func() { // setup uses an UNORDERED channel path.Setup() @@ -79,7 +80,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) } - }, true, false, false, false}, + }, nil, false, false, false}, {"success: OnRecvPacket callback returns revert=true", func() { path.Setup() @@ -87,7 +88,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockFailPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, true, true, false, false}, + }, nil, true, false, false}, {"success: ORDERED - async acknowledgement", func() { path.SetChannelOrdered() path.Setup() @@ -96,7 +97,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibcmock.MockAsyncPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, true, false, true, false}, + }, nil, false, true, false}, {"success: UNORDERED - async acknowledgement", func() { path.Setup() @@ -104,7 +105,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibcmock.MockAsyncPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, true, false, true, false}, + }, nil, false, true, false}, {"failure: ORDERED out of order packet", func() { path.SetChannelOrdered() path.Setup() @@ -116,15 +117,15 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) } - }, false, false, false, false}, + }, errors.New("packet sequence is out of order"), false, false, false}, {"channel does not exist", func() { // any non-nil value of packet is valid suite.Require().NotNil(packet) - }, false, false, false, false}, + }, errors.New("channel not found"), false, false, false}, {"packet not sent", func() { path.Setup() packet = channeltypes.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, false, false, false, false}, + }, errors.New("receive packet verification failed: couldn't verify counterparty packet commitment"), false, false, false}, {"successful no-op: ORDERED - packet already received (replay)", func() { // mock will panic if application callback is called twice on the same packet path.SetChannelOrdered() @@ -136,7 +137,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) - }, true, false, false, true}, + }, nil, false, false, true}, {"successful no-op: UNORDERED - packet already received (replay)", func() { // mock will panic if application callback is called twice on the same packet path.Setup() @@ -147,7 +148,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) - }, true, false, false, true}, + }, nil, false, false, true}, } for _, tc := range testCases { @@ -177,7 +178,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { events := ctx.EventManager().Events() - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) // replay should not fail since it will be treated as a no-op @@ -212,6 +213,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { } } else { suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expError.Error()) } }) } @@ -308,7 +310,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { testCases := []struct { name string malleate func() - expPass bool + expError error replay bool // indicate replay (no-op) }{ {"success: ORDERED", func() { @@ -321,7 +323,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) - }, true, false}, + }, nil, false}, {"success: UNORDERED", func() { path.Setup() @@ -331,7 +333,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) - }, true, false}, + }, nil, false}, {"success: UNORDERED acknowledge out of order packet", func() { // setup uses an UNORDERED channel path.Setup() @@ -345,7 +347,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) } - }, true, false}, + }, nil, false}, {"failure: ORDERED acknowledge out of order packet", func() { path.SetChannelOrdered() path.Setup() @@ -359,11 +361,11 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err = path.EndpointB.RecvPacket(packet) suite.Require().NoError(err) } - }, false, false}, + }, errors.New("packet sequence is out of order"), false}, {"channel does not exist", func() { // any non-nil value of packet is valid suite.Require().NotNil(packet) - }, false, false}, + }, errors.New("channel not found"), false}, {"packet not received", func() { path.Setup() @@ -371,7 +373,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { suite.Require().NoError(err) packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) - }, false, false}, + }, errors.New("invalid proof"), false}, {"successful no-op: ORDERED - packet already acknowledged (replay)", func() { path.Setup() @@ -384,7 +386,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err = path.EndpointA.AcknowledgePacket(packet, ibctesting.MockAcknowledgement) suite.Require().NoError(err) - }, true, true}, + }, nil, true}, {"successful no-op: UNORDERED - packet already acknowledged (replay)", func() { path.Setup() @@ -397,7 +399,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { err = path.EndpointA.AcknowledgePacket(packet, ibctesting.MockAcknowledgement) suite.Require().NoError(err) - }, true, true}, + }, nil, true}, } for _, tc := range testCases { @@ -425,7 +427,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { events := ctx.EventManager().Events() - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) // verify packet commitment was deleted on source chain @@ -445,6 +447,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { } } else { suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expError.Error()) } }) } @@ -465,7 +468,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { testCases := []struct { name string malleate func() - expPass bool + expErr error noop bool // indicate no-op }{ {"success: ORDERED", func() { @@ -485,7 +488,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, true, false}, + }, nil, false}, {"success: UNORDERED", func() { path.Setup() @@ -502,7 +505,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, timeoutTimestamp) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - }, true, false}, + }, nil, false}, {"success: UNORDERED timeout out of order packet", func() { // setup uses an UNORDERED channel path.Setup() @@ -523,7 +526,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - }, true, false}, + }, nil, false}, {"success: ORDERED timeout out of order packet", func() { path.SetChannelOrdered() path.Setup() @@ -544,18 +547,18 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, true, false}, + }, nil, false}, {"channel does not exist", func() { // any non-nil value of packet is valid suite.Require().NotNil(packet) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, false, false}, + }, errors.New("channel not found"), false}, {"successful no-op: UNORDERED - packet not sent", func() { path.Setup() packet = channeltypes.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.NewHeight(0, 1), 0) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) - }, true, true}, + }, nil, true}, } for _, tc := range testCases { @@ -582,7 +585,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { events := ctx.EventManager().Events() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) // replay should not return an error as it is treated as a no-op @@ -603,6 +606,8 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { } else { suite.Require().Error(err) + + suite.Require().Contains(err.Error(), tc.expErr.Error()) } }) } @@ -624,7 +629,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { testCases := []struct { name string malleate func() - expPass bool + expError error }{ {"success: ORDERED", func() { path.SetChannelOrdered() @@ -643,7 +648,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // close counterparty channel path.EndpointB.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.CLOSED }) - }, true}, + }, nil}, {"success: UNORDERED", func() { path.Setup() @@ -660,7 +665,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // close counterparty channel path.EndpointB.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.CLOSED }) - }, true}, + }, nil}, {"success: UNORDERED timeout out of order packet", func() { // setup uses an UNORDERED channel path.Setup() @@ -682,7 +687,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // close counterparty channel path.EndpointB.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.CLOSED }) - }, true}, + }, nil}, {"success: ORDERED timeout out of order packet", func() { path.SetChannelOrdered() path.Setup() @@ -704,13 +709,13 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // close counterparty channel path.EndpointB.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.CLOSED }) - }, true}, + }, nil}, {"channel does not exist", func() { // any non-nil value of packet is valid suite.Require().NotNil(packet) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, false}, + }, errors.New("channel not found")}, {"successful no-op: UNORDERED - packet not sent", func() { path.Setup() packet = channeltypes.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.NewHeight(0, 1), 0) @@ -718,7 +723,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { // close counterparty channel path.EndpointB.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.CLOSED }) - }, true}, + }, nil}, {"ORDERED: channel not closed", func() { path.SetChannelOrdered() path.Setup() @@ -733,7 +738,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { packet = channeltypes.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, timeoutHeight, 0) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) - }, false}, + }, errors.New("invalid proof")}, } for _, tc := range testCases { @@ -754,7 +759,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { _, err := suite.chainA.App.GetIBCKeeper().TimeoutOnClose(suite.chainA.GetContext(), msg) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) // replay should not return an error as it will be treated as a no-op @@ -767,6 +772,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { } else { suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expError.Error()) } }) } @@ -783,9 +789,9 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { msg *clienttypes.MsgUpgradeClient ) cases := []struct { - name string - setup func() - expPass bool + name string + setup func() + expErr error }{ { name: "successful upgrade", @@ -823,7 +829,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradeClientProof, upgradedConsensusStateProof, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - expPass: true, + expErr: nil, }, { name: "VerifyUpgrade fails", @@ -856,7 +862,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { msg, err = clienttypes.NewMsgUpgradeClient(path.EndpointA.ClientID, upgradedClient, upgradedConsState, nil, nil, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, - expPass: false, + expErr: errors.New("invalid merkle proof"), }, } @@ -880,7 +886,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { ctx := suite.chainA.GetContext() _, err = suite.chainA.GetSimApp().GetIBCKeeper().UpgradeClient(ctx, msg) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, "upgrade handler failed on valid case: %s", tc.name) newClient, ok := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID) suite.Require().True(ok) @@ -900,6 +906,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { ibctesting.AssertEvents(&suite.Suite, expectedEvents, ctx.EventManager().Events().ToABCIEvents()) } else { suite.Require().Error(err, "upgrade handler passed on invalid case: %s", tc.name) + suite.Require().Contains(err.Error(), tc.expErr.Error()) } } } @@ -2533,34 +2540,34 @@ func (suite *KeeperTestSuite) TestIBCSoftwareUpgrade() { func (suite *KeeperTestSuite) TestUpdateClientParams() { signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { - name string - msg *clienttypes.MsgUpdateParams - expPass bool + name string + msg *clienttypes.MsgUpdateParams + expError error }{ { "success: valid signer and default params", clienttypes.NewMsgUpdateParams(signer, clienttypes.DefaultParams()), - true, + nil, }, { "failure: malformed signer address", clienttypes.NewMsgUpdateParams(ibctesting.InvalidID, clienttypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: empty signer address", clienttypes.NewMsgUpdateParams("", clienttypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: whitespace signer address", clienttypes.NewMsgUpdateParams(" ", clienttypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: unauthorized signer address", clienttypes.NewMsgUpdateParams(ibctesting.TestAccAddress, clienttypes.DefaultParams()), - false, + errors.New("unauthorized"), }, } @@ -2569,12 +2576,13 @@ func (suite *KeeperTestSuite) TestUpdateClientParams() { suite.Run(tc.name, func() { suite.SetupTest() _, err := suite.chainA.App.GetIBCKeeper().UpdateClientParams(suite.chainA.GetContext(), tc.msg) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) p := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetParams(suite.chainA.GetContext()) suite.Require().Equal(tc.msg.Params, p) } else { suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expError.Error()) } }) } @@ -2584,34 +2592,34 @@ func (suite *KeeperTestSuite) TestUpdateClientParams() { func (suite *KeeperTestSuite) TestUpdateConnectionParams() { signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { - name string - msg *connectiontypes.MsgUpdateParams - expPass bool + name string + msg *connectiontypes.MsgUpdateParams + expErr error }{ { "success: valid signer and default params", connectiontypes.NewMsgUpdateParams(signer, connectiontypes.DefaultParams()), - true, + nil, }, { "failure: malformed signer address", connectiontypes.NewMsgUpdateParams(ibctesting.InvalidID, connectiontypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: empty signer address", connectiontypes.NewMsgUpdateParams("", connectiontypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: whitespace signer address", connectiontypes.NewMsgUpdateParams(" ", connectiontypes.DefaultParams()), - false, + errors.New("unauthorized"), }, { "failure: unauthorized signer address", connectiontypes.NewMsgUpdateParams(ibctesting.TestAccAddress, connectiontypes.DefaultParams()), - false, + errors.New("unauthorized"), }, } @@ -2620,12 +2628,13 @@ func (suite *KeeperTestSuite) TestUpdateConnectionParams() { suite.Run(tc.name, func() { suite.SetupTest() _, err := suite.chainA.App.GetIBCKeeper().UpdateConnectionParams(suite.chainA.GetContext(), tc.msg) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) p := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) suite.Require().Equal(tc.msg.Params, p) } else { suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErr.Error()) } }) } diff --git a/modules/core/module.go b/modules/core/module.go index 4e867fb4243..04cde49d313 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -33,7 +33,7 @@ import ( var ( _ module.AppModule = (*AppModule)(nil) - _ module.AppModuleBasic = (*AppModuleBasic)(nil) + _ module.AppModuleBasic = (*AppModule)(nil) _ module.AppModuleSimulation = (*AppModule)(nil) _ module.HasGenesis = (*AppModule)(nil) _ appmodule.HasConsensusVersion = (*AppModule)(nil) @@ -42,13 +42,22 @@ var ( _ appmodule.HasBeginBlocker = (*AppModule)(nil) ) -// AppModuleBasic defines the basic application module used by the ibc module. -type AppModuleBasic struct { - cdc codec.Codec +// AppModule implements an application module for the ibc module. +type AppModule struct { + cdc codec.Codec + keeper *keeper.Keeper +} + +// NewAppModule creates a new AppModule object +func NewAppModule(cdc codec.Codec, k *keeper.Keeper) AppModule { + return AppModule{ + cdc: cdc, + keeper: k, + } } // Name returns the ibc module's name. -func (AppModuleBasic) Name() string { +func (AppModule) Name() string { return exported.ModuleName } @@ -59,16 +68,16 @@ func (AppModule) IsOnePerModuleType() {} func (AppModule) IsAppModule() {} // RegisterLegacyAminoCodec does nothing. IBC does not support amino. -func (AppModuleBasic) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} +func (AppModule) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} // DefaultGenesis returns default genesis state as raw bytes for the ibc // module. -func (am AppModuleBasic) DefaultGenesis() json.RawMessage { +func (am AppModule) DefaultGenesis() json.RawMessage { return am.cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the ibc module. -func (am AppModuleBasic) ValidateGenesis(bz json.RawMessage) error { +func (am AppModule) ValidateGenesis(bz json.RawMessage) error { var gs types.GenesisState if err := am.cdc.UnmarshalJSON(bz, &gs); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", exported.ModuleName, err) @@ -78,7 +87,7 @@ func (am AppModuleBasic) ValidateGenesis(bz json.RawMessage) error { } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { err := clienttypes.RegisterQueryHandlerClient(context.Background(), mux, clienttypes.NewQueryClient(clientCtx)) if err != nil { panic(err) @@ -94,41 +103,20 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r } // GetTxCmd returns the root tx command for the ibc module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { +func (AppModule) GetTxCmd() *cobra.Command { return cli.GetTxCmd() } // GetQueryCmd returns no root query command for the ibc module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { +func (AppModule) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } // RegisterInterfaces registers module concrete types into protobuf Any. -func (AppModuleBasic) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { +func (AppModule) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { types.RegisterInterfaces(registry) } -// AppModule implements an application module for the ibc module. -type AppModule struct { - AppModuleBasic - keeper *keeper.Keeper -} - -// NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, k *keeper.Keeper) AppModule { - return AppModule{ - keeper: k, - AppModuleBasic: AppModuleBasic{ - cdc: cdc, - }, - } -} - -// Name returns the ibc module's name. -func (AppModule) Name() string { - return exported.ModuleName -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { clienttypes.RegisterMsgServer(cfg.MsgServer(), am.keeper) diff --git a/modules/core/types/codec.go b/modules/core/types/codec.go index 1280eb6cfcc..84626179a92 100644 --- a/modules/core/types/codec.go +++ b/modules/core/types/codec.go @@ -1,7 +1,7 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" @@ -11,7 +11,7 @@ import ( // RegisterInterfaces registers ibc types against interfaces using the global InterfaceRegistry. // Note: The localhost client is created by ibc core and thus requires explicit type registration. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { clienttypes.RegisterInterfaces(registry) connectiontypes.RegisterInterfaces(registry) channeltypes.RegisterInterfaces(registry) diff --git a/modules/light-clients/06-solomachine/client_state_test.go b/modules/light-clients/06-solomachine/client_state_test.go index e8e1ab6d494..d70735b3b17 100644 --- a/modules/light-clients/06-solomachine/client_state_test.go +++ b/modules/light-clients/06-solomachine/client_state_test.go @@ -2,6 +2,7 @@ package solomachine_test import ( "bytes" + "errors" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctesting "github.com/cosmos/ibc-go/v9/testing" @@ -21,37 +22,37 @@ func (suite *SoloMachineTestSuite) TestClientStateValidate() { testCases := []struct { name string clientState *solomachine.ClientState - expPass bool + expErr error }{ { "valid client state", sm.ClientState(), - true, + nil, }, { "empty ClientState", &solomachine.ClientState{}, - false, + errors.New("sequence cannot be 0: light client is invalid"), }, { "sequence is zero", solomachine.NewClientState(0, &solomachine.ConsensusState{sm.ConsensusState().PublicKey, sm.Diversifier, sm.Time}), - false, + errors.New("sequence cannot be 0: light client is invalid"), }, { "timestamp is zero", solomachine.NewClientState(1, &solomachine.ConsensusState{sm.ConsensusState().PublicKey, sm.Diversifier, 0}), - false, + errors.New("timestamp cannot be 0: invalid consensus state"), }, { "diversifier is blank", solomachine.NewClientState(1, &solomachine.ConsensusState{sm.ConsensusState().PublicKey, " ", 1}), - false, + errors.New("diversifier cannot contain only spaces: invalid consensus state"), }, { "pubkey is empty", solomachine.NewClientState(1, &solomachine.ConsensusState{nil, sm.Diversifier, sm.Time}), - false, + errors.New("public key cannot be empty: invalid consensus state"), }, } @@ -61,10 +62,11 @@ func (suite *SoloMachineTestSuite) TestClientStateValidate() { suite.Run(tc.name, func() { err := tc.clientState.Validate() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/06-solomachine/codec_test.go b/modules/light-clients/06-solomachine/codec_test.go index 702858bfef8..04b47e0ec13 100644 --- a/modules/light-clients/06-solomachine/codec_test.go +++ b/modules/light-clients/06-solomachine/codec_test.go @@ -1,6 +1,7 @@ package solomachine_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -14,34 +15,34 @@ import ( func TestCodecTypeRegistration(t *testing.T) { testCases := []struct { - name string - typeURL string - expPass bool + name string + typeURL string + expError error }{ { "success: ClientState", sdk.MsgTypeURL(&solomachine.ClientState{}), - true, + nil, }, { "success: ConsensusState", sdk.MsgTypeURL(&solomachine.ConsensusState{}), - true, + nil, }, { "success: Header", sdk.MsgTypeURL(&solomachine.Header{}), - true, + nil, }, { "success: Misbehaviour", sdk.MsgTypeURL(&solomachine.Misbehaviour{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -49,15 +50,15 @@ func TestCodecTypeRegistration(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { - encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, solomachine.AppModuleBasic{}) + encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, solomachine.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expError == nil { require.NotNil(t, msg) require.NoError(t, err) } else { require.Nil(t, msg) - require.Error(t, err) + require.ErrorContains(t, err, tc.expError.Error()) } }) } diff --git a/modules/light-clients/06-solomachine/consensus_state_test.go b/modules/light-clients/06-solomachine/consensus_state_test.go index 47abff209b9..6a385dca309 100644 --- a/modules/light-clients/06-solomachine/consensus_state_test.go +++ b/modules/light-clients/06-solomachine/consensus_state_test.go @@ -1,6 +1,8 @@ package solomachine_test import ( + "errors" + "github.com/cosmos/ibc-go/v9/modules/core/exported" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctesting "github.com/cosmos/ibc-go/v9/testing" @@ -20,12 +22,12 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { testCases := []struct { name string consensusState *solomachine.ConsensusState - expPass bool + expErr error }{ { "valid consensus state", sm.ConsensusState(), - true, + nil, }, { "timestamp is zero", @@ -34,7 +36,7 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { Timestamp: 0, Diversifier: sm.Diversifier, }, - false, + errors.New("timestamp cannot be 0: invalid consensus state"), }, { "diversifier is blank", @@ -43,7 +45,7 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { Timestamp: sm.Time, Diversifier: " ", }, - false, + errors.New("diversifier cannot contain only spaces: invalid consensus state"), }, { "pubkey is nil", @@ -52,7 +54,7 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { Diversifier: sm.Diversifier, PublicKey: nil, }, - false, + errors.New("public key cannot be empty: invalid consensus state"), }, } @@ -62,10 +64,11 @@ func (suite *SoloMachineTestSuite) TestConsensusStateValidateBasic() { suite.Run(tc.name, func() { err := tc.consensusState.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/06-solomachine/header_test.go b/modules/light-clients/06-solomachine/header_test.go index e23e66bc2b7..29c2b6571ab 100644 --- a/modules/light-clients/06-solomachine/header_test.go +++ b/modules/light-clients/06-solomachine/header_test.go @@ -1,6 +1,8 @@ package solomachine_test import ( + "errors" + "github.com/cosmos/ibc-go/v9/modules/core/exported" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctesting "github.com/cosmos/ibc-go/v9/testing" @@ -13,14 +15,14 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { header := sm.CreateHeader(sm.Diversifier) cases := []struct { - name string - header *solomachine.Header - expPass bool + name string + header *solomachine.Header + expErr error }{ { "valid header", header, - true, + nil, }, { "timestamp is zero", @@ -30,7 +32,7 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { NewPublicKey: header.NewPublicKey, NewDiversifier: header.NewDiversifier, }, - false, + errors.New("timestamp cannot be zero: invalid client header"), }, { "signature is empty", @@ -40,7 +42,7 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { NewPublicKey: header.NewPublicKey, NewDiversifier: header.NewDiversifier, }, - false, + errors.New("signature cannot be empty: invalid client header"), }, { "diversifier contains only spaces", @@ -50,7 +52,7 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { NewPublicKey: header.NewPublicKey, NewDiversifier: " ", }, - false, + errors.New("diversifier cannot contain only spaces: invalid client header"), }, { "public key is nil", @@ -60,7 +62,7 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { NewPublicKey: nil, NewDiversifier: header.NewDiversifier, }, - false, + errors.New("new public key cannot be empty: invalid client header"), }, } @@ -72,10 +74,11 @@ func (suite *SoloMachineTestSuite) TestHeaderValidateBasic() { suite.Run(tc.name, func() { err := tc.header.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/06-solomachine/light_client_module_test.go b/modules/light-clients/06-solomachine/light_client_module_test.go index b011d130931..08c6d1f2945 100644 --- a/modules/light-clients/06-solomachine/light_client_module_test.go +++ b/modules/light-clients/06-solomachine/light_client_module_test.go @@ -1,6 +1,7 @@ package solomachine_test import ( + "errors" "fmt" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -164,7 +165,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { "failure: invalid consensus state: Tendermint consensus state", &ibctm.ConsensusState{}, sm.ClientState(), - fmt.Errorf("proto: wrong wireType = 0 for field TypeUrl"), + errors.New("proto: wrong wireType = 0 for field TypeUrl"), }, { "failure: invalid consensus state: consensus state does not match consensus state in client", @@ -182,7 +183,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { "failure: invalid client state: Tendermint client state", sm.ConsensusState(), &ibctm.ClientState{}, - fmt.Errorf("proto: wrong wireType = 2 for field IsFrozen"), + errors.New("proto: wrong wireType = 2 for field IsFrozen"), }, } @@ -551,7 +552,7 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { path = sm.GetClientStatePath(counterpartyClientIdentifier) proof = []byte("invalid proof") }, - fmt.Errorf("failed to unmarshal proof into type"), + errors.New("failed to unmarshal proof into type"), }, { "failure: consensus state timestamp is greater than signature", @@ -598,7 +599,7 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { proof, err = suite.chainA.Codec.Marshal(signatureDoc) suite.Require().NoError(err) }, - fmt.Errorf("failed to unmarshal proof into type"), + errors.New("failed to unmarshal proof into type"), }, { "failure: proof is nil", @@ -771,7 +772,7 @@ func (suite *SoloMachineTestSuite) TestVerifyNonMembership() { path = sm.GetClientStatePath(counterpartyClientIdentifier) proof = []byte("invalid proof") }, - fmt.Errorf("failed to unmarshal proof into type"), + errors.New("failed to unmarshal proof into type"), }, { "failure: consensus state timestamp is greater than signature", @@ -818,7 +819,7 @@ func (suite *SoloMachineTestSuite) TestVerifyNonMembership() { proof, err = suite.chainA.Codec.Marshal(signatureDoc) suite.Require().NoError(err) }, - fmt.Errorf("failed to unmarshal proof into type"), + errors.New("failed to unmarshal proof into type"), }, { "failure: proof is nil", @@ -1297,7 +1298,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientMessageHeader() { h := sm.CreateHeader(sm.Diversifier) h.Signature = suite.GetInvalidProof() clientMsg = h - }, fmt.Errorf("proto: wrong wireType = 0 for field Multi"), + }, errors.New("proto: wrong wireType = 0 for field Multi"), }, { "failure: invalid timestamp in header", @@ -1469,7 +1470,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientMessageMisbehaviour() { m.SignatureOne.Signature = suite.GetInvalidProof() clientMsg = m - }, fmt.Errorf("proto: wrong wireType = 0 for field Multi"), + }, errors.New("proto: wrong wireType = 0 for field Multi"), }, { "failure: invalid SignatureTwo SignatureData", @@ -1478,7 +1479,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientMessageMisbehaviour() { m.SignatureTwo.Signature = suite.GetInvalidProof() clientMsg = m - }, fmt.Errorf("proto: wrong wireType = 0 for field Multi"), + }, errors.New("proto: wrong wireType = 0 for field Multi"), }, { "failure: invalid SignatureOne timestamp", diff --git a/modules/light-clients/06-solomachine/misbehaviour_test.go b/modules/light-clients/06-solomachine/misbehaviour_test.go index b74023aee35..d16ff879d60 100644 --- a/modules/light-clients/06-solomachine/misbehaviour_test.go +++ b/modules/light-clients/06-solomachine/misbehaviour_test.go @@ -1,6 +1,8 @@ package solomachine_test import ( + "errors" + "github.com/cosmos/ibc-go/v9/modules/core/exported" solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctesting "github.com/cosmos/ibc-go/v9/testing" @@ -19,61 +21,61 @@ func (suite *SoloMachineTestSuite) TestMisbehaviourValidateBasic() { testCases := []struct { name string malleateMisbehaviour func(misbehaviour *solomachine.Misbehaviour) - expPass bool + expErr error }{ { "valid misbehaviour", func(*solomachine.Misbehaviour) {}, - true, + nil, }, { "sequence is zero", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.Sequence = 0 }, - false, + errors.New("sequence cannot be 0: invalid light client misbehaviour"), }, { "signature one sig is empty", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureOne.Signature = []byte{} }, - false, + errors.New("signature one failed basic validation: signature cannot be empty: invalid signature and data"), }, { "signature two sig is empty", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Signature = []byte{} }, - false, + errors.New("signature two failed basic validation: signature cannot be empty: invalid signature and data"), }, { "signature one data is empty", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureOne.Data = nil }, - false, + errors.New("signature one failed basic validation: data for signature cannot be empty: invalid signature and data"), }, { "signature two data is empty", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Data = []byte{} }, - false, + errors.New("signature two failed basic validation: data for signature cannot be empty: invalid signature and data"), }, { "signatures are identical", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Signature = misbehaviour.SignatureOne.Signature }, - false, + errors.New("misbehaviour signatures cannot be equal: invalid light client misbehaviour"), }, { "data signed is identical but path differs", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Data = misbehaviour.SignatureOne.Data }, - true, + nil, }, { "data signed and path are identical", @@ -81,31 +83,35 @@ func (suite *SoloMachineTestSuite) TestMisbehaviourValidateBasic() { misbehaviour.SignatureTwo.Path = misbehaviour.SignatureOne.Path misbehaviour.SignatureTwo.Data = misbehaviour.SignatureOne.Data }, - false, + errors.New("misbehaviour signature data must be signed over different messages: invalid light client misbehaviour"), }, { "data path for SignatureOne is unspecified", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureOne.Path = []byte{} - }, false, + }, + errors.New("signature one failed basic validation: path for signature cannot be empty: invalid signature and data"), }, { "data path for SignatureTwo is unspecified", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Path = []byte{} - }, false, + }, + errors.New("signature two failed basic validation: path for signature cannot be empty: invalid signature and data"), }, { "timestamp for SignatureOne is zero", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureOne.Timestamp = 0 - }, false, + }, + errors.New("signature one failed basic validation: timestamp cannot be 0: invalid signature and data"), }, { "timestamp for SignatureTwo is zero", func(misbehaviour *solomachine.Misbehaviour) { misbehaviour.SignatureTwo.Timestamp = 0 - }, false, + }, + errors.New("signature two failed basic validation: timestamp cannot be 0: invalid signature and data"), }, } @@ -118,10 +124,11 @@ func (suite *SoloMachineTestSuite) TestMisbehaviourValidateBasic() { err := misbehaviour.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/06-solomachine/module.go b/modules/light-clients/06-solomachine/module.go index 23707a162e7..c940561c64c 100644 --- a/modules/light-clients/06-solomachine/module.go +++ b/modules/light-clients/06-solomachine/module.go @@ -15,23 +15,24 @@ import ( ) var ( - _ module.AppModuleBasic = (*AppModuleBasic)(nil) + _ module.AppModuleBasic = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) ) -// AppModuleBasic defines the basic application module used by the solo machine light client. -// Only the RegisterInterfaces function needs to be implemented. All other function perform -// a no-op. -type AppModuleBasic struct{} - -// IsOnePerModuleType implements the depinject.OnePerModuleType interface. -func (AppModuleBasic) IsOnePerModuleType() {} +// AppModule is the application module for the Solomachine client module +type AppModule struct { + lightClientModule LightClientModule +} -// IsAppModule implements the appmodule.AppModule interface. -func (AppModuleBasic) IsAppModule() {} +// NewAppModule creates a new Solomachine client module +func NewAppModule(lightClientModule LightClientModule) AppModule { + return AppModule{ + lightClientModule: lightClientModule, + } +} // Name returns the solo machine module name. -func (AppModuleBasic) Name() string { +func (AppModule) Name() string { return ModuleName } @@ -42,46 +43,33 @@ func (AppModule) IsOnePerModuleType() {} func (AppModule) IsAppModule() {} // RegisterLegacyAminoCodec performs a no-op. The solo machine client does not support amino. -func (AppModuleBasic) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} +func (AppModule) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} // RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC // to unmarshal solo machine types. -func (AppModuleBasic) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { +func (AppModule) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { RegisterInterfaces(registry) } // DefaultGenesis performs a no-op. Genesis is not supported for solo machine. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { +func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return nil } // ValidateGenesis performs a no-op. Genesis is not supported for solo machine. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { return nil } // RegisterGRPCGatewayRoutes performs a no-op. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} +func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} // GetTxCmd performs a no-op. Please see the 02-client cli commands. -func (AppModuleBasic) GetTxCmd() *cobra.Command { +func (AppModule) GetTxCmd() *cobra.Command { return nil } // GetQueryCmd performs a no-op. Please see the 02-client cli commands. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { +func (AppModule) GetQueryCmd() *cobra.Command { return nil } - -// AppModule is the application module for the Solomachine client module -type AppModule struct { - AppModuleBasic - lightClientModule LightClientModule -} - -// NewAppModule creates a new Solomachine client module -func NewAppModule(lightClientModule LightClientModule) AppModule { - return AppModule{ - lightClientModule: lightClientModule, - } -} diff --git a/modules/light-clients/06-solomachine/proof_test.go b/modules/light-clients/06-solomachine/proof_test.go index 6c382c1979a..a4fc0aba031 100644 --- a/modules/light-clients/06-solomachine/proof_test.go +++ b/modules/light-clients/06-solomachine/proof_test.go @@ -1,6 +1,8 @@ package solomachine_test import ( + "errors" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -23,31 +25,31 @@ func (suite *SoloMachineTestSuite) TestVerifySignature() { name string publicKey cryptotypes.PubKey sigData signing.SignatureData - expPass bool + expErr error }{ { "single signature with regular public key", suite.solomachine.PublicKey, singleSigData, - true, + nil, }, { "multi signature with multisig public key", suite.solomachineMulti.PublicKey, multiSigData, - true, + nil, }, { "single signature with multisig public key", suite.solomachineMulti.PublicKey, singleSigData, - false, + errors.New("invalid signature data type, expected *signing.MultiSignatureData, got *signing.MultiSignatureData: signature verification failed"), }, { "multi signature with regular public key", suite.solomachine.PublicKey, multiSigData, - false, + errors.New("invalid signature data type, expected *signing.SingleSignatureData, got *signing.SingleSignatureData: signature verification failed"), }, } @@ -57,10 +59,11 @@ func (suite *SoloMachineTestSuite) TestVerifySignature() { suite.Run(tc.name, func() { err := solomachine.VerifySignature(tc.publicKey, signBytes, tc.sigData) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/codec.go b/modules/light-clients/07-tendermint/codec.go index d5ef5fc0acf..897ba9ee88b 100644 --- a/modules/light-clients/07-tendermint/codec.go +++ b/modules/light-clients/07-tendermint/codec.go @@ -1,14 +1,14 @@ package tendermint import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" "github.com/cosmos/ibc-go/v9/modules/core/exported" ) // RegisterInterfaces registers the tendermint concrete client-related // implementations and interfaces. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*exported.ClientState)(nil), &ClientState{}, diff --git a/modules/light-clients/07-tendermint/codec_test.go b/modules/light-clients/07-tendermint/codec_test.go index 01868765488..87c01eba8d6 100644 --- a/modules/light-clients/07-tendermint/codec_test.go +++ b/modules/light-clients/07-tendermint/codec_test.go @@ -1,6 +1,7 @@ package tendermint_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -14,34 +15,34 @@ import ( func TestCodecTypeRegistration(t *testing.T) { testCases := []struct { - name string - typeURL string - expPass bool + name string + typeURL string + expError error }{ { "success: ClientState", sdk.MsgTypeURL(&tendermint.ClientState{}), - true, + nil, }, { "success: ConsensusState", sdk.MsgTypeURL(&tendermint.ConsensusState{}), - true, + nil, }, { "success: Header", sdk.MsgTypeURL(&tendermint.Header{}), - true, + nil, }, { "success: Misbehaviour", sdk.MsgTypeURL(&tendermint.Misbehaviour{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -52,12 +53,12 @@ func TestCodecTypeRegistration(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, tendermint.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expError == nil { require.NotNil(t, msg) require.NoError(t, err) } else { require.Nil(t, msg) - require.Error(t, err) + require.ErrorContains(t, err, tc.expError.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/header_test.go b/modules/light-clients/07-tendermint/header_test.go index 8525b4b0f89..19716c8a19a 100644 --- a/modules/light-clients/07-tendermint/header_test.go +++ b/modules/light-clients/07-tendermint/header_test.go @@ -1,6 +1,7 @@ package tendermint_test import ( + "errors" "time" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" @@ -23,34 +24,37 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ - {"valid header", func() {}, true}, + {"valid header", func() {}, nil}, {"header is nil", func() { header.Header = nil - }, false}, + }, errors.New("tendermint header cannot be nil")}, {"signed header is nil", func() { header.SignedHeader = nil - }, false}, + }, errors.New("tendermint signed header cannot be nil")}, {"SignedHeaderFromProto failed", func() { header.SignedHeader.Commit.Height = -1 - }, false}, + }, errors.New("header is not a tendermint header")}, {"signed header failed tendermint ValidateBasic", func() { header = suite.chainA.LatestCommittedHeader header.SignedHeader.Commit = nil - }, false}, + }, errors.New("header failed basic validation")}, {"trusted height is equal to header height", func() { var ok bool header.TrustedHeight, ok = header.GetHeight().(clienttypes.Height) suite.Require().True(ok) - }, false}, + }, errors.New("invalid header height")}, {"validator set nil", func() { header.ValidatorSet = nil - }, false}, + }, errors.New("invalid client header")}, + {"ValidatorSetFromProto failed", func() { + header.ValidatorSet.Validators[0].VotingPower = -1 + }, errors.New("validator set is not tendermint validator set")}, {"header validator hash does not equal hash of validator set", func() { // use chainB's randomly generated validator set header.ValidatorSet = suite.chainB.LatestCommittedHeader.ValidatorSet - }, false}, + }, errors.New("validator set does not match hash")}, } suite.Require().Equal(exported.Tendermint, suite.header.ClientType()) @@ -67,10 +71,11 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { err := header.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/misbehaviour_handle_test.go b/modules/light-clients/07-tendermint/misbehaviour_handle_test.go index 9f81e0d9343..ce49cb1ab89 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_handle_test.go +++ b/modules/light-clients/07-tendermint/misbehaviour_handle_test.go @@ -1,6 +1,7 @@ package tendermint_test import ( + "errors" "fmt" "strings" "time" @@ -35,7 +36,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "valid fork misbehaviour", func() { @@ -56,7 +57,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid time misbehaviour", func() { @@ -71,7 +72,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid time misbehaviour, header 1 time strictly less than header 2 time", func() { @@ -86,7 +87,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Hour), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid misbehavior at height greater than last consensusState", func() { @@ -100,7 +101,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, true, + }, nil, }, { "valid misbehaviour with different trusted heights", func() { @@ -124,7 +125,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight2, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals2, suite.chainB.Signers), } }, - true, + nil, }, { "valid misbehaviour at a previous revision", func() { @@ -149,7 +150,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { err = path.EndpointB.UpgradeChain() suite.Require().NoError(err) }, - true, + nil, }, { "valid misbehaviour at a future revision", func() { @@ -169,7 +170,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(futureRevision, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid misbehaviour with trusted heights at a previous revision", func() { @@ -191,7 +192,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "consensus state's valset hash different from misbehaviour should still pass", func() { @@ -216,7 +217,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), bothValSet, suite.chainB.NextVals, trustedVals, bothSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, bothValSet, suite.chainB.NextVals, trustedVals, bothSigners), } - }, true, + }, nil, }, { "invalid misbehaviour: misbehaviour from different chain", func() { @@ -236,7 +237,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader("evmos", int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader("evmos", int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("invalid light client misbehaviour"), }, { "misbehaviour trusted validators does not match validator hash in trusted consensus state", func() { @@ -253,7 +254,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, altValSet, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, altValSet, suite.chainB.Signers), } - }, false, + }, errors.New("invalid validator set"), }, { "trusted consensus state does not exist", func() { @@ -267,12 +268,12 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight.Increment().(clienttypes.Height), suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("consensus state not found"), }, { "invalid tendermint misbehaviour", func() { misbehaviour = &solomachine.Misbehaviour{} - }, false, + }, errors.New("invalid client type"), }, { "trusting period expired", func() { @@ -294,7 +295,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("time since latest trusted state has passed the trusting period"), }, { "header 1 valset has too much change", func() { @@ -314,7 +315,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), altValSet, suite.chainB.NextVals, trustedVals, altSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, { "header 2 valset has too much change", func() { @@ -334,7 +335,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, suite.chainB.NextVals, trustedVals, altSigners), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, { "both header 1 and header 2 valsets have too much change", func() { @@ -354,7 +355,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), altValSet, suite.chainB.NextVals, trustedVals, altSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, suite.chainB.NextVals, trustedVals, altSigners), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, } @@ -375,10 +376,11 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviour() { err = lightClientModule.VerifyClientMessage(suite.chainA.GetContext(), path.EndpointA.ClientID, misbehaviour) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } @@ -411,7 +413,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "valid fork misbehaviour", func() { @@ -432,7 +434,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid time misbehaviour", func() { @@ -447,7 +449,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid time misbehaviour, header 1 time strictly less than header 2 time", func() { @@ -462,7 +464,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Hour), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } }, - true, + nil, }, { "valid misbehavior at height greater than last consensusState", func() { @@ -476,7 +478,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, true, + }, nil, }, { "valid misbehaviour with different trusted heights", func() { @@ -500,7 +502,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight2, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals2, suite.chainB.Signers), } }, - true, + nil, }, { "consensus state's valset hash different from misbehaviour should still pass", func() { @@ -525,7 +527,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), bothValSet, suite.chainB.NextVals, trustedVals, bothSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, bothValSet, suite.chainB.NextVals, trustedVals, bothSigners), } - }, true, + }, nil, }, { "invalid misbehaviour: misbehaviour from different chain", func() { @@ -545,7 +547,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader("evmos", int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader("evmos", int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, { "misbehaviour trusted validators does not match validator hash in trusted consensus state", func() { @@ -562,7 +564,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, altValSet, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, altValSet, suite.chainB.Signers), } - }, false, + }, errors.New("invalid validator set"), }, { "trusted consensus state does not exist", func() { @@ -576,12 +578,12 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight.Increment().(clienttypes.Height), suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("consensus state not found"), }, { "invalid tendermint misbehaviour", func() { misbehaviour = &solomachine.Misbehaviour{} - }, false, + }, errors.New("nvalid client type"), }, { "trusting period expired", func() { @@ -603,7 +605,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("time since latest trusted state has passed the trusting period"), }, { "header 1 valset has too much change", func() { @@ -623,7 +625,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), altValSet, suite.chainB.NextVals, trustedVals, altSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, { "header 2 valset has too much change", func() { @@ -643,7 +645,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, suite.chainB.NextVals, trustedVals, altSigners), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, { "both header 1 and header 2 valsets have too much change", func() { @@ -663,7 +665,7 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { Header1: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time.Add(time.Minute), altValSet, suite.chainB.NextVals, trustedVals, altSigners), Header2: suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(height.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, suite.chainB.NextVals, trustedVals, altSigners), } - }, false, + }, errors.New("validator set in header has too much change from trusted validator set"), }, } @@ -684,10 +686,11 @@ func (suite *TendermintTestSuite) TestVerifyMisbehaviourNonRevisionChainID() { err = lightClientModule.VerifyClientMessage(suite.chainA.GetContext(), path.EndpointA.ClientID, misbehaviour) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/misbehaviour_test.go b/modules/light-clients/07-tendermint/misbehaviour_test.go index b946a6d5856..554fadab29e 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_test.go +++ b/modules/light-clients/07-tendermint/misbehaviour_test.go @@ -1,8 +1,11 @@ package tendermint_test import ( + "errors" "time" + errorsmod "cosmossdk.io/errors" + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" "github.com/cometbft/cometbft/crypto/tmhash" cmttypes "github.com/cometbft/cometbft/types" @@ -48,7 +51,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { name string misbehaviour *ibctm.Misbehaviour malleateMisbehaviour func(misbehaviour *ibctm.Misbehaviour) error - expPass bool + expErr error }{ { "valid fork misbehaviour, two headers at same height have different time", @@ -58,7 +61,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - true, + nil, }, { "valid time misbehaviour, both headers at different heights are at same time", @@ -68,19 +71,19 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - true, + nil, }, { "misbehaviour Header1 is nil", ibctm.NewMisbehaviour(clientID, nil, suite.header), func(m *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidHeader, "misbehaviour Header1 cannot be nil"), }, { "misbehaviour Header2 is nil", ibctm.NewMisbehaviour(clientID, suite.header, nil), func(m *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidHeader, "misbehaviour Header2 cannot be nil"), }, { "valid misbehaviour with different trusted headers", @@ -90,7 +93,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - true, + nil, }, { "trusted height is 0 in Header1", @@ -100,7 +103,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidHeaderHeight, "misbehaviour Header1 cannot have zero revision height"), }, { "trusted height is 0 in Header2", @@ -110,7 +113,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidHeaderHeight, "misbehaviour Header2 cannot have zero revision height"), }, { "trusted valset is nil in Header1", @@ -120,7 +123,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidValidatorSet, "trusted validator set in Header1 cannot be empty"), }, { "trusted valset is nil in Header2", @@ -130,7 +133,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(ibctm.ErrInvalidValidatorSet, "trusted validator set in Header2 cannot be empty"), }, { "invalid client ID ", @@ -140,7 +143,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: "GAIA", }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errors.New("identifier GAIA has invalid length"), }, { "chainIDs do not match", @@ -150,7 +153,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errorsmod.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers must have identical chainIDs"), }, { "header2 height is greater", @@ -160,7 +163,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { ClientId: clientID, }, func(misbehaviour *ibctm.Misbehaviour) error { return nil }, - false, + errors.New("Header1 height is less than Header2 height"), }, { "header 1 doesn't have 2/3 majority", @@ -181,7 +184,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { misbehaviour.Header1.Commit = extCommit.ToCommit().ToProto() return err }, - false, + errors.New("validator set did not commit to header"), }, { "header 2 doesn't have 2/3 majority", @@ -202,7 +205,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { misbehaviour.Header2.Commit = extCommit.ToCommit().ToProto() return err }, - false, + errors.New("validator set did not commit to header"), }, { "validators sign off on wrong commit", @@ -216,7 +219,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { misbehaviour.Header2.Commit.BlockID = tmBlockID.ToProto() return nil }, - false, + errors.New("header 2 failed validation"), }, } @@ -226,11 +229,13 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { suite.Run(tc.name, func() { err := tc.malleateMisbehaviour(tc.misbehaviour) suite.Require().NoError(err) + err = tc.misbehaviour.ValidateBasic() - if tc.expPass { - suite.Require().NoError(tc.misbehaviour.ValidateBasic(), "valid test case %d failed: %s", i, tc.name) + if tc.expErr == nil { + suite.Require().NoError(err, "valid test case %d failed: %s", i, tc.name) } else { - suite.Require().Error(tc.misbehaviour.ValidateBasic(), "invalid test case %d passed: %s", i, tc.name) + suite.Require().Error(err, "invalid test case %d passed: %s", i, tc.name) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/module.go b/modules/light-clients/07-tendermint/module.go index 41bab253f9a..2d426b3c2ce 100644 --- a/modules/light-clients/07-tendermint/module.go +++ b/modules/light-clients/07-tendermint/module.go @@ -16,6 +16,18 @@ var ( _ appmodule.AppModule = (*AppModule)(nil) ) +// AppModule is the application module for the Tendermint client module +type AppModule struct { + lightClientModule LightClientModule +} + +// NewAppModule creates a new Tendermint client module +func NewAppModule(lightClientModule LightClientModule) AppModule { + return AppModule{ + lightClientModule: lightClientModule, + } +} + // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (AppModule) IsOnePerModuleType() {} @@ -48,15 +60,3 @@ func (AppModule) GetTxCmd() *cobra.Command { func (AppModule) GetQueryCmd() *cobra.Command { return nil } - -// AppModule is the application module for the Tendermint client module -type AppModule struct { - lightClientModule LightClientModule -} - -// NewAppModule creates a new Tendermint client module -func NewAppModule(lightClientModule LightClientModule) AppModule { - return AppModule{ - lightClientModule: lightClientModule, - } -} diff --git a/modules/light-clients/07-tendermint/proposal_handle_test.go b/modules/light-clients/07-tendermint/proposal_handle_test.go index 703651ca265..e114dc3f50e 100644 --- a/modules/light-clients/07-tendermint/proposal_handle_test.go +++ b/modules/light-clients/07-tendermint/proposal_handle_test.go @@ -70,17 +70,17 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { testCases := []struct { name string FreezeClient bool - expPass bool + expError error }{ { name: "PASS: update checks are deprecated, client is not frozen", FreezeClient: false, - expPass: true, + expError: nil, }, { name: "PASS: update checks are deprecated, client is frozen", FreezeClient: true, - expPass: true, + expError: nil, }, } @@ -138,7 +138,7 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { err := subjectClientState.CheckSubstituteAndUpdateState(suite.chainA.GetContext(), suite.chainA.App.AppCodec(), subjectClientStore, substituteClientStore, substituteClientState) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) updatedClient, ok := subjectPath.EndpointA.GetClientState().(*ibctm.ClientState) @@ -165,6 +165,7 @@ func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { suite.Require().Equal(time.Hour*24*7, updatedClient.TrustingPeriod) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expError.Error()) } }) } @@ -179,7 +180,7 @@ func (suite *TendermintTestSuite) TestIsMatchingClientState() { testCases := []struct { name string malleate func() - expPass bool + isMatch bool }{ { "matching clients", func() { @@ -235,7 +236,7 @@ func (suite *TendermintTestSuite) TestIsMatchingClientState() { tc.malleate() - suite.Require().Equal(tc.expPass, ibctm.IsMatchingClientState(*subjectClientState, *substituteClientState)) + suite.Require().Equal(tc.isMatch, ibctm.IsMatchingClientState(*subjectClientState, *substituteClientState)) }) } } diff --git a/modules/light-clients/07-tendermint/store.go b/modules/light-clients/07-tendermint/store.go index ef89b8de780..b3ea14bf3a8 100644 --- a/modules/light-clients/07-tendermint/store.go +++ b/modules/light-clients/07-tendermint/store.go @@ -220,7 +220,7 @@ func IterateConsensusStateAscending(clientStore storetypes.KVStore, cb func(heig // GetNextConsensusState returns the lowest consensus state that is larger than the given height. // The Iterator returns a storetypes.Iterator which iterates from start (inclusive) to end (exclusive). -// If the starting height exists in store, we need to call iterator.Next() to get the next consenus state. +// If the starting height exists in store, we need to call iterator.Next() to get the next consensus state. // Otherwise, the iterator is already at the next consensus state so we can call iterator.Value() immediately. func GetNextConsensusState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { iterateStore := prefix.NewStore(clientStore, []byte(KeyIterateConsensusStatePrefix)) diff --git a/modules/light-clients/07-tendermint/update_test.go b/modules/light-clients/07-tendermint/update_test.go index ab4deca0f86..d9d79e0d746 100644 --- a/modules/light-clients/07-tendermint/update_test.go +++ b/modules/light-clients/07-tendermint/update_test.go @@ -1,6 +1,7 @@ package tendermint_test import ( + "errors" "time" storetypes "cosmossdk.io/store/types" @@ -39,12 +40,12 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { name: "success", malleate: func() {}, - expPass: true, + expErr: nil, }, { name: "successful verify header for header with a previous height", @@ -64,7 +65,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, - expPass: true, + expErr: nil, }, { name: "successful verify header: header with future height and different validator set", @@ -82,7 +83,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+5, trustedHeight, suite.chainB.ProposedHeader.Time, bothValSet, suite.chainB.NextVals, trustedVals, bothSigners) }, - expPass: true, + expErr: nil, }, { name: "successful verify header: header with next height and different validator set", @@ -100,7 +101,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, bothValSet, suite.chainB.NextVals, trustedVals, bothSigners) }, - expPass: true, + expErr: nil, }, { name: "unsuccessful updates, passed in incorrect trusted validators for given consensus state", @@ -115,7 +116,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, bothValSet, bothValSet, bothValSet, bothSigners) }, - expPass: false, + expErr: errors.New("invalid validator set"), }, { name: "unsuccessful verify header with next height: update header mismatches nextValSetHash", @@ -129,7 +130,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { // this will err as altValSet.Hash() != consState.NextValidatorsHash header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, altValSet, trustedVals, altSigners) }, - expPass: false, + expErr: errors.New("failed to verify header"), }, { name: "unsuccessful update with future height: too much change in validator set", @@ -142,7 +143,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, altValSet, altValSet, trustedVals, altSigners) }, - expPass: false, + expErr: errors.New("failed to verify header: can't trust new val set"), }, { name: "unsuccessful verify header: header height revision and trusted height revision mismatch", @@ -154,7 +155,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(chainIDRevision1, 3, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("invalid client header"), }, { name: "unsuccessful verify header: header height < consensus height", @@ -170,7 +171,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { // Make new header at height less than latest client state header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, int64(heightMinus1.RevisionHeight), trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("invalid client header"), }, { name: "unsuccessful verify header: header basic validation failed", @@ -178,7 +179,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { // cause header to fail validatebasic by changing commit height to mismatch header height header.SignedHeader.Commit.Height = revisionHeight - 1 }, - expPass: false, + expErr: errors.New("header and commit height mismatch"), }, { name: "unsuccessful verify header: header timestamp is not past last client timestamp", @@ -191,7 +192,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time.Add(-time.Minute), suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("failed to verify header"), }, { name: "unsuccessful verify header: header with incorrect header chain-id", @@ -204,7 +205,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(chainID, suite.chainB.ProposedHeader.Height+1, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("header height revision 0 does not match trusted header revision 1"), }, { name: "unsuccessful update: trusting period has passed since last client timestamp", @@ -219,7 +220,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { suite.chainB.ExpireClient(ibctesting.TrustingPeriod) }, - expPass: false, + expErr: errors.New("failed to verify header"), }, { name: "unsuccessful update for a previous revision", @@ -237,7 +238,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { err = path.EndpointB.UpgradeChain() suite.Require().NoError(err) }, - expPass: false, + expErr: errors.New("failed to verify header"), }, { name: "successful update with identical header to a previous update", @@ -255,7 +256,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { err = path.EndpointA.UpdateClient() suite.Require().NoError(err) }, - expPass: true, + expErr: nil, }, { @@ -269,7 +270,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID+"-1", suite.chainB.ProposedHeader.Height+5, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("failed to verify header"), }, { @@ -287,7 +288,7 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { header = suite.chainB.CreateTMClientHeader(suite.chainB.ChainID, suite.chainB.ProposedHeader.Height, trustedHeight, suite.chainB.ProposedHeader.Time, suite.chainB.Vals, suite.chainB.NextVals, trustedVals, suite.chainB.Signers) }, - expPass: false, + expErr: errors.New("header height revision 2 does not match trusted header revision 1"), }, } @@ -314,10 +315,11 @@ func (suite *TendermintTestSuite) TestVerifyHeader() { err = lightClientModule.VerifyClientMessage(suite.chainA.GetContext(), path.EndpointA.ClientID, header) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/08-wasm/Dockerfile b/modules/light-clients/08-wasm/Dockerfile index 8e4bc8999a0..9a4b9985a66 100644 --- a/modules/light-clients/08-wasm/Dockerfile +++ b/modules/light-clients/08-wasm/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine3.20 as builder +FROM golang:1.23.3-alpine as builder ARG LIBWASM_VERSION ARG LIBWASM_CHECKSUM diff --git a/modules/light-clients/08-wasm/go.mod b/modules/light-clients/08-wasm/go.mod index 72e2f842388..d11a917f2fd 100644 --- a/modules/light-clients/08-wasm/go.mod +++ b/modules/light-clients/08-wasm/go.mod @@ -1,13 +1,11 @@ module github.com/cosmos/ibc-go/modules/light-clients/08-wasm -go 1.23.2 - -toolchain go1.23.3 +go 1.23.3 require ( cosmossdk.io/api v0.8.0 - cosmossdk.io/client/v2 v2.0.0-beta.5 - cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b + cosmossdk.io/client/v2 v2.0.0-beta.6 + cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b cosmossdk.io/core v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.5.0 @@ -34,7 +32,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v1.0.0-alpha.2 + cosmossdk.io/x/tx v1.0.0-alpha.3 cosmossdk.io/x/upgrade v0.1.4 github.com/CosmWasm/wasmvm/v2 v2.1.2 github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 @@ -49,29 +47,29 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.10.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.68.0 + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 + google.golang.org/grpc v1.69.0 ) require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.42.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect cosmossdk.io/depinject v1.1.0 // indirect - cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/schema v0.4.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go v1.54.6 // indirect + github.com/aws/aws-sdk-go v1.55.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect @@ -84,7 +82,7 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -128,17 +126,17 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.6 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect @@ -162,7 +160,7 @@ require ( github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -183,7 +181,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -210,26 +208,26 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.12.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect - google.golang.org/protobuf v1.35.2 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.6.0 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -247,32 +245,32 @@ replace github.com/cosmos/ibc-go/modules/capability => ../../capability //TODO: remove everything below after tags are created replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf + cosmossdk.io/api => cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // pseudo version lower than the latest tag - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b ) diff --git a/modules/light-clients/08-wasm/go.sum b/modules/light-clients/08-wasm/go.sum index 8a1ab84f8f1..b9d1d88fb9c 100644 --- a/modules/light-clients/08-wasm/go.sum +++ b/modules/light-clients/08-wasm/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -76,8 +76,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -115,14 +115,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -179,8 +179,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -192,14 +192,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 h1:yNrJKENUaZuFTkNmwP4KgXQqk2boGNUAzVyXLdFJNXU= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9/go.mod h1:pPUWNdsU8ghYzPOeVD2sAzPVh2yniq215XjRYubdO4I= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf h1:ofV6lCxevAZvr9iRpFQLkMucYbojplFS3/ACnq6JsoY= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf/go.mod h1:iu6iZy/kgiWTvIxO1Dn49JWTE32qorpGysRVDoMG8uY= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 h1:F8emcx9K/aJHoyEan8FgEA0RaDrsIBVXxtkHOtbm9AI= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 h1:0266beLan2snXZMeELYMpTVcFjlSgzHhLBKxSuNVZUI= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608/go.mod h1:edvI8tMINqCH75EgkOEMnCZEQ3iKJgOlZ+ZxOu4gmXU= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 h1:umN3k+AZ91ZjYv3CDiTgFDaWe22w3JxpeJmepUwKXV8= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608/go.mod h1:Xxz5u4rK+ArCsRo9TMSirg6jPMdva6BHv9Db65OkN/Q= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b h1:smupoVhpdK+5pztIylyIGkCc+0QaAaGLEvnM7Wnrq18= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 h1:w+/cxqYHud1plzCTIvEBtab6RqpgAl2C5Hgn1l4p+oo= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608/go.mod h1:gCTZBT00tI2zTQy65aSolV3aUnQDqpVgz5yOp96LpGg= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= @@ -210,56 +210,56 @@ cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d h1:KQM4Q6kjwlM4HuDZRV8/ZDXX3whjfStndYNTsRrbboQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 h1:NaFVgzmO3YFX+l7696SdDTtvJR0MTjjwSe0sX+inAI4= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf h1:iDymYoV4/JayuquNG5niu4JR0/ylaX+bmXk8wGlqG74= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf/go.mod h1:NhLpCB056huDyXxcLDbCgm4deO293HO9b6/Xl1Ha2nQ= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 h1:No84LXBp0kEzJfAqorxrgqzmzqOpHhbs8IK2nBpVQJY= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608/go.mod h1:wADXnci9qeFwOQ09qiyf1uLdI4n/RSSTG8mSM9hmxys= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 h1:bCBkUT3caCwOf5U9Os96dUETHPs6Cdv9oF5LCjt1tJs= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9/go.mod h1:h+11hiXPTGV6hl8ifSaJLMXoVhCsSKoF+l0/baqRGAU= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf h1:zeaEXUGi0Kcp64F7aRRwtHcv9INO92am+FX4hHVj454= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf/go.mod h1:LDTXn+hTfFjvvtbnyRl4exZbVXMXc9BbjCp+hA75GLE= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf h1:7saWRiQfcQZN5WDUHRlulO4zWyPsnaG1GEAzBw0U6Qs= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf/go.mod h1:9bf6NM/PjLLUpiKsxG6SsEO7De9xPR9cNDbAkvWhFf8= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf h1:sO9pf67Lvb4nWOfpVv1i9K5rbGhEFWGn7O5C1m/A4fo= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ie8fti1Nb5TtqJYw76c3eySQIDh5p5420ofUQ3/t3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf h1:omz9Z670B5GLvRx5qvkEn2NIxPm21VEvB+kLdmNQK3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf/go.mod h1:wf99TK+GDbcmmUnHnY9Mfiu9WnlxNAx539QMTqTkmv8= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf h1:IfC2LFM+55i/cl0gy6C5kTwr8QoUFtuyoMSPvbJUUSc= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf/go.mod h1:qg/3LeOxuIF9RTUJG0tTfd+vKgqApP6CLyEAsd1dgc0= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf h1:+mmMU6rrI9+jg3U1eCQcNWr374HbkZjLLNmLi1UmN70= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf/go.mod h1:PKBXn9aWiMI52CIz24mtH/TpXaPiSakjZeOBl9ZaIpc= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf h1:hjO5z2eKV74A1/nNru7RzgOSZscG1axIgJLUXIlc6wg= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf/go.mod h1:aXyiBgzFj7FhePk+SfIAOKSPUuNnx688hfeQz1lEeWc= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf h1:dWxbr7c/Xve6nmyMjolMYdtc2dQ/T2XMsXd/Umu6Ho4= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ZYQlnfBVLXR04RLNbeUfw43WefbdDQXFHBnyPPis3E= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf h1:XvRnVzXgwDKE6BL2jfo23qSkoIzNTDTsF4h2T7n1Ln8= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf/go.mod h1:dntwkEmxj/nQ6BX333tomRyQ/fOn0Y/EEF/7xrDyTww= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf h1:RES8jCRYKRL1YQS+BTdQfcjQW4y/TotcZcBLfxMVWOc= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf/go.mod h1:pGpOv+bdskHPT4KDfqB73QEEN7rvVi3rDbnGXh8LOAM= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf h1:TdJDBD9G6vuBMIwjkWPYIb1Y2xiZqpOhshGWQpZ81XE= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf/go.mod h1:VPlvp0gqaXApHsRrYgfZ00aqfqsFOUG6Qt2GffMlWhI= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf h1:FUFA1OjFrL9aXrh7ZuvcgVAg1kgtUFnFfL91thNH0Zw= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf/go.mod h1:Ljvt4ihdiSMW3aXXG1ZziMchdHxhoUlzxF/o2pPU7sA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf h1:HyaQnRlvruD/l4X8HJtKA3TDcX4CLL00qE3YtUOgcIA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf/go.mod h1:QgMu/n+FOfr7DRGI4Mg9R8JRNDl4E+/G+eGWqwrHOfo= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf h1:/vSXgbYHI4VxeXuXYw/vQiS/2y1iFBu9vJ6MgG6DX0w= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf/go.mod h1:BTBxeoWmU90YHa8icMHtyNJ4yi4S7K4Q0i1Nel4fOhM= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf h1:XJIgfIUY2k4PjrCg2x7tkj3sYp2pHXdM6DuwrhSX7yE= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf/go.mod h1:KfTlw+p2yHRNtWa/K/4hEjs1zuZTUYR61l+FReNrrtM= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf h1:9o1WYkNzZxNyAFldIDPIshFtXz6OiZWhZ8gBV0yleyQ= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf/go.mod h1:YUc0YB3WFrUo/vqQhzOOfb73D+U2Yho7xqnvdAWc2Qs= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf h1:vaFB6CMx+qFjoZWq7fgthRuAhPfObptlf03Cv9bz5XE= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf/go.mod h1:EQMZV9XM15sogrzz404akhvb9BNCpyyR/U5ZIyDnsio= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf h1:q0r0DFzP4nDkArKEj8o5eJIbihgxIOJMranGyJv1iiw= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf/go.mod h1:o5LKEyzicUjBF0Xzixb5yva9y9SBAFo6o752nE/QDAM= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf h1:QmDmYiOWHkBoRdT2j76G6Gj42XVyxn5qUaiTYPcemcM= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf/go.mod h1:izXYqFcs/+AgFnik31IQYIzYHPifj2ay6Eenv9UEzwI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 h1:nMu0DD9qutZ7dzIySxTRnLYvZtockBghVkwBHyuwBLI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608/go.mod h1:m0eg/A4J5fmXFNGEldQpeTrMr9PFWaVIFjbDYes0j9I= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 h1:JL+VXHmb8xqwU7ToR2RG0V2BTmE+t1PkJ880xKi46Tc= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608/go.mod h1:huNjmnJuvPXAT5zvK8S29X0u9DpCa3X9ZCUd3bJ8bng= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 h1:MzRTC+W0Uv40yfFNegDskcisgui9lQdeG9FZxOixATk= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608/go.mod h1:GMLM+m3Il+QTfOrQG08sFJXlKw95UDKPIOYcuSwjbzQ= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 h1:lbtU7rYltk2axJ5h1DgPamVosuZEeyOAaqYPQpQBH4g= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608/go.mod h1:GN02Rosc2O/vCNBnXqY35vA2hoMmRQeCKd81FuoMzmE= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 h1:ATB7FV12GCjS+KN2Fx8B878LbwzNP4bkzsznRqMmn3k= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608/go.mod h1:d4a/F6pXE2KWJdshiRxCPKyW6h5gAnAWmSCtlRrhcYk= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 h1:lstvqRuVEDtRxiF9+LM16SpRriq0O+5lMHzsGKheXH4= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608/go.mod h1:ib+kqbNMsj6n7/LvW+qi24/1kp/ApWJpsnCWY5yN6Mk= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 h1:hYFPPs5WsMWj/1sRpw6Aqmioph3qw5VN76geVxtaWtI= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608/go.mod h1:bG9SiC6YsVOpsKgOd+b+t3Kl4GLb9T6RjhBKesPn+Gg= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 h1:UZSqhiAi1mKi8DE+OLGMrXSoenSl4PkyQT7xxNfr9Bw= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608/go.mod h1:PLdiJlSC0XveXA3vJ0E4n1NCG78UeHXwEk0razSnEk4= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 h1:KqJ+F0YVwFlu06gEoWHvGvdC1DYXDL5Rykra61/pY4Q= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608/go.mod h1:YBMj0T87xliEfldeZHC60AqyZoLoy1wJzAAgaaQubBM= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 h1:iSOOM7vAa0LuJ9xKZ7k34g5uyy9WQyfKbnAPmnf8Abc= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608/go.mod h1:yIgJCAGBnM3sull2qACQP+uMsEoogyNO6OXz82z3tVg= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 h1:F+w/ofuUDxFyyk6t7kt7cdcBsTa2gA7zuvCEplB871A= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608/go.mod h1:ynGp02hnYhVidQiL9KOKeiZnn0h+PSEJb+XjgKH6+v4= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 h1:ll6Pk+WoPlusW2uy8HTXupL+mees6mNohS4dfGYJsZ0= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608/go.mod h1:L8fBvuIwBQzABO/cYEOpekmaKlR4ELclrrGNZ6r//sg= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 h1:t0A/ip5m09OuAY0bvpnfxJhD1/dL44JYNwffy5boqB4= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608/go.mod h1:apbBgC0mKZTbgvW2ACPcNBl0z8HjCp7R9ZBns7F6J2E= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 h1:bB3FhjvPZfkS3EksYB3YR7muxGk0/rr6U993a7ETHx0= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608/go.mod h1:H1QoaISMz78OyBwXKU4gp8Gmwd1EVWq+Lb9P3BUfXUM= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 h1:ZD/gSJbfpC2WzXr17xq5UkJBQd/BfBVajzKrieu6zjQ= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608/go.mod h1:btgbNMPZJWZLd03ef2AblrpJ7e9ocpTvA0xUw0hIHew= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 h1:3rdbR/782gMtQo+1yxH+wuhJKd1jm/4X0pBgQX7pDp4= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608/go.mod h1:xLb6tQ33fgSOmwlMui9UjLzI9xmOclfjG2g+/z4XiUc= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 h1:+GBTBLH54gKT2dFlUgN/XzawdBG/9U5djPecjr7meas= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608/go.mod h1:BlYhkjtZZdKXQP9mBiVwRbaduXtDKEJHQC3dZ6fZBS0= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 h1:aycIQRLzdtuI99FkTRo4Y2QerkfKqZRYNN2BPESEc8A= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608/go.mod h1:4Zyt59oTQdaKitlYyz9K7d8Mi32e+K5NliOf9HAj5Wo= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 h1:kqbOiJpmSBE03Isw7KY27N4oCSaOcG28oaJgCLh9Rhk= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 h1:80l+duTMRKnszkWXolEs1n+1j4RFYd41mrV24P79vcY= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608/go.mod h1:5GIkumZszCtSzsXcTtL2YP4mIU25Rn3t0y51JWzzUDI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -293,8 +293,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -354,8 +354,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -385,8 +385,8 @@ github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDz github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 h1:NJ4oI0UP0Qzt5gSgxuut4PrTaI0Ae0J1GKY9HuS7Zyo= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1/go.mod h1:rHr3gIOU3dJIjpnFCUeJyG4ItADlXMjI4NBwS4+YeMA= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b h1:ZaEAV5tsUTnyWEC/Gt8DXHKBANDyx70PVCiPOEVnuHk= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b/go.mod h1:ecJnx3s3oQK5BR7vu25fYSD2/ND9YLGkVpST7uiBkT0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -582,8 +582,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -602,8 +602,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -620,8 +620,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.6 h1:5jHuM+aH373XNtXl9TNTUH5Qd69Trve11tHIrB+6yj4= +github.com/hashicorp/go-getter v1.7.6/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -703,8 +703,8 @@ github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9i github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -799,8 +799,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -905,18 +905,20 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -936,8 +938,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1028,8 +1030,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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= @@ -1055,8 +1057,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1071,8 +1073,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -1155,13 +1157,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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= @@ -1172,13 +1174,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1243,8 +1245,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.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= @@ -1293,8 +1293,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1406,12 +1406,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1447,8 +1447,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= +google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1465,8 +1465,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/modules/light-clients/08-wasm/internal/types/store.go b/modules/light-clients/08-wasm/internal/types/store.go index 11ffd559d94..c29789c3ca2 100644 --- a/modules/light-clients/08-wasm/internal/types/store.go +++ b/modules/light-clients/08-wasm/internal/types/store.go @@ -151,7 +151,7 @@ func (s ClientRecoveryStore) CacheWrapWithTrace(w io.Writer, tc storetypes.Trace return cachekv.NewStore(tracekv.NewStore(s, w, tc)) } -// getStore returns the types to be used for the given key and a boolean flag indicating if that types was found. +// GetStore returns the types to be used for the given key and a boolean flag indicating if that type was found. // If the key is prefixed with "subject/", the subjectStore is returned. If the key is prefixed with "substitute/", // the substituteStore is returned. // diff --git a/modules/light-clients/08-wasm/keeper/grpc_query_test.go b/modules/light-clients/08-wasm/keeper/grpc_query_test.go index cd2ce5cf765..fd92d3cc7bb 100644 --- a/modules/light-clients/08-wasm/keeper/grpc_query_test.go +++ b/modules/light-clients/08-wasm/keeper/grpc_query_test.go @@ -3,6 +3,10 @@ package keeper_test import ( "encoding/hex" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + errorsmod "cosmossdk.io/errors" govtypes "cosmossdk.io/x/gov/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -17,7 +21,7 @@ func (suite *KeeperTestSuite) TestQueryCode() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "success", @@ -30,21 +34,27 @@ func (suite *KeeperTestSuite) TestQueryCode() { req = &types.QueryCodeRequest{Checksum: hex.EncodeToString(res.Checksum)} }, - true, + nil, }, { "fails with empty request", func() { req = &types.QueryCodeRequest{} }, - false, + status.Error( + codes.NotFound, + errorsmod.Wrap(types.ErrWasmChecksumNotFound, "").Error(), + ), }, { "fails with non-existent checksum", func() { req = &types.QueryCodeRequest{Checksum: "test"} }, - false, + status.Error( + codes.InvalidArgument, + types.ErrInvalidChecksum.Error(), + ), }, } @@ -56,12 +66,13 @@ func (suite *KeeperTestSuite) TestQueryCode() { res, err := GetSimApp(suite.chainA).WasmClientKeeper.Code(suite.chainA.GetContext(), req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().NotEmpty(res.Data) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } @@ -73,14 +84,14 @@ func (suite *KeeperTestSuite) TestQueryChecksums() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "success with no checksums", func() { expChecksums = []string{} }, - true, + nil, }, { "success with one checksum", @@ -93,7 +104,7 @@ func (suite *KeeperTestSuite) TestQueryChecksums() { expChecksums = append(expChecksums, hex.EncodeToString(res.Checksum)) }, - true, + nil, }, } @@ -106,7 +117,7 @@ func (suite *KeeperTestSuite) TestQueryChecksums() { req := &types.QueryChecksumsRequest{} res, err := GetSimApp(suite.chainA).WasmClientKeeper.Checksums(suite.chainA.GetContext(), req) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(len(expChecksums), len(res.Checksums)) diff --git a/modules/light-clients/08-wasm/keeper/keeper.go b/modules/light-clients/08-wasm/keeper/keeper.go index 52e3670605f..0be1bb9064c 100644 --- a/modules/light-clients/08-wasm/keeper/keeper.go +++ b/modules/light-clients/08-wasm/keeper/keeper.go @@ -72,7 +72,7 @@ func (k Keeper) getQueryPlugins() QueryPlugins { return k.queryPlugins } -// SetQueryPlugins sets the plugins. +// setQueryPlugins sets the plugins. func (k *Keeper) setQueryPlugins(plugins QueryPlugins) { k.queryPlugins = plugins } diff --git a/modules/light-clients/08-wasm/keeper/keeper_test.go b/modules/light-clients/08-wasm/keeper/keeper_test.go index 9de14a2c605..9974671d270 100644 --- a/modules/light-clients/08-wasm/keeper/keeper_test.go +++ b/modules/light-clients/08-wasm/keeper/keeper_test.go @@ -315,8 +315,7 @@ func (suite *KeeperTestSuite) TestInitializedPinnedCodes() { err := wasmClientKeeper.InitializePinnedCodes(ctx) - expPass := tc.expError == nil - if expPass { + if tc.expError == nil { suite.Require().NoError(err) suite.ElementsMatch(checksumIDs, capturedChecksums) } else { @@ -432,8 +431,7 @@ func (suite *KeeperTestSuite) TestMigrateContract() { clientState, ok = endpointA.GetClientState().(*types.ClientState) suite.Require().True(ok) - expPass := tc.expErr == nil - if expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(expClientState, clientState) } else { diff --git a/modules/light-clients/08-wasm/module.go b/modules/light-clients/08-wasm/module.go index c05b6737dc1..cee85f7ce88 100644 --- a/modules/light-clients/08-wasm/module.go +++ b/modules/light-clients/08-wasm/module.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" "cosmossdk.io/core/appmodule" - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -29,6 +29,20 @@ var ( _ appmodule.AppModule = (*AppModule)(nil) ) +// AppModule represents the AppModule for this module +type AppModule struct { + cdc codec.Codec + keeper keeper.Keeper +} + +// NewAppModule creates a new 08-wasm module +func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { + return AppModule{ + cdc: cdc, + keeper: k, + } +} + // IsOnePerModuleType implements the depinject.OnePerModuleType interface. func (AppModule) IsOnePerModuleType() {} @@ -41,11 +55,11 @@ func (AppModule) Name() string { } // RegisterLegacyAminoCodec performs a no-op. The Wasm client does not support amino. -func (AppModule) RegisterLegacyAminoCodec(registry.AminoRegistrar) {} +func (AppModule) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} // RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC // to unmarshal Wasm light client types. -func (AppModule) RegisterInterfaces(reg registry.InterfaceRegistrar) { +func (AppModule) RegisterInterfaces(reg coreregistry.InterfaceRegistrar) { types.RegisterInterfaces(reg) } @@ -84,20 +98,6 @@ func (AppModule) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// AppModule represents the AppModule for this module -type AppModule struct { - cdc codec.Codec - keeper keeper.Keeper -} - -// NewAppModule creates a new 08-wasm module -func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule { - return AppModule{ - cdc: cdc, - keeper: k, - } -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) diff --git a/modules/light-clients/08-wasm/testing/simapp/app.go b/modules/light-clients/08-wasm/testing/simapp/app.go index 687402a9e47..d21792e73d2 100644 --- a/modules/light-clients/08-wasm/testing/simapp/app.go +++ b/modules/light-clients/08-wasm/testing/simapp/app.go @@ -140,7 +140,6 @@ import ( solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibcmock "github.com/cosmos/ibc-go/v9/testing/mock" - ibctestingtypes "github.com/cosmos/ibc-go/v9/testing/types" ) const appName = "SimApp" @@ -197,7 +196,7 @@ type SimApp struct { BankKeeper bankkeeper.BaseKeeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper + MintKeeper *mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper @@ -231,12 +230,6 @@ type SimApp struct { configurator module.Configurator } -func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF { - return func() (cmtcrypto.PrivKey, error) { - return cmted25519.GenPrivKey(), nil - } -} - func init() { userHomeDir, err := os.UserHomeDir() if err != nil { @@ -437,9 +430,13 @@ func NewSimApp( authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), cometService, ) - app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.StakingKeeper, app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) - app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, govModuleAddr) + app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + if err := app.MintKeeper.SetMintFn(mintkeeper.DefaultMintFn(minttypes.DefaultInflationCalculationFn, app.StakingKeeper, app.MintKeeper)); err != nil { + panic(err) + } + + app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, govModuleAddr) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, cometService, authtypes.FeeCollectorName, govModuleAddr) @@ -447,7 +444,8 @@ func NewSimApp( appCodec, legacyAmino, app.StakingKeeper, govModuleAddr, ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper.AddressCodec()) + // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks app.StakingKeeper.SetHooks( @@ -457,7 +455,7 @@ func NewSimApp( app.CircuitKeeper = circuitkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[circuittypes.StoreKey]), logger.With(log.ModuleKey, "x/circuit")), appCodec, govModuleAddr, app.AuthKeeper.AddressCodec()) app.BaseApp.SetCircuitBreaker(&app.CircuitKeeper) - app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper) + app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper.AddressCodec()) groupConfig := group.DefaultConfig() /* @@ -507,6 +505,19 @@ func NewSimApp( ), ) + evidenceKeeper := evidencekeeper.NewKeeper( + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.StakingKeeper, + app.SlashingKeeper, + app.ConsensusParamsKeeper, + app.AuthKeeper.AddressCodec(), + app.StakingKeeper.ConsensusAddressCodec(), + ) + + // If evidence needs to be handled for the app, set routes in router here and seal + app.EvidenceKeeper = *evidenceKeeper + // 08-wasm's Keeper can be instantiated in two different ways: // 1. If the chain uses x/wasm: // Both x/wasm's Keeper and 08-wasm Keeper should share the same Wasm VM instance. @@ -522,7 +533,7 @@ func NewSimApp( // you can use NewKeeperWithConfig constructor function and provide // the Wasm VM configuration parameters of your choice. // Check out the WasmConfig type definition for more information on - // each parameter. Some parameters allow node-leve configurations. + // each parameter. Some parameters allow node-level configurations. // Function DefaultWasmConfig can also be used to use default values. // // In the code below we use the second method because we are not using x/wasm in this app.go. @@ -569,11 +580,13 @@ func NewSimApp( // ICA Host keeper app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), logger.With(log.ModuleKey, "x/icahost"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.GetSubspace(icahosttypes.SubModuleName), app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack app.IBCKeeper.ChannelKeeper, - app.AuthKeeper, app.MsgServiceRouter(), - app.GRPCQueryRouter(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.AuthKeeper, + govModuleAddr, ) // Create IBC Router @@ -681,13 +694,6 @@ func NewSimApp( wasmLightClientModule := wasm.NewLightClientModule(app.WasmClientKeeper, storeProvider) clientKeeper.AddRoute(wasmtypes.ModuleName, &wasmLightClientModule) - // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), app.StakingKeeper, app.SlashingKeeper, app.ConsensusParamsKeeper, app.AuthKeeper.AddressCodec(), - ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper - // **** Module Options **** // NOTE: Any module instantiated in the module manager that is later modified @@ -699,7 +705,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), feegrantmodule.NewAppModule(appCodec, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AuthKeeper, app.BankKeeper, app.PoolKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper, nil), + mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.interfaceRegistry, cometService), distr.NewAppModule(appCodec, app.DistrKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper), @@ -881,7 +887,7 @@ func NewSimApp( // Initialize pinned codes in wasmvm as they are not persisted there if err := app.WasmClientKeeper.InitializePinnedCodes(ctx); err != nil { - fmt.Println(fmt.Sprintf("failed initialize pinned codes %s", err)) + fmt.Printf("failed initialize pinned codes %s\n", err) os.Exit(1) } } @@ -1002,6 +1008,12 @@ func (app *SimApp) DefaultGenesis() map[string]json.RawMessage { return app.ModuleManager.DefaultGenesis() } +func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF { + return func() (cmtcrypto.PrivKey, error) { + return cmted25519.GenPrivKey(), nil + } +} + // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. @@ -1136,11 +1148,6 @@ func (app *SimApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } -// GetStakingKeeper implements the TestingApp interface. -func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - // GetIBCKeeper implements the TestingApp interface. func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper diff --git a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go index c592a5c1a81..ba5303918c0 100644 --- a/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go +++ b/modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go @@ -120,7 +120,10 @@ func NewRootCmd() *cobra.Command { initRootCmd(rootCmd, tempApp.ModuleManager) autoCliOpts := tempApp.AutoCliOpts() - autoCliOpts.ClientCtx = initClientCtx + autoCliOpts.AddressCodec = initClientCtx.AddressCodec + autoCliOpts.ValidatorAddressCodec = initClientCtx.ValidatorAddressCodec + autoCliOpts.ConsensusAddressCodec = initClientCtx.ConsensusAddressCodec + autoCliOpts.Cdc = initClientCtx.Codec nodeCmds := nodeservice.NewNodeCommands() autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions() diff --git a/modules/light-clients/08-wasm/types/client_message_test.go b/modules/light-clients/08-wasm/types/client_message_test.go index c405e3fe0f8..0cc2111fcf6 100644 --- a/modules/light-clients/08-wasm/types/client_message_test.go +++ b/modules/light-clients/08-wasm/types/client_message_test.go @@ -1,6 +1,8 @@ package types_test import ( + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" ) @@ -8,28 +10,28 @@ func (suite *TypesTestSuite) TestClientMessageValidateBasic() { testCases := []struct { name string clientMessage *types.ClientMessage - expPass bool + expErr error }{ { "valid client message", &types.ClientMessage{ Data: []byte("data"), }, - true, + nil, }, { "data is nil", &types.ClientMessage{ Data: nil, }, - false, + errorsmod.Wrap(types.ErrInvalidData, "data cannot be empty"), }, { "data is empty", &types.ClientMessage{ Data: []byte{}, }, - false, + errorsmod.Wrap(types.ErrInvalidData, "data cannot be empty"), }, } @@ -40,10 +42,11 @@ func (suite *TypesTestSuite) TestClientMessageValidateBasic() { suite.Require().Equal(types.Wasm, clientMessage.ClientType()) err := clientMessage.ValidateBasic() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/light-clients/08-wasm/types/client_state_test.go b/modules/light-clients/08-wasm/types/client_state_test.go index ecd6e70ca01..f042e0183b5 100644 --- a/modules/light-clients/08-wasm/types/client_state_test.go +++ b/modules/light-clients/08-wasm/types/client_state_test.go @@ -1,6 +1,8 @@ package types_test import ( + errorsmod "cosmossdk.io/errors" + wasmtesting "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/testing" "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" @@ -10,32 +12,32 @@ func (suite *TypesTestSuite) TestValidate() { testCases := []struct { name string clientState *types.ClientState - expPass bool + expErr error }{ { name: "valid client", clientState: types.NewClientState([]byte{0}, wasmtesting.Code, clienttypes.ZeroHeight()), - expPass: true, + expErr: nil, }, { name: "nil data", clientState: types.NewClientState(nil, wasmtesting.Code, clienttypes.ZeroHeight()), - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidData, "data cannot be empty"), }, { name: "empty data", clientState: types.NewClientState([]byte{}, wasmtesting.Code, clienttypes.ZeroHeight()), - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidData, "data cannot be empty"), }, { name: "nil checksum", clientState: types.NewClientState([]byte{0}, nil, clienttypes.ZeroHeight()), - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidChecksum, "checksum cannot be empty"), }, { name: "empty checksum", clientState: types.NewClientState([]byte{0}, []byte{}, clienttypes.ZeroHeight()), - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidChecksum, "checksum cannot be empty"), }, { name: "longer than 32 bytes checksum", @@ -49,17 +51,18 @@ func (suite *TypesTestSuite) TestValidate() { }, clienttypes.ZeroHeight(), ), - expPass: false, + expErr: errorsmod.Wrap(types.ErrInvalidChecksum, "checksum cannot be empty"), }, } for _, tc := range testCases { suite.Run(tc.name, func() { err := tc.clientState.Validate() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err, tc.name) } else { suite.Require().Error(err, tc.name) + suite.Require().ErrorIs(err, tc.expErr) } }) } diff --git a/modules/light-clients/08-wasm/types/codec.go b/modules/light-clients/08-wasm/types/codec.go index 13268f6046c..b6743a9c69a 100644 --- a/modules/light-clients/08-wasm/types/codec.go +++ b/modules/light-clients/08-wasm/types/codec.go @@ -1,7 +1,7 @@ package types import ( - "cosmossdk.io/core/registry" + coreregistry "cosmossdk.io/core/registry" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -11,7 +11,7 @@ import ( // RegisterInterfaces registers the Wasm concrete client-related // implementations and interfaces. -func RegisterInterfaces(registry registry.InterfaceRegistrar) { +func RegisterInterfaces(registry coreregistry.InterfaceRegistrar) { registry.RegisterImplementations( (*exported.ClientState)(nil), &ClientState{}, diff --git a/modules/light-clients/08-wasm/types/codec_test.go b/modules/light-clients/08-wasm/types/codec_test.go index 9e94148765a..1df1c2a3000 100644 --- a/modules/light-clients/08-wasm/types/codec_test.go +++ b/modules/light-clients/08-wasm/types/codec_test.go @@ -1,6 +1,7 @@ package types_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -15,44 +16,44 @@ import ( func TestCodecTypeRegistration(t *testing.T) { testCases := []struct { - name string - typeURL string - expPass bool + name string + typeURL string + expError error }{ { "success: ClientState", sdk.MsgTypeURL(&types.ClientState{}), - true, + nil, }, { "success: ConsensusState", sdk.MsgTypeURL(&types.ConsensusState{}), - true, + nil, }, { "success: ClientMessage", sdk.MsgTypeURL(&types.ClientMessage{}), - true, + nil, }, { "success: MsgStoreCode", sdk.MsgTypeURL(&types.MsgStoreCode{}), - true, + nil, }, { "success: MsgMigrateContract", sdk.MsgTypeURL(&types.MsgMigrateContract{}), - true, + nil, }, { "success: MsgRemoveChecksum", sdk.MsgTypeURL(&types.MsgRemoveChecksum{}), - true, + nil, }, { "type not registered on codec", "ibc.invalid.MsgTypeURL", - false, + fmt.Errorf("unable to resolve type URL ibc.invalid.MsgTypeURL"), }, } @@ -63,12 +64,12 @@ func TestCodecTypeRegistration(t *testing.T) { encodingCfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, wasm.AppModule{}) msg, err := encodingCfg.Codec.InterfaceRegistry().Resolve(tc.typeURL) - if tc.expPass { + if tc.expError == nil { require.NotNil(t, msg) require.NoError(t, err) } else { require.Nil(t, msg) - require.Error(t, err) + require.ErrorContains(t, err, tc.expError.Error()) } }) } diff --git a/modules/light-clients/08-wasm/types/genesis_test.go b/modules/light-clients/08-wasm/types/genesis_test.go index ab5c6d73af5..3c9d0df46c1 100644 --- a/modules/light-clients/08-wasm/types/genesis_test.go +++ b/modules/light-clients/08-wasm/types/genesis_test.go @@ -1,6 +1,8 @@ package types_test import ( + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" ) @@ -8,31 +10,32 @@ func (suite *TypesTestSuite) TestValidateGenesis() { testCases := []struct { name string genState *types.GenesisState - expPass bool + expErr error }{ { "valid genesis", &types.GenesisState{ Contracts: []types.Contract{{CodeBytes: []byte{1}}}, }, - true, + nil, }, { "invalid genesis", &types.GenesisState{ Contracts: []types.Contract{{CodeBytes: []byte{}}}, }, - false, + errorsmod.Wrap(types.ErrWasmEmptyCode, "wasm bytecode validation failed"), }, } for _, tc := range testCases { tc := tc err := tc.genState.Validate() - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.Require().ErrorIs(err, tc.expErr) } } } diff --git a/modules/light-clients/08-wasm/types/msgs_test.go b/modules/light-clients/08-wasm/types/msgs_test.go index a005d26437e..914b5391fd9 100644 --- a/modules/light-clients/08-wasm/types/msgs_test.go +++ b/modules/light-clients/08-wasm/types/msgs_test.go @@ -1,6 +1,7 @@ package types_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -49,8 +50,7 @@ func TestMsgStoreCodeValidateBasic(t *testing.T) { tc := tc err := tc.msg.ValidateBasic() - expPass := tc.expErr == nil - if expPass { + if tc.expErr == nil { require.NoError(t, err) } else { require.ErrorIs(t, err, tc.expErr) @@ -62,10 +62,10 @@ func (suite *TypesTestSuite) TestMsgStoreCodeGetSigners() { testCases := []struct { name string address sdk.AccAddress - expPass bool + expErr error }{ - {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), true}, - {"failure: nil address", nil, false}, + {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), nil}, + {"failure: nil address", nil, fmt.Errorf("empty address string is not allowed")}, } for _, tc := range testCases { @@ -77,11 +77,12 @@ func (suite *TypesTestSuite) TestMsgStoreCodeGetSigners() { msg := types.NewMsgStoreCode(address.String(), wasmtesting.Code) signers, _, err := GetSimApp(suite.chainA).AppCodec().GetMsgSigners(msg) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(address.Bytes(), signers[0]) } else { suite.Require().Error(err) + suite.Require().Equal(err.Error(), tc.expErr.Error()) } }) } @@ -165,10 +166,10 @@ func (suite *TypesTestSuite) TestMsgMigrateContractGetSigners() { testCases := []struct { name string address sdk.AccAddress - expPass bool + expErr error }{ - {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), true}, - {"failure: nil address", nil, false}, + {"success: valid address", sdk.AccAddress(ibctesting.TestAccAddress), nil}, + {"failure: nil address", nil, fmt.Errorf("empty address string is not allowed")}, } for _, tc := range testCases { @@ -180,11 +181,12 @@ func (suite *TypesTestSuite) TestMsgMigrateContractGetSigners() { msg := types.NewMsgMigrateContract(address.String(), defaultWasmClientID, checksum, []byte("{}")) signers, _, err := GetSimApp(suite.chainA).AppCodec().GetMsgSigners(msg) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) suite.Require().Equal(address.Bytes(), signers[0]) } else { suite.Require().Error(err) + suite.Require().Equal(err.Error(), tc.expErr.Error()) } }) } diff --git a/modules/light-clients/09-localhost/light_client_module_test.go b/modules/light-clients/09-localhost/light_client_module_test.go index 108b52c8f99..8c059d37f3c 100644 --- a/modules/light-clients/09-localhost/light_client_module_test.go +++ b/modules/light-clients/09-localhost/light_client_module_test.go @@ -1,6 +1,7 @@ package localhost_test import ( + "errors" "testing" testifysuite "github.com/stretchr/testify/suite" @@ -76,7 +77,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { testCases := []struct { name string malleate func() - expPass bool + expErr error }{ { "success: connection state verification", @@ -97,7 +98,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = suite.chain.Codec.MustMarshal(&connectionEnd) }, - true, + nil, }, { "success: channel state verification", @@ -119,7 +120,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = suite.chain.Codec.MustMarshal(&channel) }, - true, + nil, }, { "success: next sequence recv verification", @@ -134,7 +135,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = sdk.Uint64ToBigEndian(nextSeqRecv) }, - true, + nil, }, { "success: packet commitment verification", @@ -160,7 +161,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = commitmentBz }, - true, + nil, }, { "success: packet acknowledgement verification", @@ -174,21 +175,21 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = ibctesting.MockAcknowledgement }, - true, + nil, }, { "failure: invalid type for key path", func() { path = mock.KeyPath{} }, - false, + errors.New("expected v2.MerklePath, got mock.KeyPath: invalid type"), }, { "failure: key path has too many elements", func() { path = commitmenttypes.NewMerklePath([]byte("ibc"), []byte("test"), []byte("key")) }, - false, + errors.New("invalid path"), }, { "failure: no value found at provided key path", @@ -200,7 +201,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { path = merklePath value = ibctesting.MockAcknowledgement }, - false, + errors.New("value not found for path"), }, { "failure: invalid value, bytes are not equal", @@ -225,7 +226,7 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { channel.State = channeltypes.CLOSED value = suite.chain.Codec.MustMarshal(&channel) }, - false, + errors.New("value provided does not equal value stored at path"), }, } @@ -250,10 +251,11 @@ func (suite *LocalhostTestSuite) TestVerifyMembership() { value, ) - if tc.expPass { + if tc.expErr == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.ErrorContains(err, tc.expErr.Error()) } }) } @@ -265,7 +267,7 @@ func (suite *LocalhostTestSuite) TestVerifyNonMembership() { testCases := []struct { name string malleate func() - expPass bool + expError error }{ { "success: packet receipt absence verification", @@ -276,7 +278,7 @@ func (suite *LocalhostTestSuite) TestVerifyNonMembership() { path = merklePath }, - true, + nil, }, { "packet receipt absence verification fails", @@ -289,21 +291,21 @@ func (suite *LocalhostTestSuite) TestVerifyNonMembership() { path = merklePath }, - false, + errors.New("non-membership verification failed"), }, { "invalid type for key path", func() { path = mock.KeyPath{} }, - false, + errors.New("expected v2.MerklePath, got mock.KeyPath: invalid type"), }, { "key path has too many elements", func() { path = commitmenttypes.NewMerklePath([]byte("ibc"), []byte("test"), []byte("key")) }, - false, + errors.New("invalid path"), }, } @@ -327,10 +329,11 @@ func (suite *LocalhostTestSuite) TestVerifyNonMembership() { path, ) - if tc.expPass { + if tc.expError == nil { suite.Require().NoError(err) } else { suite.Require().Error(err) + suite.ErrorContains(err, tc.expError.Error()) } }) } diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto index 59018306ab9..cd6bf18e663 100644 --- a/proto/ibc/applications/fee/v1/query.proto +++ b/proto/ibc/applications/fee/v1/query.proto @@ -26,7 +26,7 @@ service Query { "{packet_id.sequence}/incentivized_packet"; } - // Gets all incentivized packets for a specific channel + // IncentivizedPacketsForChannel retrieves all incentivized packets for a specific channel rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest) returns (QueryIncentivizedPacketsForChannelResponse) { option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets"; diff --git a/proto/ibc/applications/transfer/v1/transfer.proto b/proto/ibc/applications/transfer/v1/transfer.proto index 8ae82cb64d7..2c4ea710721 100644 --- a/proto/ibc/applications/transfer/v1/transfer.proto +++ b/proto/ibc/applications/transfer/v1/transfer.proto @@ -23,7 +23,7 @@ message Params { // through which a packet must be forwarded, and an unwind boolean indicating if // the coin should be unwinded to its native chain before forwarding. message Forwarding { - // optional unwinding for the token transfered + // optional unwinding for the token transferred bool unwind = 1; // optional intermediate path through which packet will be forwarded repeated Hop hops = 2 [(gogoproto.nullable) = false]; diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 90556217a2b..78df62bdbb4 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -185,38 +185,3 @@ message Params { // the relative timeout after which channel upgrades will time out. Timeout upgrade_timeout = 1 [(gogoproto.nullable) = false]; } - -// Upgrade is a verifiable type which contains the relevant information -// for an attempted upgrade. It provides the proposed changes to the channel -// end, the timeout for this upgrade attempt and the next packet sequence -// which allows the counterparty to efficiently know the highest sequence it has received. -// The next sequence send is used for pruning and upgrading from unordered to ordered channels. -message Upgrade { - option (gogoproto.goproto_getters) = false; - - UpgradeFields fields = 1 [(gogoproto.nullable) = false]; - Timeout timeout = 2 [(gogoproto.nullable) = false]; - uint64 next_sequence_send = 3; -} - -// UpgradeFields are the fields in a channel end which may be changed -// during a channel upgrade. -message UpgradeFields { - option (gogoproto.goproto_getters) = false; - - Order ordering = 1; - repeated string connection_hops = 2; - string version = 3; -} - -// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the -// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the -// next sequence. -message ErrorReceipt { - option (gogoproto.goproto_getters) = false; - - // the channel upgrade sequence - uint64 sequence = 1; - // the error message detailing the cause of failure - string message = 2; -} diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto index 2f2c970b1d9..635f1b3d96a 100644 --- a/proto/ibc/core/channel/v1/query.proto +++ b/proto/ibc/core/channel/v1/query.proto @@ -7,6 +7,7 @@ option go_package = "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types"; import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/channel/v1/channel.proto"; +import "ibc/core/channel/v1/upgrade.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index fab12f93834..06e8523284a 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -8,6 +8,7 @@ import "gogoproto/gogo.proto"; import "cosmos/msg/v1/msg.proto"; import "ibc/core/client/v1/client.proto"; import "ibc/core/channel/v1/channel.proto"; +import "ibc/core/channel/v1/upgrade.proto"; // Msg defines the ibc/channel Msg service. service Msg { diff --git a/proto/ibc/core/channel/v1/upgrade.proto b/proto/ibc/core/channel/v1/upgrade.proto new file mode 100644 index 00000000000..001fc882d2b --- /dev/null +++ b/proto/ibc/core/channel/v1/upgrade.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Upgrade is a verifiable type which contains the relevant information +// for an attempted upgrade. It provides the proposed changes to the channel +// end, the timeout for this upgrade attempt and the next packet sequence +// which allows the counterparty to efficiently know the highest sequence it has received. +// The next sequence send is used for pruning and upgrading from unordered to ordered channels. +message Upgrade { + option (gogoproto.goproto_getters) = false; + + UpgradeFields fields = 1 [(gogoproto.nullable) = false]; + Timeout timeout = 2 [(gogoproto.nullable) = false]; + uint64 next_sequence_send = 3; +} + +// UpgradeFields are the fields in a channel end which may be changed +// during a channel upgrade. +message UpgradeFields { + option (gogoproto.goproto_getters) = false; + + Order ordering = 1; + repeated string connection_hops = 2; + string version = 3; +} + +// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the +// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the +// next sequence. +message ErrorReceipt { + option (gogoproto.goproto_getters) = false; + + // the channel upgrade sequence + uint64 sequence = 1; + // the error message detailing the cause of failure + string message = 2; +} \ No newline at end of file diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index 26902d58a3e..d447a2f5b78 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -5,7 +5,6 @@ package ibc.lightclients.tendermint.v1; option go_package = "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint;tendermint"; import "cometbft/types/v1/validator.proto"; -; import "cometbft/types/v1/types.proto"; import "cosmos/ics23/v1/proofs.proto"; import "google/protobuf/duration.proto"; diff --git a/scripts/compatibility.md b/scripts/compatibility.md index a93aa2d178c..a63e3203755 100644 --- a/scripts/compatibility.md +++ b/scripts/compatibility.md @@ -2,7 +2,7 @@ ## Introduction -The generate-compatibility-json.py script is used to generate matricies that can be fed into github workflows +The generate-compatibility-json.py script is used to generate matrices that can be fed into github workflows as the matrix for the compatibility job. This is done by generating a matrix of all possible combinations based on a provided release branch diff --git a/simapp/app.go b/simapp/app.go index 4e8605cdf84..8ce9551f66f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -22,7 +22,7 @@ import ( "cosmossdk.io/x/accounts" "cosmossdk.io/x/accounts/accountstd" baseaccount "cosmossdk.io/x/accounts/defaults/base" - lockup "cosmossdk.io/x/accounts/defaults/lockup" + "cosmossdk.io/x/accounts/defaults/lockup" "cosmossdk.io/x/accounts/defaults/multisig" "cosmossdk.io/x/authz" authzkeeper "cosmossdk.io/x/authz/keeper" @@ -144,7 +144,6 @@ import ( solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibcmock "github.com/cosmos/ibc-go/v9/testing/mock" - ibctestingtypes "github.com/cosmos/ibc-go/v9/testing/types" ) const appName = "SimApp" @@ -202,7 +201,7 @@ type SimApp struct { BankKeeper bankkeeper.BaseKeeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper + MintKeeper *mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper @@ -442,9 +441,12 @@ func NewSimApp( cometService, ) - app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.StakingKeeper, app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + if err := app.MintKeeper.SetMintFn(mintkeeper.DefaultMintFn(minttypes.DefaultInflationCalculationFn, app.StakingKeeper, app.MintKeeper)); err != nil { + panic(err) + } - app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, govModuleAddr) + app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, govModuleAddr) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, cometService, authtypes.FeeCollectorName, govModuleAddr) @@ -452,7 +454,7 @@ func NewSimApp( appCodec, legacyAmino, app.StakingKeeper, govModuleAddr, ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper.AddressCodec()) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -463,7 +465,7 @@ func NewSimApp( app.CircuitKeeper = circuitkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[circuittypes.StoreKey]), logger.With(log.ModuleKey, "x/circuit")), appCodec, govModuleAddr, app.AuthKeeper.AddressCodec()) app.BaseApp.SetCircuitBreaker(&app.CircuitKeeper) - app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper) + app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper.AddressCodec()) groupConfig := group.DefaultConfig() /* @@ -510,9 +512,14 @@ func NewSimApp( app.NFTKeeper = nftkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[nftkeeper.StoreKey]), logger.With(log.ModuleKey, "x/nft")), appCodec, app.AuthKeeper, app.BankKeeper) - // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), app.StakingKeeper, app.SlashingKeeper, app.ConsensusParamsKeeper, app.AuthKeeper.AddressCodec(), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.StakingKeeper, + app.SlashingKeeper, + app.ConsensusParamsKeeper, + app.AuthKeeper.AddressCodec(), + app.StakingKeeper.ConsensusAddressCodec(), ) // If evidence needs to be handled for the app, set routes in router here and seal @@ -549,10 +556,12 @@ func NewSimApp( // ICA Host keeper app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), logger.With(log.ModuleKey, "x/icahost"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.GetSubspace(icahosttypes.SubModuleName), app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack - app.IBCKeeper.ChannelKeeper, app.AuthKeeper, - app.MsgServiceRouter(), app.GRPCQueryRouter(), + app.IBCKeeper.ChannelKeeper, + app.AuthKeeper, govModuleAddr, ) @@ -678,7 +687,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), feegrantmodule.NewAppModule(appCodec, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AuthKeeper, app.BankKeeper, app.PoolKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper, nil), + mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.interfaceRegistry, cometService), distr.NewAppModule(appCodec, app.DistrKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper), @@ -1141,11 +1150,6 @@ func (app *SimApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } -// GetStakingKeeper implements the TestingApp interface. -func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - // GetIBCKeeper implements the TestingApp interface. func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper diff --git a/simapp/go.mod b/simapp/go.mod index ba907040c02..fea53533bd9 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -1,6 +1,4 @@ -go 1.23.2 - -toolchain go1.23.3 +go 1.23.3 module github.com/cosmos/ibc-go/simapp @@ -8,8 +6,8 @@ replace github.com/cosmos/ibc-go/v9 => ../ require ( cosmossdk.io/api v0.8.0 - cosmossdk.io/client/v2 v2.0.0-beta.5 - cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b + cosmossdk.io/client/v2 v2.0.0-beta.6 + cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b cosmossdk.io/core v1.0.0 cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e cosmossdk.io/log v1.5.0 @@ -35,7 +33,7 @@ require ( cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/slashing v0.0.0-00010101000000-000000000000 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/tx v1.0.0-alpha.2 + cosmossdk.io/x/tx v1.0.0-alpha.3 cosmossdk.io/x/upgrade v0.1.4 github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 github.com/cometbft/cometbft/api v1.0.0-rc2 @@ -51,23 +49,23 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.42.0 // indirect + cloud.google.com/go v0.115.1 // indirect + cloud.google.com/go/auth v0.8.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.1.13 // indirect + cloud.google.com/go/storage v1.43.0 // indirect cosmossdk.io/depinject v1.1.0 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/math v1.4.0 // indirect - cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/schema v0.4.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go v1.54.6 // indirect + github.com/aws/aws-sdk-go v1.55.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect @@ -80,7 +78,7 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/apd/v3 v3.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -126,10 +124,10 @@ require ( github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect + github.com/google/s2a-go v0.1.8 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect + github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect @@ -137,7 +135,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.5 // indirect + github.com/hashicorp/go-getter v1.7.6 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect @@ -161,7 +159,7 @@ require ( github.com/lib/pq v1.10.9 // indirect github.com/linxGnu/grocksdb v1.9.3 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect + github.com/magiconair/properties v1.8.9 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -182,7 +180,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.2.0 // indirect @@ -208,28 +206,28 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.12.0 // indirect - golang.org/x/crypto v0.29.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect - golang.org/x/net v0.31.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/term v0.26.0 // indirect - golang.org/x/text v0.20.0 // indirect - golang.org/x/time v0.5.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect - google.golang.org/grpc v1.68.0 // indirect - google.golang.org/protobuf v1.35.2 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/time v0.6.0 // indirect + google.golang.org/api v0.192.0 // indirect + google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/grpc v1.69.0 // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -246,32 +244,32 @@ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.2021 // v0.0.0-20241106165340-4eb943897eaa = ibc-go marko/gomod_change branch // v1.0.0-alpha.5.0.20241108095921-406f977be0b9 = sdk main branch replace ( - cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 // main - cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf - cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 // main - cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d - cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf - cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1 - cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf + cosmossdk.io/api => cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 + cosmossdk.io/client/v2 => cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 + cosmossdk.io/core => cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 + cosmossdk.io/store => cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 + cosmossdk.io/x/accounts => cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/lockup => cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/accounts/defaults/multisig => cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/authz => cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/bank => cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/circuit => cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/distribution => cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/epochs => cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/evidence => cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/feegrant => cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/group => cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/mint => cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/nft => cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/params => cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/protocolpool => cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/slashing => cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 + cosmossdk.io/x/tx => cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 + cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 github.com/cometbft/cometbft => github.com/cometbft/cometbft v1.0.0-rc1.0.20240908111210-ab0be101882f // pseudo version lower than the latest tag - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b ) diff --git a/simapp/go.sum b/simapp/go.sum index 3c4e9445c05..f5abf749fe1 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -50,10 +50,10 @@ cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjby cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= +cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= +cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -76,8 +76,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -115,14 +115,14 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= +cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= +cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.5.8 h1:QThI5BFSlYlS7K0wnABCdmKsXbG/htLc3nTPzrfOgeU= -cloud.google.com/go/longrunning v0.5.8/go.mod h1:oJDErR/mm5h44gzsfjQlxd6jyjFvuBPOxR1TLy2+cQk= +cloud.google.com/go/longrunning v0.5.11 h1:Havn1kGjz3whCfoD8dxMLP73Ph5w+ODyZB9RUsDxtGk= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -179,8 +179,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.42.0 h1:4QtGpplCVt1wz6g5o1ifXd656P5z+yNgzdw1tVfp0cU= -cloud.google.com/go/storage v1.42.0/go.mod h1:HjMXRFq65pGKFn6hxj6x3HCyR41uSB72Z0SO/Vn6JFQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -192,14 +192,14 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9 h1:yNrJKENUaZuFTkNmwP4KgXQqk2boGNUAzVyXLdFJNXU= -cosmossdk.io/api v0.7.3-0.20241108095921-406f977be0b9/go.mod h1:pPUWNdsU8ghYzPOeVD2sAzPVh2yniq215XjRYubdO4I= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf h1:ofV6lCxevAZvr9iRpFQLkMucYbojplFS3/ACnq6JsoY= -cosmossdk.io/client/v2 v2.0.0-20241108061010-a0458127fccf/go.mod h1:iu6iZy/kgiWTvIxO1Dn49JWTE32qorpGysRVDoMG8uY= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= -cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9 h1:F8emcx9K/aJHoyEan8FgEA0RaDrsIBVXxtkHOtbm9AI= -cosmossdk.io/core v1.0.0-alpha.5.0.20241108095921-406f977be0b9/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608 h1:0266beLan2snXZMeELYMpTVcFjlSgzHhLBKxSuNVZUI= +cosmossdk.io/api v0.8.0-rc.2.0.20241213081318-957e24171608/go.mod h1:edvI8tMINqCH75EgkOEMnCZEQ3iKJgOlZ+ZxOu4gmXU= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608 h1:umN3k+AZ91ZjYv3CDiTgFDaWe22w3JxpeJmepUwKXV8= +cosmossdk.io/client/v2 v2.0.0-20241213081318-957e24171608/go.mod h1:Xxz5u4rK+ArCsRo9TMSirg6jPMdva6BHv9Db65OkN/Q= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b h1:smupoVhpdK+5pztIylyIGkCc+0QaAaGLEvnM7Wnrq18= +cosmossdk.io/collections v0.4.1-0.20241209183624-332d0b106d1b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608 h1:w+/cxqYHud1plzCTIvEBtab6RqpgAl2C5Hgn1l4p+oo= +cosmossdk.io/core v1.0.0-alpha.6.0.20241213081318-957e24171608/go.mod h1:gCTZBT00tI2zTQy65aSolV3aUnQDqpVgz5yOp96LpGg= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= @@ -210,56 +210,56 @@ cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b h1:svpFdulZRrYz+RTHu2u9CeKkMKrIHx5354vjiHerovo= -cosmossdk.io/schema v0.3.1-0.20241128094659-bd76b47e1d8b/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d h1:KQM4Q6kjwlM4HuDZRV8/ZDXX3whjfStndYNTsRrbboQ= -cosmossdk.io/store v1.0.0-rc.0.0.20241204123127-eb3bf8b0469d/go.mod h1:oZBBY4BrkYnghr6MFL0MP5mGqpkPedHcWkXwXddd6tU= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608 h1:NaFVgzmO3YFX+l7696SdDTtvJR0MTjjwSe0sX+inAI4= +cosmossdk.io/store v1.0.0-rc.0.0.20241213081318-957e24171608/go.mod h1:eZNgZKvZRlDUk8CE3LTDVMAcSM7zLOet2S8fByQkF3s= cosmossdk.io/tools/confix v0.1.2 h1:2hoM1oFCNisd0ltSAAZw2i4ponARPmlhuNu3yy0VwI4= cosmossdk.io/tools/confix v0.1.2/go.mod h1:7XfcbK9sC/KNgVGxgLM0BrFbVcR/+6Dg7MFfpx7duYo= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf h1:iDymYoV4/JayuquNG5niu4JR0/ylaX+bmXk8wGlqG74= -cosmossdk.io/x/accounts v0.0.0-20241108061010-a0458127fccf/go.mod h1:NhLpCB056huDyXxcLDbCgm4deO293HO9b6/Xl1Ha2nQ= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608 h1:No84LXBp0kEzJfAqorxrgqzmzqOpHhbs8IK2nBpVQJY= +cosmossdk.io/x/accounts v0.0.0-20241213081318-957e24171608/go.mod h1:wADXnci9qeFwOQ09qiyf1uLdI4n/RSSTG8mSM9hmxys= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9 h1:bCBkUT3caCwOf5U9Os96dUETHPs6Cdv9oF5LCjt1tJs= cosmossdk.io/x/accounts/defaults/base v0.0.0-20241108095921-406f977be0b9/go.mod h1:h+11hiXPTGV6hl8ifSaJLMXoVhCsSKoF+l0/baqRGAU= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf h1:zeaEXUGi0Kcp64F7aRRwtHcv9INO92am+FX4hHVj454= -cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241108061010-a0458127fccf/go.mod h1:LDTXn+hTfFjvvtbnyRl4exZbVXMXc9BbjCp+hA75GLE= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf h1:7saWRiQfcQZN5WDUHRlulO4zWyPsnaG1GEAzBw0U6Qs= -cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241108061010-a0458127fccf/go.mod h1:9bf6NM/PjLLUpiKsxG6SsEO7De9xPR9cNDbAkvWhFf8= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf h1:sO9pf67Lvb4nWOfpVv1i9K5rbGhEFWGn7O5C1m/A4fo= -cosmossdk.io/x/authz v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ie8fti1Nb5TtqJYw76c3eySQIDh5p5420ofUQ3/t3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf h1:omz9Z670B5GLvRx5qvkEn2NIxPm21VEvB+kLdmNQK3w= -cosmossdk.io/x/bank v0.0.0-20241108061010-a0458127fccf/go.mod h1:wf99TK+GDbcmmUnHnY9Mfiu9WnlxNAx539QMTqTkmv8= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf h1:IfC2LFM+55i/cl0gy6C5kTwr8QoUFtuyoMSPvbJUUSc= -cosmossdk.io/x/circuit v0.0.0-20241108061010-a0458127fccf/go.mod h1:qg/3LeOxuIF9RTUJG0tTfd+vKgqApP6CLyEAsd1dgc0= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf h1:+mmMU6rrI9+jg3U1eCQcNWr374HbkZjLLNmLi1UmN70= -cosmossdk.io/x/consensus v0.0.0-20241108061010-a0458127fccf/go.mod h1:PKBXn9aWiMI52CIz24mtH/TpXaPiSakjZeOBl9ZaIpc= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf h1:hjO5z2eKV74A1/nNru7RzgOSZscG1axIgJLUXIlc6wg= -cosmossdk.io/x/distribution v0.0.0-20241108061010-a0458127fccf/go.mod h1:aXyiBgzFj7FhePk+SfIAOKSPUuNnx688hfeQz1lEeWc= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf h1:dWxbr7c/Xve6nmyMjolMYdtc2dQ/T2XMsXd/Umu6Ho4= -cosmossdk.io/x/epochs v0.0.0-20241108061010-a0458127fccf/go.mod h1:2ZYQlnfBVLXR04RLNbeUfw43WefbdDQXFHBnyPPis3E= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf h1:XvRnVzXgwDKE6BL2jfo23qSkoIzNTDTsF4h2T7n1Ln8= -cosmossdk.io/x/evidence v0.0.0-20241108061010-a0458127fccf/go.mod h1:dntwkEmxj/nQ6BX333tomRyQ/fOn0Y/EEF/7xrDyTww= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf h1:RES8jCRYKRL1YQS+BTdQfcjQW4y/TotcZcBLfxMVWOc= -cosmossdk.io/x/feegrant v0.0.0-20241108061010-a0458127fccf/go.mod h1:pGpOv+bdskHPT4KDfqB73QEEN7rvVi3rDbnGXh8LOAM= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf h1:TdJDBD9G6vuBMIwjkWPYIb1Y2xiZqpOhshGWQpZ81XE= -cosmossdk.io/x/gov v0.0.0-20241108061010-a0458127fccf/go.mod h1:VPlvp0gqaXApHsRrYgfZ00aqfqsFOUG6Qt2GffMlWhI= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf h1:FUFA1OjFrL9aXrh7ZuvcgVAg1kgtUFnFfL91thNH0Zw= -cosmossdk.io/x/group v0.0.0-20241108061010-a0458127fccf/go.mod h1:Ljvt4ihdiSMW3aXXG1ZziMchdHxhoUlzxF/o2pPU7sA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf h1:HyaQnRlvruD/l4X8HJtKA3TDcX4CLL00qE3YtUOgcIA= -cosmossdk.io/x/mint v0.0.0-20241108061010-a0458127fccf/go.mod h1:QgMu/n+FOfr7DRGI4Mg9R8JRNDl4E+/G+eGWqwrHOfo= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf h1:/vSXgbYHI4VxeXuXYw/vQiS/2y1iFBu9vJ6MgG6DX0w= -cosmossdk.io/x/nft v0.0.0-20241108061010-a0458127fccf/go.mod h1:BTBxeoWmU90YHa8icMHtyNJ4yi4S7K4Q0i1Nel4fOhM= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf h1:XJIgfIUY2k4PjrCg2x7tkj3sYp2pHXdM6DuwrhSX7yE= -cosmossdk.io/x/params v0.0.0-20241108061010-a0458127fccf/go.mod h1:KfTlw+p2yHRNtWa/K/4hEjs1zuZTUYR61l+FReNrrtM= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf h1:9o1WYkNzZxNyAFldIDPIshFtXz6OiZWhZ8gBV0yleyQ= -cosmossdk.io/x/protocolpool v0.0.0-20241108061010-a0458127fccf/go.mod h1:YUc0YB3WFrUo/vqQhzOOfb73D+U2Yho7xqnvdAWc2Qs= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf h1:vaFB6CMx+qFjoZWq7fgthRuAhPfObptlf03Cv9bz5XE= -cosmossdk.io/x/slashing v0.0.0-20241108061010-a0458127fccf/go.mod h1:EQMZV9XM15sogrzz404akhvb9BNCpyyR/U5ZIyDnsio= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf h1:q0r0DFzP4nDkArKEj8o5eJIbihgxIOJMranGyJv1iiw= -cosmossdk.io/x/staking v0.0.0-20241108061010-a0458127fccf/go.mod h1:o5LKEyzicUjBF0Xzixb5yva9y9SBAFo6o752nE/QDAM= -cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= -cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf h1:QmDmYiOWHkBoRdT2j76G6Gj42XVyxn5qUaiTYPcemcM= -cosmossdk.io/x/upgrade v0.0.0-20241108061010-a0458127fccf/go.mod h1:izXYqFcs/+AgFnik31IQYIzYHPifj2ay6Eenv9UEzwI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608 h1:nMu0DD9qutZ7dzIySxTRnLYvZtockBghVkwBHyuwBLI= +cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20241213081318-957e24171608/go.mod h1:m0eg/A4J5fmXFNGEldQpeTrMr9PFWaVIFjbDYes0j9I= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608 h1:JL+VXHmb8xqwU7ToR2RG0V2BTmE+t1PkJ880xKi46Tc= +cosmossdk.io/x/accounts/defaults/multisig v0.0.0-20241213081318-957e24171608/go.mod h1:huNjmnJuvPXAT5zvK8S29X0u9DpCa3X9ZCUd3bJ8bng= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608 h1:MzRTC+W0Uv40yfFNegDskcisgui9lQdeG9FZxOixATk= +cosmossdk.io/x/authz v0.0.0-20241213081318-957e24171608/go.mod h1:GMLM+m3Il+QTfOrQG08sFJXlKw95UDKPIOYcuSwjbzQ= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608 h1:lbtU7rYltk2axJ5h1DgPamVosuZEeyOAaqYPQpQBH4g= +cosmossdk.io/x/bank v0.0.0-20241213081318-957e24171608/go.mod h1:GN02Rosc2O/vCNBnXqY35vA2hoMmRQeCKd81FuoMzmE= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608 h1:ATB7FV12GCjS+KN2Fx8B878LbwzNP4bkzsznRqMmn3k= +cosmossdk.io/x/circuit v0.0.0-20241213081318-957e24171608/go.mod h1:d4a/F6pXE2KWJdshiRxCPKyW6h5gAnAWmSCtlRrhcYk= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608 h1:lstvqRuVEDtRxiF9+LM16SpRriq0O+5lMHzsGKheXH4= +cosmossdk.io/x/consensus v0.0.0-20241213081318-957e24171608/go.mod h1:ib+kqbNMsj6n7/LvW+qi24/1kp/ApWJpsnCWY5yN6Mk= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608 h1:hYFPPs5WsMWj/1sRpw6Aqmioph3qw5VN76geVxtaWtI= +cosmossdk.io/x/distribution v0.0.0-20241213081318-957e24171608/go.mod h1:bG9SiC6YsVOpsKgOd+b+t3Kl4GLb9T6RjhBKesPn+Gg= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608 h1:UZSqhiAi1mKi8DE+OLGMrXSoenSl4PkyQT7xxNfr9Bw= +cosmossdk.io/x/epochs v0.0.0-20241213081318-957e24171608/go.mod h1:PLdiJlSC0XveXA3vJ0E4n1NCG78UeHXwEk0razSnEk4= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608 h1:KqJ+F0YVwFlu06gEoWHvGvdC1DYXDL5Rykra61/pY4Q= +cosmossdk.io/x/evidence v0.0.0-20241213081318-957e24171608/go.mod h1:YBMj0T87xliEfldeZHC60AqyZoLoy1wJzAAgaaQubBM= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608 h1:iSOOM7vAa0LuJ9xKZ7k34g5uyy9WQyfKbnAPmnf8Abc= +cosmossdk.io/x/feegrant v0.0.0-20241213081318-957e24171608/go.mod h1:yIgJCAGBnM3sull2qACQP+uMsEoogyNO6OXz82z3tVg= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608 h1:F+w/ofuUDxFyyk6t7kt7cdcBsTa2gA7zuvCEplB871A= +cosmossdk.io/x/gov v0.0.0-20241213081318-957e24171608/go.mod h1:ynGp02hnYhVidQiL9KOKeiZnn0h+PSEJb+XjgKH6+v4= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608 h1:ll6Pk+WoPlusW2uy8HTXupL+mees6mNohS4dfGYJsZ0= +cosmossdk.io/x/group v0.0.0-20241213081318-957e24171608/go.mod h1:L8fBvuIwBQzABO/cYEOpekmaKlR4ELclrrGNZ6r//sg= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608 h1:t0A/ip5m09OuAY0bvpnfxJhD1/dL44JYNwffy5boqB4= +cosmossdk.io/x/mint v0.0.0-20241213081318-957e24171608/go.mod h1:apbBgC0mKZTbgvW2ACPcNBl0z8HjCp7R9ZBns7F6J2E= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608 h1:bB3FhjvPZfkS3EksYB3YR7muxGk0/rr6U993a7ETHx0= +cosmossdk.io/x/nft v0.0.0-20241213081318-957e24171608/go.mod h1:H1QoaISMz78OyBwXKU4gp8Gmwd1EVWq+Lb9P3BUfXUM= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608 h1:ZD/gSJbfpC2WzXr17xq5UkJBQd/BfBVajzKrieu6zjQ= +cosmossdk.io/x/params v0.0.0-20241213081318-957e24171608/go.mod h1:btgbNMPZJWZLd03ef2AblrpJ7e9ocpTvA0xUw0hIHew= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608 h1:3rdbR/782gMtQo+1yxH+wuhJKd1jm/4X0pBgQX7pDp4= +cosmossdk.io/x/protocolpool v0.0.0-20241213081318-957e24171608/go.mod h1:xLb6tQ33fgSOmwlMui9UjLzI9xmOclfjG2g+/z4XiUc= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608 h1:+GBTBLH54gKT2dFlUgN/XzawdBG/9U5djPecjr7meas= +cosmossdk.io/x/slashing v0.0.0-20241213081318-957e24171608/go.mod h1:BlYhkjtZZdKXQP9mBiVwRbaduXtDKEJHQC3dZ6fZBS0= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608 h1:aycIQRLzdtuI99FkTRo4Y2QerkfKqZRYNN2BPESEc8A= +cosmossdk.io/x/staking v0.0.0-20241213081318-957e24171608/go.mod h1:4Zyt59oTQdaKitlYyz9K7d8Mi32e+K5NliOf9HAj5Wo= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938 h1:kqbOiJpmSBE03Isw7KY27N4oCSaOcG28oaJgCLh9Rhk= +cosmossdk.io/x/tx v1.0.0-alpha.1.0.20241212002302-a6d28e384938/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608 h1:80l+duTMRKnszkWXolEs1n+1j4RFYd41mrV24P79vcY= +cosmossdk.io/x/upgrade v0.0.0-20241213081318-957e24171608/go.mod h1:5GIkumZszCtSzsXcTtL2YP4mIU25Rn3t0y51JWzzUDI= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -291,8 +291,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.54.6 h1:HEYUib3yTt8E6vxjMWM3yAq5b+qjj/6aKA62mkgux9g= -github.com/aws/aws-sdk-go v1.54.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -352,8 +352,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= -github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= +github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -383,8 +383,8 @@ github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDz github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1 h1:NJ4oI0UP0Qzt5gSgxuut4PrTaI0Ae0J1GKY9HuS7Zyo= -github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241204154714-17fe120ba0b1/go.mod h1:rHr3gIOU3dJIjpnFCUeJyG4ItADlXMjI4NBwS4+YeMA= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b h1:ZaEAV5tsUTnyWEC/Gt8DXHKBANDyx70PVCiPOEVnuHk= +github.com/cosmos/cosmos-sdk v0.52.0-beta.2.0.20241213155709-f1e881e81b1b/go.mod h1:ecJnx3s3oQK5BR7vu25fYSD2/ND9YLGkVpST7uiBkT0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -580,8 +580,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -600,8 +600,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= +github.com/googleapis/gax-go/v2 v2.13.0 h1:yitjD5f7jQHhyDsnhKEBU52NdvvdSeGzlAnDPT0hH1s= +github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS338j1Is2S+B7A= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= @@ -618,8 +618,8 @@ github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NM github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.5 h1:dT58k9hQ/vbxNMwoI5+xFYAJuv6152UNvdHokfI5wE4= -github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.6 h1:5jHuM+aH373XNtXl9TNTUH5Qd69Trve11tHIrB+6yj4= +github.com/hashicorp/go-getter v1.7.6/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -701,8 +701,8 @@ github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9i github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -797,8 +797,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -901,18 +901,20 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -932,8 +934,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1024,8 +1026,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= 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= @@ -1051,8 +1053,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1067,8 +1069,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -1151,13 +1153,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= -golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= 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= @@ -1168,13 +1170,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1239,8 +1241,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.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= @@ -1289,8 +1289,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= +google.golang.org/api v0.192.0 h1:PljqpNAfZaaSpS+TnANfnNAXKdzHM/B9bKhwRlo7JP0= +google.golang.org/api v0.192.0/go.mod h1:9VcphjvAxPKLmSxVSzPlSRXy/5ARMEw5bf58WoVXafQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1402,12 +1402,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142 h1:oLiyxGgE+rt22duwci1+TG7bg2/L1LQsXwfjPlmuJA0= +google.golang.org/genproto v0.0.0-20240814211410-ddb44dafa142/go.mod h1:G11eXq53iI5Q+kyNOmCvnzBaxEA2Q/Ik5Tj7nqBE8j4= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= +google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1443,8 +1443,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.0 h1:quSiOM1GJPmPH5XtU+BCoVXcDVJJAzNcoyfC2cCjGkI= +google.golang.org/grpc v1.69.0/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1461,8 +1461,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index eb286952091..766bb0dba84 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -118,7 +118,10 @@ func NewRootCmd() *cobra.Command { initRootCmd(rootCmd, tempApp.ModuleManager) autoCliOpts := tempApp.AutoCliOpts() - autoCliOpts.ClientCtx = initClientCtx + autoCliOpts.AddressCodec = initClientCtx.AddressCodec + autoCliOpts.ValidatorAddressCodec = initClientCtx.ValidatorAddressCodec + autoCliOpts.ConsensusAddressCodec = initClientCtx.ConsensusAddressCodec + autoCliOpts.Cdc = initClientCtx.Codec nodeCmds := nodeservice.NewNodeCommands() autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions() diff --git a/testing/README.md b/testing/README.md index 844b011fd99..124586e6d80 100644 --- a/testing/README.md +++ b/testing/README.md @@ -51,7 +51,6 @@ type TestingApp interface { // ibc-go additions GetBaseApp() *baseapp.BaseApp - GetStakingKeeper() ibctestingtypes.StakingKeeper GetIBCKeeper() *keeper.Keeper GetTxConfig() client.TxConfig diff --git a/testing/chain.go b/testing/chain.go index 939ad817060..afa881846c2 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -201,8 +201,13 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain { func (chain *TestChain) GetContext() sdk.Context { ctx := chain.App.GetBaseApp().NewUncachedContext(false, chain.ProposedHeader) - // when fetching time from context, the header info time is used, rather than the proposed header. + cmtHeader, err := cmttypes.HeaderFromProto(&chain.ProposedHeader) + require.NoError(chain.TB, err) + + // since:cosmos-sdk/v0.52 when fetching time from context, it now returns from HeaderInfo headerInfo := header.Info{ + AppHash: chain.ProposedHeader.AppHash, + Hash: cmtHeader.Hash(), Time: chain.ProposedHeader.Time, ChainID: chain.ProposedHeader.ChainID, } @@ -337,6 +342,7 @@ func (chain *TestChain) commitBlock(res *abci.FinalizeBlockResponse) { // increment the current header chain.ProposedHeader = cmtproto.Header{ + Version: cmtprotoversion.Consensus{Block: cmtversion.BlockProtocol, App: 1}, ChainID: chain.ChainID, Height: chain.App.LastBlockHeight() + 1, AppHash: chain.App.LastCommitID().Hash, diff --git a/testing/coordinator.go b/testing/coordinator.go index eaac6e4bad0..98b194d55fb 100644 --- a/testing/coordinator.go +++ b/testing/coordinator.go @@ -85,7 +85,7 @@ func (*Coordinator) SetupClients(path *Path) { path.SetupClients() } -// SetupClientConnections is a helper function to create clients and the appropriate +// SetupConnections is a helper function to create clients and the appropriate // connections on both the source and counterparty chain. It assumes the caller does not // anticipate any errors. // Deprecated: please use path.SetupConnections(), this function will be removed in v10 @@ -93,7 +93,7 @@ func (*Coordinator) SetupConnections(path *Path) { path.SetupConnections() } -// CreateConnection constructs and executes connection handshake messages in order to create +// CreateConnections constructs and executes connection handshake messages in order to create // OPEN channels on chainA and chainB. The connection information of for chainA and chainB // are returned within a TestConnection struct. The function expects the connections to be // successfully opened otherwise testing will fail. @@ -123,7 +123,7 @@ func (*Coordinator) CreateTransferChannels(path *Path) { path.CreateChannels() } -// CreateChannel constructs and executes channel handshake messages in order to create +// CreateChannels constructs and executes channel handshake messages in order to create // OPEN channels on chainA and chainB. The function expects the channels to be successfully // opened otherwise testing will fail. // Deprecated: please use path.CreateChannels(), this function will be removed in v10 diff --git a/testing/endpoint.go b/testing/endpoint.go index 6230f9148df..3e5d7534cae 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -517,7 +517,7 @@ func (endpoint *Endpoint) AcknowledgePacket(packet channeltypes.Packet, ack []by return endpoint.Chain.sendMsgs(ackMsg) } -// AcknowledgePacket sends a MsgAcknowledgement to the channel associated with the endpoint and returns the result. +// AcknowledgePacketWithResult sends a MsgAcknowledgement to the channel associated with the endpoint and returns the result. func (endpoint *Endpoint) AcknowledgePacketWithResult(packet channeltypes.Packet, ack []byte) (*abci.ExecTxResult, error) { // get proof of acknowledgement on counterparty packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) diff --git a/testing/mock/mock.go b/testing/mock/mock.go index d875337c7d5..c8307dc8474 100644 --- a/testing/mock/mock.go +++ b/testing/mock/mock.go @@ -56,17 +56,18 @@ var ( _ porttypes.IBCModule = (*IBCModule)(nil) ) -// AppModuleBasic is the mock AppModuleBasic. -type AppModuleBasic struct{} - -// IsOnePerModuleType implements the depinject.OnePerModuleType interface. -func (AppModuleBasic) IsOnePerModuleType() {} +// AppModule represents the AppModule for the mock module. +type AppModule struct { + ibcApps []*IBCApp +} -// IsAppModule implements the appmodule.AppModule interface. -func (AppModuleBasic) IsAppModule() {} +// NewAppModule returns a mock AppModule instance. +func NewAppModule() AppModule { + return AppModule{} +} -// Name implements AppModuleBasic interface. -func (AppModuleBasic) Name() string { +// Name implements AppModule interface. +func (AppModule) Name() string { return ModuleName } @@ -77,45 +78,34 @@ func (AppModule) IsOnePerModuleType() {} func (AppModule) IsAppModule() {} // RegisterLegacyAminoCodec implements AppModuleBasic interface. -func (AppModuleBasic) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} +func (AppModule) RegisterLegacyAminoCodec(coreregistry.AminoRegistrar) {} // RegisterInterfaces implements AppModuleBasic interface. -func (AppModuleBasic) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {} +func (AppModule) RegisterInterfaces(registry coreregistry.InterfaceRegistrar) {} // DefaultGenesis implements AppModuleBasic interface. -func (AppModuleBasic) DefaultGenesis() json.RawMessage { +func (AppModule) DefaultGenesis() json.RawMessage { return nil } // ValidateGenesis implements the AppModuleBasic interface. -func (AppModuleBasic) ValidateGenesis(json.RawMessage) error { +func (AppModule) ValidateGenesis(json.RawMessage) error { return nil } // RegisterGRPCGatewayRoutes implements AppModuleBasic interface. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} +func (AppModule) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} // GetTxCmd implements AppModuleBasic interface. -func (AppModuleBasic) GetTxCmd() *cobra.Command { +func (AppModule) GetTxCmd() *cobra.Command { return nil } // GetQueryCmd implements AppModuleBasic interface. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { +func (AppModule) GetQueryCmd() *cobra.Command { return nil } -// AppModule represents the AppModule for the mock module. -type AppModule struct { - AppModuleBasic - ibcApps []*IBCApp -} - -// NewAppModule returns a mock AppModule instance. -func NewAppModule() AppModule { - return AppModule{} -} - // RegisterInvariants implements the AppModule interface. func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} diff --git a/testing/simapp/app.go b/testing/simapp/app.go index b0e15a3d2e6..cb58ec66802 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -22,7 +22,7 @@ import ( "cosmossdk.io/x/accounts" "cosmossdk.io/x/accounts/accountstd" baseaccount "cosmossdk.io/x/accounts/defaults/base" - lockup "cosmossdk.io/x/accounts/defaults/lockup" + "cosmossdk.io/x/accounts/defaults/lockup" "cosmossdk.io/x/accounts/defaults/multisig" "cosmossdk.io/x/authz" authzkeeper "cosmossdk.io/x/authz/keeper" @@ -141,7 +141,6 @@ import ( solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" ibcmock "github.com/cosmos/ibc-go/v9/testing/mock" - ibctestingtypes "github.com/cosmos/ibc-go/v9/testing/types" ) const appName = "SimApp" @@ -197,7 +196,7 @@ type SimApp struct { BankKeeper bankkeeper.BaseKeeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper + MintKeeper *mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper @@ -317,7 +316,7 @@ func NewSimApp( // voteExtOp := func(bApp *baseapp.BaseApp) { // voteExtHandler := NewVoteExtensionHandler() // voteExtHandler.SetHandlers(bApp) - //} + // } // baseAppOptions = append(baseAppOptions, voteExtOp, baseapp.SetOptimisticExecution(), // baseapp.SetIncludeNestedMsgsGas([]sdk.Msg{&govv1.MsgSubmitProposal{}})) @@ -418,9 +417,12 @@ func NewSimApp( cometService, ) - app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.StakingKeeper, app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + app.MintKeeper = mintkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[minttypes.StoreKey]), logger.With(log.ModuleKey, "x/mint")), app.AuthKeeper, app.BankKeeper, authtypes.FeeCollectorName, govModuleAddr) + if err := app.MintKeeper.SetMintFn(mintkeeper.DefaultMintFn(minttypes.DefaultInflationCalculationFn, app.StakingKeeper, app.MintKeeper)); err != nil { + panic(err) + } - app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, govModuleAddr) + app.PoolKeeper = poolkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), logger.With(log.ModuleKey, "x/protocolpool")), app.AuthKeeper, app.BankKeeper, govModuleAddr) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger.With(log.ModuleKey, "x/distribution")), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, cometService, authtypes.FeeCollectorName, govModuleAddr) @@ -428,7 +430,7 @@ func NewSimApp( appCodec, legacyAmino, app.StakingKeeper, govModuleAddr, ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[feegrant.StoreKey]), logger.With(log.ModuleKey, "x/feegrant")), appCodec, app.AuthKeeper.AddressCodec()) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -439,7 +441,7 @@ func NewSimApp( app.CircuitKeeper = circuitkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[circuittypes.StoreKey]), logger.With(log.ModuleKey, "x/circuit")), appCodec, govModuleAddr, app.AuthKeeper.AddressCodec()) app.BaseApp.SetCircuitBreaker(&app.CircuitKeeper) - app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper) + app.AuthzKeeper = authzkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), logger.With(log.ModuleKey, "x/authz"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), appCodec, app.AuthKeeper.AddressCodec()) groupConfig := group.DefaultConfig() /* @@ -486,9 +488,14 @@ func NewSimApp( app.NFTKeeper = nftkeeper.NewKeeper(runtime.NewEnvironment(runtime.NewKVStoreService(keys[nftkeeper.StoreKey]), logger.With(log.ModuleKey, "x/nft")), appCodec, app.AuthKeeper, app.BankKeeper) - // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), app.StakingKeeper, app.SlashingKeeper, app.ConsensusParamsKeeper, app.AuthKeeper.AddressCodec(), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), logger.With(log.ModuleKey, "x/evidence"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.StakingKeeper, + app.SlashingKeeper, + app.ConsensusParamsKeeper, + app.AuthKeeper.AddressCodec(), + app.StakingKeeper.ConsensusAddressCodec(), ) // If evidence needs to be handled for the app, set routes in router here and seal @@ -525,10 +532,12 @@ func NewSimApp( // ICA Host keeper app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), app.GetSubspace(icahosttypes.SubModuleName), + appCodec, + runtime.NewEnvironment(runtime.NewKVStoreService(keys[icahosttypes.StoreKey]), logger.With(log.ModuleKey, "x/icahost"), runtime.EnvWithMsgRouterService(app.MsgServiceRouter()), runtime.EnvWithQueryRouterService(app.GRPCQueryRouter())), + app.GetSubspace(icahosttypes.SubModuleName), app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack - app.IBCKeeper.ChannelKeeper, app.AuthKeeper, - app.MsgServiceRouter(), app.GRPCQueryRouter(), + app.IBCKeeper.ChannelKeeper, + app.AuthKeeper, govModuleAddr, ) @@ -654,7 +663,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AuthKeeper), feegrantmodule.NewAppModule(appCodec, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, &app.GovKeeper, app.AuthKeeper, app.BankKeeper, app.PoolKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper, nil), + mint.NewAppModule(appCodec, app.MintKeeper, app.AuthKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.interfaceRegistry, cometService), distr.NewAppModule(appCodec, app.DistrKeeper, app.StakingKeeper), staking.NewAppModule(appCodec, app.StakingKeeper), @@ -926,8 +935,8 @@ func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { return app.ModuleManager.EndBlock(ctx) } -func (a *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1. - return a.configurator +func (app *SimApp) Configurator() module.Configurator { //nolint:staticcheck // SA1019: Configurator is deprecated but still used in runtime v1. + return app.configurator } // InitChainer application update at chain initialization @@ -984,8 +993,8 @@ func (app *SimApp) AutoCliOpts() autocli.AppOptions { } // DefaultGenesis returns a default genesis from the registered AppModule's. -func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { - return a.ModuleManager.DefaultGenesis() +func (app *SimApp) DefaultGenesis() map[string]json.RawMessage { + return app.ModuleManager.DefaultGenesis() } // GetKey returns the KVStoreKey for the provided store key. @@ -1062,7 +1071,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf // ValidatorKeyProvider returns a function that generates a validator key // Supported key types are those supported by Comet: ed25519, secp256k1, bls12-381 -func (app *SimApp) ValidatorKeyProvider() runtime.KeyGenF { +func (*SimApp) ValidatorKeyProvider() runtime.KeyGenF { return func() (cmtcrypto.PrivKey, error) { return cmted25519.GenPrivKey(), nil } @@ -1125,11 +1134,6 @@ func (app *SimApp) GetBaseApp() *baseapp.BaseApp { return app.BaseApp } -// GetStakingKeeper implements the TestingApp interface. -func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - // GetIBCKeeper implements the TestingApp interface. func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { return app.IBCKeeper diff --git a/testing/testing_app.go b/testing/testing_app.go index a75b396ca0b..0125368474b 100644 --- a/testing/testing_app.go +++ b/testing/testing_app.go @@ -29,7 +29,6 @@ import ( "github.com/cosmos/ibc-go/v9/modules/core/keeper" "github.com/cosmos/ibc-go/v9/testing/simapp" - ibctestingtypes "github.com/cosmos/ibc-go/v9/testing/types" ) var DefaultTestingAppInit = SetupTestingApp @@ -39,7 +38,6 @@ type TestingApp interface { // ibc-go additions GetBaseApp() *baseapp.BaseApp - GetStakingKeeper() ibctestingtypes.StakingKeeper GetIBCKeeper() *keeper.Keeper GetTxConfig() client.TxConfig diff --git a/testing/types/expected_keepers.go b/testing/types/expected_keepers.go deleted file mode 100644 index 5a44a3ab412..00000000000 --- a/testing/types/expected_keepers.go +++ /dev/null @@ -1,5 +0,0 @@ -package types - -// StakingKeeper defines the expected staking keeper interface used in the -// IBC testing package -type StakingKeeper interface{}