From f33576b5668dd0b1a2bb28de304aa620e8081bfb Mon Sep 17 00:00:00 2001 From: Nikolas De Giorgis Date: Fri, 12 Apr 2024 12:26:42 +0100 Subject: [PATCH 1/2] Address lint findings in testing/ --- .../main/ica-chain-a.json | 8 +- .../main/ica-chain-b.json | 8 +- .../main/ica-channel-upgrade-chain-a.json | 3 +- .../main/ica-channel-upgrade-chain-b.json | 3 +- .../main/ica-gov-chain-a.json | 8 +- .../main/ica-gov-chain-b.json | 8 +- .../main/ica-groups-chain-a.json | 8 +- .../main/ica-groups-chain-b.json | 8 +- .../main/ica-unordered-channel-chain-a.json | 3 +- .../main/ica-unordered-channel-chain-b.json | 3 +- .../main/incentivized-ica-chain-a.json | 8 +- .../main/incentivized-ica-chain-b.json | 8 +- .../main/incentivized-transfer-chain-a.json | 10 +- .../main/incentivized-transfer-chain-b.json | 10 +- .../main/localhost-ica-chain-a.json | 9 +- .../main/localhost-ica-chain-b.json | 9 +- .../main/localhost-transfer-chain-a.json | 9 +- .../main/localhost-transfer-chain-b.json | 9 +- .../main/transfer-authz-chain-a.json | 9 +- .../main/transfer-authz-chain-b.json | 9 +- .../main/transfer-chain-a.json | 12 +- .../main/transfer-chain-b.json | 12 +- .../transfer-channel-upgrade-chain-a.json | 3 +- .../transfer-channel-upgrade-chain-b.json | 3 +- .../release-v7.2.x/client-chain-a.json | 19 - .../release-v7.2.x/connection-chain-a.json | 17 - .../release-v7.2.x/ica-chain-a.json | 29 - .../release-v7.2.x/ica-chain-b.json | 29 - .../release-v7.2.x/ica-gov-chain-a.json | 26 - .../release-v7.2.x/ica-gov-chain-b.json | 26 - .../release-v7.2.x/ica-groups-chain-a.json | 26 - .../release-v7.2.x/ica-groups-chain-b.json | 26 - .../incentivized-ica-chain-a.json | 27 - .../incentivized-ica-chain-b.json | 27 - .../incentivized-transfer-chain-a.json | 31 - .../incentivized-transfer-chain-b.json | 31 - .../release-v7.2.x/localhost-ica-chain-a.json | 18 - .../localhost-transfer-chain-a.json | 17 - .../transfer-authz-chain-a.json | 27 - .../transfer-authz-chain-b.json | 27 - .../release-v7.2.x/transfer-chain-a.json | 31 - .../release-v7.2.x/transfer-chain-b.json | 29 - .../release-v7.3.x/client-chain-a.json | 19 - .../release-v7.3.x/connection-chain-a.json | 17 - .../release-v7.3.x/ica-chain-a.json | 29 - .../release-v7.3.x/ica-chain-b.json | 29 - .../release-v7.3.x/ica-gov-chain-a.json | 26 - .../release-v7.3.x/ica-gov-chain-b.json | 26 - .../release-v7.3.x/ica-groups-chain-a.json | 26 - .../release-v7.3.x/ica-groups-chain-b.json | 26 - .../incentivized-ica-chain-a.json | 27 - .../incentivized-ica-chain-b.json | 27 - .../incentivized-transfer-chain-a.json | 31 - .../incentivized-transfer-chain-b.json | 31 - .../release-v7.3.x/localhost-ica-chain-a.json | 18 - .../localhost-transfer-chain-a.json | 17 - .../transfer-authz-chain-a.json | 27 - .../transfer-authz-chain-b.json | 27 - .../release-v7.3.x/transfer-chain-a.json | 31 - .../release-v7.3.x/transfer-chain-b.json | 29 - .../release-v7.4.x/ica-chain-a.json | 8 +- .../release-v7.4.x/ica-chain-b.json | 8 +- .../release-v7.4.x/ica-gov-chain-a.json | 8 +- .../release-v7.4.x/ica-gov-chain-b.json | 8 +- .../release-v7.4.x/ica-groups-chain-a.json | 8 +- .../release-v7.4.x/ica-groups-chain-b.json | 8 +- .../incentivized-ica-chain-a.json | 8 +- .../incentivized-ica-chain-b.json | 8 +- .../incentivized-transfer-chain-a.json | 10 +- .../incentivized-transfer-chain-b.json | 10 +- .../release-v7.4.x/localhost-ica-chain-a.json | 2 + .../localhost-transfer-chain-a.json | 2 + .../transfer-authz-chain-a.json | 7 - .../transfer-authz-chain-b.json | 7 - .../release-v7.4.x/transfer-chain-a.json | 12 +- .../release-v7.4.x/transfer-chain-b.json | 12 +- .../release-v8.0.x/client-chain-a.json | 21 - .../release-v8.0.x/connection-chain-a.json | 17 - .../release-v8.0.x/genesis-chain-a.json | 17 - .../release-v8.0.x/ica-chain-a.json | 29 - .../release-v8.0.x/ica-chain-b.json | 29 - .../release-v8.0.x/ica-gov-chain-a.json | 26 - .../release-v8.0.x/ica-gov-chain-b.json | 26 - .../release-v8.0.x/ica-groups-chain-a.json | 26 - .../release-v8.0.x/ica-groups-chain-b.json | 26 - .../incentivized-ica-chain-a.json | 27 - .../incentivized-ica-chain-b.json | 27 - .../incentivized-transfer-chain-a.json | 31 - .../incentivized-transfer-chain-b.json | 31 - .../release-v8.0.x/localhost-ica-chain-a.json | 18 - .../localhost-transfer-chain-a.json | 17 - .../transfer-authz-chain-a.json | 27 - .../transfer-authz-chain-b.json | 27 - .../release-v8.0.x/transfer-chain-a.json | 31 - .../release-v8.0.x/transfer-chain-b.json | 29 - .../release-v8.1.x/client-chain-a.json | 21 - .../release-v8.1.x/connection-chain-a.json | 17 - .../release-v8.1.x/genesis-chain-a.json | 17 - .../release-v8.1.x/ica-chain-a.json | 29 - .../release-v8.1.x/ica-chain-b.json | 29 - .../ica-channel-upgrade-chain-a.json | 20 - .../ica-channel-upgrade-chain-b.json | 20 - .../release-v8.1.x/ica-gov-chain-a.json | 26 - .../release-v8.1.x/ica-gov-chain-b.json | 26 - .../release-v8.1.x/ica-groups-chain-a.json | 26 - .../release-v8.1.x/ica-groups-chain-b.json | 26 - .../ica-unordered-channel-chain-a.json | 17 - .../ica-unordered-channel-chain-b.json | 17 - .../incentivized-ica-chain-a.json | 27 - .../incentivized-ica-chain-b.json | 27 - .../incentivized-transfer-chain-a.json | 31 - .../incentivized-transfer-chain-b.json | 31 - .../release-v8.1.x/localhost-ica-chain-a.json | 18 - .../localhost-transfer-chain-a.json | 17 - .../transfer-authz-chain-a.json | 27 - .../transfer-authz-chain-b.json | 27 - .../release-v8.1.x/transfer-chain-a.json | 31 - .../release-v8.1.x/transfer-chain-b.json | 29 - .../transfer-channel-upgrade-chain-a.json | 21 - .../transfer-channel-upgrade-chain-b.json | 21 - .../release-v8.2.x/ica-chain-a.json | 8 +- .../release-v8.2.x/ica-chain-b.json | 8 +- .../ica-channel-upgrade-chain-a.json | 1 - .../ica-channel-upgrade-chain-b.json | 1 - .../release-v8.2.x/ica-gov-chain-a.json | 8 +- .../release-v8.2.x/ica-gov-chain-b.json | 8 +- .../release-v8.2.x/ica-groups-chain-a.json | 8 +- .../release-v8.2.x/ica-groups-chain-b.json | 8 +- .../ica-unordered-channel-chain-a.json | 1 + .../ica-unordered-channel-chain-b.json | 1 + .../incentivized-ica-chain-a.json | 8 +- .../incentivized-ica-chain-b.json | 8 +- .../incentivized-transfer-chain-a.json | 10 +- .../incentivized-transfer-chain-b.json | 10 +- .../release-v8.2.x/localhost-ica-chain-a.json | 2 + .../localhost-transfer-chain-a.json | 2 + .../transfer-authz-chain-a.json | 7 - .../transfer-authz-chain-b.json | 7 - .../release-v8.2.x/transfer-chain-a.json | 12 +- .../release-v8.2.x/transfer-chain-b.json | 12 +- .../transfer-channel-upgrade-chain-a.json | 1 - .../transfer-channel-upgrade-chain-b.json | 1 - .../unreleased/client-1.json | 8 +- .../unreleased/client-2.json | 8 +- .../unreleased/connection.json | 12 +- .../unreleased/genesis.json | 8 +- .../ica-channel-upgrade-chain-a.json | 6 +- .../ica-channel-upgrade-chain-b.json | 6 +- .../unreleased/ica-gov.json | 8 - .../unreleased/ica-groups.json | 8 - .../unreleased/ica-unordered-channel.json | 6 +- .../unreleased/ica.json | 8 - .../unreleased/incentivized-ica.json | 8 - .../unreleased/incentivized-transfer-1.json | 8 - .../unreleased/incentivized-transfer-2.json | 8 - .../unreleased/incentivized-transfer-3.json | 8 - .../unreleased/localhost-ica.json | 12 +- .../unreleased/localhost-transfer.json | 12 +- .../unreleased/transfer-1.json | 8 - .../unreleased/transfer-2.json | 8 - .../unreleased/transfer-3.json | 8 - .../unreleased/transfer-authz.json | 12 +- .../transfer-channel-upgrade-chain-a.json | 6 +- .../transfer-channel-upgrade-chain-b.json | 4 +- .github/mergify.yml | 38 +- .../e2e-compatibility-unreleased.yaml | 4 - .github/workflows/e2e-compatibility.yaml | 12 +- CHANGELOG.md | 1 + .../04-wasm/03-integration.md | 2 +- .../03-light-clients/04-wasm/09-migrations.md | 2 +- docs/docs/05-migrations/13-v8-to-v9.md | 4 + e2e/go.mod | 2 +- e2e/go.sum | 4 +- e2e/internal/directories/directories.go | 40 + e2e/tests/core/02-client/client_test.go | 3 +- e2e/tests/transfer/localhost_test.go | 3 +- e2e/tests/upgrades/genesis_test.go | 2 +- e2e/tests/wasm/grandpa_test.go | 35 +- e2e/testsuite/diagnostics/diagnostics.go | 28 +- e2e/testsuite/testconfig.go | 79 +- e2e/testsuite/testsuite.go | 60 +- go.mod | 2 +- go.sum | 4 +- .../controller/ibc_middleware_test.go | 32 +- .../controller/keeper/keeper_test.go | 5 +- .../migrations/v6/migrations_test.go | 2 +- .../host/ibc_module_test.go | 20 +- .../host/keeper/keeper.go | 10 +- .../host/keeper/keeper_test.go | 6 +- .../27-interchain-accounts/types/keys_test.go | 2 +- .../27-interchain-accounts/types/router.go | 2 +- modules/apps/29-fee/ibc_middleware_test.go | 28 +- modules/apps/29-fee/keeper/keeper_test.go | 5 +- modules/apps/callbacks/callbacks_test.go | 2 +- modules/apps/callbacks/go.mod | 2 +- modules/apps/callbacks/go.sum | 4 +- modules/apps/callbacks/ibc_middleware_test.go | 37 +- modules/apps/callbacks/testing/simapp/app.go | 22 +- .../apps/callbacks/types/callbacks_test.go | 2 +- modules/apps/transfer/ibc_module_test.go | 8 +- modules/apps/transfer/keeper/keeper_test.go | 5 +- .../types/transfer_authorization_test.go | 2 +- modules/core/02-client/genesis.go | 4 +- modules/core/02-client/keeper/client.go | 8 +- modules/core/02-client/keeper/client_test.go | 37 +- modules/core/02-client/keeper/encoding.go | 12 +- modules/core/02-client/keeper/events_test.go | 6 +- modules/core/02-client/keeper/grpc_query.go | 20 +- .../core/02-client/keeper/grpc_query_test.go | 20 +- modules/core/02-client/keeper/keeper.go | 77 +- modules/core/02-client/keeper/migrations.go | 2 +- .../02-client/migrations/v7/genesis_test.go | 9 +- .../02-client/migrations/v7/localhost_test.go | 2 +- .../02-client/migrations/v7/store_test.go | 5 +- modules/core/02-client/types/client.go | 2 +- modules/core/02-client/types/client_test.go | 3 +- modules/core/02-client/types/codec.go | 2 +- modules/core/02-client/types/genesis_test.go | 2 +- .../02-client/types/legacy_proposal_test.go | 3 +- modules/core/03-connection/genesis.go | 4 +- .../core/03-connection/keeper/grpc_query.go | 12 +- .../03-connection/keeper/grpc_query_test.go | 3 +- .../core/03-connection/keeper/handshake.go | 8 +- .../03-connection/keeper/handshake_test.go | 8 +- modules/core/03-connection/keeper/keeper.go | 36 +- .../core/03-connection/keeper/migrations.go | 4 +- modules/core/03-connection/keeper/verify.go | 22 +- .../core/03-connection/keeper/verify_test.go | 36 +- modules/core/03-connection/types/msgs_test.go | 5 +- .../core/03-connection/types/params_legacy.go | 2 +- modules/core/04-channel/genesis.go | 4 +- modules/core/04-channel/keeper/events.go | 18 - modules/core/04-channel/keeper/export_test.go | 10 +- modules/core/04-channel/keeper/grpc_query.go | 34 +- modules/core/04-channel/keeper/handshake.go | 20 +- modules/core/04-channel/keeper/keeper.go | 128 +-- modules/core/04-channel/keeper/migrations.go | 4 +- modules/core/04-channel/keeper/packet.go | 12 +- modules/core/04-channel/keeper/packet_test.go | 21 +- modules/core/04-channel/keeper/timeout.go | 6 +- modules/core/04-channel/keeper/upgrade.go | 44 +- modules/core/04-channel/types/msgs_test.go | 5 +- modules/core/05-port/keeper/keeper.go | 16 +- .../23-commitment/types/commitment_test.go | 4 +- modules/core/23-commitment/types/utils.go | 2 +- .../core/23-commitment/types/utils_test.go | 2 +- modules/core/exported/client.go | 2 +- modules/core/genesis.go | 4 +- modules/core/keeper/grpc_query.go | 66 +- modules/core/keeper/keeper.go | 32 +- modules/core/keeper/msg_server.go | 92 +-- modules/core/keeper/msg_server_test.go | 94 +-- modules/core/migrations/v7/genesis_test.go | 4 +- .../07-tendermint/client_state.go | 3 +- .../07-tendermint/client_state_test.go | 690 +---------------- .../07-tendermint/consensus_host_test.go | 6 +- modules/light-clients/07-tendermint/errors.go | 1 + .../07-tendermint/light_client_module.go | 6 +- .../07-tendermint/light_client_module_test.go | 732 ++++++++++++++++++ .../07-tendermint/tendermint_test.go | 7 +- modules/light-clients/08-wasm/go.mod | 2 +- modules/light-clients/08-wasm/go.sum | 4 +- .../08-wasm/types/consensus_host_test.go | 8 +- testing/chain.go | 3 +- testing/endpoint.go | 13 +- testing/simapp/app.go | 12 +- testing/simapp/upgrades/upgrades.go | 2 +- 267 files changed, 1742 insertions(+), 3870 deletions(-) delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/genesis-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/localhost-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/localhost-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.0.x/transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/genesis-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/localhost-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/localhost-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-b.json create mode 100644 e2e/internal/directories/directories.go diff --git a/.github/compatibility-test-matrices/main/ica-chain-a.json b/.github/compatibility-test-matrices/main/ica-chain-a.json index eaaeb2cc7ac..2aaa763929d 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-chain-a.json @@ -5,14 +5,8 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "entrypoint": [ "TestInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/main/ica-chain-b.json b/.github/compatibility-test-matrices/main/ica-chain-b.json index 89aec299fac..7269d6e9f59 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-chain-b.json @@ -2,14 +2,8 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-a.json index 4d7fa2942cb..55117258a89 100644 --- a/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "entrypoint": [ "TestInterchainAccountsChannelUpgradesTestSuite" diff --git a/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-b.json index 5154e749dc4..ef21e2854dd 100644 --- a/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-channel-upgrade-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/ica-gov-chain-a.json b/.github/compatibility-test-matrices/main/ica-gov-chain-a.json index aeb76a6fd77..c6e9806ddd1 100644 --- a/.github/compatibility-test-matrices/main/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-gov-chain-a.json @@ -5,14 +5,8 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "entrypoint": [ "TestInterchainAccountsGovTestSuite" diff --git a/.github/compatibility-test-matrices/main/ica-gov-chain-b.json b/.github/compatibility-test-matrices/main/ica-gov-chain-b.json index f93e918c545..f361a9a3fd7 100644 --- a/.github/compatibility-test-matrices/main/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-gov-chain-b.json @@ -2,14 +2,8 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/ica-groups-chain-a.json b/.github/compatibility-test-matrices/main/ica-groups-chain-a.json index fe3d5d2310f..5d3f1704ea3 100644 --- a/.github/compatibility-test-matrices/main/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-groups-chain-a.json @@ -5,14 +5,8 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "entrypoint": [ "TestInterchainAccountsGroupsTestSuite" diff --git a/.github/compatibility-test-matrices/main/ica-groups-chain-b.json b/.github/compatibility-test-matrices/main/ica-groups-chain-b.json index a7e1394193f..9117abf3463 100644 --- a/.github/compatibility-test-matrices/main/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-groups-chain-b.json @@ -2,14 +2,8 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-a.json b/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-a.json index 5d8fdcee353..66b51f645ea 100644 --- a/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "entrypoint": [ "TestInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-b.json b/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-b.json index e4270389f40..d3cda9cf973 100644 --- a/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-unordered-channel-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json index b49908134cd..b7081c237d2 100644 --- a/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json @@ -5,14 +5,8 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "entrypoint": [ "TestIncentivizedInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json index 121b16f1961..053b34112e0 100644 --- a/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json @@ -2,14 +2,8 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json index c23451b5b5c..f8c54be75c1 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json @@ -5,14 +5,10 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0", + "v5.4.0", + "v4.6.0" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json index a83b58beca8..c5d151be8ec 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json @@ -2,14 +2,10 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0", + "v5.4.0", + "v4.6.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json index 6c69e2ed283..2bcc3821722 100644 --- a/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json @@ -2,14 +2,7 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json index db74691bb56..bae97ad9311 100644 --- a/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json @@ -5,14 +5,7 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "entrypoint": [ "LocalhostInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json index 315ff2a59c3..5c50aa2e5ac 100644 --- a/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json @@ -2,14 +2,7 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json index b5c78f1e9b5..14bc6b25d08 100644 --- a/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json @@ -5,14 +5,7 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "entrypoint": [ "LocalhostTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json index 9e364d21053..fc93040ab61 100644 --- a/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json @@ -5,14 +5,7 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "entrypoint": [ "TestAuthzTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json index cc733c5e0e7..b758c43f997 100644 --- a/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json @@ -2,14 +2,7 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v7.4.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/transfer-chain-a.json b/.github/compatibility-test-matrices/main/transfer-chain-a.json index fee18e982a8..0f995ee9175 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-a.json @@ -5,14 +5,12 @@ "chain-b": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0" ], "entrypoint": [ "TestTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/transfer-chain-b.json b/.github/compatibility-test-matrices/main/transfer-chain-b.json index 053f32bd847..08d3a9ab74c 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-b.json @@ -2,14 +2,12 @@ "chain-a": [ "main", "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2" + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-a.json index 9ec9ec7287c..967f2dfe965 100644 --- a/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "entrypoint": [ "TestTransferChannelUpgradesTestSuite" diff --git a/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-b.json index 84c047ab070..b2eb76dc12c 100644 --- a/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-channel-upgrade-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v8.2.0", - "v8.1.0" + "v8.2.0" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json deleted file mode 100644 index b71cc49edc9..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour", - "TestAllowedClientsParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json deleted file mode 100644 index e74afb32de7..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json deleted file mode 100644 index 946b91fb5c1..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestControllerEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json deleted file mode 100644 index 567109c80bb..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestHostEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json deleted file mode 100644 index 48ce770e190..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json deleted file mode 100644 index 5214f818923..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json deleted file mode 100644 index ad65fcdca76..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json deleted file mode 100644 index dc87fd1c373..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json deleted file mode 100644 index ddafcf108ff..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json deleted file mode 100644 index 6d10fbc5e29..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json deleted file mode 100644 index 9cca421b91a..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json deleted file mode 100644 index 9d37cdb9746..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json deleted file mode 100644 index 5c109eb5211..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json deleted file mode 100644 index 6e6c99396c7..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json deleted file mode 100644 index e10d285cae8..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json deleted file mode 100644 index 159a031b94e..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json deleted file mode 100644 index b9ffe644f68..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json deleted file mode 100644 index 2ddafb074f9..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.2.x" - ], - "chain-b": [ - "release-v7.2.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json deleted file mode 100644 index 232376b5f6b..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour", - "TestAllowedClientsParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json deleted file mode 100644 index 813007e52a2..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json deleted file mode 100644 index 4fdd158b18a..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestControllerEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json deleted file mode 100644 index bfe27bf9fd2..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestHostEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json deleted file mode 100644 index 38da2ca0d91..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json deleted file mode 100644 index 075d3aa28b4..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json deleted file mode 100644 index 8a676fcf2f4..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json deleted file mode 100644 index 89d16f2a817..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json deleted file mode 100644 index 9906a12ffe4..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json deleted file mode 100644 index 8546a3efb12..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json deleted file mode 100644 index 417a3c25598..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json deleted file mode 100644 index b91869ffbf7..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json deleted file mode 100644 index 68c4e7b8d89..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json deleted file mode 100644 index 624fac9e1b2..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json deleted file mode 100644 index 0332b0172e0..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json deleted file mode 100644 index 2d0f937a9b0..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json deleted file mode 100644 index 27a977f3929..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json deleted file mode 100644 index 0c21b74ab08..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v7.3.x" - ], - "chain-b": [ - "release-v7.3.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-a.json index 40ad8a3cde5..7da8fda85d4 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-b.json index 47455841bca..8e458ea4dc4 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-a.json index 707049b1480..76e962ead24 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-b.json index af79b48ba50..7137932762f 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-gov-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-a.json index 90a8d9488c9..44e70d421d3 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-b.json index 2addec01e7c..7fb8a39dfc6 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/ica-groups-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-a.json index 8679845f600..ff17ed3e9e8 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-b.json index 84d1f7f9e1b..5456be68cda 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-ica-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-a.json index b98200768d2..d62b4369a4f 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-a.json @@ -4,14 +4,10 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-b.json index 42cff78379c..f873c101012 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/incentivized-transfer-chain-b.json @@ -1,14 +1,10 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/localhost-ica-chain-a.json index 353252f6755..1bae278c051 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/localhost-ica-chain-a.json @@ -3,6 +3,8 @@ "release-v7.4.x" ], "chain-b": [ + "v8.2.0", + "v7.4.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/localhost-transfer-chain-a.json index a71aebd9a94..93e2967f9c3 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/localhost-transfer-chain-a.json @@ -3,6 +3,8 @@ "release-v7.4.x" ], "chain-b": [ + "v8.2.0", + "v7.4.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-a.json index 3059f67cbf5..120aa54a836 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-a.json @@ -4,14 +4,7 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-b.json index 09b95ebc8a3..7a31713606d 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/transfer-authz-chain-b.json @@ -1,14 +1,7 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-a.json index 11a06e7809d..f4774373573 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-a.json @@ -4,14 +4,12 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", "release-v7.4.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-b.json index fa20d88db54..901050959ff 100644 --- a/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.4.x/transfer-chain-b.json @@ -1,14 +1,12 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", "release-v7.4.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.0.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/client-chain-a.json deleted file mode 100644 index d86c2a43168..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/client-chain-a.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestRecoverClient_Succeeds", - "TestScheduleIBCUpgrade_Succeeds", - "TestClient_Update_Misbehaviour", - "TestAllowedClientsParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.0.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/connection-chain-a.json deleted file mode 100644 index 5cb2aea9fc4..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/connection-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.0.x/genesis-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/genesis-chain-a.json deleted file mode 100644 index b7b3a30bf0c..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/genesis-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestGenesisTestSuite" - ], - "test": [ - "TestIBCGenesis" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-a.json deleted file mode 100644 index 115f56d3a1c..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestControllerEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-b.json deleted file mode 100644 index 54f397f369b..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestHostEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-a.json deleted file mode 100644 index 9fee2c67447..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-b.json deleted file mode 100644 index a956e906f17..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-gov-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-a.json deleted file mode 100644 index 963b71fe1a5..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-b.json deleted file mode 100644 index 92262b05598..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/ica-groups-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-a.json deleted file mode 100644 index 67d464e94f6..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-b.json deleted file mode 100644 index 8d154bfa05d..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-a.json deleted file mode 100644 index 31be6d858f8..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-b.json deleted file mode 100644 index ee30ebd052b..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/localhost-ica-chain-a.json deleted file mode 100644 index 2ff2171aff8..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/localhost-ica-chain-a.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.0.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/localhost-transfer-chain-a.json deleted file mode 100644 index 476845f7dd4..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/localhost-transfer-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-a.json deleted file mode 100644 index 05aed85b4d0..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-b.json deleted file mode 100644 index 1fae9cfd8d0..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-a.json deleted file mode 100644 index af77f0357a8..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v8.0.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-b.json deleted file mode 100644 index 80eb4a122cf..00000000000 --- a/.github/compatibility-test-matrices/release-v8.0.x/transfer-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.0.x" - ], - "chain-b": [ - "release-v8.0.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/client-chain-a.json deleted file mode 100644 index 6bff002e372..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/client-chain-a.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestRecoverClient_Succeeds", - "TestScheduleIBCUpgrade_Succeeds", - "TestClient_Update_Misbehaviour", - "TestAllowedClientsParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.1.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/connection-chain-a.json deleted file mode 100644 index 7e40bbed9b6..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/connection-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.1.x/genesis-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/genesis-chain-a.json deleted file mode 100644 index a25c7d6cfb1..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/genesis-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestGenesisTestSuite" - ], - "test": [ - "TestIBCGenesis" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-a.json deleted file mode 100644 index 86b6973802d..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestControllerEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-b.json deleted file mode 100644 index f0a085a9a45..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", - "TestHostEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-a.json deleted file mode 100644 index 39baf6c3d33..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-a.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsChannelUpgradesTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer_AfterUpgradingOrdertoUnordered", - "TestChannelUpgrade_ICAChannelClosesAfterTimeout_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-b.json deleted file mode 100644 index f4dace6bb0e..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-channel-upgrade-chain-b.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsChannelUpgradesTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer_AfterUpgradingOrdertoUnordered", - "TestChannelUpgrade_ICAChannelClosesAfterTimeout_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-a.json deleted file mode 100644 index 486c232b7b0..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-b.json deleted file mode 100644 index 8504cd1820a..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-gov-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-a.json deleted file mode 100644 index ec9a108c22f..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-a.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-b.json deleted file mode 100644 index ecb9f905a02..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-groups-chain-b.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-a.json deleted file mode 100644 index df950997c70..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer_UnorderedChannel" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-b.json deleted file mode 100644 index df950997c70..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/ica-unordered-channel-chain-b.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer_UnorderedChannel" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-a.json deleted file mode 100644 index c19c0138e0a..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-b.json deleted file mode 100644 index 30c1488f2dd..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-a.json deleted file mode 100644 index fbc49fab091..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-b.json deleted file mode 100644 index 8720b68bff7..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/localhost-ica-chain-a.json deleted file mode 100644 index 0233da5a86a..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/localhost-ica-chain-a.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.1.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/localhost-transfer-chain-a.json deleted file mode 100644 index da7415f15f9..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/localhost-transfer-chain-a.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "hermes" - ] -} diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-a.json deleted file mode 100644 index 0d1564cc992..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-b.json deleted file mode 100644 index 1fb0eac9ade..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestAuthzTransferTestSuite" - ], - "test": [ - "TestAuthz_MsgTransfer_Succeeds", - "TestAuthz_InvalidTransferAuthorizations" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-a.json deleted file mode 100644 index df17e70c337..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-a.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-b.json deleted file mode 100644 index f2b9746ee4f..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", - "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-a.json deleted file mode 100644 index 610df43ae78..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-a.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "chain-a": [ - "release-v8.1.x" - ], - "chain-b": [ - "v8.2.0", - "v8.1.0", - "release-v8.1.x" - ], - "entrypoint": [ - "TestTransferChannelUpgradesTestSuite" - ], - "test": [ - "TestChannelUpgrade_WithFeeMiddleware_Succeeds", - "TestChannelUpgrade_WithFeeMiddleware_CrossingHello_Succeeds", - "TestChannelUpgrade_WithFeeMiddleware_FailsWithTimeoutOnAck" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-b.json deleted file mode 100644 index 275c37b88c2..00000000000 --- a/.github/compatibility-test-matrices/release-v8.1.x/transfer-channel-upgrade-chain-b.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "chain-a": [ - "v8.2.0", - "v8.1.0", - "release-v8.1.x" - ], - "chain-b": [ - "release-v8.1.x" - ], - "entrypoint": [ - "TestTransferChannelUpgradesTestSuite" - ], - "test": [ - "TestChannelUpgrade_WithFeeMiddleware_Succeeds", - "TestChannelUpgrade_WithFeeMiddleware_CrossingHello_Succeeds", - "TestChannelUpgrade_WithFeeMiddleware_FailsWithTimeoutOnAck" - ], - "relayer-type": [ - "hermes" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-a.json index bcde9b44b46..f8ab5847253 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-b.json index 2af8e578458..be50c080dca 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-a.json index 7835f15f3d1..6c1bbee0c73 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-a.json @@ -4,7 +4,6 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-b.json index 538e0c49723..ab914abf8a3 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-channel-upgrade-chain-b.json @@ -1,7 +1,6 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-a.json index d0d8fcdbc0e..ab550bcd521 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-b.json index ef335371f4a..fafe5c8fd80 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-gov-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-a.json index dd0cd49d7d9..a26bc467c77 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-b.json index 3c3e6859497..c935e86530a 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-groups-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-a.json index 724aed8831f..08f47ba02bc 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-a.json @@ -3,6 +3,7 @@ "release-v8.2.x" ], "chain-b": [ + "v8.2.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-b.json index 724aed8831f..fdd8db8ced8 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/ica-unordered-channel-chain-b.json @@ -1,5 +1,6 @@ { "chain-a": [ + "v8.2.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-a.json index 331e6ba5c90..e9adde86b37 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-a.json @@ -4,14 +4,8 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-b.json index 8a183ee1426..b41af7059ba 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-ica-chain-b.json @@ -1,14 +1,8 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-a.json index 5264f0b52fb..5127c321660 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-a.json @@ -4,14 +4,10 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-b.json index 0aaf811717e..39157482bcc 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/incentivized-transfer-chain-b.json @@ -1,14 +1,10 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/localhost-ica-chain-a.json index 98defae8a2a..5efc575b4bf 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/localhost-ica-chain-a.json @@ -3,6 +3,8 @@ "release-v8.2.x" ], "chain-b": [ + "v8.2.0", + "v7.4.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/localhost-transfer-chain-a.json index db5af09c1d4..deb9acc7f84 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/localhost-transfer-chain-a.json @@ -3,6 +3,8 @@ "release-v8.2.x" ], "chain-b": [ + "v8.2.0", + "v7.4.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-a.json index 166e586023f..359a3239516 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-a.json @@ -4,14 +4,7 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-b.json index 8c282b2a574..1fbed292ed9 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-authz-chain-b.json @@ -1,14 +1,7 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-a.json index f4929f0bf96..4324f926385 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-a.json @@ -4,14 +4,12 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-b.json index bbcfae73d89..c0bf321db61 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-chain-b.json @@ -1,14 +1,12 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", - "v8.0.1", - "v8.0.0", "v7.4.0", - "v7.3.2", - "v7.3.1", - "v7.2.3", - "v7.2.2", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-a.json index 4e17e1ee57c..c1c4bb35a87 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-a.json @@ -4,7 +4,6 @@ ], "chain-b": [ "v8.2.0", - "v8.1.0", "release-v8.2.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-b.json index 79424d6e4c5..5896d3deec0 100644 --- a/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/release-v8.2.x/transfer-channel-upgrade-chain-b.json @@ -1,7 +1,6 @@ { "chain-a": [ "v8.2.0", - "v8.1.0", "release-v8.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/unreleased/client-1.json b/.github/compatibility-test-matrices/unreleased/client-1.json index e3165e23499..274f1c16ae8 100644 --- a/.github/compatibility-test-matrices/unreleased/client-1.json +++ b/.github/compatibility-test-matrices/unreleased/client-1.json @@ -1,13 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "entrypoint": [ "TestClientTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/client-2.json b/.github/compatibility-test-matrices/unreleased/client-2.json index 4da8ebf2604..b3fcc9e07f5 100644 --- a/.github/compatibility-test-matrices/unreleased/client-2.json +++ b/.github/compatibility-test-matrices/unreleased/client-2.json @@ -1,13 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "entrypoint": [ "TestClientTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/connection.json b/.github/compatibility-test-matrices/unreleased/connection.json index 2cae6ce82e1..0d14c80c1aa 100644 --- a/.github/compatibility-test-matrices/unreleased/connection.json +++ b/.github/compatibility-test-matrices/unreleased/connection.json @@ -1,19 +1,11 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.3.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.3.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "entrypoint": [ "TestConnectionTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/genesis.json b/.github/compatibility-test-matrices/unreleased/genesis.json index df8c36ceb31..a76b46fd824 100644 --- a/.github/compatibility-test-matrices/unreleased/genesis.json +++ b/.github/compatibility-test-matrices/unreleased/genesis.json @@ -1,13 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x" + "release-v8.2.x" ], "entrypoint": [ "TestGenesisTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-a.json index e334be59e64..1844727c4f0 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-a.json @@ -1,11 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "entrypoint": [ "TestInterchainAccountsChannelUpgradesTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-b.json index e334be59e64..1844727c4f0 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/unreleased/ica-channel-upgrade-chain-b.json @@ -1,11 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "entrypoint": [ "TestInterchainAccountsChannelUpgradesTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/ica-gov.json b/.github/compatibility-test-matrices/unreleased/ica-gov.json index fa2d1c2ed9f..b95f08b3186 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-gov.json +++ b/.github/compatibility-test-matrices/unreleased/ica-gov.json @@ -1,20 +1,12 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/unreleased/ica-groups.json b/.github/compatibility-test-matrices/unreleased/ica-groups.json index ff282e2c8ac..2c29fb0fdcb 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-groups.json +++ b/.github/compatibility-test-matrices/unreleased/ica-groups.json @@ -1,20 +1,12 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json b/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json index 9411ac9546f..724aed8831f 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json +++ b/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json @@ -1,11 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "entrypoint": [ "TestInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/ica.json b/.github/compatibility-test-matrices/unreleased/ica.json index fb8fecd134f..543ccd5651f 100644 --- a/.github/compatibility-test-matrices/unreleased/ica.json +++ b/.github/compatibility-test-matrices/unreleased/ica.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json index a5240b6b2bb..e57a8d2f8da 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json @@ -1,20 +1,12 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x" ], "entrypoint": [ diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json index 0053ba9fb6f..39bbc42077a 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json index 90b16205e26..9d6604460c1 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json index 5d068b154fa..deea2e25ccd 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/localhost-ica.json b/.github/compatibility-test-matrices/unreleased/localhost-ica.json index 451e955de1d..19d67a119e7 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-ica.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-ica.json @@ -1,19 +1,11 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "entrypoint": [ "LocalhostInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json index 996284782eb..f0b55d72305 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json @@ -1,19 +1,11 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "entrypoint": [ "LocalhostTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-1.json b/.github/compatibility-test-matrices/unreleased/transfer-1.json index a7181cd3893..e63cbef2a91 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-1.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-2.json b/.github/compatibility-test-matrices/unreleased/transfer-2.json index bfe675d6c5e..314d4e8a13b 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-2.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-3.json b/.github/compatibility-test-matrices/unreleased/transfer-3.json index c5f5170b021..f3a8a5ac989 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-3.json @@ -1,22 +1,14 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x", "release-v6.3.x", "release-v5.4.x", "release-v4.6.x" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-authz.json b/.github/compatibility-test-matrices/unreleased/transfer-authz.json index ea9cec64162..d33d16a42b4 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-authz.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-authz.json @@ -1,19 +1,11 @@ { "chain-a": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "chain-b": [ "release-v8.2.x", - "release-v8.1.x", - "release-v8.0.x", - "release-v7.4.x", - "release-v7.3.x", - "release-v7.2.x" + "release-v7.4.x" ], "entrypoint": [ "TestAuthzTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-a.json index c4128066538..2e6b31152fb 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-a.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-a.json @@ -1,11 +1,9 @@ { "chain-a": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.2.x", - "release-v8.1.x" + "release-v8.2.x" ], "entrypoint": [ "TestTransferChannelUpgradesTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-b.json index 4de19466899..2e6b31152fb 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-b.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-channel-upgrade-chain-b.json @@ -1,9 +1,9 @@ { "chain-a": [ - "release-v8.1.x" + "release-v8.2.x" ], "chain-b": [ - "release-v8.1.x" + "release-v8.2.x" ], "entrypoint": [ "TestTransferChannelUpgradesTestSuite" diff --git a/.github/mergify.yml b/.github/mergify.yml index 3da50d23931..e87a2d9d027 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -66,30 +66,14 @@ pull_request_rules: backport: branches: - 08-wasm/release/v0.1.x+ibc-go-v8.0.x-wasmvm-v1.5.x - - name: backport patches to v0.2.x wasm ibc-go v8.2.x & wasmvm 2.0.x branch + - name: backport patches to v0.2.x wasm ibc-go v8.3.x & wasmvm 2.0.x branch conditions: - base=main - - label=backport-wasm-v0.2.x+ibc-go-v8.2.x-wasmvm-v2.0.x + - label=backport-wasm-v0.2.x+ibc-go-v8.3.x-wasmvm-v2.0.x actions: backport: branches: - - 08-wasm/release/v0.2.x+ibc-go-v8.2.x-wasmvm-v2.0.x - - name: backport patches to v7.2.x branch - conditions: - - base=main - - label=backport-to-v7.2.x - actions: - backport: - branches: - - release/v7.2.x - - name: backport patches to v7.3.x branch - conditions: - - base=main - - label=backport-to-v7.3.x - actions: - backport: - branches: - - release/v7.3.x + - 08-wasm/release/v0.2.x+ibc-go-v8.3.x-wasmvm-v2.0.x - name: backport patches to v7.4.x branch conditions: - base=main @@ -106,22 +90,6 @@ pull_request_rules: backport: branches: - release/v7.5.x - - name: backport patches to v8.0.x branch - conditions: - - base=main - - label=backport-to-v8.0.x - actions: - backport: - branches: - - release/v8.0.x - - name: backport patches to v8.1.x branch - conditions: - - base=main - - label=backport-to-v8.1.x - actions: - backport: - branches: - - release/v8.1.x - name: backport patches to v8.2.x branch conditions: - base=main diff --git a/.github/workflows/e2e-compatibility-unreleased.yaml b/.github/workflows/e2e-compatibility-unreleased.yaml index 9d73108598b..5c9fc58e628 100644 --- a/.github/workflows/e2e-compatibility-unreleased.yaml +++ b/.github/workflows/e2e-compatibility-unreleased.yaml @@ -15,11 +15,7 @@ jobs: - release/v4.6.x - release/v5.4.x - release/v6.3.x - - release/v7.2.x - - release/v7.3.x - release/v7.4.x - - release/v8.0.x - - release/v8.1.x - release/v8.2.x steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index 736c085d7c0..a977aeddd61 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -7,10 +7,8 @@ on: required: true type: choice options: - - release/v7.2.x - - release/v7.3.x - - release/v8.0.x - - release/v8.1.x + - release/v7.4.x + - release/v8.2.x - main ibc-go-version: description: 'The version of ibc-go that is going to be released' @@ -43,10 +41,8 @@ jobs: strategy: matrix: release-branch: - - release/v7.2.x - - release/v7.3.x - - release/v8.0.x - - release/v8.1.x + - release/v7.4.x + - release/v8.2.x - main steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ef1bf6ff1a..cf37396300c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (core/04-channel) [\#5991](https://github.com/cosmos/ibc-go/pull/5991) The client CLI `QueryLatestConsensusState` has been removed. * (light-clients/06-solomachine) [\#6037](https://github.com/cosmos/ibc-go/pull/6037) Remove `Initialize` function from `ClientState` and move logic to `Initialize` function of `LightClientModule`. * (core/02-client) [\#6084](https://github.com/cosmos/ibc-go/pull/6084) Removed `stakingKeeper` as an argument to `NewKeeper` and replaced with a `ConsensusHost` implementation. +* (core) [\#6138](https://github.com/cosmos/ibc-go/pull/6138) Remove `Router` reference from IBC core keeper and use instead the router on the existing `PortKeeper` reference. ### State Machine Breaking diff --git a/docs/docs/03-light-clients/04-wasm/03-integration.md b/docs/docs/03-light-clients/04-wasm/03-integration.md index 2fc65155551..33fd75fad9d 100644 --- a/docs/docs/03-light-clients/04-wasm/03-integration.md +++ b/docs/docs/03-light-clients/04-wasm/03-integration.md @@ -129,7 +129,7 @@ When it comes to instantiating `08-wasm`'s keeper there are two recommended ways ### If `x/wasm` is present -If the chain where the module is integrated uses `x/wasm` then we recommend that both `08-wasm` and `x/wasm` share the same Wasm VM instance. Having two separate Wasm VM instances is still possible, but care should be taken to make sure that both instances do not share the directory when the VM stores blobs and various caches, otherwise unexpected behaviour is likely to happen (from `x/wasm` v0.51 and `08-wasm` v0.2.0.0+ibc-go-v8.2-wasmvm-v2.0 this will be forbidden anyway, since wasmvm v2.0.0 and above will not allow two different Wasm VM instances to shared the same data folder). +If the chain where the module is integrated uses `x/wasm` then we recommend that both `08-wasm` and `x/wasm` share the same Wasm VM instance. Having two separate Wasm VM instances is still possible, but care should be taken to make sure that both instances do not share the directory when the VM stores blobs and various caches, otherwise unexpected behaviour is likely to happen (from `x/wasm` v0.51 and `08-wasm` v0.2.0+ibc-go-v8.3-wasmvm-v2.0 this will be forbidden anyway, since wasmvm v2.0.0 and above will not allow two different Wasm VM instances to shared the same data folder). In order to share the Wasm VM instance please follow the guideline below. Please note that this requires `x/wasm` v0.41 or above. diff --git a/docs/docs/03-light-clients/04-wasm/09-migrations.md b/docs/docs/03-light-clients/04-wasm/09-migrations.md index ff4800e74ec..1acc23d441a 100644 --- a/docs/docs/03-light-clients/04-wasm/09-migrations.md +++ b/docs/docs/03-light-clients/04-wasm/09-migrations.md @@ -15,7 +15,7 @@ This guide provides instructions for migrating 08-wasm versions. In the 08-wasm versions compatible with ibc-go v7.3.x and above from the v7 release line, the checksums of the uploaded Wasm bytecodes are all stored under a single key. From ibc-go v8.0.x the checksums are stored using [`collections.KeySet`](https://docs.cosmos.network/v0.50/build/packages/collections#keyset), whose full functionality became available in Cosmos SDK v0.50. There is therefore an [automatic migration handler](https://github.com/cosmos/ibc-go/blob/57fcdb9a9a9db9b206f7df2f955866dc4e10fef4/modules/light-clients/08-wasm/module.go#L115-L118) configured in the 08-wasm module to migrate the stored checksums to `collections.KeySet`. -## From v0.1.0+ibc-go-v8.0-wasmvm-v1.5 to v0.2.0-ibc-go-v8.2-wasmvm-v2.0 +## From v0.1.0+ibc-go-v8.0-wasmvm-v1.5 to v0.2.0-ibc-go-v8.3-wasmvm-v2.0 The `WasmEngine` interface has been updated to reflect changes in the function signatures of Wasm VM: diff --git a/docs/docs/05-migrations/13-v8-to-v9.md b/docs/docs/05-migrations/13-v8-to-v9.md index 98425383303..75a2bcfe80b 100644 --- a/docs/docs/05-migrations/13-v8-to-v9.md +++ b/docs/docs/05-migrations/13-v8-to-v9.md @@ -47,6 +47,10 @@ Please use the new functions `path.Setup`, `path.SetupClients`, `path.SetupConne - Functions `ConstructUpdateTMClientHeader` and `ConstructUpdateTMClientHeaderWithTrustedHeight` of `TestChain` type have been replaced with `IBCClientHeader`. This function will construct a `07-tendermint` header to update the light client on the counterparty chain. The trusted height must be passed in as a non-zero height. - `GetValsAtHeight` has been renamed to `GetTrustedValidators` +### IBC core + +- `Router` reference has been removed from IBC core keeper: [#6138](https://github.com/cosmos/ibc-go/pull/6138) + ### ICS27 - Interchain Accounts In [#5785](https://github.com/cosmos/ibc-go/pull/5785) the list of arguments of the `NewKeeper` constructor function of the host submodule was extended with an extra argument for the gRPC query router that the submodule uses when executing a [`MsgModuleQuerySafe`](https://github.com/cosmos/ibc-go/blob/eecfa5c09a4c38a5c9f2cc2a322d2286f45911da/proto/ibc/applications/interchain_accounts/host/v1/tx.proto#L41-L51) to perform queries that are module safe: diff --git a/e2e/go.mod b/e2e/go.mod index e07220575b6..0a597d2d982 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -16,7 +16,7 @@ require ( github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 golang.org/x/mod v0.17.0 - google.golang.org/grpc v1.63.0 + google.golang.org/grpc v1.63.2 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/e2e/go.sum b/e2e/go.sum index d18041399d0..37c00601b09 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1731,8 +1731,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.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/e2e/internal/directories/directories.go b/e2e/internal/directories/directories.go new file mode 100644 index 00000000000..b27590b51bc --- /dev/null +++ b/e2e/internal/directories/directories.go @@ -0,0 +1,40 @@ +package directories + +import ( + "fmt" + "os" + "path" + "strings" + "testing" +) + +const ( + e2eDir = "e2e" + + // DefaultGenesisExportPath is the default path to which Genesis debug files will be exported to. + DefaultGenesisExportPath = "diagnostics/genesis.json" +) + +// E2E finds the e2e directory above the test. +func E2E(t *testing.T) (string, error) { + t.Helper() + + wd, err := os.Getwd() + if err != nil { + return "", err + } + + const maxAttempts = 100 + count := 0 + for ; !strings.HasSuffix(wd, e2eDir) || count > maxAttempts; wd = path.Dir(wd) { + count++ + } + + // 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 { + return "", fmt.Errorf("unable to find e2e directory after %d tries", maxAttempts) + } + + return wd, nil +} diff --git a/e2e/tests/core/02-client/client_test.go b/e2e/tests/core/02-client/client_test.go index 06e1f3f3581..fe7ade0ee46 100644 --- a/e2e/tests/core/02-client/client_test.go +++ b/e2e/tests/core/02-client/client_test.go @@ -101,7 +101,8 @@ func (s *ClientTestSuite) TestScheduleIBCUpgrade_Succeeds() { s.Require().NoError(err) s.Require().NotEqual(originalChainID, newChainID) - upgradedClientState := clientState.(*ibctm.ClientState) + upgradedClientState, ok := clientState.(*ibctm.ClientState) + s.Require().True(ok) upgradedClientState.ChainId = newChainID scheduleUpgradeMsg, err := clienttypes.NewMsgIBCSoftwareUpgrade( diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go index a8909fa9675..e7d5e7299dc 100644 --- a/e2e/tests/transfer/localhost_test.go +++ b/e2e/tests/transfer/localhost_test.go @@ -56,7 +56,8 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() { cs, err := s.QueryClientState(ctx, chainA, exported.LocalhostClientID) s.Require().NoError(err) - localhostClientState := cs.(*localhost.ClientState) + localhostClientState, ok := cs.(*localhost.ClientState) + s.Require().True(ok) originalHeight := localhostClientState.LatestHeight s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA), "failed to wait for blocks") diff --git a/e2e/tests/upgrades/genesis_test.go b/e2e/tests/upgrades/genesis_test.go index 2e2d1850e03..08d913d061e 100644 --- a/e2e/tests/upgrades/genesis_test.go +++ b/e2e/tests/upgrades/genesis_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/gogoproto/proto" "github.com/strangelove-ventures/interchaintest/v8" - cosmos "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/ibc" test "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/suite" diff --git a/e2e/tests/wasm/grandpa_test.go b/e2e/tests/wasm/grandpa_test.go index b67a4c930e7..4b0824a6103 100644 --- a/e2e/tests/wasm/grandpa_test.go +++ b/e2e/tests/wasm/grandpa_test.go @@ -78,8 +78,11 @@ func (s *GrandpaTestSuite) TestMsgTransfer_Succeeds_GrandpaContract() { chainA, chainB := s.GetGrandpaTestChains() - polkadotChain := chainA.(*polkadot.PolkadotChain) - cosmosChain := chainB.(*cosmos.CosmosChain) + polkadotChain, ok := chainA.(*polkadot.PolkadotChain) + s.Require().True(ok) + + cosmosChain, ok := chainB.(*cosmos.CosmosChain) + s.Require().True(ok) // we explicitly skip path creation as the contract needs to be uploaded before we can create clients. r := s.ConfigureRelayer(ctx, polkadotChain, cosmosChain, nil, func(options *interchaintest.InterchainBuildOptions) { @@ -230,8 +233,11 @@ func (s *GrandpaTestSuite) TestMsgTransfer_TimesOut_GrandpaContract() { chainA, chainB := s.GetGrandpaTestChains() - polkadotChain := chainA.(*polkadot.PolkadotChain) - cosmosChain := chainB.(*cosmos.CosmosChain) + polkadotChain, ok := chainA.(*polkadot.PolkadotChain) + s.Require().True(ok) + + cosmosChain, ok := chainB.(*cosmos.CosmosChain) + s.Require().True(ok) // we explicitly skip path creation as the contract needs to be uploaded before we can create clients. r := s.ConfigureRelayer(ctx, polkadotChain, cosmosChain, nil, func(options *interchaintest.InterchainBuildOptions) { @@ -344,8 +350,11 @@ func (s *GrandpaTestSuite) TestMsgMigrateContract_Success_GrandpaContract() { chainA, chainB := s.GetGrandpaTestChains() - polkadotChain := chainA.(*polkadot.PolkadotChain) - cosmosChain := chainB.(*cosmos.CosmosChain) + polkadotChain, ok := chainA.(*polkadot.PolkadotChain) + s.Require().True(ok) + + cosmosChain, ok := chainB.(*cosmos.CosmosChain) + s.Require().True(ok) // we explicitly skip path creation as the contract needs to be uploaded before we can create clients. r := s.ConfigureRelayer(ctx, polkadotChain, cosmosChain, nil, func(options *interchaintest.InterchainBuildOptions) { @@ -431,8 +440,11 @@ func (s *GrandpaTestSuite) TestMsgMigrateContract_ContractError_GrandpaContract( chainA, chainB := s.GetGrandpaTestChains() - polkadotChain := chainA.(*polkadot.PolkadotChain) - cosmosChain := chainB.(*cosmos.CosmosChain) + polkadotChain, ok := chainA.(*polkadot.PolkadotChain) + s.Require().True(ok) + + cosmosChain, ok := chainB.(*cosmos.CosmosChain) + s.Require().True(ok) // we explicitly skip path creation as the contract needs to be uploaded before we can create clients. r := s.ConfigureRelayer(ctx, polkadotChain, cosmosChain, nil, func(options *interchaintest.InterchainBuildOptions) { @@ -523,8 +535,11 @@ func (s *GrandpaTestSuite) TestRecoverClient_Succeeds_GrandpaContract() { chainA, chainB := s.GetGrandpaTestChains() - polkadotChain := chainA.(*polkadot.PolkadotChain) - cosmosChain := chainB.(*cosmos.CosmosChain) + polkadotChain, ok := chainA.(*polkadot.PolkadotChain) + s.Require().True(ok) + + cosmosChain, ok := chainB.(*cosmos.CosmosChain) + s.Require().True(ok) // we explicitly skip path creation as the contract needs to be uploaded before we can create clients. r := s.ConfigureRelayer(ctx, polkadotChain, cosmosChain, nil, func(options *interchaintest.InterchainBuildOptions) { diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go index 38ae500947e..4b24a1cfc9f 100644 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ b/e2e/testsuite/diagnostics/diagnostics.go @@ -13,11 +13,11 @@ import ( dockerclient "github.com/docker/docker/client" "github.com/cosmos/ibc-go/e2e/dockerutil" + "github.com/cosmos/ibc-go/e2e/internal/directories" ) const ( dockerInspectFileName = "docker-inspect.json" - e2eDir = "e2e" defaultFilePerm = 0o750 ) @@ -37,7 +37,7 @@ func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, chain t.Logf("writing logs for test: %s", t.Name()) ctx := context.TODO() - e2eDir, err := getE2EDir(t) + e2eDir, err := directories.E2E(t) if err != nil { t.Logf("failed finding log directory: %s", err) return @@ -161,27 +161,3 @@ func relayerDiagnosticAbsoluteFilePaths() []string { "/home/hermes/.hermes/config.toml", } } - -// getE2EDir finds the e2e directory above the test. -func getE2EDir(t *testing.T) (string, error) { - t.Helper() - - wd, err := os.Getwd() - if err != nil { - return "", err - } - - const maxAttempts = 100 - count := 0 - for ; !strings.HasSuffix(wd, e2eDir) || count > maxAttempts; wd = ospath.Dir(wd) { - count++ - } - - // 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 { - return "", fmt.Errorf("unable to find e2e directory after %d tries", maxAttempts) - } - - return wd, nil -} diff --git a/e2e/testsuite/testconfig.go b/e2e/testsuite/testconfig.go index 3da52060b06..b1050388e77 100644 --- a/e2e/testsuite/testconfig.go +++ b/e2e/testsuite/testconfig.go @@ -62,7 +62,7 @@ const ( // TODO: https://github.com/cosmos/ibc-go/issues/4965 defaultHyperspaceTag = "20231122v39" // defaultHermesTag is the tag that will be used if no relayer tag is specified for hermes. - defaultHermesTag = "luca_joss-channel-upgrade-authority" + defaultHermesTag = "sean-channel-upgradability" // defaultChainTag is the tag that will be used for the chains if none is specified. defaultChainTag = "main" // defaultConfigFileName is the default filename for the config file that can be used to configure @@ -70,6 +70,9 @@ const ( defaultConfigFileName = ".ibc-go-e2e-config.yaml" ) +// defaultChainNames contains the default name for chainA and chainB. +var defaultChainNames = []string{"simapp-a", "simapp-b"} + func getChainImage(binary string) string { if binary == "" { binary = defaultBinary @@ -103,6 +106,10 @@ func (tc TestConfig) Validate() error { if err := tc.validateRelayers(); err != nil { return fmt.Errorf("invalid relayer configuration: %w", err) } + + if err := tc.validateGenesisDebugConfig(); err != nil { + return fmt.Errorf("invalid Genesis debug configuration: %w", err) + } return nil } @@ -163,6 +170,31 @@ func (tc TestConfig) validateRelayers() error { return nil } +// GetChainIndex returns the index of the chain with the given name, if it +// exists. +func (tc TestConfig) GetChainIndex(name string) (int, error) { + for i := range tc.ChainConfigs { + chainName := tc.GetChainName(i) + if chainName == name { + return i, nil + } + } + return -1, fmt.Errorf("chain %s not found in chain configs", name) +} + +// validateGenesisDebugConfig validates configuration of Genesis debug options/ +func (tc TestConfig) validateGenesisDebugConfig() error { + cfg := tc.DebugConfig.GenesisDebug + if !cfg.DumpGenesisDebugInfo { + return nil + } + + // Verify that the provided chain exists in our config + _, err := tc.GetChainIndex(tc.GetGenesisChainName()) + + return err +} + // GetActiveRelayerConfig returns the currently specified relayer config. func (tc TestConfig) GetActiveRelayerConfig() *relayer.Config { for _, r := range tc.RelayerConfigs { @@ -207,6 +239,26 @@ func (tc TestConfig) GetChainBID() string { return "chainB-1" } +// GetChainName returns the name of the chain given an index. +func (tc TestConfig) GetChainName(idx int) string { + // Assumes that only valid indices are provided. We do the same in several other places. + chainName := tc.ChainConfigs[idx].Name + if chainName == "" { + chainName = defaultChainNames[idx] + } + return chainName +} + +// GetGenesisChainName returns the name of the chain for which to dump Genesis files. +// If no chain is provided, it uses the default one (chainA). +func (tc TestConfig) GetGenesisChainName() string { + name := tc.DebugConfig.GenesisDebug.ChainName + if name == "" { + return tc.GetChainName(0) + } + return name +} + // UpgradeConfig holds values relevant to upgrade tests. type UpgradeConfig struct { PlanName string `yaml:"planName"` @@ -216,6 +268,7 @@ type UpgradeConfig struct { // ChainConfig holds information about an individual chain used in the tests. type ChainConfig struct { ChainID string `yaml:"chainId"` + Name string `yaml:"name"` Image string `yaml:"image"` Tag string `yaml:"tag"` Binary string `yaml:"binary"` @@ -227,9 +280,23 @@ type CometBFTConfig struct { LogLevel string `yaml:"logLevel"` } +type GenesisDebugConfig struct { + // DumpGenesisDebugInfo enables the output of Genesis debug files. + DumpGenesisDebugInfo bool `yaml:"dumpGenesisDebugInfo"` + + // ExportFilePath specifies which path to export Genesis debug files to. + ExportFilePath string `yaml:"filePath"` + + // ChainName represent which chain to get Genesis debug info for. + ChainName string `yaml:"chainName"` +} + type DebugConfig struct { // DumpLogs forces the logs to be collected before removing test containers. DumpLogs bool `yaml:"dumpLogs"` + + // GenesisDebug contains debug information specific to Genesis. + GenesisDebug GenesisDebugConfig `yaml:"genesis"` } // LoadConfig attempts to load a atest configuration from the default file path. @@ -471,8 +538,8 @@ type ChainOptionConfiguration func(options *ChainOptions) func DefaultChainOptions() ChainOptions { tc := LoadConfig() - chainACfg := newDefaultSimappConfig(tc.ChainConfigs[0], "simapp-a", tc.GetChainAID(), "atoma", tc.CometBFTConfig) - chainBCfg := newDefaultSimappConfig(tc.ChainConfigs[1], "simapp-b", tc.GetChainBID(), "atomb", tc.CometBFTConfig) + chainACfg := newDefaultSimappConfig(tc.ChainConfigs[0], tc.GetChainName(0), tc.GetChainAID(), "atoma", tc.CometBFTConfig) + chainBCfg := newDefaultSimappConfig(tc.ChainConfigs[1], tc.GetChainName(1), tc.GetChainBID(), "atomb", tc.CometBFTConfig) chainAVal, chainAFn := getValidatorsAndFullNodes(0) chainBVal, chainBFn := getValidatorsAndFullNodes(1) @@ -740,8 +807,12 @@ func modifyChannelGenesisAppState(ibcAppState []byte) ([]byte, error) { return nil, err } + var channelGenesis map[string]interface{} // be ashamed, be very ashamed - channelGenesis := ibcGenesisMap["channel_genesis"].(map[string]interface{}) + channelGenesis, ok := ibcGenesisMap["channel_genesis"].(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("can't convert IBC genesis map entry into type %T", &channelGenesis) + } delete(channelGenesis, "params") return json.Marshal(ibcGenesisMap) diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 48dbc13adcc..f7aed822821 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -4,6 +4,8 @@ import ( "context" "errors" "fmt" + "os" + "path" "strings" dockerclient "github.com/docker/docker/client" @@ -19,6 +21,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/cosmos/ibc-go/e2e/internal/directories" "github.com/cosmos/ibc-go/e2e/relayer" "github.com/cosmos/ibc-go/e2e/testsuite/diagnostics" feetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" @@ -67,6 +70,49 @@ func newPath(chainA, chainB ibc.Chain) pathPair { } } +func (s *E2ETestSuite) SetupTest() { + s.configureGenesisDebugExport() +} + +// configureGenesisDebugExport sets, if needed, env variables to enable exporting of Genesis debug files. +func (s *E2ETestSuite) configureGenesisDebugExport() { + tc := LoadConfig() + t := s.T() + cfg := tc.DebugConfig.GenesisDebug + if !cfg.DumpGenesisDebugInfo { + return + } + + // Set the export path. + exportPath := cfg.ExportFilePath + + // If no path is provided, use the default (e2e/diagnostics/genesis.json). + if exportPath == "" { + e2eDir, err := directories.E2E(t) + s.Require().NoError(err, "can't get e2edir") + exportPath = path.Join(e2eDir, directories.DefaultGenesisExportPath) + } + + if !path.IsAbs(exportPath) { + wd, err := os.Getwd() + s.Require().NoError(err, "can't get working directory") + exportPath = path.Join(wd, exportPath) + } + + // This env variables are set by the interchain test code: + // https://github.com/strangelove-ventures/interchaintest/blob/7aa0fd6487f76238ab44231fdaebc34627bc5990/chain/cosmos/cosmos_chain.go#L1007-L1008 + t.Setenv("EXPORT_GENESIS_FILE_PATH", exportPath) + + chainName := tc.GetGenesisChainName() + chainIdx, err := tc.GetChainIndex(chainName) + s.Require().NoError(err) + + // Interchaintest adds a suffix (https://github.com/strangelove-ventures/interchaintest/blob/a3f4c7bcccf1925ffa6dc793a298f15497919a38/chainspec.go#L125) + // to the chain name, so we need to do the same. + genesisChainName := fmt.Sprintf("%s-%d", chainName, chainIdx+1) + t.Setenv("EXPORT_GENESIS_CHAIN", genesisChainName) +} + // GetRelayerUsers returns two ibc.Wallet instances which can be used for the relayer users // on the two chains. func (s *E2ETestSuite) GetRelayerUsers(ctx context.Context, chainOpts ...ChainOptionConfiguration) (ibc.Wallet, ibc.Wallet) { @@ -173,9 +219,9 @@ func (s *E2ETestSuite) SetupSingleChain(ctx context.Context) ibc.Chain { // generatePathName generates the path name using the test suites name func (s *E2ETestSuite) generatePathName() string { - path := s.GetPathName(s.pathNameIndex) + pathName := s.GetPathName(s.pathNameIndex) s.pathNameIndex++ - return path + return pathName } // GetPathName returns the name of a path at a specific index. This can be used in tests @@ -219,9 +265,9 @@ func (s *E2ETestSuite) GetChains(chainOpts ...ChainOptionConfiguration) (ibc.Cha s.paths = map[string]pathPair{} } - path, ok := s.paths[s.T().Name()] + suitePath, ok := s.paths[s.T().Name()] if ok { - return path.chainA, path.chainB + return suitePath.chainA, suitePath.chainB } chainOptions := DefaultChainOptions() @@ -230,8 +276,8 @@ func (s *E2ETestSuite) GetChains(chainOpts ...ChainOptionConfiguration) (ibc.Cha } chainA, chainB := s.createChains(chainOptions) - path = newPath(chainA, chainB) - s.paths[s.T().Name()] = path + suitePath = newPath(chainA, chainB) + s.paths[s.T().Name()] = suitePath if s.proposalIDs == nil { s.proposalIDs = map[string]uint64{} @@ -240,7 +286,7 @@ func (s *E2ETestSuite) GetChains(chainOpts ...ChainOptionConfiguration) (ibc.Cha s.proposalIDs[chainA.Config().ChainID] = 1 s.proposalIDs[chainB.Config().ChainID] = 1 - return path.chainA, path.chainB + return suitePath.chainA, suitePath.chainB } // GetRelayerWallets returns the ibcrelayer wallets associated with the chains. diff --git a/go.mod b/go.mod index 1f456ff5a94..756e2ad48f1 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de - google.golang.org/grpc v1.63.0 + google.golang.org/grpc v1.63.2 google.golang.org/protobuf v1.33.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 2443adefd66..3ac3b263bdc 100644 --- a/go.sum +++ b/go.sum @@ -1646,8 +1646,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.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go index c8ef37eecdf..e0e6ef288f0 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go @@ -226,7 +226,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenInit() { chanCap, err := suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) if isNilApp { @@ -282,7 +282,7 @@ func (suite *InterchainAccountsTestSuite) TestChanOpenTry() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) counterparty := channeltypes.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -370,7 +370,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanOpenAck(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelID, path.EndpointB.ChannelConfig.Version) @@ -429,7 +429,7 @@ func (suite *InterchainAccountsTestSuite) TestChanOpenConfirm() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanOpenConfirm( @@ -449,7 +449,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseInit() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanCloseInit( @@ -497,7 +497,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) if isNilApp { @@ -544,7 +544,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) packet := channeltypes.NewPacket( @@ -655,7 +655,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) if isNilApp { @@ -750,7 +750,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) if isNilApp { @@ -843,7 +843,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeInit() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -886,7 +886,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeTry() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -969,7 +969,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -1050,7 +1050,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeOpen() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -1152,10 +1152,12 @@ func (suite *InterchainAccountsTestSuite) TestGetAppVersion() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) + suite.Require().True(ok) + + controllerStack, ok := cbs.(porttypes.ICS4Wrapper) suite.Require().True(ok) - controllerStack := cbs.(porttypes.ICS4Wrapper) appVersion, found := controllerStack.GetAppVersion(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) suite.Require().True(found) suite.Require().Equal(path.EndpointA.ChannelConfig.Version, appVersion) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go index b8028d53354..b733adff9ca 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go @@ -354,13 +354,12 @@ func (suite *KeeperTestSuite) TestWithICS4Wrapper() { // test if the ics4 wrapper is the channel keeper initially ics4Wrapper := suite.chainA.GetSimApp().ICAControllerKeeper.GetICS4Wrapper() - _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + _, isChannelKeeper := ics4Wrapper.(*channelkeeper.Keeper) suite.Require().False(isChannelKeeper) // set the ics4 wrapper to the channel keeper suite.chainA.GetSimApp().ICAControllerKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) ics4Wrapper = suite.chainA.GetSimApp().ICAControllerKeeper.GetICS4Wrapper() - _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) - suite.Require().True(isChannelKeeper) + suite.Require().IsType((*channelkeeper.Keeper)(nil), ics4Wrapper) } diff --git a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go index dcbe067ceaf..3c88c512d3d 100644 --- a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go +++ b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - v6 "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/migrations/v6" + "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/migrations/v6" "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" 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 e8f2d859b2f..98dbb2b36a0 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -211,7 +211,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() { chanCap, err := suite.chainB.App.GetScopedIBCKeeper().NewCapability(suite.chainB.GetContext(), host.ChannelCapabilityPath(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID)) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) version, err := cbs.OnChanOpenTry(suite.chainB.GetContext(), channel.Ordering, channel.ConnectionHops, @@ -315,7 +315,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenConfirm() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanOpenConfirm(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) @@ -340,7 +340,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseInit() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanCloseInit( @@ -379,7 +379,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanCloseConfirm() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanCloseConfirm( @@ -488,7 +488,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) ctx := suite.chainB.GetContext() @@ -560,7 +560,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) packet := channeltypes.NewPacket( @@ -613,7 +613,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) packet := channeltypes.NewPacket( @@ -650,7 +650,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeInit() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -709,7 +709,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeTry() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) @@ -745,7 +745,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanUpgradeAck() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID) suite.Require().NoError(err) - app, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) suite.Require().True(ok) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 971e953f1ca..119424053ac 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -288,8 +288,14 @@ func newModuleQuerySafeAllowList() []string { sd := fd.Services().Get(i) // Skip services that are annotated with the "cosmos.msg.v1.service" option. - if ext := proto.GetExtension(sd.Options(), msgv1.E_Service); ext != nil && ext.(bool) { - continue + if ext := proto.GetExtension(sd.Options(), msgv1.E_Service); ext != nil { + val, ok := ext.(bool) + if !ok { + panic(fmt.Errorf("cannot convert %T to %T", ext, ok)) + } + if val { + continue + } } for j := 0; j < sd.Methods().Len(); j++ { 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 3b25bf90a85..acbc274ef2f 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -411,15 +411,15 @@ func (suite *KeeperTestSuite) TestWithICS4Wrapper() { _, isFeeKeeper := ics4Wrapper.(ibcfeekeeper.Keeper) suite.Require().True(isFeeKeeper) - _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + _, isChannelKeeper := ics4Wrapper.(*channelkeeper.Keeper) suite.Require().False(isChannelKeeper) // set the ics4 wrapper to the channel keeper suite.chainA.GetSimApp().ICAHostKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) ics4Wrapper = suite.chainA.GetSimApp().ICAHostKeeper.GetICS4Wrapper() - _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) - suite.Require().True(isChannelKeeper) + suite.Require().IsType((*channelkeeper.Keeper)(nil), ics4Wrapper) + _, isFeeKeeper = ics4Wrapper.(ibcfeekeeper.Keeper) suite.Require().False(isFeeKeeper) } diff --git a/modules/apps/27-interchain-accounts/types/keys_test.go b/modules/apps/27-interchain-accounts/types/keys_test.go index 7b80c699aa0..1013b2a4acf 100644 --- a/modules/apps/27-interchain-accounts/types/keys_test.go +++ b/modules/apps/27-interchain-accounts/types/keys_test.go @@ -1,7 +1,7 @@ package types_test import ( - fmt "fmt" + "fmt" "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" ibctesting "github.com/cosmos/ibc-go/v8/testing" diff --git a/modules/apps/27-interchain-accounts/types/router.go b/modules/apps/27-interchain-accounts/types/router.go index 32a334f5f46..6c1dcee6d39 100644 --- a/modules/apps/27-interchain-accounts/types/router.go +++ b/modules/apps/27-interchain-accounts/types/router.go @@ -1,7 +1,7 @@ package types import ( - baseapp "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/modules/apps/29-fee/ibc_middleware_test.go b/modules/apps/29-fee/ibc_middleware_test.go index 8cba9337a88..fc16fd900fc 100644 --- a/modules/apps/29-fee/ibc_middleware_test.go +++ b/modules/apps/29-fee/ibc_middleware_test.go @@ -109,7 +109,7 @@ func (suite *FeeTestSuite) TestOnChanOpenInit() { chanCap, err := suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID)) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) version, err := cbs.OnChanOpenInit(suite.chainA.GetContext(), channel.Ordering, channel.ConnectionHops, @@ -212,7 +212,7 @@ func (suite *FeeTestSuite) TestOnChanOpenTry() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) _, err = cbs.OnChanOpenTry(suite.chainA.GetContext(), channel.Ordering, channel.ConnectionHops, @@ -298,7 +298,7 @@ func (suite *FeeTestSuite) TestOnChanOpenAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanOpenAck(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID, suite.path.EndpointA.Counterparty.ChannelID, tc.cpVersion) @@ -385,7 +385,7 @@ func (suite *FeeTestSuite) TestOnChanCloseInit() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanCloseInit(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) @@ -475,7 +475,7 @@ func (suite *FeeTestSuite) TestOnChanCloseConfirm() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnChanCloseConfirm(suite.chainA.GetContext(), suite.path.EndpointA.ChannelConfig.PortID, suite.path.EndpointA.ChannelID) @@ -553,7 +553,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) suite.chainB.GetSimApp().IBCFeeKeeper.SetCounterpartyPayeeAddress(suite.chainB.GetContext(), suite.chainA.SenderAccount.GetAddress().String(), suite.chainB.SenderAccount.GetAddress().String(), suite.path.EndpointB.ChannelID) @@ -832,7 +832,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), packet, ack, relayerAddr) @@ -1043,7 +1043,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, relayerAddr) @@ -1358,7 +1358,7 @@ func (suite *FeeTestSuite) TestOnChanUpgradeAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) @@ -1468,7 +1468,7 @@ func (suite *FeeTestSuite) TestOnChanUpgradeOpen() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) @@ -1544,10 +1544,12 @@ func (suite *FeeTestSuite) TestGetAppVersion() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) + suite.Require().True(ok) + + feeModule, ok := cbs.(porttypes.ICS4Wrapper) suite.Require().True(ok) - feeModule := cbs.(porttypes.ICS4Wrapper) appVersion, found := feeModule.GetAppVersion(suite.chainA.GetContext(), portID, channelID) if tc.expFound { @@ -1565,7 +1567,7 @@ func (suite *FeeTestSuite) TestPacketDataUnmarshalerInterface() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) feeModule, ok := cbs.(porttypes.PacketDataUnmarshaler) diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index 1da6b37033c..1a29a98d5ef 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -296,8 +296,7 @@ func (suite *KeeperTestSuite) TestWithICS4Wrapper() { // test if the ics4 wrapper is the channel keeper initially ics4Wrapper := suite.chainA.GetSimApp().IBCFeeKeeper.GetICS4Wrapper() - _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) - suite.Require().True(isChannelKeeper) + suite.Require().IsType((*channelkeeper.Keeper)(nil), ics4Wrapper) _, isFeeKeeper := ics4Wrapper.(keeper.Keeper) suite.Require().False(isFeeKeeper) @@ -307,6 +306,6 @@ func (suite *KeeperTestSuite) TestWithICS4Wrapper() { _, isFeeKeeper = ics4Wrapper.(keeper.Keeper) suite.Require().True(isFeeKeeper) - _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) + _, isChannelKeeper := ics4Wrapper.(*channelkeeper.Keeper) suite.Require().False(isChannelKeeper) } diff --git a/modules/apps/callbacks/callbacks_test.go b/modules/apps/callbacks/callbacks_test.go index 3b337b7bd24..092dedd4bbd 100644 --- a/modules/apps/callbacks/callbacks_test.go +++ b/modules/apps/callbacks/callbacks_test.go @@ -18,7 +18,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" - simapp "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" "github.com/cosmos/ibc-go/modules/apps/callbacks/types" icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" diff --git a/modules/apps/callbacks/go.mod b/modules/apps/callbacks/go.mod index 83d0f340ac1..19fb3140b88 100644 --- a/modules/apps/callbacks/go.mod +++ b/modules/apps/callbacks/go.mod @@ -195,7 +195,7 @@ require ( google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/grpc v1.63.0 // indirect + google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/modules/apps/callbacks/go.sum b/modules/apps/callbacks/go.sum index 2443adefd66..3ac3b263bdc 100644 --- a/modules/apps/callbacks/go.sum +++ b/modules/apps/callbacks/go.sum @@ -1646,8 +1646,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.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/modules/apps/callbacks/ibc_middleware_test.go b/modules/apps/callbacks/ibc_middleware_test.go index d041ea61b2c..d4419ffd8ec 100644 --- a/modules/apps/callbacks/ibc_middleware_test.go +++ b/modules/apps/callbacks/ibc_middleware_test.go @@ -33,21 +33,21 @@ func (s *CallbacksTestSuite) TestNewIBCMiddleware() { { "success", func() { - _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, &channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) }, nil, }, { "panics with nil underlying app", func() { - _ = ibccallbacks.NewIBCMiddleware(nil, channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) + _ = ibccallbacks.NewIBCMiddleware(nil, &channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) }, fmt.Errorf("underlying application does not implement %T", (*types.CallbacksCompatibleModule)(nil)), }, { "panics with nil contract keeper", func() { - _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, nil, maxCallbackGas) + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, &channelkeeper.Keeper{}, nil, maxCallbackGas) }, fmt.Errorf("contract keeper cannot be nil"), }, @@ -61,7 +61,7 @@ func (s *CallbacksTestSuite) TestNewIBCMiddleware() { { "panics with zero maxCallbackGas", func() { - _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, simapp.ContractKeeper{}, uint64(0)) + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, &channelkeeper.Keeper{}, simapp.ContractKeeper{}, uint64(0)) }, fmt.Errorf("maxCallbackGas cannot be zero"), }, @@ -89,7 +89,7 @@ func (s *CallbacksTestSuite) TestWithICS4Wrapper() { cbsMiddleware.WithICS4Wrapper(s.chainA.App.GetIBCKeeper().ChannelKeeper) ics4Wrapper := cbsMiddleware.GetICS4Wrapper() - s.Require().IsType(channelkeeper.Keeper{}, ics4Wrapper) + s.Require().IsType((*channelkeeper.Keeper)(nil), ics4Wrapper) } func (s *CallbacksTestSuite) TestSendPacket() { @@ -322,7 +322,7 @@ func (s *CallbacksTestSuite) TestOnAcknowledgementPacket() { tc.malleate() // callbacks module is routed as top level middleware - transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + transferStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(transfertypes.ModuleName) s.Require().True(ok) onAcknowledgementPacket := func() error { @@ -485,7 +485,7 @@ func (s *CallbacksTestSuite) TestOnTimeoutPacket() { tc.malleate() // callbacks module is routed as top level middleware - transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + transferStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(transfertypes.ModuleName) s.Require().True(ok) onTimeoutPacket := func() error { @@ -645,7 +645,7 @@ func (s *CallbacksTestSuite) TestOnRecvPacket() { tc.malleate() // callbacks module is routed as top level middleware - transferStack, ok := s.chainB.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + transferStack, ok := s.chainB.App.GetIBCKeeper().PortKeeper.Route(transfertypes.ModuleName) s.Require().True(ok) onRecvPacket := func() ibcexported.Acknowledgement { @@ -913,7 +913,7 @@ func (s *CallbacksTestSuite) TestProcessCallback() { module, _, err := s.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(s.chainA.GetContext(), ibctesting.MockFeePort) s.Require().NoError(err) - cbs, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(module) s.Require().True(ok) mockCallbackStack, ok := cbs.(ibccallbacks.IBCMiddleware) s.Require().True(ok) @@ -944,7 +944,7 @@ func (s *CallbacksTestSuite) TestUnmarshalPacketData() { // We will pass the function call down the transfer stack to the transfer module // transfer stack UnmarshalPacketData call order: callbacks -> fee -> transfer - transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + transferStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(transfertypes.ModuleName) s.Require().True(ok) unmarshalerStack, ok := transferStack.(types.CallbacksCompatibleModule) @@ -970,10 +970,11 @@ func (s *CallbacksTestSuite) TestGetAppVersion() { // Obtain an IBC stack for testing. The function call will use the top of the stack which calls // directly to the channel keeper. Calling from a further down module in the stack is not necessary // for this test. - icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(icacontrollertypes.SubModuleName) s.Require().True(ok) - controllerStack := icaControllerStack.(porttypes.ICS4Wrapper) + controllerStack, ok := icaControllerStack.(porttypes.ICS4Wrapper) + s.Require().True(ok) appVersion, found := controllerStack.GetAppVersion(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) s.Require().True(found) s.Require().Equal(s.path.EndpointA.ChannelConfig.Version, appVersion) @@ -984,10 +985,11 @@ func (s *CallbacksTestSuite) TestOnChanCloseInit() { // We will pass the function call down the icacontroller stack to the icacontroller module // icacontroller stack OnChanCloseInit call order: callbacks -> fee -> icacontroller - icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(icacontrollertypes.SubModuleName) s.Require().True(ok) - controllerStack := icaControllerStack.(porttypes.Middleware) + controllerStack, ok := icaControllerStack.(porttypes.Middleware) + s.Require().True(ok) err := controllerStack.OnChanCloseInit(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) // we just check that this call is passed down to the icacontroller to return an error s.Require().ErrorIs(err, errorsmod.Wrap(ibcerrors.ErrInvalidRequest, "user cannot close channel")) @@ -998,10 +1000,11 @@ func (s *CallbacksTestSuite) TestOnChanCloseConfirm() { // We will pass the function call down the icacontroller stack to the icacontroller module // icacontroller stack OnChanCloseConfirm call order: callbacks -> fee -> icacontroller - icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(icacontrollertypes.SubModuleName) s.Require().True(ok) - controllerStack := icaControllerStack.(porttypes.Middleware) + controllerStack, ok := icaControllerStack.(porttypes.Middleware) + s.Require().True(ok) err := controllerStack.OnChanCloseConfirm(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) // we just check that this call is passed down to the icacontroller s.Require().NoError(err) @@ -1012,7 +1015,7 @@ func (s *CallbacksTestSuite) TestOnRecvPacketAsyncAck() { module, _, err := s.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(s.chainA.GetContext(), ibctesting.MockFeePort) s.Require().NoError(err) - cbs, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := s.chainA.App.GetIBCKeeper().PortKeeper.Route(module) s.Require().True(ok) mockFeeCallbackStack, ok := cbs.(porttypes.Middleware) s.Require().True(ok) diff --git a/modules/apps/callbacks/testing/simapp/app.go b/modules/apps/callbacks/testing/simapp/app.go index 26de8d3e158..db4eee5c2fc 100644 --- a/modules/apps/callbacks/testing/simapp/app.go +++ b/modules/apps/callbacks/testing/simapp/app.go @@ -67,7 +67,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensus "github.com/cosmos/cosmos-sdk/x/consensus" + "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" @@ -118,7 +118,7 @@ import ( ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v8/modules/core" @@ -511,7 +511,12 @@ func NewSimApp( var transferStack porttypes.IBCModule transferStack = transfer.NewIBCModule(app.TransferKeeper) transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) - transferICS4Wrapper := transferStack.(porttypes.ICS4Wrapper) + var transferICS4Wrapper porttypes.ICS4Wrapper + transferICS4Wrapper, ok := transferStack.(porttypes.ICS4Wrapper) + if !ok { + panic(fmt.Errorf("cannot convert %T to %T", transferStack, transferICS4Wrapper)) + } + transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the transfer keeper app.TransferKeeper.WithICS4Wrapper(transferICS4Wrapper) @@ -526,10 +531,17 @@ func NewSimApp( // initialize ICA module with mock module as the authentication module on the controller side var icaControllerStack porttypes.IBCModule icaControllerStack = ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp("", scopedICAMockKeeper)) - app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule) + app.ICAAuthModule, ok = icaControllerStack.(ibcmock.IBCModule) + if !ok { + panic(fmt.Errorf("cannot convert %T to %T", icaControllerStack, app.ICAAuthModule)) + } icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper) icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) - icaICS4Wrapper := icaControllerStack.(porttypes.ICS4Wrapper) + var icaICS4Wrapper porttypes.ICS4Wrapper + icaICS4Wrapper, ok = icaControllerStack.(porttypes.ICS4Wrapper) + if !ok { + panic(fmt.Errorf("cannot convert %T to %T", icaControllerStack, icaICS4Wrapper)) + } icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper app.ICAControllerKeeper.WithICS4Wrapper(icaICS4Wrapper) diff --git a/modules/apps/callbacks/types/callbacks_test.go b/modules/apps/callbacks/types/callbacks_test.go index ccb983a31a8..4521afc0a41 100644 --- a/modules/apps/callbacks/types/callbacks_test.go +++ b/modules/apps/callbacks/types/callbacks_test.go @@ -8,7 +8,7 @@ import ( "github.com/cometbft/cometbft/crypto/secp256k1" "github.com/cosmos/ibc-go/modules/apps/callbacks/types" - transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" ibctesting "github.com/cosmos/ibc-go/v8/testing" diff --git a/modules/apps/transfer/ibc_module_test.go b/modules/apps/transfer/ibc_module_test.go index ad4b0be3861..ee473377227 100644 --- a/modules/apps/transfer/ibc_module_test.go +++ b/modules/apps/transfer/ibc_module_test.go @@ -183,7 +183,7 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { chanCap, err = suite.chainA.App.GetScopedIBCKeeper().NewCapability(suite.chainA.GetContext(), host.ChannelCapabilityPath(ibctesting.TransferPort, path.EndpointA.ChannelID)) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) tc.malleate() // explicitly change fields in channel and testChannel @@ -235,7 +235,7 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.TransferPort) suite.Require().NoError(err) - cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) tc.malleate() // explicitly change fields in channel and testChannel @@ -379,7 +379,7 @@ func (suite *TransferTestSuite) TestOnChanUpgradeTry() { module, _, err := suite.chainB.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainB.GetContext(), types.PortID) suite.Require().NoError(err) - app, ok := suite.chainB.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainB.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) @@ -450,7 +450,7 @@ func (suite *TransferTestSuite) TestOnChanUpgradeAck() { module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), types.PortID) suite.Require().NoError(err) - app, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + app, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) cbs, ok := app.(porttypes.UpgradableModule) diff --git a/modules/apps/transfer/keeper/keeper_test.go b/modules/apps/transfer/keeper/keeper_test.go index 2e164f05c5b..0d0da50c002 100644 --- a/modules/apps/transfer/keeper/keeper_test.go +++ b/modules/apps/transfer/keeper/keeper_test.go @@ -341,13 +341,12 @@ func (suite *KeeperTestSuite) TestWithICS4Wrapper() { // test if the ics4 wrapper is the channel keeper initially ics4Wrapper := suite.chainA.GetSimApp().TransferKeeper.GetICS4Wrapper() - _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + _, isChannelKeeper := ics4Wrapper.(*channelkeeper.Keeper) suite.Require().False(isChannelKeeper) // set the ics4 wrapper to the channel keeper suite.chainA.GetSimApp().TransferKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) ics4Wrapper = suite.chainA.GetSimApp().TransferKeeper.GetICS4Wrapper() - _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) - suite.Require().True(isChannelKeeper) + suite.Require().IsType((*channelkeeper.Keeper)(nil), ics4Wrapper) } diff --git a/modules/apps/transfer/types/transfer_authorization_test.go b/modules/apps/transfer/types/transfer_authorization_test.go index 781e5d68e3d..c5d883e5198 100644 --- a/modules/apps/transfer/types/transfer_authorization_test.go +++ b/modules/apps/transfer/types/transfer_authorization_test.go @@ -4,7 +4,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - authz "github.com/cosmos/cosmos-sdk/x/authz" + "github.com/cosmos/cosmos-sdk/x/authz" "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibctesting "github.com/cosmos/ibc-go/v8/testing" diff --git a/modules/core/02-client/genesis.go b/modules/core/02-client/genesis.go index 3127d665d55..d89cc5073ed 100644 --- a/modules/core/02-client/genesis.go +++ b/modules/core/02-client/genesis.go @@ -13,7 +13,7 @@ import ( // InitGenesis initializes the ibc client submodule's state from a provided genesis // state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { +func InitGenesis(ctx sdk.Context, k *keeper.Keeper, gs types.GenesisState) { if err := gs.Params.Validate(); err != nil { panic(fmt.Errorf("invalid ibc client genesis state parameters: %v", err)) } @@ -61,7 +61,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { // ExportGenesis returns the ibc client submodule's exported genesis. // NOTE: the export process is not optimized, it will iterate three // times over the 02-client sub-store. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) types.GenesisState { genClients := k.GetAllGenesisClients(ctx) clientsMetadata, err := k.GetAllClientMetadata(ctx, genClients) if err != nil { diff --git a/modules/core/02-client/keeper/client.go b/modules/core/02-client/keeper/client.go index 4711491faae..07adefa2e53 100644 --- a/modules/core/02-client/keeper/client.go +++ b/modules/core/02-client/keeper/client.go @@ -17,7 +17,7 @@ import ( // client identifier. The light client module is responsible for setting any client-specific data in the store // via the Initialize method. This includes the client state, initial consensus state and any associated // metadata. The generated client identifier will be returned if a client was successfully initialized. -func (k Keeper) CreateClient(ctx sdk.Context, clientType string, clientState, consensusState []byte) (string, error) { +func (k *Keeper) CreateClient(ctx sdk.Context, clientType string, clientState, consensusState []byte) (string, error) { if clientType == exported.Localhost { return "", errorsmod.Wrapf(types.ErrInvalidClientType, "cannot create client of type: %s", clientType) } @@ -60,7 +60,7 @@ func (k Keeper) CreateClient(ctx sdk.Context, clientType string, clientState, co } // UpdateClient updates the consensus state and the state root from a provided header. -func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, clientMsg exported.ClientMessage) error { +func (k *Keeper) UpdateClient(ctx sdk.Context, clientID string, clientMsg exported.ClientMessage) error { if status := k.GetClientStatus(ctx, clientID); status != exported.Active { return errorsmod.Wrapf(types.ErrClientNotActive, "cannot update client (%s) with status %s", clientID, status) } @@ -122,7 +122,7 @@ func (k Keeper) UpdateClient(ctx sdk.Context, clientID string, clientMsg exporte // UpgradeClient upgrades the client to a new client state if this new client was committed to // by the old client at the specified upgrade height -func (k Keeper) UpgradeClient( +func (k *Keeper) UpgradeClient( ctx sdk.Context, clientID string, upgradedClient, upgradedConsState, upgradeClientProof, upgradeConsensusStateProof []byte, @@ -167,7 +167,7 @@ func (k Keeper) UpgradeClient( // is responsible for validating the parameters of the substitute (ensuring they match the subject's parameters) // as well as copying the necessary consensus states from the substitute to the subject client store. // The substitute must be Active and the subject must not be Active. -func (k Keeper) RecoverClient(ctx sdk.Context, subjectClientID, substituteClientID string) error { +func (k *Keeper) RecoverClient(ctx sdk.Context, subjectClientID, substituteClientID string) error { if status := k.GetClientStatus(ctx, subjectClientID); status == exported.Active { return errorsmod.Wrapf(types.ErrInvalidRecoveryClient, "cannot recover %s subject client", exported.Active) } diff --git a/modules/core/02-client/keeper/client_test.go b/modules/core/02-client/keeper/client_test.go index 446fe195f03..847bdee6968 100644 --- a/modules/core/02-client/keeper/client_test.go +++ b/modules/core/02-client/keeper/client_test.go @@ -216,13 +216,15 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientConsensusState(suite.chainA.GetContext(), clientID, updateHeader.GetHeight(), conflictConsState) }, true, true}, {"misbehaviour detection: monotonic time violation", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientID := path.EndpointA.ClientID trustedHeight := clientState.LatestHeight // store intermediate consensus state at a time greater than updateHeader time // this will break time monotonicity - incrementedClientHeight := clientState.LatestHeight.Increment().(clienttypes.Height) + incrementedClientHeight, ok := clientState.LatestHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) intermediateConsState := &ibctm.ConsensusState{ Timestamp: suite.coordinator.CurrentTime.Add(2 * time.Hour), NextValidatorsHash: suite.chainB.Vals.Hash(), @@ -238,7 +240,8 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { updateHeader = createFutureUpdateFn(trustedHeight) }, true, true}, {"client state not found", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) updateHeader = createFutureUpdateFn(clientState.LatestHeight) path.EndpointA.ClientID = ibctesting.InvalidID @@ -247,21 +250,25 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { clientState := path.EndpointA.GetClientState() tmClient, ok := clientState.(*ibctm.ClientState) suite.Require().True(ok) - tmClient.LatestHeight = tmClient.LatestHeight.Increment().(clienttypes.Height) + tmClient.LatestHeight, ok = tmClient.LatestHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), path.EndpointA.ClientID, clientState) updateHeader = createFutureUpdateFn(tmClient.LatestHeight) }, false, false}, {"client is not active", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + 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}, {"invalid header", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) updateHeader = createFutureUpdateFn(clientState.LatestHeight) - updateHeader.TrustedHeight = updateHeader.TrustedHeight.Increment().(clienttypes.Height) + updateHeader.TrustedHeight, ok = updateHeader.TrustedHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) }, false, false}, } @@ -275,8 +282,10 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { tc.malleate() var clientState *ibctm.ClientState + var ok bool if tc.expPass { - clientState = path.EndpointA.GetClientState().(*ibctm.ClientState) + 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) @@ -284,7 +293,8 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { if tc.expPass { suite.Require().NoError(err, err) - newClientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + newClientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) if tc.expFreeze { suite.Require().True(!newClientState.FrozenHeight.IsZero(), "client did not freeze after conflicting header was submitted to UpdateClient") @@ -463,7 +473,8 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { path = ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupClients() - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) revisionNumber := clienttypes.ParseChainID(clientState.ChainId) newChainID, err := clienttypes.SetRevisionNumber(clientState.ChainId, revisionNumber+1) @@ -589,7 +600,8 @@ func (suite *KeeperTestSuite) TestRecoverClient() { func() { tmClientState, ok := subjectClientState.(*ibctm.ClientState) suite.Require().True(ok) - tmClientState.LatestHeight = substituteClientState.(*ibctm.ClientState).LatestHeight.Increment().(clienttypes.Height) + tmClientState.LatestHeight, ok = substituteClientState.(*ibctm.ClientState).LatestHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), subject, tmClientState) }, clienttypes.ErrInvalidHeight, @@ -665,7 +677,8 @@ func (suite *KeeperTestSuite) TestRecoverClient() { // Assert that client status is now Active clientStore := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), subjectPath.EndpointA.ClientID) - tmClientState := subjectPath.EndpointA.GetClientState().(*ibctm.ClientState) + tmClientState, ok := subjectPath.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) suite.Require().Equal(tmClientState.Status(suite.chainA.GetContext(), clientStore, suite.chainA.App.AppCodec()), exported.Active) } else { diff --git a/modules/core/02-client/keeper/encoding.go b/modules/core/02-client/keeper/encoding.go index 63191d8a3d8..19a927165e2 100644 --- a/modules/core/02-client/keeper/encoding.go +++ b/modules/core/02-client/keeper/encoding.go @@ -7,36 +7,36 @@ import ( // UnmarshalClientState attempts to decode and return an ClientState object from // raw encoded bytes. -func (k Keeper) UnmarshalClientState(bz []byte) (exported.ClientState, error) { +func (k *Keeper) UnmarshalClientState(bz []byte) (exported.ClientState, error) { return types.UnmarshalClientState(k.cdc, bz) } // MustUnmarshalClientState attempts to decode and return an ClientState object from // raw encoded bytes. It panics on error. -func (k Keeper) MustUnmarshalClientState(bz []byte) exported.ClientState { +func (k *Keeper) MustUnmarshalClientState(bz []byte) exported.ClientState { return types.MustUnmarshalClientState(k.cdc, bz) } // UnmarshalConsensusState attempts to decode and return an ConsensusState object from // raw encoded bytes. -func (k Keeper) UnmarshalConsensusState(bz []byte) (exported.ConsensusState, error) { +func (k *Keeper) UnmarshalConsensusState(bz []byte) (exported.ConsensusState, error) { return types.UnmarshalConsensusState(k.cdc, bz) } // MustUnmarshalConsensusState attempts to decode and return an ConsensusState object from // raw encoded bytes. It panics on error. -func (k Keeper) MustUnmarshalConsensusState(bz []byte) exported.ConsensusState { +func (k *Keeper) MustUnmarshalConsensusState(bz []byte) exported.ConsensusState { return types.MustUnmarshalConsensusState(k.cdc, bz) } // MustMarshalClientState attempts to encode an ClientState object and returns the // raw encoded bytes. It panics on error. -func (k Keeper) MustMarshalClientState(clientState exported.ClientState) []byte { +func (k *Keeper) MustMarshalClientState(clientState exported.ClientState) []byte { return types.MustMarshalClientState(k.cdc, clientState) } // MustMarshalConsensusState attempts to encode an ConsensusState object and returns the // raw encoded bytes. It panics on error. -func (k Keeper) MustMarshalConsensusState(consensusState exported.ConsensusState) []byte { +func (k *Keeper) MustMarshalConsensusState(consensusState exported.ConsensusState) []byte { return types.MustMarshalConsensusState(k.cdc, consensusState) } diff --git a/modules/core/02-client/keeper/events_test.go b/modules/core/02-client/keeper/events_test.go index 45423239e98..26252de916e 100644 --- a/modules/core/02-client/keeper/events_test.go +++ b/modules/core/02-client/keeper/events_test.go @@ -18,7 +18,8 @@ func (suite *KeeperTestSuite) TestMsgCreateClientEvents() { tmConfig, ok := path.EndpointA.ClientConfig.(*ibctesting.TendermintConfig) suite.Require().True(ok) - height := path.EndpointA.Counterparty.Chain.LatestCommittedHeader.GetHeight().(clienttypes.Height) + height, ok := path.EndpointA.Counterparty.Chain.LatestCommittedHeader.GetHeight().(clienttypes.Height) + suite.Require().True(ok) clientState := ibctm.NewClientState( path.EndpointA.Counterparty.Chain.ChainID, tmConfig.TrustLevel, tmConfig.TrustingPeriod, tmConfig.UnbondingPeriod, tmConfig.MaxClockDrift, height, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath) @@ -56,7 +57,8 @@ func (suite *KeeperTestSuite) TestMsgUpdateClientEvents() { suite.chainB.Coordinator.CommitBlock(suite.chainB) - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) trustedHeight := clientState.LatestHeight header, err := suite.chainB.IBCClientHeader(suite.chainB.LatestCommittedHeader, trustedHeight) suite.Require().NoError(err) diff --git a/modules/core/02-client/keeper/grpc_query.go b/modules/core/02-client/keeper/grpc_query.go index a94ff45dc33..41c52f7c7d6 100644 --- a/modules/core/02-client/keeper/grpc_query.go +++ b/modules/core/02-client/keeper/grpc_query.go @@ -25,7 +25,7 @@ import ( var _ types.QueryServer = (*Keeper)(nil) // ClientState implements the Query/ClientState gRPC method -func (k Keeper) ClientState(c context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error) { +func (k *Keeper) ClientState(c context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -56,7 +56,7 @@ func (k Keeper) ClientState(c context.Context, req *types.QueryClientStateReques } // ClientStates implements the Query/ClientStates gRPC method -func (k Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error) { +func (k *Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -100,7 +100,7 @@ func (k Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequ } // ConsensusState implements the Query/ConsensusState gRPC method -func (k Keeper) ConsensusState(c context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error) { +func (k *Keeper) ConsensusState(c context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -147,7 +147,7 @@ func (k Keeper) ConsensusState(c context.Context, req *types.QueryConsensusState } // ConsensusStates implements the Query/ConsensusStates gRPC method -func (k Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error) { +func (k *Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -191,7 +191,7 @@ func (k Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat } // ConsensusStateHeights implements the Query/ConsensusStateHeights gRPC method -func (k Keeper) ConsensusStateHeights(c context.Context, req *types.QueryConsensusStateHeightsRequest) (*types.QueryConsensusStateHeightsResponse, error) { +func (k *Keeper) ConsensusStateHeights(c context.Context, req *types.QueryConsensusStateHeightsRequest) (*types.QueryConsensusStateHeightsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -230,7 +230,7 @@ func (k Keeper) ConsensusStateHeights(c context.Context, req *types.QueryConsens } // ClientStatus implements the Query/ClientStatus gRPC method -func (k Keeper) ClientStatus(c context.Context, req *types.QueryClientStatusRequest) (*types.QueryClientStatusResponse, error) { +func (k *Keeper) ClientStatus(c context.Context, req *types.QueryClientStatusRequest) (*types.QueryClientStatusResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -248,7 +248,7 @@ func (k Keeper) ClientStatus(c context.Context, req *types.QueryClientStatusRequ } // ClientParams implements the Query/ClientParams gRPC method -func (k Keeper) ClientParams(c context.Context, _ *types.QueryClientParamsRequest) (*types.QueryClientParamsResponse, error) { +func (k *Keeper) ClientParams(c context.Context, _ *types.QueryClientParamsRequest) (*types.QueryClientParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) params := k.GetParams(ctx) @@ -258,7 +258,7 @@ func (k Keeper) ClientParams(c context.Context, _ *types.QueryClientParamsReques } // UpgradedClientState implements the Query/UpgradedClientState gRPC method -func (k Keeper) UpgradedClientState(c context.Context, req *types.QueryUpgradedClientStateRequest) (*types.QueryUpgradedClientStateResponse, error) { +func (k *Keeper) UpgradedClientState(c context.Context, req *types.QueryUpgradedClientStateRequest) (*types.QueryUpgradedClientStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -293,7 +293,7 @@ func (k Keeper) UpgradedClientState(c context.Context, req *types.QueryUpgradedC } // UpgradedConsensusState implements the Query/UpgradedConsensusState gRPC method -func (k Keeper) UpgradedConsensusState(c context.Context, req *types.QueryUpgradedConsensusStateRequest) (*types.QueryUpgradedConsensusStateResponse, error) { +func (k *Keeper) UpgradedConsensusState(c context.Context, req *types.QueryUpgradedConsensusStateRequest) (*types.QueryUpgradedConsensusStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -325,7 +325,7 @@ func (k Keeper) UpgradedConsensusState(c context.Context, req *types.QueryUpgrad // VerifyMembership implements the Query/VerifyMembership gRPC method // NOTE: Any state changes made within this handler are discarded by leveraging a cached context. Gas is consumed for underlying state access. // This gRPC method is intended to be used within the context of the state machine and delegates to light clients to verify proofs. -func (k Keeper) VerifyMembership(c context.Context, req *types.QueryVerifyMembershipRequest) (*types.QueryVerifyMembershipResponse, error) { +func (k *Keeper) VerifyMembership(c context.Context, req *types.QueryVerifyMembershipRequest) (*types.QueryVerifyMembershipResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } diff --git a/modules/core/02-client/keeper/grpc_query_test.go b/modules/core/02-client/keeper/grpc_query_test.go index a2dc1eb3377..2a916d89c8b 100644 --- a/modules/core/02-client/keeper/grpc_query_test.go +++ b/modules/core/02-client/keeper/grpc_query_test.go @@ -344,7 +344,8 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { path := ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupClients() - height1 := path.EndpointA.GetClientLatestHeight().(types.Height) + height1, ok := path.EndpointA.GetClientLatestHeight().(types.Height) + suite.Require().True(ok) expConsensusStates = append( expConsensusStates, types.NewConsensusStateWithHeight( @@ -354,8 +355,8 @@ func (suite *KeeperTestSuite) TestQueryConsensusStates() { err := path.EndpointA.UpdateClient() suite.Require().NoError(err) - - height2 := path.EndpointA.GetClientLatestHeight().(types.Height) + height2, ok := path.EndpointA.GetClientLatestHeight().(types.Height) + suite.Require().True(ok) expConsensusStates = append( expConsensusStates, types.NewConsensusStateWithHeight( @@ -548,10 +549,12 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { func() { path := ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupClients() - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) // increment latest height so no consensus state is stored - clientState.LatestHeight = clientState.LatestHeight.Increment().(types.Height) + clientState.LatestHeight, ok = clientState.LatestHeight.Increment().(types.Height) + suite.Require().True(ok) path.EndpointA.SetClientState(clientState) req = &types.QueryClientStatusRequest{ @@ -565,7 +568,8 @@ func (suite *KeeperTestSuite) TestQueryClientStatus() { func() { path := ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupClients() - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = types.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) @@ -636,7 +640,9 @@ func (suite *KeeperTestSuite) TestQueryUpgradedClientState() { suite.Require().NoError(err) suite.Require().NotNil(resp) - expClientState = clientState.(*ibctm.ClientState) + var ok bool + expClientState, ok = clientState.(*ibctm.ClientState) + suite.Require().True(ok) }, nil, }, diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index ff8a54a7f29..f65f76746a7 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -33,12 +33,12 @@ type Keeper struct { } // NewKeeper creates a new NewKeeper instance -func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace types.ParamSubspace, consensusHost types.ConsensusHost, uk types.UpgradeKeeper) Keeper { +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace types.ParamSubspace, consensusHost types.ConsensusHost, uk types.UpgradeKeeper) *Keeper { router := types.NewRouter(key) localhostModule := localhost.NewLightClientModule(cdc, key) router.AddRoute(exported.Localhost, localhostModule) - return Keeper{ + return &Keeper{ storeKey: key, cdc: cdc, router: router, @@ -54,17 +54,17 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger { } // GetRouter returns the light client module router. -func (k Keeper) GetRouter() *types.Router { +func (k *Keeper) GetRouter() *types.Router { return k.router } // Route returns the light client module for the given client identifier. -func (k Keeper) Route(clientID string) (exported.LightClientModule, bool) { +func (k *Keeper) Route(clientID string) (exported.LightClientModule, bool) { return k.router.GetRoute(clientID) } // CreateLocalhostClient initialises the 09-localhost client state and sets it in state. -func (k Keeper) CreateLocalhostClient(ctx sdk.Context) error { +func (k *Keeper) CreateLocalhostClient(ctx sdk.Context) error { clientModule, found := k.router.GetRoute(exported.LocalhostClientID) if !found { return errorsmod.Wrap(types.ErrRouteNotFound, exported.LocalhostClientID) @@ -74,7 +74,7 @@ func (k Keeper) CreateLocalhostClient(ctx sdk.Context) error { } // UpdateLocalhostClient updates the 09-localhost client to the latest block height and chain ID. -func (k Keeper) UpdateLocalhostClient(ctx sdk.Context, clientState exported.ClientState) []exported.Height { +func (k *Keeper) UpdateLocalhostClient(ctx sdk.Context, clientState exported.ClientState) []exported.Height { clientModule, found := k.router.GetRoute(exported.LocalhostClientID) if !found { panic(errorsmod.Wrap(types.ErrRouteNotFound, exported.LocalhostClientID)) @@ -83,8 +83,8 @@ func (k Keeper) UpdateLocalhostClient(ctx sdk.Context, clientState exported.Clie return clientModule.UpdateState(ctx, exported.LocalhostClientID, nil) } -// SetSelfConsensusHost sets a custom ConsensusHost for self client state and consensus state validation. -func (k *Keeper) SetSelfConsensusHost(consensusHost types.ConsensusHost) { +// SetConsensusHost sets a custom ConsensusHost for self client state and consensus state validation. +func (k *Keeper) SetConsensusHost(consensusHost types.ConsensusHost) { if consensusHost == nil { panic(fmt.Errorf("cannot set a nil self consensus host")) } @@ -93,7 +93,7 @@ func (k *Keeper) SetSelfConsensusHost(consensusHost types.ConsensusHost) { } // GenerateClientIdentifier returns the next client identifier. -func (k Keeper) GenerateClientIdentifier(ctx sdk.Context, clientType string) string { +func (k *Keeper) GenerateClientIdentifier(ctx sdk.Context, clientType string) string { nextClientSeq := k.GetNextClientSequence(ctx) clientID := types.FormatClientIdentifier(clientType, nextClientSeq) @@ -134,13 +134,13 @@ func (k *Keeper) GetClientConsensusState(ctx sdk.Context, clientID string, heigh // SetClientConsensusState sets a ConsensusState to a particular client at the given // height -func (k Keeper) SetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height, consensusState exported.ConsensusState) { +func (k *Keeper) SetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height, consensusState exported.ConsensusState) { store := k.ClientStore(ctx, clientID) store.Set(host.ConsensusStateKey(height), k.MustMarshalConsensusState(consensusState)) } // GetNextClientSequence gets the next client sequence from the store. -func (k Keeper) GetNextClientSequence(ctx sdk.Context) uint64 { +func (k *Keeper) GetNextClientSequence(ctx sdk.Context) uint64 { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.KeyNextClientSequence)) if len(bz) == 0 { @@ -151,7 +151,7 @@ func (k Keeper) GetNextClientSequence(ctx sdk.Context) uint64 { } // SetNextClientSequence sets the next client sequence to the store. -func (k Keeper) SetNextClientSequence(ctx sdk.Context, sequence uint64) { +func (k *Keeper) SetNextClientSequence(ctx sdk.Context, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set([]byte(types.KeyNextClientSequence), bz) @@ -160,7 +160,7 @@ func (k Keeper) SetNextClientSequence(ctx sdk.Context, sequence uint64) { // IterateConsensusStates provides an iterator over all stored consensus states. // objects. For each State object, cb will be called. If the cb returns true, // the iterator will close and stop. -func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, cs types.ConsensusStateWithHeight) bool) { +func (k *Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, cs types.ConsensusStateWithHeight) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, host.KeyClientStorePrefix) @@ -185,7 +185,7 @@ func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, // iterateMetadata provides an iterator over all stored metadata keys in the client store. // For each metadata object, it will perform a callback. -func (k Keeper) iterateMetadata(ctx sdk.Context, cb func(clientID string, key, value []byte) bool) { +func (k *Keeper) iterateMetadata(ctx sdk.Context, cb func(clientID string, key, value []byte) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, host.KeyClientStorePrefix) @@ -220,7 +220,7 @@ func (k Keeper) iterateMetadata(ctx sdk.Context, cb func(clientID string, key, v } // GetAllGenesisClients returns all the clients in state with their client ids returned as IdentifiedClientState -func (k Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStates { +func (k *Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStates { var genClients types.IdentifiedClientStates k.IterateClientStates(ctx, nil, func(clientID string, cs exported.ClientState) bool { genClients = append(genClients, types.NewIdentifiedClientState(clientID, cs)) @@ -233,7 +233,7 @@ func (k Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStat // GetAllClientMetadata will take a list of IdentifiedClientState and return a list // of IdentifiedGenesisMetadata necessary for exporting and importing client metadata // into the client store. -func (k Keeper) GetAllClientMetadata(ctx sdk.Context, genClients []types.IdentifiedClientState) ([]types.IdentifiedGenesisMetadata, error) { +func (k *Keeper) GetAllClientMetadata(ctx sdk.Context, genClients []types.IdentifiedClientState) ([]types.IdentifiedGenesisMetadata, error) { metadataMap := make(map[string][]types.GenesisMetadata) k.iterateMetadata(ctx, func(clientID string, key, value []byte) bool { metadataMap[clientID] = append(metadataMap[clientID], types.NewGenesisMetadata(key, value)) @@ -255,7 +255,7 @@ func (k Keeper) GetAllClientMetadata(ctx sdk.Context, genClients []types.Identif } // SetAllClientMetadata takes a list of IdentifiedGenesisMetadata and stores all of the metadata in the client store at the appropriate paths. -func (k Keeper) SetAllClientMetadata(ctx sdk.Context, genMetadata []types.IdentifiedGenesisMetadata) { +func (k *Keeper) SetAllClientMetadata(ctx sdk.Context, genMetadata []types.IdentifiedGenesisMetadata) { for _, igm := range genMetadata { // create client store store := k.ClientStore(ctx, igm.ClientId) @@ -267,7 +267,7 @@ func (k Keeper) SetAllClientMetadata(ctx sdk.Context, genMetadata []types.Identi } // GetAllConsensusStates returns all stored client consensus states. -func (k Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusStates { +func (k *Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusStates { clientConsStates := make(types.ClientsConsensusStates, 0) mapClientIDToConsStateIdx := make(map[string]int) @@ -293,13 +293,13 @@ func (k Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusSta // HasClientConsensusState returns if keeper has a ConsensusState for a particular // client at the given height -func (k Keeper) HasClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) bool { +func (k *Keeper) HasClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) bool { store := k.ClientStore(ctx, clientID) return store.Has(host.ConsensusStateKey(height)) } // GetLatestClientConsensusState gets the latest ConsensusState stored for a given client -func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) (exported.ConsensusState, bool) { +func (k *Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) (exported.ConsensusState, bool) { clientModule, found := k.router.GetRoute(clientID) if !found { return nil, false @@ -311,7 +311,7 @@ func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) // GetSelfConsensusState introspects the (self) past historical info at a given height // and returns the expected consensus state at that height. // For now, can only retrieve self consensus states for the current revision -func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, error) { +func (k *Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, error) { return k.consensusHost.GetSelfConsensusState(ctx, height) } @@ -319,34 +319,34 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) ( // This function is only used to validate the client state the counterparty stores for this chain. // NOTE: If the client type is not of type Tendermint then delegate to a custom client validator function. // This allows support for non-Tendermint clients, for example 08-wasm clients. -func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error { +func (k *Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error { return k.consensusHost.ValidateSelfClient(ctx, clientState) } // GetUpgradePlan executes the upgrade keeper GetUpgradePlan function. -func (k Keeper) GetUpgradePlan(ctx sdk.Context) (upgradetypes.Plan, error) { +func (k *Keeper) GetUpgradePlan(ctx sdk.Context) (upgradetypes.Plan, error) { return k.upgradeKeeper.GetUpgradePlan(ctx) } // GetUpgradedClient executes the upgrade keeper GetUpgradeClient function. -func (k Keeper) GetUpgradedClient(ctx sdk.Context, planHeight int64) ([]byte, error) { +func (k *Keeper) GetUpgradedClient(ctx sdk.Context, planHeight int64) ([]byte, error) { return k.upgradeKeeper.GetUpgradedClient(ctx, planHeight) } // GetUpgradedConsensusState returns the upgraded consensus state -func (k Keeper) GetUpgradedConsensusState(ctx sdk.Context, planHeight int64) ([]byte, error) { +func (k *Keeper) GetUpgradedConsensusState(ctx sdk.Context, planHeight int64) ([]byte, error) { return k.upgradeKeeper.GetUpgradedConsensusState(ctx, planHeight) } // SetUpgradedConsensusState executes the upgrade keeper SetUpgradedConsensusState function. -func (k Keeper) SetUpgradedConsensusState(ctx sdk.Context, planHeight int64, bz []byte) error { +func (k *Keeper) SetUpgradedConsensusState(ctx sdk.Context, planHeight int64, bz []byte) error { return k.upgradeKeeper.SetUpgradedConsensusState(ctx, planHeight, bz) } // IterateClientStates provides an iterator over all stored ibc ClientState // objects using the provided store prefix. For each ClientState object, cb will be called. If the cb returns true, // the iterator will close and stop. -func (k Keeper) IterateClientStates(ctx sdk.Context, storePrefix []byte, cb func(clientID string, cs exported.ClientState) bool) { +func (k *Keeper) IterateClientStates(ctx sdk.Context, storePrefix []byte, cb func(clientID string, cs exported.ClientState) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, host.PrefixedClientStoreKey(storePrefix)) @@ -368,7 +368,7 @@ func (k Keeper) IterateClientStates(ctx sdk.Context, storePrefix []byte, cb func } // GetAllClients returns all stored light client State objects. -func (k Keeper) GetAllClients(ctx sdk.Context) []exported.ClientState { +func (k *Keeper) GetAllClients(ctx sdk.Context) []exported.ClientState { var states []exported.ClientState k.IterateClientStates(ctx, nil, func(_ string, state exported.ClientState) bool { states = append(states, state) @@ -380,14 +380,14 @@ func (k Keeper) GetAllClients(ctx sdk.Context) []exported.ClientState { // ClientStore returns isolated prefix store for each client so they can read/write in separate // namespace without being able to read/write other client's data -func (k Keeper) ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore { +func (k *Keeper) ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore { clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, clientID)) return prefix.NewStore(ctx.KVStore(k.storeKey), clientPrefix) } // GetClientStatus returns the status for a client state given a client identifier. If the client type is not in the allowed // clients param field, Unauthorized is returned, otherwise the client state status is returned. -func (k Keeper) GetClientStatus(ctx sdk.Context, clientID string) exported.Status { +func (k *Keeper) GetClientStatus(ctx sdk.Context, clientID string) exported.Status { clientType, _, err := types.ParseClientIdentifier(clientID) if err != nil { return exported.Unauthorized @@ -407,7 +407,7 @@ func (k Keeper) GetClientStatus(ctx sdk.Context, clientID string) exported.Statu // GetClientLatestHeight returns the latest height of a client state for a given client identifier. If the client type is not in the allowed // clients param field, a zero value height is returned, otherwise the client state latest height is returned. -func (k Keeper) GetClientLatestHeight(ctx sdk.Context, clientID string) types.Height { +func (k *Keeper) GetClientLatestHeight(ctx sdk.Context, clientID string) types.Height { clientType, _, err := types.ParseClientIdentifier(clientID) if err != nil { return types.ZeroHeight() @@ -422,11 +422,16 @@ func (k Keeper) GetClientLatestHeight(ctx sdk.Context, clientID string) types.He return types.ZeroHeight() } - return clientModule.LatestHeight(ctx, clientID).(types.Height) + var latestHeight types.Height + latestHeight, ok := clientModule.LatestHeight(ctx, clientID).(types.Height) + if !ok { + panic(fmt.Errorf("cannot convert %T to %T", clientModule.LatestHeight, latestHeight)) + } + return latestHeight } // GetClientTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the given height. -func (k Keeper) GetClientTimestampAtHeight(ctx sdk.Context, clientID string, height exported.Height) (uint64, error) { +func (k *Keeper) GetClientTimestampAtHeight(ctx sdk.Context, clientID string, height exported.Height) (uint64, error) { clientType, _, err := types.ParseClientIdentifier(clientID) if err != nil { return 0, errorsmod.Wrapf(err, "clientID (%s)", clientID) @@ -445,7 +450,7 @@ func (k Keeper) GetClientTimestampAtHeight(ctx sdk.Context, clientID string, hei } // GetParams returns the total set of ibc-client parameters. -func (k Keeper) GetParams(ctx sdk.Context) types.Params { +func (k *Keeper) GetParams(ctx sdk.Context) types.Params { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.ParamsKey)) if bz == nil { // only panic on unset params and not on empty params @@ -458,14 +463,14 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { } // SetParams sets the total set of ibc-client parameters. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { +func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) store.Set([]byte(types.ParamsKey), bz) } // ScheduleIBCSoftwareUpgrade schedules an upgrade for the IBC client. -func (k Keeper) ScheduleIBCSoftwareUpgrade(ctx sdk.Context, plan upgradetypes.Plan, upgradedClientState exported.ClientState) error { +func (k *Keeper) ScheduleIBCSoftwareUpgrade(ctx sdk.Context, plan upgradetypes.Plan, upgradedClientState exported.ClientState) error { // zero out any custom fields before setting cs, ok := upgradedClientState.(*ibctm.ClientState) if !ok { diff --git a/modules/core/02-client/keeper/migrations.go b/modules/core/02-client/keeper/migrations.go index 73bee079231..cefdd5da0fc 100644 --- a/modules/core/02-client/keeper/migrations.go +++ b/modules/core/02-client/keeper/migrations.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v7 "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" + "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" ) diff --git a/modules/core/02-client/migrations/v7/genesis_test.go b/modules/core/02-client/migrations/v7/genesis_test.go index 944e579892f..acb409ad04a 100644 --- a/modules/core/02-client/migrations/v7/genesis_test.go +++ b/modules/core/02-client/migrations/v7/genesis_test.go @@ -7,7 +7,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" - v7 "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" + "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" @@ -33,7 +33,7 @@ func (suite *MigrationsV7TestSuite) TestMigrateGenesisSolomachine() { solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, ibctesting.DefaultSolomachineClientID, "testing", 1) solomachineMulti := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-1", "testing", 4) - clientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), *suite.chainA.App.GetIBCKeeper().ClientKeeper) + clientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.GetIBCKeeper().ClientKeeper) // manually generate old proto buf definitions and set in genesis // NOTE: we cannot use 'ExportGenesis' for the solo machines since we are @@ -67,7 +67,8 @@ func (suite *MigrationsV7TestSuite) TestMigrateGenesisSolomachine() { // set in store for ease of determining expected genesis clientStore := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), sm.ClientID) - cdc := suite.chainA.App.AppCodec().(*codec.ProtoCodec) + cdc, ok := suite.chainA.App.AppCodec().(*codec.ProtoCodec) + suite.Require().True(ok) v7.RegisterInterfaces(cdc.InterfaceRegistry()) bz, err := cdc.MarshalInterface(legacyClientState) @@ -108,7 +109,7 @@ func (suite *MigrationsV7TestSuite) TestMigrateGenesisSolomachine() { // NOTE: tendermint clients are not pruned in genesis so the test should not have expired tendermint clients err := v7.MigrateStore(suite.chainA.GetContext(), suite.chainA.GetSimApp().GetKey(ibcexported.StoreKey), suite.chainA.App.AppCodec(), suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) suite.Require().NoError(err) - expectedClientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), *suite.chainA.App.GetIBCKeeper().ClientKeeper) + expectedClientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.GetIBCKeeper().ClientKeeper) cdc, ok := suite.chainA.App.AppCodec().(codec.ProtoCodecMarshaler) suite.Require().True(ok) diff --git a/modules/core/02-client/migrations/v7/localhost_test.go b/modules/core/02-client/migrations/v7/localhost_test.go index 57b604b09cd..1a6d657477c 100644 --- a/modules/core/02-client/migrations/v7/localhost_test.go +++ b/modules/core/02-client/migrations/v7/localhost_test.go @@ -1,7 +1,7 @@ package v7_test import ( - v7 "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" + "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" "github.com/cosmos/ibc-go/v8/modules/core/exported" ) diff --git a/modules/core/02-client/migrations/v7/store_test.go b/modules/core/02-client/migrations/v7/store_test.go index b0a2ae934e6..9ef3d995980 100644 --- a/modules/core/02-client/migrations/v7/store_test.go +++ b/modules/core/02-client/migrations/v7/store_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" - v7 "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" + "github.com/cosmos/ibc-go/v8/modules/core/02-client/migrations/v7" "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" @@ -104,7 +104,8 @@ func (suite *MigrationsV7TestSuite) createSolomachineClients(solomachines []*ibc AllowUpdateAfterProposal: true, } - cdc := suite.chainA.App.AppCodec().(*codec.ProtoCodec) + cdc, ok := suite.chainA.App.AppCodec().(*codec.ProtoCodec) + suite.Require().True(ok) v7.RegisterInterfaces(cdc.InterfaceRegistry()) bz, err := cdc.MarshalInterface(legacyClientState) diff --git a/modules/core/02-client/types/client.go b/modules/core/02-client/types/client.go index 2b1cb965b85..b38dc3370ea 100644 --- a/modules/core/02-client/types/client.go +++ b/modules/core/02-client/types/client.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" diff --git a/modules/core/02-client/types/client_test.go b/modules/core/02-client/types/client_test.go index 960f8e785e9..19514ea7f36 100644 --- a/modules/core/02-client/types/client_test.go +++ b/modules/core/02-client/types/client_test.go @@ -27,7 +27,8 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { path := ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupClients() - latestHeight := path.EndpointA.GetClientLatestHeight().(types.Height) + latestHeight, ok := path.EndpointA.GetClientLatestHeight().(types.Height) + suite.Require().True(ok) consensusState, ok := suite.chainA.GetConsensusState(path.EndpointA.ClientID, latestHeight) suite.Require().True(ok) diff --git a/modules/core/02-client/types/codec.go b/modules/core/02-client/types/codec.go index 835b641e7cf..e70c0682300 100644 --- a/modules/core/02-client/types/codec.go +++ b/modules/core/02-client/types/codec.go @@ -1,7 +1,7 @@ package types import ( - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" errorsmod "cosmossdk.io/errors" diff --git a/modules/core/02-client/types/genesis_test.go b/modules/core/02-client/types/genesis_test.go index 2a91d94b764..ab9a5c18150 100644 --- a/modules/core/02-client/types/genesis_test.go +++ b/modules/core/02-client/types/genesis_test.go @@ -32,7 +32,7 @@ func (suite *TypesTestSuite) TestMarshalGenesisState() { err := path.EndpointA.UpdateClient() suite.Require().NoError(err) - genesis := client.ExportGenesis(suite.chainA.GetContext(), *suite.chainA.App.GetIBCKeeper().ClientKeeper) + genesis := client.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.GetIBCKeeper().ClientKeeper) bz, err := cdc.MarshalJSON(&genesis) suite.Require().NoError(err) diff --git a/modules/core/02-client/types/legacy_proposal_test.go b/modules/core/02-client/types/legacy_proposal_test.go index a2684265a4f..a3724616edd 100644 --- a/modules/core/02-client/types/legacy_proposal_test.go +++ b/modules/core/02-client/types/legacy_proposal_test.go @@ -74,7 +74,8 @@ func (suite *TypesTestSuite) TestMarshalClientUpdateProposalProposal() { cdc := codec.NewProtoCodec(ir) // marshal message - content := proposal.(*types.ClientUpdateProposal) + content, ok := proposal.(*types.ClientUpdateProposal) + suite.Require().True(ok) bz, err := cdc.MarshalJSON(content) suite.Require().NoError(err) diff --git a/modules/core/03-connection/genesis.go b/modules/core/03-connection/genesis.go index fd315407664..46f214719dd 100644 --- a/modules/core/03-connection/genesis.go +++ b/modules/core/03-connection/genesis.go @@ -9,7 +9,7 @@ import ( // InitGenesis initializes the ibc connection submodule's state from a provided genesis // state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { +func InitGenesis(ctx sdk.Context, k *keeper.Keeper, gs types.GenesisState) { for _, connection := range gs.Connections { conn := types.NewConnectionEnd(connection.State, connection.ClientId, connection.Counterparty, connection.Versions, connection.DelayPeriod) k.SetConnection(ctx, connection.Id, conn) @@ -24,7 +24,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { } // ExportGenesis returns the ibc connection submodule's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) types.GenesisState { return types.GenesisState{ Connections: k.GetAllConnections(ctx), ClientConnectionPaths: k.GetAllClientConnectionPaths(ctx), diff --git a/modules/core/03-connection/keeper/grpc_query.go b/modules/core/03-connection/keeper/grpc_query.go index 1c9d7aef311..5832b1b517b 100644 --- a/modules/core/03-connection/keeper/grpc_query.go +++ b/modules/core/03-connection/keeper/grpc_query.go @@ -20,7 +20,7 @@ import ( var _ types.QueryServer = (*Keeper)(nil) // Connection implements the Query/Connection gRPC method -func (k Keeper) Connection(c context.Context, req *types.QueryConnectionRequest) (*types.QueryConnectionResponse, error) { +func (k *Keeper) Connection(c context.Context, req *types.QueryConnectionRequest) (*types.QueryConnectionResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -45,7 +45,7 @@ func (k Keeper) Connection(c context.Context, req *types.QueryConnectionRequest) } // Connections implements the Query/Connections gRPC method -func (k Keeper) Connections(c context.Context, req *types.QueryConnectionsRequest) (*types.QueryConnectionsResponse, error) { +func (k *Keeper) Connections(c context.Context, req *types.QueryConnectionsRequest) (*types.QueryConnectionsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -82,7 +82,7 @@ func (k Keeper) Connections(c context.Context, req *types.QueryConnectionsReques } // ClientConnections implements the Query/ClientConnections gRPC method -func (k Keeper) ClientConnections(c context.Context, req *types.QueryClientConnectionsRequest) (*types.QueryClientConnectionsResponse, error) { +func (k *Keeper) ClientConnections(c context.Context, req *types.QueryClientConnectionsRequest) (*types.QueryClientConnectionsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -107,7 +107,7 @@ func (k Keeper) ClientConnections(c context.Context, req *types.QueryClientConne } // ConnectionClientState implements the Query/ConnectionClientState gRPC method -func (k Keeper) ConnectionClientState(c context.Context, req *types.QueryConnectionClientStateRequest) (*types.QueryConnectionClientStateResponse, error) { +func (k *Keeper) ConnectionClientState(c context.Context, req *types.QueryConnectionClientStateRequest) (*types.QueryConnectionClientStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -141,7 +141,7 @@ func (k Keeper) ConnectionClientState(c context.Context, req *types.QueryConnect } // ConnectionConsensusState implements the Query/ConnectionConsensusState gRPC method -func (k Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConnectionConsensusStateRequest) (*types.QueryConnectionConsensusStateResponse, error) { +func (k *Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConnectionConsensusStateRequest) (*types.QueryConnectionConsensusStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -179,7 +179,7 @@ func (k Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConn } // ConnectionParams implements the Query/ConnectionParams gRPC method. -func (k Keeper) ConnectionParams(c context.Context, req *types.QueryConnectionParamsRequest) (*types.QueryConnectionParamsResponse, error) { +func (k *Keeper) ConnectionParams(c context.Context, req *types.QueryConnectionParamsRequest) (*types.QueryConnectionParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) params := k.GetParams(ctx) diff --git a/modules/core/03-connection/keeper/grpc_query_test.go b/modules/core/03-connection/keeper/grpc_query_test.go index 694ca794379..3ffdee2eef8 100644 --- a/modules/core/03-connection/keeper/grpc_query_test.go +++ b/modules/core/03-connection/keeper/grpc_query_test.go @@ -412,7 +412,8 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { path := ibctesting.NewPath(suite.chainA, suite.chainB) path.SetupConnections() - clientHeight := path.EndpointA.GetClientLatestHeight().(clienttypes.Height) + clientHeight, ok := path.EndpointA.GetClientLatestHeight().(clienttypes.Height) + suite.Require().True(ok) expConsensusState, _ = suite.chainA.GetConsensusState(path.EndpointA.ClientID, clientHeight) suite.Require().NotNil(expConsensusState) expClientID = path.EndpointA.ClientID diff --git a/modules/core/03-connection/keeper/handshake.go b/modules/core/03-connection/keeper/handshake.go index b85ccd1e68e..8fd698ac91a 100644 --- a/modules/core/03-connection/keeper/handshake.go +++ b/modules/core/03-connection/keeper/handshake.go @@ -18,7 +18,7 @@ import ( // // NOTE: Msg validation verifies the supplied identifiers and ensures that the counterparty // connection identifier is empty. -func (k Keeper) ConnOpenInit( +func (k *Keeper) ConnOpenInit( ctx sdk.Context, clientID string, counterparty types.Counterparty, // counterpartyPrefix, counterpartyClientIdentifier @@ -62,7 +62,7 @@ func (k Keeper) ConnOpenInit( // NOTE: // - Here chain A acts as the counterparty // - Identifiers are checked on msg validation -func (k Keeper) ConnOpenTry( +func (k *Keeper) ConnOpenTry( ctx sdk.Context, counterparty types.Counterparty, // counterpartyConnectionIdentifier, counterpartyPrefix and counterpartyClientIdentifier delayPeriod uint64, @@ -155,7 +155,7 @@ func (k Keeper) ConnOpenTry( // to chain A (this code is executed on chain A). // // NOTE: Identifiers are checked on msg validation. -func (k Keeper) ConnOpenAck( +func (k *Keeper) ConnOpenAck( ctx sdk.Context, connectionID string, clientState exported.ClientState, // client state for chainA on chainB @@ -253,7 +253,7 @@ func (k Keeper) ConnOpenAck( // which the connection is open on both chains (this code is executed on chain B). // // NOTE: Identifiers are checked on msg validation. -func (k Keeper) ConnOpenConfirm( +func (k *Keeper) ConnOpenConfirm( ctx sdk.Context, connectionID string, ackProof []byte, // proof that connection opened on ChainA during ConnOpenAck diff --git a/modules/core/03-connection/keeper/handshake_test.go b/modules/core/03-connection/keeper/handshake_test.go index 4b27757e50e..77ce7f3f685 100644 --- a/modules/core/03-connection/keeper/handshake_test.go +++ b/modules/core/03-connection/keeper/handshake_test.go @@ -200,7 +200,8 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { // modify counterparty client without setting in store so it still passes validate but fails proof verification tmClient, ok := counterpartyClient.(*ibctm.ClientState) suite.Require().True(ok) - tmClient.LatestHeight = tmClient.LatestHeight.Increment().(clienttypes.Height) + tmClient.LatestHeight, ok = tmClient.LatestHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) }, false}, {"consensus state verification failed", func() { // retrieve client state of chainA to pass as counterpartyClient @@ -232,7 +233,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { }, } - suite.chainB.App.GetIBCKeeper().ClientKeeper.SetSelfConsensusHost(&mockValidator) + suite.chainB.App.GetIBCKeeper().SetConsensusHost(&mockValidator) }, false}, } @@ -460,7 +461,8 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { // modify counterparty client without setting in store so it still passes validate but fails proof verification tmClient, ok := counterpartyClient.(*ibctm.ClientState) suite.Require().True(ok) - tmClient.LatestHeight = tmClient.LatestHeight.Increment().(clienttypes.Height) + tmClient.LatestHeight, ok = tmClient.LatestHeight.Increment().(clienttypes.Height) + suite.Require().True(ok) err = path.EndpointB.ConnOpenTry() suite.Require().NoError(err) diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index f7b787854fb..5bbfd783fd5 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -29,8 +29,8 @@ type Keeper struct { } // NewKeeper creates a new IBC connection Keeper instance -func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace types.ParamSubspace, ck types.ClientKeeper) Keeper { - return Keeper{ +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace types.ParamSubspace, ck types.ClientKeeper) *Keeper { + return &Keeper{ storeKey: key, cdc: cdc, legacySubspace: legacySubspace, @@ -45,12 +45,12 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger { // GetCommitmentPrefix returns the IBC connection store prefix as a commitment // Prefix -func (k Keeper) GetCommitmentPrefix() exported.Prefix { +func (k *Keeper) GetCommitmentPrefix() exported.Prefix { return commitmenttypes.NewMerklePrefix([]byte(k.storeKey.Name())) } // GenerateConnectionIdentifier returns the next connection identifier. -func (k Keeper) GenerateConnectionIdentifier(ctx sdk.Context) string { +func (k *Keeper) GenerateConnectionIdentifier(ctx sdk.Context) string { nextConnSeq := k.GetNextConnectionSequence(ctx) connectionID := types.FormatConnectionIdentifier(nextConnSeq) @@ -60,7 +60,7 @@ func (k Keeper) GenerateConnectionIdentifier(ctx sdk.Context) string { } // GetConnection returns a connection with a particular identifier -func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.ConnectionEnd, bool) { +func (k *Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.ConnectionEnd, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ConnectionKey(connectionID)) if len(bz) == 0 { @@ -75,13 +75,13 @@ func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (types.Conne // HasConnection returns a true if the connection with the given identifier // exists in the store. -func (k Keeper) HasConnection(ctx sdk.Context, connectionID string) bool { +func (k *Keeper) HasConnection(ctx sdk.Context, connectionID string) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.ConnectionKey(connectionID)) } // SetConnection sets a connection to the store -func (k Keeper) SetConnection(ctx sdk.Context, connectionID string, connection types.ConnectionEnd) { +func (k *Keeper) SetConnection(ctx sdk.Context, connectionID string, connection types.ConnectionEnd) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&connection) store.Set(host.ConnectionKey(connectionID), bz) @@ -89,7 +89,7 @@ func (k Keeper) SetConnection(ctx sdk.Context, connectionID string, connection t // GetClientConnectionPaths returns all the connection paths stored under a // particular client -func (k Keeper) GetClientConnectionPaths(ctx sdk.Context, clientID string) ([]string, bool) { +func (k *Keeper) GetClientConnectionPaths(ctx sdk.Context, clientID string) ([]string, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ClientConnectionsKey(clientID)) if len(bz) == 0 { @@ -102,7 +102,7 @@ func (k Keeper) GetClientConnectionPaths(ctx sdk.Context, clientID string) ([]st } // SetClientConnectionPaths sets the connections paths for client -func (k Keeper) SetClientConnectionPaths(ctx sdk.Context, clientID string, paths []string) { +func (k *Keeper) SetClientConnectionPaths(ctx sdk.Context, clientID string, paths []string) { store := ctx.KVStore(k.storeKey) clientPaths := types.ClientPaths{Paths: paths} bz := k.cdc.MustMarshal(&clientPaths) @@ -110,7 +110,7 @@ func (k Keeper) SetClientConnectionPaths(ctx sdk.Context, clientID string, paths } // GetNextConnectionSequence gets the next connection sequence from the store. -func (k Keeper) GetNextConnectionSequence(ctx sdk.Context) uint64 { +func (k *Keeper) GetNextConnectionSequence(ctx sdk.Context) uint64 { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.KeyNextConnectionSequence)) if len(bz) == 0 { @@ -121,7 +121,7 @@ func (k Keeper) GetNextConnectionSequence(ctx sdk.Context) uint64 { } // SetNextConnectionSequence sets the next connection sequence to the store. -func (k Keeper) SetNextConnectionSequence(ctx sdk.Context, sequence uint64) { +func (k *Keeper) SetNextConnectionSequence(ctx sdk.Context, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set([]byte(types.KeyNextConnectionSequence), bz) @@ -130,7 +130,7 @@ func (k Keeper) SetNextConnectionSequence(ctx sdk.Context, sequence uint64) { // GetAllClientConnectionPaths returns all stored clients connection id paths. It // will ignore the clients that haven't initialized a connection handshake since // no paths are stored. -func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionPaths { +func (k *Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionPaths { var allConnectionPaths []types.ConnectionPaths k.clientKeeper.IterateClientStates(ctx, nil, func(clientID string, cs exported.ClientState) bool { paths, found := k.GetClientConnectionPaths(ctx, clientID) @@ -149,7 +149,7 @@ func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionP // IterateConnections provides an iterator over all ConnectionEnd objects. // For each ConnectionEnd, cb will be called. If the cb returns true, the // iterator will close and stop. -func (k Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConnection) bool) { +func (k *Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConnection) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyConnectionPrefix)) @@ -167,7 +167,7 @@ func (k Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConn } // GetAllConnections returns all stored ConnectionEnd objects. -func (k Keeper) GetAllConnections(ctx sdk.Context) (connections []types.IdentifiedConnection) { +func (k *Keeper) GetAllConnections(ctx sdk.Context) (connections []types.IdentifiedConnection) { k.IterateConnections(ctx, func(connection types.IdentifiedConnection) bool { connections = append(connections, connection) return false @@ -176,7 +176,7 @@ func (k Keeper) GetAllConnections(ctx sdk.Context) (connections []types.Identifi } // CreateSentinelLocalhostConnection creates and sets the sentinel localhost connection end in the IBC store. -func (k Keeper) CreateSentinelLocalhostConnection(ctx sdk.Context) { +func (k *Keeper) CreateSentinelLocalhostConnection(ctx sdk.Context) { counterparty := types.NewCounterparty(exported.LocalhostClientID, exported.LocalhostConnectionID, commitmenttypes.NewMerklePrefix(k.GetCommitmentPrefix().Bytes())) connectionEnd := types.NewConnectionEnd(types.OPEN, exported.LocalhostClientID, counterparty, types.GetCompatibleVersions(), 0) @@ -185,7 +185,7 @@ func (k Keeper) CreateSentinelLocalhostConnection(ctx sdk.Context) { // addConnectionToClient is used to add a connection identifier to the set of // connections associated with a client. -func (k Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID string) error { +func (k *Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID string) error { _, found := k.clientKeeper.GetClientState(ctx, clientID) if !found { return errorsmod.Wrap(clienttypes.ErrClientNotFound, clientID) @@ -202,7 +202,7 @@ func (k Keeper) addConnectionToClient(ctx sdk.Context, clientID, connectionID st } // GetParams returns the total set of ibc-connection parameters. -func (k Keeper) GetParams(ctx sdk.Context) types.Params { +func (k *Keeper) GetParams(ctx sdk.Context) types.Params { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.ParamsKey)) if bz == nil { // only panic on unset params and not on empty params @@ -215,7 +215,7 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { } // SetParams sets the total set of ibc-connection parameters. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { +func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) store.Set([]byte(types.ParamsKey), bz) diff --git a/modules/core/03-connection/keeper/migrations.go b/modules/core/03-connection/keeper/migrations.go index 64b84e7885e..c120ff6c2cd 100644 --- a/modules/core/03-connection/keeper/migrations.go +++ b/modules/core/03-connection/keeper/migrations.go @@ -9,11 +9,11 @@ import ( // Migrator is a struct for handling in-place store migrations. type Migrator struct { - keeper Keeper + keeper *Keeper } // NewMigrator returns a new Migrator. -func NewMigrator(keeper Keeper) Migrator { +func NewMigrator(keeper *Keeper) Migrator { return Migrator{keeper: keeper} } diff --git a/modules/core/03-connection/keeper/verify.go b/modules/core/03-connection/keeper/verify.go index da90e78c9fb..c1cf804f91e 100644 --- a/modules/core/03-connection/keeper/verify.go +++ b/modules/core/03-connection/keeper/verify.go @@ -17,7 +17,7 @@ import ( // VerifyClientState verifies a proof of a client state of the running machine // stored on the target machine -func (k Keeper) VerifyClientState( +func (k *Keeper) VerifyClientState( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -58,7 +58,7 @@ func (k Keeper) VerifyClientState( // VerifyClientConsensusState verifies a proof of the consensus state of the // specified client stored on the target machine. -func (k Keeper) VerifyClientConsensusState( +func (k *Keeper) VerifyClientConsensusState( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -100,7 +100,7 @@ func (k Keeper) VerifyClientConsensusState( // VerifyConnectionState verifies a proof of the connection state of the // specified connection end stored on the target machine. -func (k Keeper) VerifyConnectionState( +func (k *Keeper) VerifyConnectionState( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -142,7 +142,7 @@ func (k Keeper) VerifyConnectionState( // VerifyChannelState verifies a proof of the channel state of the specified // channel end, under the specified port, stored on the target machine. -func (k Keeper) VerifyChannelState( +func (k *Keeper) VerifyChannelState( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -185,7 +185,7 @@ func (k Keeper) VerifyChannelState( // VerifyPacketCommitment verifies a proof of an outgoing packet commitment at // the specified port, specified channel, and specified sequence. -func (k Keeper) VerifyPacketCommitment( +func (k *Keeper) VerifyPacketCommitment( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -226,7 +226,7 @@ func (k Keeper) VerifyPacketCommitment( // VerifyPacketAcknowledgement verifies a proof of an incoming packet // acknowledgement at the specified port, specified channel, and specified sequence. -func (k Keeper) VerifyPacketAcknowledgement( +func (k *Keeper) VerifyPacketAcknowledgement( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -269,7 +269,7 @@ func (k Keeper) VerifyPacketAcknowledgement( // VerifyPacketReceiptAbsence verifies a proof of the absence of an // incoming packet receipt at the specified port, specified channel, and // specified sequence. -func (k Keeper) VerifyPacketReceiptAbsence( +func (k *Keeper) VerifyPacketReceiptAbsence( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -314,7 +314,7 @@ func (k Keeper) VerifyPacketReceiptAbsence( // VerifyNextSequenceRecv verifies a proof of the next sequence number to be // received of the specified channel at the specified port. -func (k Keeper) VerifyNextSequenceRecv( +func (k *Keeper) VerifyNextSequenceRecv( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -355,7 +355,7 @@ func (k Keeper) VerifyNextSequenceRecv( } // VerifyChannelUpgradeError verifies a proof of the provided upgrade error receipt. -func (k Keeper) VerifyChannelUpgradeError( +func (k *Keeper) VerifyChannelUpgradeError( ctx sdk.Context, connection types.ConnectionEnd, height exported.Height, @@ -397,7 +397,7 @@ func (k Keeper) VerifyChannelUpgradeError( } // VerifyChannelUpgrade verifies the proof that a particular proposed upgrade has been stored in the upgrade path. -func (k Keeper) VerifyChannelUpgrade( +func (k *Keeper) VerifyChannelUpgrade( ctx sdk.Context, connection types.ConnectionEnd, proofHeight exported.Height, @@ -440,7 +440,7 @@ func (k Keeper) VerifyChannelUpgrade( // getBlockDelay calculates the block delay period from the time delay of the connection // and the maximum expected time per block. -func (k Keeper) getBlockDelay(ctx sdk.Context, connection types.ConnectionEnd) uint64 { +func (k *Keeper) getBlockDelay(ctx sdk.Context, connection types.ConnectionEnd) uint64 { // expectedTimePerBlock should never be zero, however if it is then return a 0 block delay for safety // as the expectedTimePerBlock parameter was not set. expectedTimePerBlock := k.GetParams(ctx).MaxExpectedTimePerBlock diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index 7867d2271d3..12de9813240 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -36,12 +36,14 @@ func (suite *KeeperTestSuite) TestVerifyClientState() { heightDiff = 5 }, false}, {"verification failed", func() { - counterpartyClient := path.EndpointB.GetClientState().(*ibctm.ClientState) + counterpartyClient, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) counterpartyClient.ChainId = "wrongChainID" path.EndpointB.SetClientState(counterpartyClient) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -112,7 +114,8 @@ func (suite *KeeperTestSuite) TestVerifyClientConsensusState() { suite.coordinator.CommitBlock(suite.chainB) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -172,7 +175,8 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { path.EndpointA.UpdateConnection(func(c *types.ConnectionEnd) { c.State = types.TRYOPEN }) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -233,7 +237,8 @@ func (suite *KeeperTestSuite) TestVerifyChannelState() { path.EndpointA.UpdateChannel(func(channel *channeltypes.Channel) { channel.State = channeltypes.TRYOPEN }) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -309,7 +314,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketCommitment() { packet.Data = []byte(ibctesting.InvalidID) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointB.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) }, false}, @@ -399,7 +405,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketAcknowledgement() { ack = ibcmock.MockFailAcknowledgement }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -503,7 +510,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { suite.Require().NoError(err) }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -532,7 +540,8 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { connection := path.EndpointA.GetConnection() connection.DelayPeriod = delayTimePeriod - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) if clientState.FrozenHeight.IsZero() { // need to update height to prove absence or receipt suite.coordinator.CommitBlock(suite.chainA, suite.chainB) @@ -602,7 +611,8 @@ func (suite *KeeperTestSuite) TestVerifyNextSequenceRecv() { offsetSeq = 1 }, false}, {"client status is not active - client is expired", func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointA.SetClientState(clientState) }, false}, @@ -678,7 +688,8 @@ func (suite *KeeperTestSuite) TestVerifyUpgradeErrorReceipt() { { name: "fails when client state is frozen", malleate: func() { - clientState := path.EndpointB.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) }, @@ -759,7 +770,8 @@ func (suite *KeeperTestSuite) TestVerifyUpgrade() { { name: "fails when client state is frozen", malleate: func() { - clientState := path.EndpointB.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.FrozenHeight = clienttypes.NewHeight(0, 1) path.EndpointB.SetClientState(clientState) }, diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index b125baa6e56..9106e3aa15f 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" testifysuite "github.com/stretchr/testify/suite" - log "cosmossdk.io/log" + "cosmossdk.io/log" "cosmossdk.io/store/iavl" "cosmossdk.io/store/metrics" "cosmossdk.io/store/rootmulti" @@ -60,7 +60,8 @@ func (suite *MsgTestSuite) SetupTest() { store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil) err := store.LoadVersion(0) suite.Require().NoError(err) - iavlStore := store.GetCommitStore(storeKey).(*iavl.Store) + iavlStore, ok := store.GetCommitStore(storeKey).(*iavl.Store) + suite.Require().True(ok) iavlStore.Set([]byte("KEY"), []byte("VALUE")) _ = store.Commit() diff --git a/modules/core/03-connection/types/params_legacy.go b/modules/core/03-connection/types/params_legacy.go index c57c3e359e5..99f32271e6d 100644 --- a/modules/core/03-connection/types/params_legacy.go +++ b/modules/core/03-connection/types/params_legacy.go @@ -7,7 +7,7 @@ for migration purposes and will be removed in a future release. package types import ( - fmt "fmt" + "fmt" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) diff --git a/modules/core/04-channel/genesis.go b/modules/core/04-channel/genesis.go index 42481e558c1..eaccf98340b 100644 --- a/modules/core/04-channel/genesis.go +++ b/modules/core/04-channel/genesis.go @@ -11,7 +11,7 @@ import ( // InitGenesis initializes the ibc channel submodule's state from a provided genesis // state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { +func InitGenesis(ctx sdk.Context, k *keeper.Keeper, gs types.GenesisState) { if err := gs.Params.Validate(); err != nil { panic(fmt.Sprintf("invalid ibc channel genesis state parameters: %v", err)) } @@ -42,7 +42,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { } // ExportGenesis returns the ibc channel submodule's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) types.GenesisState { return types.GenesisState{ Channels: k.GetAllChannels(ctx), Acknowledgements: k.GetAllPacketAcks(ctx), diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index a2af8cd40e5..7d2e9fe4a6a 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -280,9 +280,6 @@ func EmitChannelUpgradeInitEvent(ctx sdk.Context, portID string, channelID strin sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, upgrade.Fields.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, upgrade.Fields.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, upgrade.Fields.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), ), sdk.NewEvent( @@ -301,9 +298,6 @@ func EmitChannelUpgradeTryEvent(ctx sdk.Context, portID string, channelID string sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, upgrade.Fields.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, upgrade.Fields.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, upgrade.Fields.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), ), sdk.NewEvent( @@ -322,9 +316,6 @@ func EmitChannelUpgradeAckEvent(ctx sdk.Context, portID string, channelID string sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, upgrade.Fields.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, upgrade.Fields.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, upgrade.Fields.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), ), sdk.NewEvent( @@ -363,9 +354,6 @@ func EmitChannelUpgradeOpenEvent(ctx sdk.Context, portID string, channelID strin sdk.NewAttribute(types.AttributeKeyChannelState, channel.State.String()), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, channel.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, channel.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, channel.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), ), sdk.NewEvent( @@ -384,9 +372,6 @@ func EmitChannelUpgradeTimeoutEvent(ctx sdk.Context, portID string, channelID st sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, upgrade.Fields.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, upgrade.Fields.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, upgrade.Fields.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeTimeoutHeight, upgrade.Timeout.Height.String()), sdk.NewAttribute(types.AttributeKeyUpgradeTimeoutTimestamp, fmt.Sprintf("%d", upgrade.Timeout.Timestamp)), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), @@ -426,9 +411,6 @@ func EmitChannelUpgradeCancelEvent(ctx sdk.Context, portID string, channelID str sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), - sdk.NewAttribute(types.AttributeKeyConnectionHops, upgrade.Fields.ConnectionHops[0]), - sdk.NewAttribute(types.AttributeKeyVersion, upgrade.Fields.Version), - sdk.NewAttribute(types.AttributeKeyOrdering, upgrade.Fields.Ordering.String()), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", channel.UpgradeSequence)), ), sdk.NewEvent( diff --git a/modules/core/04-channel/keeper/export_test.go b/modules/core/04-channel/keeper/export_test.go index a36da4eea47..ae68eb5e275 100644 --- a/modules/core/04-channel/keeper/export_test.go +++ b/modules/core/04-channel/keeper/export_test.go @@ -11,26 +11,26 @@ import ( ) // StartFlushing is a wrapper around startFlushing to allow the function to be directly called in tests. -func (k Keeper) StartFlushing(ctx sdk.Context, portID, channelID string, upgrade *types.Upgrade) error { +func (k *Keeper) StartFlushing(ctx sdk.Context, portID, channelID string, upgrade *types.Upgrade) error { return k.startFlushing(ctx, portID, channelID, upgrade) } // ValidateSelfUpgradeFields is a wrapper around validateSelfUpgradeFields to allow the function to be directly called in tests. -func (k Keeper) ValidateSelfUpgradeFields(ctx sdk.Context, proposedUpgrade types.UpgradeFields, channel types.Channel) error { +func (k *Keeper) ValidateSelfUpgradeFields(ctx sdk.Context, proposedUpgrade types.UpgradeFields, channel types.Channel) error { return k.validateSelfUpgradeFields(ctx, proposedUpgrade, channel) } // CheckForUpgradeCompatibility is a wrapper around checkForUpgradeCompatibility to allow the function to be directly called in tests. -func (k Keeper) CheckForUpgradeCompatibility(ctx sdk.Context, upgradeFields, counterpartyUpgradeFields types.UpgradeFields) error { +func (k *Keeper) CheckForUpgradeCompatibility(ctx sdk.Context, upgradeFields, counterpartyUpgradeFields types.UpgradeFields) error { return k.checkForUpgradeCompatibility(ctx, upgradeFields, counterpartyUpgradeFields) } // SetUpgradeErrorReceipt is a wrapper around setUpgradeErrorReceipt to allow the function to be directly called in tests. -func (k Keeper) SetUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt) { +func (k *Keeper) SetUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt) { k.setUpgradeErrorReceipt(ctx, portID, channelID, errorReceipt) } // SetRecvStartSequence is a wrapper around setRecvStartSequence to allow the function to be directly called in tests. -func (k Keeper) SetRecvStartSequence(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetRecvStartSequence(ctx sdk.Context, portID, channelID string, sequence uint64) { k.setRecvStartSequence(ctx, portID, channelID, sequence) } diff --git a/modules/core/04-channel/keeper/grpc_query.go b/modules/core/04-channel/keeper/grpc_query.go index 98e5c9e3773..f15a232d911 100644 --- a/modules/core/04-channel/keeper/grpc_query.go +++ b/modules/core/04-channel/keeper/grpc_query.go @@ -24,7 +24,7 @@ import ( var _ types.QueryServer = (*Keeper)(nil) // Channel implements the Query/Channel gRPC method -func (k Keeper) Channel(c context.Context, req *types.QueryChannelRequest) (*types.QueryChannelResponse, error) { +func (k *Keeper) Channel(c context.Context, req *types.QueryChannelRequest) (*types.QueryChannelResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -47,7 +47,7 @@ func (k Keeper) Channel(c context.Context, req *types.QueryChannelRequest) (*typ } // Channels implements the Query/Channels gRPC method -func (k Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*types.QueryChannelsResponse, error) { +func (k *Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*types.QueryChannelsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -85,7 +85,7 @@ func (k Keeper) Channels(c context.Context, req *types.QueryChannelsRequest) (*t } // ConnectionChannels implements the Query/ConnectionChannels gRPC method -func (k Keeper) ConnectionChannels(c context.Context, req *types.QueryConnectionChannelsRequest) (*types.QueryConnectionChannelsResponse, error) { +func (k *Keeper) ConnectionChannels(c context.Context, req *types.QueryConnectionChannelsRequest) (*types.QueryConnectionChannelsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -134,7 +134,7 @@ func (k Keeper) ConnectionChannels(c context.Context, req *types.QueryConnection } // ChannelClientState implements the Query/ChannelClientState gRPC method -func (k Keeper) ChannelClientState(c context.Context, req *types.QueryChannelClientStateRequest) (*types.QueryChannelClientStateResponse, error) { +func (k *Keeper) ChannelClientState(c context.Context, req *types.QueryChannelClientStateRequest) (*types.QueryChannelClientStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -157,7 +157,7 @@ func (k Keeper) ChannelClientState(c context.Context, req *types.QueryChannelCli } // ChannelConsensusState implements the Query/ChannelConsensusState gRPC method -func (k Keeper) ChannelConsensusState(c context.Context, req *types.QueryChannelConsensusStateRequest) (*types.QueryChannelConsensusStateResponse, error) { +func (k *Keeper) ChannelConsensusState(c context.Context, req *types.QueryChannelConsensusStateRequest) (*types.QueryChannelConsensusStateResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -203,7 +203,7 @@ func (k Keeper) ChannelConsensusState(c context.Context, req *types.QueryChannel } // PacketCommitment implements the Query/PacketCommitment gRPC method -func (k Keeper) PacketCommitment(c context.Context, req *types.QueryPacketCommitmentRequest) (*types.QueryPacketCommitmentResponse, error) { +func (k *Keeper) PacketCommitment(c context.Context, req *types.QueryPacketCommitmentRequest) (*types.QueryPacketCommitmentResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -235,7 +235,7 @@ func (k Keeper) PacketCommitment(c context.Context, req *types.QueryPacketCommit } // PacketCommitments implements the Query/PacketCommitments gRPC method -func (k Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommitmentsRequest) (*types.QueryPacketCommitmentsResponse, error) { +func (k *Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommitmentsRequest) (*types.QueryPacketCommitmentsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -280,7 +280,7 @@ func (k Keeper) PacketCommitments(c context.Context, req *types.QueryPacketCommi } // PacketReceipt implements the Query/PacketReceipt gRPC method -func (k Keeper) PacketReceipt(c context.Context, req *types.QueryPacketReceiptRequest) (*types.QueryPacketReceiptResponse, error) { +func (k *Keeper) PacketReceipt(c context.Context, req *types.QueryPacketReceiptRequest) (*types.QueryPacketReceiptResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -308,7 +308,7 @@ func (k Keeper) PacketReceipt(c context.Context, req *types.QueryPacketReceiptRe } // PacketAcknowledgement implements the Query/PacketAcknowledgement gRPC method -func (k Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketAcknowledgementRequest) (*types.QueryPacketAcknowledgementResponse, error) { +func (k *Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketAcknowledgementRequest) (*types.QueryPacketAcknowledgementResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -339,7 +339,7 @@ func (k Keeper) PacketAcknowledgement(c context.Context, req *types.QueryPacketA } // PacketAcknowledgements implements the Query/PacketAcknowledgements gRPC method -func (k Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacketAcknowledgementsRequest) (*types.QueryPacketAcknowledgementsResponse, error) { +func (k *Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacketAcknowledgementsRequest) (*types.QueryPacketAcknowledgementsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -421,7 +421,7 @@ func (k Keeper) PacketAcknowledgements(c context.Context, req *types.QueryPacket // commitments is correct and will not function properly if the list // is not up to date. Ideally the query height should equal the latest height // on the counterparty's client which represents this chain. -func (k Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedPacketsRequest) (*types.QueryUnreceivedPacketsResponse, error) { +func (k *Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedPacketsRequest) (*types.QueryUnreceivedPacketsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -507,7 +507,7 @@ func (k Keeper) UnreceivedPackets(c context.Context, req *types.QueryUnreceivedP // acknowledgements is correct and will not function properly if the list // is not up to date. Ideally the query height should equal the latest height // on the counterparty's client which represents this chain. -func (k Keeper) UnreceivedAcks(c context.Context, req *types.QueryUnreceivedAcksRequest) (*types.QueryUnreceivedAcksResponse, error) { +func (k *Keeper) UnreceivedAcks(c context.Context, req *types.QueryUnreceivedAcksRequest) (*types.QueryUnreceivedAcksResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -547,7 +547,7 @@ func (k Keeper) UnreceivedAcks(c context.Context, req *types.QueryUnreceivedAcks } // NextSequenceReceive implements the Query/NextSequenceReceive gRPC method -func (k Keeper) NextSequenceReceive(c context.Context, req *types.QueryNextSequenceReceiveRequest) (*types.QueryNextSequenceReceiveResponse, error) { +func (k *Keeper) NextSequenceReceive(c context.Context, req *types.QueryNextSequenceReceiveRequest) (*types.QueryNextSequenceReceiveResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -582,7 +582,7 @@ func (k Keeper) NextSequenceReceive(c context.Context, req *types.QueryNextSeque } // NextSequenceSend implements the Query/NextSequenceSend gRPC method -func (k Keeper) NextSequenceSend(c context.Context, req *types.QueryNextSequenceSendRequest) (*types.QueryNextSequenceSendResponse, error) { +func (k *Keeper) NextSequenceSend(c context.Context, req *types.QueryNextSequenceSendRequest) (*types.QueryNextSequenceSendResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -605,7 +605,7 @@ func (k Keeper) NextSequenceSend(c context.Context, req *types.QueryNextSequence } // UpgradeErrorReceipt implements the Query/UpgradeErrorReceipt gRPC method -func (k Keeper) UpgradeErrorReceipt(c context.Context, req *types.QueryUpgradeErrorRequest) (*types.QueryUpgradeErrorResponse, error) { +func (k *Keeper) UpgradeErrorReceipt(c context.Context, req *types.QueryUpgradeErrorRequest) (*types.QueryUpgradeErrorResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -636,7 +636,7 @@ func (k Keeper) UpgradeErrorReceipt(c context.Context, req *types.QueryUpgradeEr } // Upgrade implements the Query/UpgradeSequence gRPC method -func (k Keeper) Upgrade(c context.Context, req *types.QueryUpgradeRequest) (*types.QueryUpgradeResponse, error) { +func (k *Keeper) Upgrade(c context.Context, req *types.QueryUpgradeRequest) (*types.QueryUpgradeResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -667,7 +667,7 @@ func (k Keeper) Upgrade(c context.Context, req *types.QueryUpgradeRequest) (*typ } // ChannelParams implements the Query/ChannelParams gRPC method. -func (k Keeper) ChannelParams(c context.Context, req *types.QueryChannelParamsRequest) (*types.QueryChannelParamsResponse, error) { +func (k *Keeper) ChannelParams(c context.Context, req *types.QueryChannelParamsRequest) (*types.QueryChannelParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) params := k.GetParams(ctx) diff --git a/modules/core/04-channel/keeper/handshake.go b/modules/core/04-channel/keeper/handshake.go index 4b5c536f5c8..3ea7b36587e 100644 --- a/modules/core/04-channel/keeper/handshake.go +++ b/modules/core/04-channel/keeper/handshake.go @@ -20,7 +20,7 @@ import ( // ChanOpenInit is called by a module to initiate a channel opening handshake with // a module on another chain. The counterparty channel identifier is validated to be // empty in msg validation. -func (k Keeper) ChanOpenInit( +func (k *Keeper) ChanOpenInit( ctx sdk.Context, order types.Order, connectionHops []string, @@ -73,7 +73,7 @@ func (k Keeper) ChanOpenInit( // WriteOpenInitChannel writes a channel which has successfully passed the OpenInit handshake step. // The channel is set in state and all the associated Send and Recv sequences are set to 1. // An event is emitted for the handshake step. -func (k Keeper) WriteOpenInitChannel( +func (k *Keeper) WriteOpenInitChannel( ctx sdk.Context, portID, channelID string, @@ -98,7 +98,7 @@ func (k Keeper) WriteOpenInitChannel( // ChanOpenTry is called by a module to accept the first step of a channel opening // handshake initiated by a module on another chain. -func (k Keeper) ChanOpenTry( +func (k *Keeper) ChanOpenTry( ctx sdk.Context, order types.Order, connectionHops []string, @@ -180,7 +180,7 @@ func (k Keeper) ChanOpenTry( // WriteOpenTryChannel writes a channel which has successfully passed the OpenTry handshake step. // The channel is set in state. If a previous channel state did not exist, all the Send and Recv // sequences are set to 1. An event is emitted for the handshake step. -func (k Keeper) WriteOpenTryChannel( +func (k *Keeper) WriteOpenTryChannel( ctx sdk.Context, portID, channelID string, @@ -206,7 +206,7 @@ func (k Keeper) WriteOpenTryChannel( // ChanOpenAck is called by the handshake-originating module to acknowledge the // acceptance of the initial request by the counterparty module on the other chain. -func (k Keeper) ChanOpenAck( +func (k *Keeper) ChanOpenAck( ctx sdk.Context, portID, channelID string, @@ -255,7 +255,7 @@ func (k Keeper) ChanOpenAck( // WriteOpenAckChannel writes an updated channel state for the successful OpenAck handshake step. // An event is emitted for the handshake step. -func (k Keeper) WriteOpenAckChannel( +func (k *Keeper) WriteOpenAckChannel( ctx sdk.Context, portID, channelID, @@ -281,7 +281,7 @@ func (k Keeper) WriteOpenAckChannel( // ChanOpenConfirm is called by the handshake-accepting module to confirm the acknowledgement // of the handshake-originating module on the other chain and finish the channel opening handshake. -func (k Keeper) ChanOpenConfirm( +func (k *Keeper) ChanOpenConfirm( ctx sdk.Context, portID, channelID string, @@ -332,7 +332,7 @@ func (k Keeper) ChanOpenConfirm( // WriteOpenConfirmChannel writes an updated channel state for the successful OpenConfirm handshake step. // An event is emitted for the handshake step. -func (k Keeper) WriteOpenConfirmChannel( +func (k *Keeper) WriteOpenConfirmChannel( ctx sdk.Context, portID, channelID string, @@ -358,7 +358,7 @@ func (k Keeper) WriteOpenConfirmChannel( // // ChanCloseInit is called by either module to close their end of the channel. Once // closed, channels cannot be reopened. -func (k Keeper) ChanCloseInit( +func (k *Keeper) ChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -404,7 +404,7 @@ func (k Keeper) ChanCloseInit( // ChanCloseConfirm is called by the counterparty module to close their end of the // channel, since the other end has been closed. -func (k Keeper) ChanCloseConfirm( +func (k *Keeper) ChanCloseConfirm( ctx sdk.Context, portID, channelID string, diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index 5272554204d..463c2174bb1 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -43,8 +43,8 @@ func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, clientKeeper types.ClientKeeper, connectionKeeper types.ConnectionKeeper, portKeeper types.PortKeeper, scopedKeeper exported.ScopedKeeper, -) Keeper { - return Keeper{ +) *Keeper { + return &Keeper{ storeKey: key, cdc: cdc, clientKeeper: clientKeeper, @@ -60,7 +60,7 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger { } // GenerateChannelIdentifier returns the next channel identifier. -func (k Keeper) GenerateChannelIdentifier(ctx sdk.Context) string { +func (k *Keeper) GenerateChannelIdentifier(ctx sdk.Context) string { nextChannelSeq := k.GetNextChannelSequence(ctx) channelID := types.FormatChannelIdentifier(nextChannelSeq) @@ -70,13 +70,13 @@ func (k Keeper) GenerateChannelIdentifier(ctx sdk.Context) string { } // HasChannel true if the channel with the given identifiers exists in state. -func (k Keeper) HasChannel(ctx sdk.Context, portID, channelID string) bool { +func (k *Keeper) HasChannel(ctx sdk.Context, portID, channelID string) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.ChannelKey(portID, channelID)) } // GetChannel returns a channel with a particular identifier binded to a specific port -func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (types.Channel, bool) { +func (k *Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (types.Channel, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ChannelKey(portID, channelID)) if len(bz) == 0 { @@ -89,14 +89,14 @@ func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (types.Cha } // SetChannel sets a channel to the store -func (k Keeper) SetChannel(ctx sdk.Context, portID, channelID string, channel types.Channel) { +func (k *Keeper) SetChannel(ctx sdk.Context, portID, channelID string, channel types.Channel) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&channel) store.Set(host.ChannelKey(portID, channelID), bz) } // GetAppVersion gets the version for the specified channel. -func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { +func (k *Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { return "", false @@ -106,7 +106,7 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string } // GetNextChannelSequence gets the next channel sequence from the store. -func (k Keeper) GetNextChannelSequence(ctx sdk.Context) uint64 { +func (k *Keeper) GetNextChannelSequence(ctx sdk.Context) uint64 { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.KeyNextChannelSequence)) if len(bz) == 0 { @@ -117,14 +117,14 @@ func (k Keeper) GetNextChannelSequence(ctx sdk.Context) uint64 { } // SetNextChannelSequence sets the next channel sequence to the store. -func (k Keeper) SetNextChannelSequence(ctx sdk.Context, sequence uint64) { +func (k *Keeper) SetNextChannelSequence(ctx sdk.Context, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set([]byte(types.KeyNextChannelSequence), bz) } // GetNextSequenceSend gets a channel's next send sequence from the store -func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) { +func (k *Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.NextSequenceSendKey(portID, channelID)) if len(bz) == 0 { @@ -135,14 +135,14 @@ func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) ( } // SetNextSequenceSend sets a channel's next send sequence to the store -func (k Keeper) SetNextSequenceSend(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetNextSequenceSend(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set(host.NextSequenceSendKey(portID, channelID), bz) } // GetNextSequenceRecv gets a channel's next receive sequence from the store -func (k Keeper) GetNextSequenceRecv(ctx sdk.Context, portID, channelID string) (uint64, bool) { +func (k *Keeper) GetNextSequenceRecv(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.NextSequenceRecvKey(portID, channelID)) if len(bz) == 0 { @@ -153,14 +153,14 @@ func (k Keeper) GetNextSequenceRecv(ctx sdk.Context, portID, channelID string) ( } // SetNextSequenceRecv sets a channel's next receive sequence to the store -func (k Keeper) SetNextSequenceRecv(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetNextSequenceRecv(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set(host.NextSequenceRecvKey(portID, channelID), bz) } // GetNextSequenceAck gets a channel's next ack sequence from the store -func (k Keeper) GetNextSequenceAck(ctx sdk.Context, portID, channelID string) (uint64, bool) { +func (k *Keeper) GetNextSequenceAck(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.NextSequenceAckKey(portID, channelID)) if len(bz) == 0 { @@ -171,14 +171,14 @@ func (k Keeper) GetNextSequenceAck(ctx sdk.Context, portID, channelID string) (u } // SetNextSequenceAck sets a channel's next ack sequence to the store -func (k Keeper) SetNextSequenceAck(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetNextSequenceAck(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set(host.NextSequenceAckKey(portID, channelID), bz) } // GetPacketReceipt gets a packet receipt from the store -func (k Keeper) GetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) (string, bool) { +func (k *Keeper) GetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) (string, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.PacketReceiptKey(portID, channelID, sequence)) if len(bz) == 0 { @@ -189,49 +189,49 @@ func (k Keeper) GetPacketReceipt(ctx sdk.Context, portID, channelID string, sequ } // SetPacketReceipt sets an empty packet receipt to the store -func (k Keeper) SetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetPacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) store.Set(host.PacketReceiptKey(portID, channelID, sequence), []byte{byte(1)}) } // deletePacketReceipt deletes a packet receipt from the store -func (k Keeper) deletePacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) deletePacketReceipt(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) store.Delete(host.PacketReceiptKey(portID, channelID, sequence)) } // GetPacketCommitment gets the packet commitment hash from the store -func (k Keeper) GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte { +func (k *Keeper) GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte { store := ctx.KVStore(k.storeKey) bz := store.Get(host.PacketCommitmentKey(portID, channelID, sequence)) return bz } // HasPacketCommitment returns true if the packet commitment exists -func (k Keeper) HasPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) bool { +func (k *Keeper) HasPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.PacketCommitmentKey(portID, channelID, sequence)) } // SetPacketCommitment sets the packet commitment hash to the store -func (k Keeper) SetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64, commitmentHash []byte) { +func (k *Keeper) SetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64, commitmentHash []byte) { store := ctx.KVStore(k.storeKey) store.Set(host.PacketCommitmentKey(portID, channelID, sequence), commitmentHash) } -func (k Keeper) deletePacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) deletePacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) store.Delete(host.PacketCommitmentKey(portID, channelID, sequence)) } // SetPacketAcknowledgement sets the packet ack hash to the store -func (k Keeper) SetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64, ackHash []byte) { +func (k *Keeper) SetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64, ackHash []byte) { store := ctx.KVStore(k.storeKey) store.Set(host.PacketAcknowledgementKey(portID, channelID, sequence), ackHash) } // GetPacketAcknowledgement gets the packet ack hash from the store -func (k Keeper) GetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) ([]byte, bool) { +func (k *Keeper) GetPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) ([]byte, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.PacketAcknowledgementKey(portID, channelID, sequence)) if len(bz) == 0 { @@ -241,13 +241,13 @@ func (k Keeper) GetPacketAcknowledgement(ctx sdk.Context, portID, channelID stri } // HasPacketAcknowledgement check if the packet ack hash is already on the store -func (k Keeper) HasPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) bool { +func (k *Keeper) HasPacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.PacketAcknowledgementKey(portID, channelID, sequence)) } // deletePacketAcknowledgement deletes the packet ack hash from the store -func (k Keeper) deletePacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) deletePacketAcknowledgement(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) store.Delete(host.PacketAcknowledgementKey(portID, channelID, sequence)) } @@ -273,7 +273,7 @@ func (Keeper) IteratePacketSequence(ctx sdk.Context, iterator db.Iterator, cb fu } // GetAllPacketSendSeqs returns all stored next send sequences. -func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { +func (k *Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqSendPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextSendSeq uint64) bool { @@ -285,7 +285,7 @@ func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequen } // GetAllPacketRecvSeqs returns all stored next recv sequences. -func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { +func (k *Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqRecvPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextRecvSeq uint64) bool { @@ -297,7 +297,7 @@ func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequen } // GetAllPacketAckSeqs returns all stored next acknowledgements sequences. -func (k Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { +func (k *Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqAckPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextAckSeq uint64) bool { @@ -311,14 +311,14 @@ func (k Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequenc // IteratePacketCommitment provides an iterator over all PacketCommitment objects. For each // packet commitment, cb will be called. If the cb returns true, the iterator will close // and stop. -func (k Keeper) IteratePacketCommitment(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { +func (k *Keeper) IteratePacketCommitment(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) k.iterateHashes(ctx, iterator, cb) } // GetAllPacketCommitments returns all stored PacketCommitments objects. -func (k Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.PacketState) { +func (k *Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.PacketState) { k.IteratePacketCommitment(ctx, func(portID, channelID string, sequence uint64, hash []byte) bool { pc := types.NewPacketState(portID, channelID, sequence, hash) commitments = append(commitments, pc) @@ -330,7 +330,7 @@ func (k Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.Pa // IteratePacketCommitmentAtChannel provides an iterator over all PacketCommmitment 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 sdk.Context, portID, channelID string, cb func(_, _ string, sequence uint64, hash []byte) bool) { +func (k *Keeper) IteratePacketCommitmentAtChannel(ctx sdk.Context, portID, channelID string, cb func(_, _ string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.PacketCommitmentPrefixPath(portID, channelID))) k.iterateHashes(ctx, iterator, cb) @@ -338,7 +338,7 @@ func (k Keeper) IteratePacketCommitmentAtChannel(ctx sdk.Context, portID, channe // GetAllPacketCommitmentsAtChannel returns all stored PacketCommitments objects for a specified // port ID and channel ID. -func (k Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channelID string) (commitments []types.PacketState) { +func (k *Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channelID string) (commitments []types.PacketState) { k.IteratePacketCommitmentAtChannel(ctx, portID, channelID, func(_, _ string, sequence uint64, hash []byte) bool { pc := types.NewPacketState(portID, channelID, sequence, hash) commitments = append(commitments, pc) @@ -350,14 +350,14 @@ func (k Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channe // IteratePacketReceipt provides an iterator over all PacketReceipt objects. For each // receipt, cb will be called. If the cb returns true, the iterator will close // and stop. -func (k Keeper) IteratePacketReceipt(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, receipt []byte) bool) { +func (k *Keeper) IteratePacketReceipt(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, receipt []byte) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) k.iterateHashes(ctx, iterator, cb) } // GetAllPacketReceipts returns all stored PacketReceipt objects. -func (k Keeper) GetAllPacketReceipts(ctx sdk.Context) (receipts []types.PacketState) { +func (k *Keeper) GetAllPacketReceipts(ctx sdk.Context) (receipts []types.PacketState) { k.IteratePacketReceipt(ctx, func(portID, channelID string, sequence uint64, receipt []byte) bool { packetReceipt := types.NewPacketState(portID, channelID, sequence, receipt) receipts = append(receipts, packetReceipt) @@ -369,14 +369,14 @@ func (k Keeper) GetAllPacketReceipts(ctx sdk.Context) (receipts []types.PacketSt // IteratePacketAcknowledgement provides an iterator over all PacketAcknowledgement objects. For each // acknowledgement, cb will be called. If the cb returns true, the iterator will close // and stop. -func (k Keeper) IteratePacketAcknowledgement(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { +func (k *Keeper) IteratePacketAcknowledgement(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) k.iterateHashes(ctx, iterator, cb) } // GetAllPacketAcks returns all stored PacketAcknowledgements objects. -func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { +func (k *Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { k.IteratePacketAcknowledgement(ctx, func(portID, channelID string, sequence uint64, ack []byte) bool { packetAck := types.NewPacketState(portID, channelID, sequence, ack) acks = append(acks, packetAck) @@ -388,7 +388,7 @@ func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { // IterateChannels provides an iterator over all Channel objects. For each // Channel, cb will be called. If the cb returns true, the iterator will close // and stop. -func (k Keeper) IterateChannels(ctx sdk.Context, cb func(types.IdentifiedChannel) bool) { +func (k *Keeper) IterateChannels(ctx sdk.Context, cb func(types.IdentifiedChannel) bool) { store := ctx.KVStore(k.storeKey) iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyChannelEndPrefix)) @@ -407,7 +407,7 @@ func (k Keeper) IterateChannels(ctx sdk.Context, cb func(types.IdentifiedChannel // GetAllChannelsWithPortPrefix returns all channels with the specified port prefix. If an empty prefix is provided // all channels will be returned. -func (k Keeper) GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) []types.IdentifiedChannel { +func (k *Keeper) GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) []types.IdentifiedChannel { if strings.TrimSpace(portPrefix) == "" { return k.GetAllChannels(ctx) } @@ -428,7 +428,7 @@ func (k Keeper) GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) } // GetAllChannels returns all stored Channel objects. -func (k Keeper) GetAllChannels(ctx sdk.Context) (channels []types.IdentifiedChannel) { +func (k *Keeper) GetAllChannels(ctx sdk.Context) (channels []types.IdentifiedChannel) { k.IterateChannels(ctx, func(channel types.IdentifiedChannel) bool { channels = append(channels, channel) return false @@ -437,7 +437,7 @@ func (k Keeper) GetAllChannels(ctx sdk.Context) (channels []types.IdentifiedChan } // GetChannelClientState returns the associated client state with its ID, from a port and channel identifier. -func (k Keeper) GetChannelClientState(ctx sdk.Context, portID, channelID string) (string, exported.ClientState, error) { +func (k *Keeper) GetChannelClientState(ctx sdk.Context, portID, channelID string) (string, exported.ClientState, error) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { return "", nil, errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: %s, channel-id: %s", portID, channelID) @@ -457,7 +457,7 @@ func (k Keeper) GetChannelClientState(ctx sdk.Context, portID, channelID string) } // GetConnection wraps the connection keeper's GetConnection function. -func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, error) { +func (k *Keeper) GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, error) { connection, found := k.connectionKeeper.GetConnection(ctx, connectionID) if !found { return connectiontypes.ConnectionEnd{}, errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "connection-id: %s", connectionID) @@ -467,7 +467,7 @@ func (k Keeper) GetConnection(ctx sdk.Context, connectionID string) (connectiont } // GetChannelConnection returns the connection ID and state associated with the given port and channel identifier. -func (k Keeper) GetChannelConnection(ctx sdk.Context, portID, channelID string) (string, connectiontypes.ConnectionEnd, error) { +func (k *Keeper) GetChannelConnection(ctx sdk.Context, portID, channelID string) (string, connectiontypes.ConnectionEnd, error) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { return "", connectiontypes.ConnectionEnd{}, errorsmod.Wrapf(types.ErrChannelNotFound, "port-id: %s, channel-id: %s", portID, channelID) @@ -484,7 +484,7 @@ func (k Keeper) GetChannelConnection(ctx sdk.Context, portID, channelID string) } // LookupModuleByChannel will return the IBCModule along with the capability associated with a given channel defined by its portID and channelID -func (k Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error) { +func (k *Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error) { modules, capability, err := k.scopedKeeper.LookupModules(ctx, host.ChannelCapabilityPath(portID, channelID)) if err != nil { return "", nil, err @@ -494,7 +494,7 @@ func (k Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) } // GetUpgradeErrorReceipt returns the upgrade error receipt for the provided port and channel identifiers. -func (k Keeper) GetUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string) (types.ErrorReceipt, bool) { +func (k *Keeper) GetUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string) (types.ErrorReceipt, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ChannelUpgradeErrorKey(portID, channelID)) if bz == nil { @@ -508,20 +508,20 @@ func (k Keeper) GetUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string } // setUpgradeErrorReceipt sets the provided error receipt in store using the port and channel identifiers. -func (k Keeper) setUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt) { +func (k *Keeper) setUpgradeErrorReceipt(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&errorReceipt) store.Set(host.ChannelUpgradeErrorKey(portID, channelID), bz) } // hasUpgrade returns true if a proposed upgrade exists in store -func (k Keeper) hasUpgrade(ctx sdk.Context, portID, channelID string) bool { +func (k *Keeper) hasUpgrade(ctx sdk.Context, portID, channelID string) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.ChannelUpgradeKey(portID, channelID)) } // GetUpgrade returns the proposed upgrade for the provided port and channel identifiers. -func (k Keeper) GetUpgrade(ctx sdk.Context, portID, channelID string) (types.Upgrade, bool) { +func (k *Keeper) GetUpgrade(ctx sdk.Context, portID, channelID string) (types.Upgrade, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ChannelUpgradeKey(portID, channelID)) if bz == nil { @@ -535,26 +535,26 @@ func (k Keeper) GetUpgrade(ctx sdk.Context, portID, channelID string) (types.Upg } // SetUpgrade sets the proposed upgrade using the provided port and channel identifiers. -func (k Keeper) SetUpgrade(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade) { +func (k *Keeper) SetUpgrade(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&upgrade) store.Set(host.ChannelUpgradeKey(portID, channelID), bz) } // deleteUpgrade deletes the upgrade for the provided port and channel identifiers. -func (k Keeper) deleteUpgrade(ctx sdk.Context, portID, channelID string) { +func (k *Keeper) deleteUpgrade(ctx sdk.Context, portID, channelID string) { store := ctx.KVStore(k.storeKey) store.Delete(host.ChannelUpgradeKey(portID, channelID)) } // hasCounterpartyUpgrade returns true if a counterparty upgrade exists in store -func (k Keeper) hasCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) bool { +func (k *Keeper) hasCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.ChannelCounterpartyUpgradeKey(portID, channelID)) } // GetCounterpartyUpgrade gets the counterparty upgrade from the store. -func (k Keeper) GetCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) (types.Upgrade, bool) { +func (k *Keeper) GetCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) (types.Upgrade, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.ChannelCounterpartyUpgradeKey(portID, channelID)) if bz == nil { @@ -568,33 +568,33 @@ func (k Keeper) GetCounterpartyUpgrade(ctx sdk.Context, portID, channelID string } // SetCounterpartyUpgrade sets the counterparty upgrade in the store. -func (k Keeper) SetCounterpartyUpgrade(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade) { +func (k *Keeper) SetCounterpartyUpgrade(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&upgrade) store.Set(host.ChannelCounterpartyUpgradeKey(portID, channelID), bz) } // deleteCounterpartyUpgrade deletes the counterparty upgrade in the store. -func (k Keeper) deleteCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) { +func (k *Keeper) deleteCounterpartyUpgrade(ctx sdk.Context, portID, channelID string) { store := ctx.KVStore(k.storeKey) store.Delete(host.ChannelCounterpartyUpgradeKey(portID, channelID)) } // deleteUpgradeInfo deletes all auxiliary upgrade information. -func (k Keeper) deleteUpgradeInfo(ctx sdk.Context, portID, channelID string) { +func (k *Keeper) deleteUpgradeInfo(ctx sdk.Context, portID, channelID string) { k.deleteUpgrade(ctx, portID, channelID) k.deleteCounterpartyUpgrade(ctx, portID, channelID) } // SetParams sets the channel parameters. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { +func (k *Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) store.Set([]byte(types.ParamsKey), bz) } // GetParams returns the total set of the channel parameters. -func (k Keeper) GetParams(ctx sdk.Context) types.Params { +func (k *Keeper) GetParams(ctx sdk.Context) types.Params { store := ctx.KVStore(k.storeKey) bz := store.Get([]byte(types.ParamsKey)) if bz == nil { // only panic on unset params and not on empty params @@ -628,7 +628,7 @@ func (Keeper) iterateHashes(ctx sdk.Context, iterator db.Iterator, cb func(portI // HasInflightPackets returns true if there are packet commitments stored at the specified // port and channel, and false otherwise. -func (k Keeper) HasInflightPackets(ctx sdk.Context, portID, channelID string) bool { +func (k *Keeper) HasInflightPackets(ctx sdk.Context, portID, channelID string) bool { iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), []byte(host.PacketCommitmentPrefixPath(portID, channelID))) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) @@ -636,7 +636,7 @@ func (k Keeper) HasInflightPackets(ctx sdk.Context, portID, channelID string) bo } // setRecvStartSequence sets the channel's recv start sequence to the store. -func (k Keeper) setRecvStartSequence(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) setRecvStartSequence(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set(host.RecvStartSequenceKey(portID, channelID), bz) @@ -646,7 +646,7 @@ func (k Keeper) setRecvStartSequence(ctx sdk.Context, portID, channelID string, // The recv start sequence will be set to the counterparty's next sequence send // upon a successful channel upgrade. It will be used for replay protection of // historical packets and as the upper bound for pruning stale packet receives. -func (k Keeper) GetRecvStartSequence(ctx sdk.Context, portID, channelID string) (uint64, bool) { +func (k *Keeper) GetRecvStartSequence(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.RecvStartSequenceKey(portID, channelID)) if len(bz) == 0 { @@ -657,14 +657,14 @@ func (k Keeper) GetRecvStartSequence(ctx sdk.Context, portID, channelID string) } // SetPruningSequenceStart sets a channel's pruning sequence start to the store. -func (k Keeper) SetPruningSequenceStart(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) SetPruningSequenceStart(ctx sdk.Context, portID, channelID string, sequence uint64) { store := ctx.KVStore(k.storeKey) bz := sdk.Uint64ToBigEndian(sequence) store.Set(host.PruningSequenceStartKey(portID, channelID), bz) } // GetPruningSequenceStart gets a channel's pruning sequence start from the store. -func (k Keeper) GetPruningSequenceStart(ctx sdk.Context, portID, channelID string) (uint64, bool) { +func (k *Keeper) GetPruningSequenceStart(ctx sdk.Context, portID, channelID string) (uint64, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(host.PruningSequenceStartKey(portID, channelID)) if len(bz) == 0 { @@ -675,7 +675,7 @@ func (k Keeper) GetPruningSequenceStart(ctx sdk.Context, portID, channelID strin } // HasPruningSequenceStart returns true if the pruning sequence start is set for the specified channel. -func (k Keeper) HasPruningSequenceStart(ctx sdk.Context, portID, channelID string) bool { +func (k *Keeper) HasPruningSequenceStart(ctx sdk.Context, portID, channelID string) bool { store := ctx.KVStore(k.storeKey) return store.Has(host.PruningSequenceStartKey(portID, channelID)) } @@ -685,7 +685,7 @@ func (k Keeper) HasPruningSequenceStart(ctx sdk.Context, portID, channelID strin // // Pruning sequence start keeps track of the packet ack/receipt that can be pruned next. When it reaches pruningSequenceEnd, // pruning is complete. -func (k Keeper) PruneAcknowledgements(ctx sdk.Context, portID, channelID string, limit uint64) (uint64, uint64, error) { +func (k *Keeper) PruneAcknowledgements(ctx sdk.Context, portID, channelID string, limit uint64) (uint64, uint64, error) { pruningSequenceStart, found := k.GetPruningSequenceStart(ctx, portID, channelID) if !found { return 0, 0, errorsmod.Wrapf(types.ErrPruningSequenceStartNotFound, "port ID (%s) channel ID (%s)", portID, channelID) diff --git a/modules/core/04-channel/keeper/migrations.go b/modules/core/04-channel/keeper/migrations.go index 5bc0fcf0a41..2eacf49aca7 100644 --- a/modules/core/04-channel/keeper/migrations.go +++ b/modules/core/04-channel/keeper/migrations.go @@ -8,11 +8,11 @@ import ( // Migrator is a struct for handling in-place store migrations. type Migrator struct { - keeper Keeper + keeper *Keeper } // NewMigrator returns a new Migrator. -func NewMigrator(keeper Keeper) Migrator { +func NewMigrator(keeper *Keeper) Migrator { return Migrator{keeper: keeper} } diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index c7d12d6dfe7..08d1d678538 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -20,7 +20,7 @@ import ( // SendPacket is called by a module in order to send an IBC packet on a channel. // The packet sequence generated for the packet to be sent is returned. An error // is returned if one occurs. -func (k Keeper) SendPacket( +func (k *Keeper) SendPacket( ctx sdk.Context, channelCap *capabilitytypes.Capability, sourcePort string, @@ -69,6 +69,10 @@ func (k Keeper) SendPacket( } latestHeight := k.clientKeeper.GetClientLatestHeight(ctx, connectionEnd.ClientId) + if latestHeight.IsZero() { + return 0, errorsmod.Wrapf(clienttypes.ErrInvalidHeight, "cannot send packet using client (%s) with zero height", connectionEnd.ClientId) + } + latestTimestamp, err := k.clientKeeper.GetClientTimestampAtHeight(ctx, connectionEnd.ClientId, latestHeight) if err != nil { return 0, err @@ -101,7 +105,7 @@ func (k Keeper) SendPacket( // RecvPacket is called by a module in order to receive & process an IBC packet // sent on the corresponding channel end on the counterparty chain. -func (k Keeper) RecvPacket( +func (k *Keeper) RecvPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet types.Packet, @@ -276,7 +280,7 @@ func (k Keeper) RecvPacket( // // 2) Assumes that packet receipt has been written (unordered), or nextSeqRecv was incremented (ordered) // previously by RecvPacket. -func (k Keeper) WriteAcknowledgement( +func (k *Keeper) WriteAcknowledgement( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, @@ -353,7 +357,7 @@ func (k Keeper) WriteAcknowledgement( // handler. AcknowledgePacket will clean up the packet commitment, // which is no longer necessary since the packet has been received and acted upon. // It will also increment NextSequenceAck in case of ORDERED channels. -func (k Keeper) AcknowledgePacket( +func (k *Keeper) AcknowledgePacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet types.Packet, diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 0791dfdd39c..91cf13337ae 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -145,12 +145,31 @@ func (suite *KeeperTestSuite) TestSendPacket() { channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, + {"client state zero height", func() { + path.Setup() + sourceChannel = path.EndpointA.ChannelID + + connection := path.EndpointA.GetConnection() + clientState := path.EndpointA.GetClientState() + cs, ok := clientState.(*ibctm.ClientState) + suite.Require().True(ok) + // force a consensus state into the store at height zero to allow client status check to pass. + consensusState := path.EndpointA.GetConsensusState(cs.LatestHeight) + path.EndpointA.SetConsensusState(consensusState, clienttypes.ZeroHeight()) + + cs.LatestHeight = clienttypes.ZeroHeight() + suite.chainA.App.GetIBCKeeper().ClientKeeper.SetClientState(suite.chainA.GetContext(), connection.ClientId, cs) + + channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) + }, false}, {"timeout height passed", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID - timeoutHeight = path.EndpointA.GetClientLatestHeight().(clienttypes.Height) + var ok bool + timeoutHeight, ok = path.EndpointA.GetClientLatestHeight().(clienttypes.Height) + suite.Require().True(ok) channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"timeout timestamp passed", func() { diff --git a/modules/core/04-channel/keeper/timeout.go b/modules/core/04-channel/keeper/timeout.go index ed83e25b13a..8d7fdf892ff 100644 --- a/modules/core/04-channel/keeper/timeout.go +++ b/modules/core/04-channel/keeper/timeout.go @@ -22,7 +22,7 @@ import ( // packet can no longer be executed and to allow the calling module to safely // perform appropriate state transitions. Its intended usage is within the // ante handler. -func (k Keeper) TimeoutPacket( +func (k *Keeper) TimeoutPacket( ctx sdk.Context, packet types.Packet, proof []byte, @@ -130,7 +130,7 @@ func (k Keeper) TimeoutPacket( // then the channel will be set to the FLUSHCOMPLETE state. // // CONTRACT: this function must be called in the IBC handler -func (k Keeper) TimeoutExecuted( +func (k *Keeper) TimeoutExecuted( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet types.Packet, @@ -208,7 +208,7 @@ func (k Keeper) TimeoutExecuted( // TimeoutOnClose is called by a module in order to prove that the channel to // which an unreceived packet was addressed has been closed, so the packet will // never be received (even if the timeoutHeight has not yet been reached). -func (k Keeper) TimeoutOnClose( +func (k *Keeper) TimeoutOnClose( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet types.Packet, diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index 51f114dd457..955eed7f2d3 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -19,7 +19,7 @@ import ( // ChanUpgradeInit is called by a module to initiate a channel upgrade handshake with // a module on another chain. -func (k Keeper) ChanUpgradeInit( +func (k *Keeper) ChanUpgradeInit( ctx sdk.Context, portID string, channelID string, @@ -45,7 +45,7 @@ func (k Keeper) ChanUpgradeInit( // WriteUpgradeInitChannel writes a channel which has successfully passed the UpgradeInit handshake step. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade, upgradeVersion string) (types.Channel, types.Upgrade) { +func (k *Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade, upgradeVersion string) (types.Channel, types.Upgrade) { defer telemetry.IncrCounter(1, "ibc", "channel", "upgrade-init") channel, found := k.GetChannel(ctx, portID, channelID) @@ -73,7 +73,7 @@ func (k Keeper) WriteUpgradeInitChannel(ctx sdk.Context, portID, channelID strin // ChanUpgradeTry is called by a module to accept the first step of a channel upgrade handshake initiated by // a module on another chain. If this function is successful, the proposed upgrade will be returned. If the upgrade fails, the upgrade sequence will still be incremented but an error will be returned. -func (k Keeper) ChanUpgradeTry( +func (k *Keeper) ChanUpgradeTry( ctx sdk.Context, portID, channelID string, @@ -223,7 +223,7 @@ func (k Keeper) ChanUpgradeTry( // WriteUpgradeTryChannel writes the channel end and upgrade to state after successfully passing the UpgradeTry handshake step. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeTryChannel(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade, upgradeVersion string) (types.Channel, types.Upgrade) { +func (k *Keeper) WriteUpgradeTryChannel(ctx sdk.Context, portID, channelID string, upgrade types.Upgrade, upgradeVersion string) (types.Channel, types.Upgrade) { defer telemetry.IncrCounter(1, "ibc", "channel", "upgrade-try") channel, found := k.GetChannel(ctx, portID, channelID) @@ -251,7 +251,7 @@ func (k Keeper) WriteUpgradeTryChannel(ctx sdk.Context, portID, channelID string // The channel may be in FLUSHING if we are in a crossing hellos situation. // // A -> Init (OPEN), B -> Init (OPEN) -> A -> Try (FLUSHING), B -> Try (FLUSHING), A -> Ack (begins in FLUSHING) -func (k Keeper) ChanUpgradeAck( +func (k *Keeper) ChanUpgradeAck( ctx sdk.Context, portID, channelID string, @@ -352,7 +352,7 @@ func (k Keeper) ChanUpgradeAck( // WriteUpgradeAckChannel writes a channel which has successfully passed the UpgradeAck handshake step as well as // setting the upgrade for that channel. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeAckChannel(ctx sdk.Context, portID, channelID string, counterpartyUpgrade types.Upgrade) (types.Channel, types.Upgrade) { +func (k *Keeper) WriteUpgradeAckChannel(ctx sdk.Context, portID, channelID string, counterpartyUpgrade types.Upgrade) (types.Channel, types.Upgrade) { defer telemetry.IncrCounter(1, "ibc", "channel", "upgrade-ack") channel, found := k.GetChannel(ctx, portID, channelID) @@ -382,7 +382,7 @@ func (k Keeper) WriteUpgradeAckChannel(ctx sdk.Context, portID, channelID string // ChanUpgradeConfirm is called on the chain which is on FLUSHING after chanUpgradeAck is called on the counterparty. // This will inform the TRY chain of the timeout set on ACK by the counterparty. If the timeout has already exceeded, we will write an error receipt and restore. -func (k Keeper) ChanUpgradeConfirm( +func (k *Keeper) ChanUpgradeConfirm( ctx sdk.Context, portID, channelID string, @@ -460,7 +460,7 @@ func (k Keeper) ChanUpgradeConfirm( // If the channel has no in-flight packets, its state is updated to indicate that flushing has completed. Otherwise, the counterparty upgrade is set // and the channel state is left unchanged. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeConfirmChannel(ctx sdk.Context, portID, channelID string, counterpartyUpgrade types.Upgrade) types.Channel { +func (k *Keeper) WriteUpgradeConfirmChannel(ctx sdk.Context, portID, channelID string, counterpartyUpgrade types.Upgrade) types.Channel { defer telemetry.IncrCounter(1, "ibc", "channel", "upgrade-confirm") channel, found := k.GetChannel(ctx, portID, channelID) @@ -482,7 +482,7 @@ func (k Keeper) WriteUpgradeConfirmChannel(ctx sdk.Context, portID, channelID st // ChanUpgradeOpen is called by a module to complete the channel upgrade handshake and move the channel back to an OPEN state. // This method should only be called after both channels have flushed any in-flight packets. // This method should only be called directly by the core IBC message server. -func (k Keeper) ChanUpgradeOpen( +func (k *Keeper) ChanUpgradeOpen( ctx sdk.Context, portID, channelID string, @@ -574,7 +574,7 @@ func (k Keeper) ChanUpgradeOpen( // WriteUpgradeOpenChannel writes the agreed upon upgrade fields to the channel, and sets the channel state back to OPEN. This can be called in one of two cases: // - In the UpgradeConfirm step of the handshake if both sides have already flushed all in-flight packets. // - In the UpgradeOpen step of the handshake. -func (k Keeper) WriteUpgradeOpenChannel(ctx sdk.Context, portID, channelID string) types.Channel { +func (k *Keeper) WriteUpgradeOpenChannel(ctx sdk.Context, portID, channelID string) types.Channel { channel, found := k.GetChannel(ctx, portID, channelID) if !found { panic(fmt.Errorf("could not find existing channel when updating channel state, channelID: %s, portID: %s", channelID, portID)) @@ -636,7 +636,7 @@ func (k Keeper) WriteUpgradeOpenChannel(ctx sdk.Context, portID, channelID strin // ChanUpgradeCancel is called by the msg server to prove that an error receipt was written on the counterparty // which constitutes a valid situation where the upgrade should be cancelled. An error is returned if sufficient evidence // for cancelling the upgrade has not been provided. -func (k Keeper) ChanUpgradeCancel(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt, errorReceiptProof []byte, proofHeight clienttypes.Height) error { +func (k *Keeper) ChanUpgradeCancel(ctx sdk.Context, portID, channelID string, errorReceipt types.ErrorReceipt, errorReceiptProof []byte, proofHeight clienttypes.Height) error { channel, found := k.GetChannel(ctx, portID, channelID) if !found { return errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID) @@ -694,7 +694,7 @@ func (k Keeper) ChanUpgradeCancel(ctx sdk.Context, portID, channelID string, err // WriteUpgradeCancelChannel writes a channel which has canceled the upgrade process.Auxiliary upgrade state is // also deleted. -func (k Keeper) WriteUpgradeCancelChannel(ctx sdk.Context, portID, channelID string, sequence uint64) { +func (k *Keeper) WriteUpgradeCancelChannel(ctx sdk.Context, portID, channelID string, sequence uint64) { defer telemetry.IncrCounter(1, "ibc", "channel", "upgrade-cancel") channel, found := k.GetChannel(ctx, portID, channelID) @@ -712,7 +712,7 @@ func (k Keeper) WriteUpgradeCancelChannel(ctx sdk.Context, portID, channelID str // ChanUpgradeTimeout times out an outstanding upgrade. // This should be used by the initialising chain when the counterparty chain has not responded to an upgrade proposal within the specified timeout period. -func (k Keeper) ChanUpgradeTimeout( +func (k *Keeper) ChanUpgradeTimeout( ctx sdk.Context, portID, channelID string, counterpartyChannel types.Channel, @@ -808,7 +808,7 @@ func (k Keeper) ChanUpgradeTimeout( // WriteUpgradeTimeoutChannel restores the channel state of an initialising chain in the event that the counterparty chain has passed the timeout set in ChanUpgradeInit to the state before the upgrade was proposed. // Auxiliary upgrade state is also deleted. // An event is emitted for the handshake step. -func (k Keeper) WriteUpgradeTimeoutChannel( +func (k *Keeper) WriteUpgradeTimeoutChannel( ctx sdk.Context, portID, channelID string, ) (types.Channel, types.Upgrade) { @@ -834,7 +834,7 @@ func (k Keeper) WriteUpgradeTimeoutChannel( // startFlushing will set the upgrade last packet send and continue blocking the upgrade from continuing until all // in-flight packets have been flushed. -func (k Keeper) startFlushing(ctx sdk.Context, portID, channelID string, upgrade *types.Upgrade) error { +func (k *Keeper) startFlushing(ctx sdk.Context, portID, channelID string, upgrade *types.Upgrade) error { channel, found := k.GetChannel(ctx, portID, channelID) if !found { return errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID) @@ -865,13 +865,13 @@ func (k Keeper) startFlushing(ctx sdk.Context, portID, channelID string, upgrade } // getAbsoluteUpgradeTimeout returns the absolute timeout for the given upgrade. -func (k Keeper) getAbsoluteUpgradeTimeout(ctx sdk.Context) types.Timeout { +func (k *Keeper) getAbsoluteUpgradeTimeout(ctx sdk.Context) types.Timeout { upgradeTimeout := k.GetParams(ctx).UpgradeTimeout return types.NewTimeout(clienttypes.ZeroHeight(), uint64(ctx.BlockTime().UnixNano())+upgradeTimeout.Timestamp) } // checkForUpgradeCompatibility checks performs stateful validation of self upgrade fields relative to counterparty upgrade. -func (k Keeper) checkForUpgradeCompatibility(ctx sdk.Context, upgradeFields, counterpartyUpgradeFields types.UpgradeFields) error { +func (k *Keeper) checkForUpgradeCompatibility(ctx sdk.Context, upgradeFields, counterpartyUpgradeFields types.UpgradeFields) error { // assert that both sides propose the same channel ordering if upgradeFields.Ordering != counterpartyUpgradeFields.Ordering { return errorsmod.Wrapf(types.ErrIncompatibleCounterpartyUpgrade, "expected upgrade ordering (%s) to match counterparty upgrade ordering (%s)", upgradeFields.Ordering, counterpartyUpgradeFields.Ordering) @@ -909,7 +909,7 @@ func (k Keeper) checkForUpgradeCompatibility(ctx sdk.Context, upgradeFields, cou // - the proposed connection hops do not exist // - the proposed version is non-empty (checked in UpgradeFields.ValidateBasic()) // - the proposed connection hops are not open -func (k Keeper) validateSelfUpgradeFields(ctx sdk.Context, proposedUpgrade types.UpgradeFields, channel types.Channel) error { +func (k *Keeper) validateSelfUpgradeFields(ctx sdk.Context, proposedUpgrade types.UpgradeFields, channel types.Channel) error { currentFields := extractUpgradeFields(channel) if reflect.DeepEqual(proposedUpgrade, currentFields) { @@ -958,7 +958,7 @@ func extractUpgradeFields(channel types.Channel) types.UpgradeFields { // MustAbortUpgrade will restore the channel state to its pre-upgrade state so that upgrade is aborted. // Any unnecessary state is deleted and an error receipt is written. // This function is expected to always succeed, a panic will occur if an error occurs. -func (k Keeper) MustAbortUpgrade(ctx sdk.Context, portID, channelID string, err error) { +func (k *Keeper) MustAbortUpgrade(ctx sdk.Context, portID, channelID string, err error) { if err := k.abortUpgrade(ctx, portID, channelID, err); err != nil { panic(err) } @@ -968,7 +968,7 @@ func (k Keeper) MustAbortUpgrade(ctx sdk.Context, portID, channelID string, err // All upgrade information associated with the upgrade attempt is deleted and an upgrade error // receipt is written for that upgrade attempt. This prevents the upgrade handshake from continuing // on our side and provides proof for the counterparty to safely abort the upgrade. -func (k Keeper) abortUpgrade(ctx sdk.Context, portID, channelID string, err error) error { +func (k *Keeper) abortUpgrade(ctx sdk.Context, portID, channelID string, err error) error { if err == nil { return errorsmod.Wrap(types.ErrInvalidUpgradeError, "cannot abort upgrade handshake with nil error") } @@ -996,7 +996,7 @@ func (k Keeper) abortUpgrade(ctx sdk.Context, portID, channelID string, err erro // restoreChannel will restore the channel state to its pre-upgrade state so that upgrade is aborted. // When an upgrade attempt is aborted, the upgrade information must be deleted. This prevents us // from continuing an upgrade handshake after we cancel an upgrade attempt. -func (k Keeper) restoreChannel(ctx sdk.Context, portID, channelID string, upgradeSequence uint64, channel types.Channel) types.Channel { +func (k *Keeper) restoreChannel(ctx sdk.Context, portID, channelID string, upgradeSequence uint64, channel types.Channel) types.Channel { channel.State = types.OPEN channel.UpgradeSequence = upgradeSequence @@ -1009,7 +1009,7 @@ func (k Keeper) restoreChannel(ctx sdk.Context, portID, channelID string, upgrad } // WriteErrorReceipt will write an error receipt from the provided UpgradeError. -func (k Keeper) WriteErrorReceipt(ctx sdk.Context, portID, channelID string, upgradeError *types.UpgradeError) { +func (k *Keeper) WriteErrorReceipt(ctx sdk.Context, portID, channelID string, upgradeError *types.UpgradeError) { channel, found := k.GetChannel(ctx, portID, channelID) if !found { panic(errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", portID, channelID)) diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index b6d196133af..884700adc3d 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -9,7 +9,7 @@ import ( testifysuite "github.com/stretchr/testify/suite" errorsmod "cosmossdk.io/errors" - log "cosmossdk.io/log" + "cosmossdk.io/log" "cosmossdk.io/store/iavl" "cosmossdk.io/store/metrics" "cosmossdk.io/store/rootmulti" @@ -94,7 +94,8 @@ func (suite *TypesTestSuite) SetupTest() { store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil) err := store.LoadVersion(0) suite.Require().NoError(err) - iavlStore := store.GetCommitStore(storeKey).(*iavl.Store) + iavlStore, ok := store.GetCommitStore(storeKey).(*iavl.Store) + suite.Require().True(ok) iavlStore.Set([]byte("KEY"), []byte("VALUE")) _ = store.Commit() diff --git a/modules/core/05-port/keeper/keeper.go b/modules/core/05-port/keeper/keeper.go index 68e89ecac69..51d77152a59 100644 --- a/modules/core/05-port/keeper/keeper.go +++ b/modules/core/05-port/keeper/keeper.go @@ -21,8 +21,8 @@ type Keeper struct { } // NewKeeper creates a new IBC connection Keeper instance -func NewKeeper(sck exported.ScopedKeeper) Keeper { - return Keeper{ +func NewKeeper(sck exported.ScopedKeeper) *Keeper { + return &Keeper{ scopedKeeper: sck, } } @@ -33,7 +33,7 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger { } // IsBound checks a given port ID is already bounded. -func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { +func (k *Keeper) IsBound(ctx sdk.Context, portID string) bool { _, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID)) return ok } @@ -64,7 +64,7 @@ func (k *Keeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capab // by checking if the memory address of the capability was previously // generated and bound to the port (provided as a parameter) which the capability // is being authenticated against. -func (k Keeper) Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, portID string) bool { +func (k *Keeper) Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, portID string) bool { if err := host.PortIdentifierValidator(portID); err != nil { panic(err.Error()) } @@ -73,7 +73,7 @@ func (k Keeper) Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, p } // LookupModuleByPort will return the IBCModule along with the capability associated with a given portID -func (k Keeper) LookupModuleByPort(ctx sdk.Context, portID string) (string, *capabilitytypes.Capability, error) { +func (k *Keeper) LookupModuleByPort(ctx sdk.Context, portID string) (string, *capabilitytypes.Capability, error) { modules, capability, err := k.scopedKeeper.LookupModules(ctx, host.PortPath(portID)) if err != nil { return "", nil, err @@ -81,3 +81,9 @@ func (k Keeper) LookupModuleByPort(ctx sdk.Context, portID string) (string, *cap return types.GetModuleOwner(modules), capability, nil } + +// Route returns a IBCModule for a given module, and a boolean indicating +// whether or not the route is present. +func (k *Keeper) Route(clientID string) (types.IBCModule, bool) { + return k.Router.GetRoute(clientID) +} diff --git a/modules/core/23-commitment/types/commitment_test.go b/modules/core/23-commitment/types/commitment_test.go index 6d8a2d227af..2000a4814d7 100644 --- a/modules/core/23-commitment/types/commitment_test.go +++ b/modules/core/23-commitment/types/commitment_test.go @@ -31,7 +31,9 @@ func (suite *MerkleTestSuite) SetupTest() { err := suite.store.LoadVersion(0) suite.Require().NoError(err) - suite.iavlStore = suite.store.GetCommitStore(suite.storeKey).(*iavl.Store) + var ok bool + suite.iavlStore, ok = suite.store.GetCommitStore(suite.storeKey).(*iavl.Store) + suite.Require().True(ok) } func TestMerkleTestSuite(t *testing.T) { diff --git a/modules/core/23-commitment/types/utils.go b/modules/core/23-commitment/types/utils.go index 79530fc51fd..8c5416262d0 100644 --- a/modules/core/23-commitment/types/utils.go +++ b/modules/core/23-commitment/types/utils.go @@ -5,7 +5,7 @@ import ( errorsmod "cosmossdk.io/errors" - crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/cometbft/cometbft/proto/tendermint/crypto" ) // ConvertProofs converts crypto.ProofOps into MerkleProof diff --git a/modules/core/23-commitment/types/utils_test.go b/modules/core/23-commitment/types/utils_test.go index 0cd24b66323..22afcf60a52 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" - crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + "github.com/cometbft/cometbft/proto/tendermint/crypto" "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" ) diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index 8a1bdd980dc..2259b9fdc20 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -1,7 +1,7 @@ package exported import ( - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" storetypes "cosmossdk.io/store/types" diff --git a/modules/core/genesis.go b/modules/core/genesis.go index d1379de4b84..3eaada47208 100644 --- a/modules/core/genesis.go +++ b/modules/core/genesis.go @@ -13,7 +13,7 @@ import ( // InitGenesis initializes the ibc state from a provided genesis // state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs *types.GenesisState) { - client.InitGenesis(ctx, *k.ClientKeeper, gs.ClientGenesis) + client.InitGenesis(ctx, k.ClientKeeper, gs.ClientGenesis) connection.InitGenesis(ctx, k.ConnectionKeeper, gs.ConnectionGenesis) channel.InitGenesis(ctx, k.ChannelKeeper, gs.ChannelGenesis) } @@ -21,7 +21,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs *types.GenesisState) { // ExportGenesis returns the ibc exported genesis. func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { return &types.GenesisState{ - ClientGenesis: client.ExportGenesis(ctx, *k.ClientKeeper), + ClientGenesis: client.ExportGenesis(ctx, k.ClientKeeper), ConnectionGenesis: connection.ExportGenesis(ctx, k.ConnectionKeeper), ChannelGenesis: channel.ExportGenesis(ctx, k.ChannelKeeper), } diff --git a/modules/core/keeper/grpc_query.go b/modules/core/keeper/grpc_query.go index 259fb55e7d2..2a589738eea 100644 --- a/modules/core/keeper/grpc_query.go +++ b/modules/core/keeper/grpc_query.go @@ -9,166 +9,166 @@ import ( ) // ClientState implements the IBC QueryServer interface -func (k Keeper) ClientState(c context.Context, req *clienttypes.QueryClientStateRequest) (*clienttypes.QueryClientStateResponse, error) { +func (k *Keeper) ClientState(c context.Context, req *clienttypes.QueryClientStateRequest) (*clienttypes.QueryClientStateResponse, error) { return k.ClientKeeper.ClientState(c, req) } // ClientStates implements the IBC QueryServer interface -func (k Keeper) ClientStates(c context.Context, req *clienttypes.QueryClientStatesRequest) (*clienttypes.QueryClientStatesResponse, error) { +func (k *Keeper) ClientStates(c context.Context, req *clienttypes.QueryClientStatesRequest) (*clienttypes.QueryClientStatesResponse, error) { return k.ClientKeeper.ClientStates(c, req) } // ConsensusState implements the IBC QueryServer interface -func (k Keeper) ConsensusState(c context.Context, req *clienttypes.QueryConsensusStateRequest) (*clienttypes.QueryConsensusStateResponse, error) { +func (k *Keeper) ConsensusState(c context.Context, req *clienttypes.QueryConsensusStateRequest) (*clienttypes.QueryConsensusStateResponse, error) { return k.ClientKeeper.ConsensusState(c, req) } // ConsensusStates implements the IBC QueryServer interface -func (k Keeper) ConsensusStates(c context.Context, req *clienttypes.QueryConsensusStatesRequest) (*clienttypes.QueryConsensusStatesResponse, error) { +func (k *Keeper) ConsensusStates(c context.Context, req *clienttypes.QueryConsensusStatesRequest) (*clienttypes.QueryConsensusStatesResponse, error) { return k.ClientKeeper.ConsensusStates(c, req) } // ConsensusStateHeights implements the IBC QueryServer interface -func (k Keeper) ConsensusStateHeights(c context.Context, req *clienttypes.QueryConsensusStateHeightsRequest) (*clienttypes.QueryConsensusStateHeightsResponse, error) { +func (k *Keeper) ConsensusStateHeights(c context.Context, req *clienttypes.QueryConsensusStateHeightsRequest) (*clienttypes.QueryConsensusStateHeightsResponse, error) { return k.ClientKeeper.ConsensusStateHeights(c, req) } // ClientStatus implements the IBC QueryServer interface -func (k Keeper) ClientStatus(c context.Context, req *clienttypes.QueryClientStatusRequest) (*clienttypes.QueryClientStatusResponse, error) { +func (k *Keeper) ClientStatus(c context.Context, req *clienttypes.QueryClientStatusRequest) (*clienttypes.QueryClientStatusResponse, error) { return k.ClientKeeper.ClientStatus(c, req) } // ClientParams implements the IBC QueryServer interface -func (k Keeper) ClientParams(c context.Context, req *clienttypes.QueryClientParamsRequest) (*clienttypes.QueryClientParamsResponse, error) { +func (k *Keeper) ClientParams(c context.Context, req *clienttypes.QueryClientParamsRequest) (*clienttypes.QueryClientParamsResponse, error) { return k.ClientKeeper.ClientParams(c, req) } // UpgradedClientState implements the IBC QueryServer interface -func (k Keeper) UpgradedClientState(c context.Context, req *clienttypes.QueryUpgradedClientStateRequest) (*clienttypes.QueryUpgradedClientStateResponse, error) { +func (k *Keeper) UpgradedClientState(c context.Context, req *clienttypes.QueryUpgradedClientStateRequest) (*clienttypes.QueryUpgradedClientStateResponse, error) { return k.ClientKeeper.UpgradedClientState(c, req) } // UpgradedConsensusState implements the IBC QueryServer interface -func (k Keeper) UpgradedConsensusState(c context.Context, req *clienttypes.QueryUpgradedConsensusStateRequest) (*clienttypes.QueryUpgradedConsensusStateResponse, error) { +func (k *Keeper) UpgradedConsensusState(c context.Context, req *clienttypes.QueryUpgradedConsensusStateRequest) (*clienttypes.QueryUpgradedConsensusStateResponse, error) { return k.ClientKeeper.UpgradedConsensusState(c, req) } // VerifyMembership implements the IBC QueryServer interface. -func (k Keeper) VerifyMembership(c context.Context, req *clienttypes.QueryVerifyMembershipRequest) (*clienttypes.QueryVerifyMembershipResponse, error) { +func (k *Keeper) VerifyMembership(c context.Context, req *clienttypes.QueryVerifyMembershipRequest) (*clienttypes.QueryVerifyMembershipResponse, error) { return k.ClientKeeper.VerifyMembership(c, req) } // Connection implements the IBC QueryServer interface -func (k Keeper) Connection(c context.Context, req *connectiontypes.QueryConnectionRequest) (*connectiontypes.QueryConnectionResponse, error) { +func (k *Keeper) Connection(c context.Context, req *connectiontypes.QueryConnectionRequest) (*connectiontypes.QueryConnectionResponse, error) { return k.ConnectionKeeper.Connection(c, req) } // Connections implements the IBC QueryServer interface -func (k Keeper) Connections(c context.Context, req *connectiontypes.QueryConnectionsRequest) (*connectiontypes.QueryConnectionsResponse, error) { +func (k *Keeper) Connections(c context.Context, req *connectiontypes.QueryConnectionsRequest) (*connectiontypes.QueryConnectionsResponse, error) { return k.ConnectionKeeper.Connections(c, req) } // ClientConnections implements the IBC QueryServer interface -func (k Keeper) ClientConnections(c context.Context, req *connectiontypes.QueryClientConnectionsRequest) (*connectiontypes.QueryClientConnectionsResponse, error) { +func (k *Keeper) ClientConnections(c context.Context, req *connectiontypes.QueryClientConnectionsRequest) (*connectiontypes.QueryClientConnectionsResponse, error) { return k.ConnectionKeeper.ClientConnections(c, req) } // ConnectionClientState implements the IBC QueryServer interface -func (k Keeper) ConnectionClientState(c context.Context, req *connectiontypes.QueryConnectionClientStateRequest) (*connectiontypes.QueryConnectionClientStateResponse, error) { +func (k *Keeper) ConnectionClientState(c context.Context, req *connectiontypes.QueryConnectionClientStateRequest) (*connectiontypes.QueryConnectionClientStateResponse, error) { return k.ConnectionKeeper.ConnectionClientState(c, req) } // ConnectionConsensusState implements the IBC QueryServer interface -func (k Keeper) ConnectionConsensusState(c context.Context, req *connectiontypes.QueryConnectionConsensusStateRequest) (*connectiontypes.QueryConnectionConsensusStateResponse, error) { +func (k *Keeper) ConnectionConsensusState(c context.Context, req *connectiontypes.QueryConnectionConsensusStateRequest) (*connectiontypes.QueryConnectionConsensusStateResponse, error) { return k.ConnectionKeeper.ConnectionConsensusState(c, req) } // ConnectionParams implements the IBC QueryServer interface -func (k Keeper) ConnectionParams(c context.Context, req *connectiontypes.QueryConnectionParamsRequest) (*connectiontypes.QueryConnectionParamsResponse, error) { +func (k *Keeper) ConnectionParams(c context.Context, req *connectiontypes.QueryConnectionParamsRequest) (*connectiontypes.QueryConnectionParamsResponse, error) { return k.ConnectionKeeper.ConnectionParams(c, req) } // Channel implements the IBC QueryServer interface -func (k Keeper) Channel(c context.Context, req *channeltypes.QueryChannelRequest) (*channeltypes.QueryChannelResponse, error) { +func (k *Keeper) Channel(c context.Context, req *channeltypes.QueryChannelRequest) (*channeltypes.QueryChannelResponse, error) { return k.ChannelKeeper.Channel(c, req) } // Channels implements the IBC QueryServer interface -func (k Keeper) Channels(c context.Context, req *channeltypes.QueryChannelsRequest) (*channeltypes.QueryChannelsResponse, error) { +func (k *Keeper) Channels(c context.Context, req *channeltypes.QueryChannelsRequest) (*channeltypes.QueryChannelsResponse, error) { return k.ChannelKeeper.Channels(c, req) } // ConnectionChannels implements the IBC QueryServer interface -func (k Keeper) ConnectionChannels(c context.Context, req *channeltypes.QueryConnectionChannelsRequest) (*channeltypes.QueryConnectionChannelsResponse, error) { +func (k *Keeper) ConnectionChannels(c context.Context, req *channeltypes.QueryConnectionChannelsRequest) (*channeltypes.QueryConnectionChannelsResponse, error) { return k.ChannelKeeper.ConnectionChannels(c, req) } // ChannelClientState implements the IBC QueryServer interface -func (k Keeper) ChannelClientState(c context.Context, req *channeltypes.QueryChannelClientStateRequest) (*channeltypes.QueryChannelClientStateResponse, error) { +func (k *Keeper) ChannelClientState(c context.Context, req *channeltypes.QueryChannelClientStateRequest) (*channeltypes.QueryChannelClientStateResponse, error) { return k.ChannelKeeper.ChannelClientState(c, req) } // ChannelConsensusState implements the IBC QueryServer interface -func (k Keeper) ChannelConsensusState(c context.Context, req *channeltypes.QueryChannelConsensusStateRequest) (*channeltypes.QueryChannelConsensusStateResponse, error) { +func (k *Keeper) ChannelConsensusState(c context.Context, req *channeltypes.QueryChannelConsensusStateRequest) (*channeltypes.QueryChannelConsensusStateResponse, error) { return k.ChannelKeeper.ChannelConsensusState(c, req) } // PacketCommitment implements the IBC QueryServer interface -func (k Keeper) PacketCommitment(c context.Context, req *channeltypes.QueryPacketCommitmentRequest) (*channeltypes.QueryPacketCommitmentResponse, error) { +func (k *Keeper) PacketCommitment(c context.Context, req *channeltypes.QueryPacketCommitmentRequest) (*channeltypes.QueryPacketCommitmentResponse, error) { return k.ChannelKeeper.PacketCommitment(c, req) } // PacketCommitments implements the IBC QueryServer interface -func (k Keeper) PacketCommitments(c context.Context, req *channeltypes.QueryPacketCommitmentsRequest) (*channeltypes.QueryPacketCommitmentsResponse, error) { +func (k *Keeper) PacketCommitments(c context.Context, req *channeltypes.QueryPacketCommitmentsRequest) (*channeltypes.QueryPacketCommitmentsResponse, error) { return k.ChannelKeeper.PacketCommitments(c, req) } // PacketReceipt implements the IBC QueryServer interface -func (k Keeper) PacketReceipt(c context.Context, req *channeltypes.QueryPacketReceiptRequest) (*channeltypes.QueryPacketReceiptResponse, error) { +func (k *Keeper) PacketReceipt(c context.Context, req *channeltypes.QueryPacketReceiptRequest) (*channeltypes.QueryPacketReceiptResponse, error) { return k.ChannelKeeper.PacketReceipt(c, req) } // PacketAcknowledgement implements the IBC QueryServer interface -func (k Keeper) PacketAcknowledgement(c context.Context, req *channeltypes.QueryPacketAcknowledgementRequest) (*channeltypes.QueryPacketAcknowledgementResponse, error) { +func (k *Keeper) PacketAcknowledgement(c context.Context, req *channeltypes.QueryPacketAcknowledgementRequest) (*channeltypes.QueryPacketAcknowledgementResponse, error) { return k.ChannelKeeper.PacketAcknowledgement(c, req) } // PacketAcknowledgements implements the IBC QueryServer interface -func (k Keeper) PacketAcknowledgements(c context.Context, req *channeltypes.QueryPacketAcknowledgementsRequest) (*channeltypes.QueryPacketAcknowledgementsResponse, error) { +func (k *Keeper) PacketAcknowledgements(c context.Context, req *channeltypes.QueryPacketAcknowledgementsRequest) (*channeltypes.QueryPacketAcknowledgementsResponse, error) { return k.ChannelKeeper.PacketAcknowledgements(c, req) } // UnreceivedPackets implements the IBC QueryServer interface -func (k Keeper) UnreceivedPackets(c context.Context, req *channeltypes.QueryUnreceivedPacketsRequest) (*channeltypes.QueryUnreceivedPacketsResponse, error) { +func (k *Keeper) UnreceivedPackets(c context.Context, req *channeltypes.QueryUnreceivedPacketsRequest) (*channeltypes.QueryUnreceivedPacketsResponse, error) { return k.ChannelKeeper.UnreceivedPackets(c, req) } // UnreceivedAcks implements the IBC QueryServer interface -func (k Keeper) UnreceivedAcks(c context.Context, req *channeltypes.QueryUnreceivedAcksRequest) (*channeltypes.QueryUnreceivedAcksResponse, error) { +func (k *Keeper) UnreceivedAcks(c context.Context, req *channeltypes.QueryUnreceivedAcksRequest) (*channeltypes.QueryUnreceivedAcksResponse, error) { return k.ChannelKeeper.UnreceivedAcks(c, req) } // NextSequenceReceive implements the IBC QueryServer interface -func (k Keeper) NextSequenceReceive(c context.Context, req *channeltypes.QueryNextSequenceReceiveRequest) (*channeltypes.QueryNextSequenceReceiveResponse, error) { +func (k *Keeper) NextSequenceReceive(c context.Context, req *channeltypes.QueryNextSequenceReceiveRequest) (*channeltypes.QueryNextSequenceReceiveResponse, error) { return k.ChannelKeeper.NextSequenceReceive(c, req) } // NextSequenceSend implements the IBC QueryServer interface -func (k Keeper) NextSequenceSend(c context.Context, req *channeltypes.QueryNextSequenceSendRequest) (*channeltypes.QueryNextSequenceSendResponse, error) { +func (k *Keeper) NextSequenceSend(c context.Context, req *channeltypes.QueryNextSequenceSendRequest) (*channeltypes.QueryNextSequenceSendResponse, error) { return k.ChannelKeeper.NextSequenceSend(c, req) } // UpgradeError implements the IBC QueryServer interface -func (k Keeper) UpgradeError(c context.Context, req *channeltypes.QueryUpgradeErrorRequest) (*channeltypes.QueryUpgradeErrorResponse, error) { +func (k *Keeper) UpgradeError(c context.Context, req *channeltypes.QueryUpgradeErrorRequest) (*channeltypes.QueryUpgradeErrorResponse, error) { return k.ChannelKeeper.UpgradeErrorReceipt(c, req) } // Upgrade implements the IBC QueryServer interface -func (k Keeper) Upgrade(c context.Context, req *channeltypes.QueryUpgradeRequest) (*channeltypes.QueryUpgradeResponse, error) { +func (k *Keeper) Upgrade(c context.Context, req *channeltypes.QueryUpgradeRequest) (*channeltypes.QueryUpgradeResponse, error) { return k.ChannelKeeper.Upgrade(c, req) } // ChannelParams implements the IBC QueryServer interface -func (k Keeper) ChannelParams(c context.Context, req *channeltypes.QueryChannelParamsRequest) (*channeltypes.QueryChannelParamsResponse, error) { +func (k *Keeper) ChannelParams(c context.Context, req *channeltypes.QueryChannelParamsRequest) (*channeltypes.QueryChannelParamsResponse, error) { return k.ChannelKeeper.ChannelParams(c, req) } diff --git a/modules/core/keeper/keeper.go b/modules/core/keeper/keeper.go index 093c8313e9b..30726efecfc 100644 --- a/modules/core/keeper/keeper.go +++ b/modules/core/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "errors" + "fmt" "reflect" "strings" @@ -29,10 +30,9 @@ type Keeper struct { cdc codec.BinaryCodec ClientKeeper *clientkeeper.Keeper - ConnectionKeeper connectionkeeper.Keeper - ChannelKeeper channelkeeper.Keeper + ConnectionKeeper *connectionkeeper.Keeper + ChannelKeeper *channelkeeper.Keeper PortKeeper *portkeeper.Keeper - Router *porttypes.Router authority string } @@ -61,39 +61,47 @@ func NewKeeper( } clientKeeper := clientkeeper.NewKeeper(cdc, key, paramSpace, consensusHost, upgradeKeeper) - connectionKeeper := connectionkeeper.NewKeeper(cdc, key, paramSpace, &clientKeeper) + connectionKeeper := connectionkeeper.NewKeeper(cdc, key, paramSpace, clientKeeper) portKeeper := portkeeper.NewKeeper(scopedKeeper) - channelKeeper := channelkeeper.NewKeeper(cdc, key, &clientKeeper, &connectionKeeper, &portKeeper, scopedKeeper) + channelKeeper := channelkeeper.NewKeeper(cdc, key, clientKeeper, connectionKeeper, portKeeper, scopedKeeper) return &Keeper{ cdc: cdc, - ClientKeeper: &clientKeeper, + ClientKeeper: clientKeeper, ConnectionKeeper: connectionKeeper, ChannelKeeper: channelKeeper, - PortKeeper: &portKeeper, + PortKeeper: portKeeper, authority: authority, } } // Codec returns the IBC module codec. -func (k Keeper) Codec() codec.BinaryCodec { +func (k *Keeper) Codec() codec.BinaryCodec { return k.cdc } +// SetConsensusHost sets a custom ConsensusHost for self client state and consensus state validation. +func (k *Keeper) SetConsensusHost(consensusHost clienttypes.ConsensusHost) { + if consensusHost == nil { + panic(fmt.Errorf("cannot set a nil self consensus host")) + } + + k.ClientKeeper.SetConsensusHost(consensusHost) +} + // SetRouter sets the Router in IBC Keeper and seals it. The method panics if // there is an existing router that's already sealed. func (k *Keeper) SetRouter(rtr *porttypes.Router) { - if k.Router != nil && k.Router.Sealed() { + if k.PortKeeper.Router != nil && k.PortKeeper.Router.Sealed() { panic(errors.New("cannot reset a sealed router")) } k.PortKeeper.Router = rtr - k.Router = rtr - k.Router.Seal() + k.PortKeeper.Router.Seal() } // GetAuthority returns the ibc module's authority. -func (k Keeper) GetAuthority() string { +func (k *Keeper) GetAuthority() string { return k.authority } diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index b213a35b85e..a30e96d1ed6 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -32,7 +32,7 @@ var ( // of the light client module to unmarshal and interpret the proto encoded bytes. // Backwards compatibility with older versions of ibc-go is maintained through the light client module reconstructing and encoding // the expected concrete type to the protobuf.Any for proof verification. -func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateClient) (*clienttypes.MsgCreateClientResponse, error) { +func (k *Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateClient) (*clienttypes.MsgCreateClientResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) clientState, err := clienttypes.UnpackClientState(msg.ClientState) @@ -48,7 +48,7 @@ func (k Keeper) CreateClient(goCtx context.Context, msg *clienttypes.MsgCreateCl } // UpdateClient defines a rpc handler method for MsgUpdateClient. -func (k Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateClient) (*clienttypes.MsgUpdateClientResponse, error) { +func (k *Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateClient) (*clienttypes.MsgUpdateClientResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) clientMsg, err := clienttypes.UnpackClientMessage(msg.ClientMessage) @@ -69,7 +69,7 @@ func (k Keeper) UpdateClient(goCtx context.Context, msg *clienttypes.MsgUpdateCl // of the light client module to unmarshal and interpret the proto encoded bytes. // Backwards compatibility with older versions of ibc-go is maintained through the light client module reconstructing and encoding // the expected concrete type to the protobuf.Any for proof verification. -func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgradeClient) (*clienttypes.MsgUpgradeClientResponse, error) { +func (k *Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgradeClient) (*clienttypes.MsgUpgradeClientResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if err := k.ClientKeeper.UpgradeClient( @@ -88,7 +88,7 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. // Warning: DEPRECATED // This handler is redundant as `MsgUpdateClient` is now capable of handling both a Header and a Misbehaviour -func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSubmitMisbehaviour) (*clienttypes.MsgSubmitMisbehaviourResponse, error) { //nolint:staticcheck // for now, we're using msgsubmitmisbehaviour. +func (k *Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSubmitMisbehaviour) (*clienttypes.MsgSubmitMisbehaviourResponse, error) { //nolint:staticcheck // for now, we're using msgsubmitmisbehaviour. ctx := sdk.UnwrapSDKContext(goCtx) misbehaviour, err := clienttypes.UnpackClientMessage(msg.Misbehaviour) @@ -104,7 +104,7 @@ func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSu } // RecoverClient defines a rpc handler method for MsgRecoverClient. -func (k Keeper) RecoverClient(goCtx context.Context, msg *clienttypes.MsgRecoverClient) (*clienttypes.MsgRecoverClientResponse, error) { +func (k *Keeper) RecoverClient(goCtx context.Context, msg *clienttypes.MsgRecoverClient) (*clienttypes.MsgRecoverClientResponse, error) { if k.GetAuthority() != msg.Signer { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } @@ -118,7 +118,7 @@ func (k Keeper) RecoverClient(goCtx context.Context, msg *clienttypes.MsgRecover } // IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. -func (k Keeper) IBCSoftwareUpgrade(goCtx context.Context, msg *clienttypes.MsgIBCSoftwareUpgrade) (*clienttypes.MsgIBCSoftwareUpgradeResponse, error) { +func (k *Keeper) IBCSoftwareUpgrade(goCtx context.Context, msg *clienttypes.MsgIBCSoftwareUpgrade) (*clienttypes.MsgIBCSoftwareUpgradeResponse, error) { if k.GetAuthority() != msg.Signer { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } @@ -137,7 +137,7 @@ func (k Keeper) IBCSoftwareUpgrade(goCtx context.Context, msg *clienttypes.MsgIB } // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. -func (k Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenInit) (*connectiontypes.MsgConnectionOpenInitResponse, error) { +func (k *Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenInit) (*connectiontypes.MsgConnectionOpenInitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if _, err := k.ConnectionKeeper.ConnOpenInit(ctx, msg.ClientId, msg.Counterparty, msg.Version, msg.DelayPeriod); err != nil { @@ -148,7 +148,7 @@ func (k Keeper) ConnectionOpenInit(goCtx context.Context, msg *connectiontypes.M } // ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. -func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenTry) (*connectiontypes.MsgConnectionOpenTryResponse, error) { +func (k *Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenTry) (*connectiontypes.MsgConnectionOpenTryResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) targetClient, err := clienttypes.UnpackClientState(msg.ClientState) @@ -168,7 +168,7 @@ func (k Keeper) ConnectionOpenTry(goCtx context.Context, msg *connectiontypes.Ms } // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. -func (k Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenAck) (*connectiontypes.MsgConnectionOpenAckResponse, error) { +func (k *Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenAck) (*connectiontypes.MsgConnectionOpenAckResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) targetClient, err := clienttypes.UnpackClientState(msg.ClientState) @@ -188,7 +188,7 @@ func (k Keeper) ConnectionOpenAck(goCtx context.Context, msg *connectiontypes.Ms } // ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. -func (k Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenConfirm) (*connectiontypes.MsgConnectionOpenConfirmResponse, error) { +func (k *Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontypes.MsgConnectionOpenConfirm) (*connectiontypes.MsgConnectionOpenConfirmResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if err := k.ConnectionKeeper.ConnOpenConfirm( @@ -203,7 +203,7 @@ func (k Keeper) ConnectionOpenConfirm(goCtx context.Context, msg *connectiontype // ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. // ChannelOpenInit will perform 04-channel checks, route to the application // callback, and write an OpenInit channel into state upon successful execution. -func (k Keeper) ChannelOpenInit(goCtx context.Context, msg *channeltypes.MsgChannelOpenInit) (*channeltypes.MsgChannelOpenInitResponse, error) { +func (k *Keeper) ChannelOpenInit(goCtx context.Context, msg *channeltypes.MsgChannelOpenInit) (*channeltypes.MsgChannelOpenInitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by port capability @@ -214,7 +214,7 @@ func (k Keeper) ChannelOpenInit(goCtx context.Context, msg *channeltypes.MsgChan } // Retrieve application callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel open init failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -251,7 +251,7 @@ func (k Keeper) ChannelOpenInit(goCtx context.Context, msg *channeltypes.MsgChan // ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. // ChannelOpenTry will perform 04-channel checks, route to the application // callback, and write an OpenTry channel into state upon successful execution. -func (k Keeper) ChannelOpenTry(goCtx context.Context, msg *channeltypes.MsgChannelOpenTry) (*channeltypes.MsgChannelOpenTryResponse, error) { +func (k *Keeper) ChannelOpenTry(goCtx context.Context, msg *channeltypes.MsgChannelOpenTry) (*channeltypes.MsgChannelOpenTryResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by port capability @@ -262,7 +262,7 @@ func (k Keeper) ChannelOpenTry(goCtx context.Context, msg *channeltypes.MsgChann } // Retrieve application callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel open try failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -298,7 +298,7 @@ func (k Keeper) ChannelOpenTry(goCtx context.Context, msg *channeltypes.MsgChann // ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. // ChannelOpenAck will perform 04-channel checks, route to the application // callback, and write an OpenAck channel into state upon successful execution. -func (k Keeper) ChannelOpenAck(goCtx context.Context, msg *channeltypes.MsgChannelOpenAck) (*channeltypes.MsgChannelOpenAckResponse, error) { +func (k *Keeper) ChannelOpenAck(goCtx context.Context, msg *channeltypes.MsgChannelOpenAck) (*channeltypes.MsgChannelOpenAckResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by channel capability @@ -309,7 +309,7 @@ func (k Keeper) ChannelOpenAck(goCtx context.Context, msg *channeltypes.MsgChann } // Retrieve application callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel open ack failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -340,7 +340,7 @@ func (k Keeper) ChannelOpenAck(goCtx context.Context, msg *channeltypes.MsgChann // ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. // ChannelOpenConfirm will perform 04-channel checks, route to the application // callback, and write an OpenConfirm channel into state upon successful execution. -func (k Keeper) ChannelOpenConfirm(goCtx context.Context, msg *channeltypes.MsgChannelOpenConfirm) (*channeltypes.MsgChannelOpenConfirmResponse, error) { +func (k *Keeper) ChannelOpenConfirm(goCtx context.Context, msg *channeltypes.MsgChannelOpenConfirm) (*channeltypes.MsgChannelOpenConfirmResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by channel capability @@ -351,7 +351,7 @@ func (k Keeper) ChannelOpenConfirm(goCtx context.Context, msg *channeltypes.MsgC } // Retrieve application callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel open confirm failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -378,7 +378,7 @@ func (k Keeper) ChannelOpenConfirm(goCtx context.Context, msg *channeltypes.MsgC } // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. -func (k Keeper) ChannelCloseInit(goCtx context.Context, msg *channeltypes.MsgChannelCloseInit) (*channeltypes.MsgChannelCloseInitResponse, error) { +func (k *Keeper) ChannelCloseInit(goCtx context.Context, msg *channeltypes.MsgChannelCloseInit) (*channeltypes.MsgChannelCloseInitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by channel capability @@ -389,7 +389,7 @@ func (k Keeper) ChannelCloseInit(goCtx context.Context, msg *channeltypes.MsgCha } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel close init failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -412,7 +412,7 @@ func (k Keeper) ChannelCloseInit(goCtx context.Context, msg *channeltypes.MsgCha } // ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. -func (k Keeper) ChannelCloseConfirm(goCtx context.Context, msg *channeltypes.MsgChannelCloseConfirm) (*channeltypes.MsgChannelCloseConfirmResponse, error) { +func (k *Keeper) ChannelCloseConfirm(goCtx context.Context, msg *channeltypes.MsgChannelCloseConfirm) (*channeltypes.MsgChannelCloseConfirmResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Lookup module by channel capability @@ -423,7 +423,7 @@ func (k Keeper) ChannelCloseConfirm(goCtx context.Context, msg *channeltypes.Msg } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel close confirm failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -446,7 +446,7 @@ func (k Keeper) ChannelCloseConfirm(goCtx context.Context, msg *channeltypes.Msg } // RecvPacket defines a rpc handler method for MsgRecvPacket. -func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacket) (*channeltypes.MsgRecvPacketResponse, error) { +func (k *Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacket) (*channeltypes.MsgRecvPacketResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) relayer, err := sdk.AccAddressFromBech32(msg.Signer) @@ -463,7 +463,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("receive packet failed", "port-id", msg.Packet.SourcePort, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -527,7 +527,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke } // Timeout defines a rpc handler method for MsgTimeout. -func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*channeltypes.MsgTimeoutResponse, error) { +func (k *Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*channeltypes.MsgTimeoutResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) relayer, err := sdk.AccAddressFromBech32(msg.Signer) @@ -544,7 +544,7 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("timeout failed", "port-id", msg.Packet.SourcePort, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -599,7 +599,7 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c } // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. -func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeoutOnClose) (*channeltypes.MsgTimeoutOnCloseResponse, error) { +func (k *Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeoutOnClose) (*channeltypes.MsgTimeoutOnCloseResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) relayer, err := sdk.AccAddressFromBech32(msg.Signer) @@ -616,7 +616,7 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("timeout on close failed", "port-id", msg.Packet.SourcePort, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -674,7 +674,7 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo } // Acknowledgement defines a rpc handler method for MsgAcknowledgement. -func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAcknowledgement) (*channeltypes.MsgAcknowledgementResponse, error) { +func (k *Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAcknowledgement) (*channeltypes.MsgAcknowledgementResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) relayer, err := sdk.AccAddressFromBech32(msg.Signer) @@ -691,7 +691,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn } // Retrieve callbacks from router - cbs, ok := k.Router.GetRoute(module) + cbs, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("acknowledgement failed", "port-id", msg.Packet.SourcePort, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -740,7 +740,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn } // ChannelUpgradeInit defines a rpc handler method for MsgChannelUpgradeInit. -func (k Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeInit) (*channeltypes.MsgChannelUpgradeInitResponse, error) { +func (k *Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeInit) (*channeltypes.MsgChannelUpgradeInitResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if k.GetAuthority() != msg.Signer { @@ -753,7 +753,7 @@ func (k Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgC return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") } - app, ok := k.Router.GetRoute(module) + app, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel upgrade init failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -792,7 +792,7 @@ func (k Keeper) ChannelUpgradeInit(goCtx context.Context, msg *channeltypes.MsgC } // ChannelUpgradeTry defines a rpc handler method for MsgChannelUpgradeTry. -func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTry) (*channeltypes.MsgChannelUpgradeTryResponse, error) { +func (k *Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTry) (*channeltypes.MsgChannelUpgradeTryResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) @@ -801,7 +801,7 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") } - app, ok := k.Router.GetRoute(module) + app, ok := k.PortKeeper.Route(module) if !ok { ctx.Logger().Error("channel upgrade try failed", "port-id", msg.PortId, "error", errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module)) return nil, errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) @@ -853,7 +853,7 @@ func (k Keeper) ChannelUpgradeTry(goCtx context.Context, msg *channeltypes.MsgCh } // ChannelUpgradeAck defines a rpc handler method for MsgChannelUpgradeAck. -func (k Keeper) ChannelUpgradeAck(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeAck) (*channeltypes.MsgChannelUpgradeAckResponse, error) { +func (k *Keeper) ChannelUpgradeAck(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeAck) (*channeltypes.MsgChannelUpgradeAckResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) @@ -862,7 +862,7 @@ func (k Keeper) ChannelUpgradeAck(goCtx context.Context, msg *channeltypes.MsgCh return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") } - app, ok := k.Router.GetRoute(module) + app, ok := k.PortKeeper.Route(module) if !ok { err = errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) ctx.Logger().Error("channel upgrade ack failed", "port-id", msg.PortId, "error", err) @@ -919,7 +919,7 @@ func (k Keeper) ChannelUpgradeAck(goCtx context.Context, msg *channeltypes.MsgCh } // ChannelUpgradeConfirm defines a rpc handler method for MsgChannelUpgradeConfirm. -func (k Keeper) ChannelUpgradeConfirm(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeConfirm) (*channeltypes.MsgChannelUpgradeConfirmResponse, error) { +func (k *Keeper) ChannelUpgradeConfirm(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeConfirm) (*channeltypes.MsgChannelUpgradeConfirmResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) @@ -928,7 +928,7 @@ func (k Keeper) ChannelUpgradeConfirm(goCtx context.Context, msg *channeltypes.M return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") } - app, ok := k.Router.GetRoute(module) + app, ok := k.PortKeeper.Route(module) if !ok { err = errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) ctx.Logger().Error("channel upgrade confirm failed", "port-id", msg.PortId, "error", err) @@ -980,7 +980,7 @@ func (k Keeper) ChannelUpgradeConfirm(goCtx context.Context, msg *channeltypes.M } // ChannelUpgradeOpen defines a rpc handler method for MsgChannelUpgradeOpen. -func (k Keeper) ChannelUpgradeOpen(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeOpen) (*channeltypes.MsgChannelUpgradeOpenResponse, error) { +func (k *Keeper) ChannelUpgradeOpen(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeOpen) (*channeltypes.MsgChannelUpgradeOpenResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) module, _, err := k.ChannelKeeper.LookupModuleByChannel(ctx, msg.PortId, msg.ChannelId) @@ -989,7 +989,7 @@ func (k Keeper) ChannelUpgradeOpen(goCtx context.Context, msg *channeltypes.MsgC return nil, errorsmod.Wrap(err, "could not retrieve module from port-id") } - app, ok := k.Router.GetRoute(module) + app, ok := k.PortKeeper.Route(module) if !ok { err = errorsmod.Wrapf(porttypes.ErrInvalidRoute, "route not found to module: %s", module) ctx.Logger().Error("channel upgrade open failed", "port-id", msg.PortId, "error", err) @@ -1023,7 +1023,7 @@ func (k Keeper) ChannelUpgradeOpen(goCtx context.Context, msg *channeltypes.MsgC } // ChannelUpgradeTimeout defines a rpc handler method for MsgChannelUpgradeTimeout. -func (k Keeper) ChannelUpgradeTimeout(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTimeout) (*channeltypes.MsgChannelUpgradeTimeoutResponse, error) { +func (k *Keeper) ChannelUpgradeTimeout(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeTimeout) (*channeltypes.MsgChannelUpgradeTimeoutResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if err := k.ChannelKeeper.ChanUpgradeTimeout(ctx, msg.PortId, msg.ChannelId, msg.CounterpartyChannel, msg.ProofChannel, msg.ProofHeight); err != nil { @@ -1039,7 +1039,7 @@ func (k Keeper) ChannelUpgradeTimeout(goCtx context.Context, msg *channeltypes.M } // ChannelUpgradeCancel defines a rpc handler method for MsgChannelUpgradeCancel. -func (k Keeper) ChannelUpgradeCancel(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeCancel) (*channeltypes.MsgChannelUpgradeCancelResponse, error) { +func (k *Keeper) ChannelUpgradeCancel(goCtx context.Context, msg *channeltypes.MsgChannelUpgradeCancel) (*channeltypes.MsgChannelUpgradeCancelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) channel, found := k.ChannelKeeper.GetChannel(ctx, msg.PortId, msg.ChannelId) @@ -1091,7 +1091,7 @@ func (k Keeper) ChannelUpgradeCancel(goCtx context.Context, msg *channeltypes.Ms } // PruneAcknowledgements defines a rpc handler method for MsgPruneAcknowledgements. -func (k Keeper) PruneAcknowledgements(goCtx context.Context, msg *channeltypes.MsgPruneAcknowledgements) (*channeltypes.MsgPruneAcknowledgementsResponse, error) { +func (k *Keeper) PruneAcknowledgements(goCtx context.Context, msg *channeltypes.MsgPruneAcknowledgements) (*channeltypes.MsgPruneAcknowledgementsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) pruned, remaining, err := k.ChannelKeeper.PruneAcknowledgements(ctx, msg.PortId, msg.ChannelId, msg.Limit) @@ -1106,7 +1106,7 @@ func (k Keeper) PruneAcknowledgements(goCtx context.Context, msg *channeltypes.M } // UpdateClientParams defines a rpc handler method for MsgUpdateParams. -func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUpdateParams) (*clienttypes.MsgUpdateParamsResponse, error) { +func (k *Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUpdateParams) (*clienttypes.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Signer { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } @@ -1118,7 +1118,7 @@ func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUp } // UpdateConnectionParams defines a rpc handler method for MsgUpdateParams for the 03-connection submodule. -func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateParams) (*connectiontypes.MsgUpdateParamsResponse, error) { +func (k *Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateParams) (*connectiontypes.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Signer { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } @@ -1130,7 +1130,7 @@ func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontyp } // UpdateChannelParams defines a rpc handler method for MsgUpdateParams. -func (k Keeper) UpdateChannelParams(goCtx context.Context, msg *channeltypes.MsgUpdateParams) (*channeltypes.MsgUpdateParamsResponse, error) { +func (k *Keeper) UpdateChannelParams(goCtx context.Context, msg *channeltypes.MsgUpdateParams) (*channeltypes.MsgUpdateParamsResponse, error) { if k.GetAuthority() != msg.Authority { return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) } diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index 1f7de0c2fe1..b213c22fa13 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -172,7 +172,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { msg := channeltypes.NewMsgRecvPacket(packet, proof, proofHeight, suite.chainB.SenderAccount.GetAddress().String()) ctx := suite.chainB.GetContext() - _, err := keeper.Keeper.RecvPacket(*suite.chainB.App.GetIBCKeeper(), ctx, msg) + _, err := suite.chainB.App.GetIBCKeeper().RecvPacket(ctx, msg) events := ctx.EventManager().Events() @@ -180,7 +180,7 @@ func (suite *KeeperTestSuite) TestHandleRecvPacket() { suite.Require().NoError(err) // replay should not fail since it will be treated as a no-op - _, err := keeper.Keeper.RecvPacket(*suite.chainB.App.GetIBCKeeper(), suite.chainB.GetContext(), msg) + _, err := suite.chainB.App.GetIBCKeeper().RecvPacket(suite.chainB.GetContext(), msg) suite.Require().NoError(err) // check that callback state was handled correctly @@ -280,7 +280,7 @@ func (suite *KeeperTestSuite) TestRecoverClient() { tc.malleate() - _, err = keeper.Keeper.RecoverClient(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err = suite.chainA.App.GetIBCKeeper().RecoverClient(suite.chainA.GetContext(), msg) expPass := tc.expErr == nil if expPass { @@ -288,7 +288,8 @@ func (suite *KeeperTestSuite) TestRecoverClient() { // Assert that client status is now Active clientStore := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), subjectPath.EndpointA.ClientID) - tmClientState := subjectPath.EndpointA.GetClientState().(*ibctm.ClientState) + tmClientState, ok := subjectPath.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) suite.Require().Equal(tmClientState.Status(suite.chainA.GetContext(), clientStore, suite.chainA.App.AppCodec()), exported.Active) } else { suite.Require().Error(err) @@ -425,7 +426,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { msg := channeltypes.NewMsgAcknowledgement(packet, ibcmock.MockAcknowledgement.Acknowledgement(), proof, proofHeight, suite.chainA.SenderAccount.GetAddress().String()) ctx := suite.chainA.GetContext() - _, err := keeper.Keeper.Acknowledgement(*suite.chainA.App.GetIBCKeeper(), ctx, msg) + _, err := suite.chainA.App.GetIBCKeeper().Acknowledgement(ctx, msg) events := ctx.EventManager().Events() @@ -437,7 +438,7 @@ func (suite *KeeperTestSuite) TestHandleAcknowledgePacket() { suite.Require().False(has) // replay should not error as it is treated as a no-op - _, err := keeper.Keeper.Acknowledgement(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err := suite.chainA.App.GetIBCKeeper().Acknowledgement(suite.chainA.GetContext(), msg) suite.Require().NoError(err) if tc.replay { @@ -582,7 +583,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { msg := channeltypes.NewMsgTimeout(packet, 1, proof, proofHeight, suite.chainA.SenderAccount.GetAddress().String()) ctx := suite.chainA.GetContext() - _, err := keeper.Keeper.Timeout(*suite.chainA.App.GetIBCKeeper(), ctx, msg) + _, err := suite.chainA.App.GetIBCKeeper().Timeout(ctx, msg) events := ctx.EventManager().Events() @@ -590,7 +591,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) // replay should not return an error as it is treated as a no-op - _, err := keeper.Keeper.Timeout(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err := suite.chainA.App.GetIBCKeeper().Timeout(suite.chainA.GetContext(), msg) suite.Require().NoError(err) // verify packet commitment was deleted on source chain @@ -756,13 +757,13 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { msg := channeltypes.NewMsgTimeoutOnClose(packet, 1, proof, closedProof, proofHeight, suite.chainA.SenderAccount.GetAddress().String(), counterpartyUpgradeSequence) - _, err := keeper.Keeper.TimeoutOnClose(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err := suite.chainA.App.GetIBCKeeper().TimeoutOnClose(suite.chainA.GetContext(), msg) if tc.expPass { suite.Require().NoError(err) // replay should not return an error as it will be treated as a no-op - _, err := keeper.Keeper.TimeoutOnClose(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err := suite.chainA.App.GetIBCKeeper().TimeoutOnClose(suite.chainA.GetContext(), msg) suite.Require().NoError(err) // verify packet commitment was deleted on source chain @@ -870,7 +871,8 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { path.SetupClients() var err error - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointA.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) revisionNumber := clienttypes.ParseChainID(clientState.ChainId) newChainID, err = clienttypes.SetRevisionNumber(clientState.ChainId, revisionNumber+1) @@ -932,8 +934,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeInit() { suite.Require().NoError(err) suite.Require().NotNil(res) suite.Require().Equal(uint64(1), res.UpgradeSequence) - - upgrade := path.EndpointA.GetChannelUpgrade() channel := path.EndpointA.GetChannel() expEvents := ibctesting.EventsMap{ @@ -942,9 +942,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeInit() { channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: upgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: upgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: upgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1078,17 +1075,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeTry() { suite.Require().Equal(channeltypes.FLUSHING, channel.State) suite.Require().Equal(uint64(1), channel.UpgradeSequence) - upgrade := path.EndpointB.GetChannelUpgrade() - expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeTry: { channeltypes.AttributeKeyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointB.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointA.ChannelID, - channeltypes.AttributeKeyConnectionHops: upgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: upgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: upgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1265,17 +1257,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeAck() { suite.Require().Equal(channeltypes.FLUSHCOMPLETE, channel.State) suite.Require().Equal(uint64(1), channel.UpgradeSequence) - upgrade := path.EndpointA.GetChannelUpgrade() - expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeAck: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: upgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: upgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: upgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1302,17 +1289,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeAck() { suite.Require().Equal(channeltypes.FLUSHING, channel.State) suite.Require().Equal(uint64(1), channel.UpgradeSequence) - upgrade := path.EndpointA.GetChannelUpgrade() - expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeAck: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: upgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: upgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: upgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1580,9 +1562,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeConfirm() { channeltypes.AttributeCounterpartyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeKeyChannelState: channeltypes.OPEN.String(), - channeltypes.AttributeKeyConnectionHops: channel.ConnectionHops[0], - channeltypes.AttributeKeyVersion: channel.Version, - channeltypes.AttributeKeyOrdering: channel.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1873,9 +1852,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeOpen() { channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, channeltypes.AttributeKeyChannelState: channeltypes.OPEN.String(), - channeltypes.AttributeKeyConnectionHops: channel.ConnectionHops[0], - channeltypes.AttributeKeyVersion: channel.Version, - channeltypes.AttributeKeyOrdering: channel.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -1919,9 +1895,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeOpen() { channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, channeltypes.AttributeKeyChannelState: channeltypes.OPEN.String(), - channeltypes.AttributeKeyConnectionHops: channel.ConnectionHops[0], - channeltypes.AttributeKeyVersion: channel.Version, - channeltypes.AttributeKeyOrdering: channel.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, sdk.EventTypeMessage: { @@ -2055,17 +2028,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeCancel() { // Upgrade sequence should be changed to match sequence on error receipt. suite.Require().Equal(uint64(2), channel.UpgradeSequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeCancel: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { @@ -2104,17 +2072,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeCancel() { // Upgrade sequence should be changed to match initial upgrade sequence. suite.Require().Equal(uint64(3), channel.UpgradeSequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeCancel: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { @@ -2154,17 +2117,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeCancel() { // Upgrade sequence should be changed to match initial upgrade sequence. suite.Require().Equal(uint64(1), channel.UpgradeSequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeCancel: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { @@ -2204,17 +2162,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeCancel() { // Upgrade sequence should be changed to match initial upgrade sequence. suite.Require().Equal(uint64(1), channel.UpgradeSequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeCancel: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { @@ -2253,17 +2206,12 @@ func (suite *KeeperTestSuite) TestChannelUpgradeCancel() { // Upgrade sequence should not be changed. suite.Require().Equal(uint64(2), channel.UpgradeSequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeCancel: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { @@ -2428,8 +2376,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeTimeout() { suite.Require().True(found) suite.Require().Equal(uint64(1), errorReceipt.Sequence) - // we need to find the event values from the proposed upgrade as the actual upgrade has been deleted. - proposedUpgrade := path.EndpointA.GetProposedUpgrade() // use the timeout we set in the malleate function timeout := channeltypes.NewTimeout(clienttypes.ZeroHeight(), 1) expEvents := ibctesting.EventsMap{ @@ -2438,9 +2384,6 @@ func (suite *KeeperTestSuite) TestChannelUpgradeTimeout() { channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyOrdering: proposedUpgrade.Fields.Ordering.String(), channeltypes.AttributeKeyUpgradeTimeoutHeight: timeout.Height.String(), channeltypes.AttributeKeyUpgradeTimeoutTimestamp: fmt.Sprintf("%d", timeout.Timestamp), channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), @@ -2574,7 +2517,8 @@ func (suite *KeeperTestSuite) TestIBCSoftwareUpgrade() { Height: 1000, } // update trusting period - clientState := path.EndpointB.GetClientState().(*ibctm.ClientState) + clientState, ok := path.EndpointB.GetClientState().(*ibctm.ClientState) + suite.Require().True(ok) clientState.TrustingPeriod += 100 var err error @@ -2588,7 +2532,7 @@ func (suite *KeeperTestSuite) TestIBCSoftwareUpgrade() { tc.malleate() - _, err = keeper.Keeper.IBCSoftwareUpgrade(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), msg) + _, err = suite.chainA.App.GetIBCKeeper().IBCSoftwareUpgrade(suite.chainA.GetContext(), msg) if tc.expError == nil { suite.Require().NoError(err) @@ -2649,7 +2593,7 @@ func (suite *KeeperTestSuite) TestUpdateClientParams() { tc := tc suite.Run(tc.name, func() { suite.SetupTest() - _, err := keeper.Keeper.UpdateClientParams(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), tc.msg) + _, err := suite.chainA.App.GetIBCKeeper().UpdateClientParams(suite.chainA.GetContext(), tc.msg) if tc.expPass { suite.Require().NoError(err) p := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetParams(suite.chainA.GetContext()) @@ -2700,7 +2644,7 @@ func (suite *KeeperTestSuite) TestUpdateConnectionParams() { tc := tc suite.Run(tc.name, func() { suite.SetupTest() - _, err := keeper.Keeper.UpdateConnectionParams(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), tc.msg) + _, err := suite.chainA.App.GetIBCKeeper().UpdateConnectionParams(suite.chainA.GetContext(), tc.msg) if tc.expPass { suite.Require().NoError(err) p := suite.chainA.App.GetIBCKeeper().ConnectionKeeper.GetParams(suite.chainA.GetContext()) @@ -2751,7 +2695,7 @@ func (suite *KeeperTestSuite) TestUpdateChannelParams() { tc := tc suite.Run(tc.name, func() { suite.SetupTest() - resp, err := keeper.Keeper.UpdateChannelParams(*suite.chainA.App.GetIBCKeeper(), suite.chainA.GetContext(), tc.msg) + resp, err := suite.chainA.App.GetIBCKeeper().UpdateChannelParams(suite.chainA.GetContext(), tc.msg) expPass := tc.expError == nil if expPass { suite.Require().NoError(err) diff --git a/modules/core/migrations/v7/genesis_test.go b/modules/core/migrations/v7/genesis_test.go index 781d4f594ba..de941f3a2d2 100644 --- a/modules/core/migrations/v7/genesis_test.go +++ b/modules/core/migrations/v7/genesis_test.go @@ -61,7 +61,7 @@ func (suite *MigrationsV7TestSuite) TestMigrateGenesisSolomachine() { solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, ibctesting.DefaultSolomachineClientID, "testing", 1) solomachineMulti := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-1", "testing", 4) - clientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), *suite.chainA.App.GetIBCKeeper().ClientKeeper) + clientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.GetIBCKeeper().ClientKeeper) // manually generate old proto buf definitions and set in genesis // NOTE: we cannot use 'ExportGenesis' for the solo machines since we are @@ -135,7 +135,7 @@ func (suite *MigrationsV7TestSuite) TestMigrateGenesisSolomachine() { // NOTE: tendermint clients are not pruned in genesis so the test should not have expired tendermint clients err := clientv7.MigrateStore(suite.chainA.GetContext(), suite.chainA.GetSimApp().GetKey(ibcexported.StoreKey), suite.chainA.App.AppCodec(), suite.chainA.GetSimApp().IBCKeeper.ClientKeeper) suite.Require().NoError(err) - expectedClientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), *suite.chainA.App.GetIBCKeeper().ClientKeeper) + expectedClientGenState := ibcclient.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.GetIBCKeeper().ClientKeeper) cdc := suite.chainA.App.AppCodec().(*codec.ProtoCodec) diff --git a/modules/light-clients/07-tendermint/client_state.go b/modules/light-clients/07-tendermint/client_state.go index d0a1d10e30e..daa14c9e0a1 100644 --- a/modules/light-clients/07-tendermint/client_state.go +++ b/modules/light-clients/07-tendermint/client_state.go @@ -123,7 +123,7 @@ func (cs ClientState) Validate() error { } if err := light.ValidateTrustLevel(cs.TrustLevel.ToTendermint()); err != nil { - return err + return errorsmod.Wrapf(ErrInvalidTrustLevel, err.Error()) } if cs.TrustingPeriod <= 0 { return errorsmod.Wrap(ErrInvalidTrustingPeriod, "trusting period must be greater than zero") @@ -303,7 +303,6 @@ func verifyDelayPeriodPassed(ctx sdk.Context, store storetypes.KVStore, proofHei return errorsmod.Wrapf(ErrDelayPeriodNotPassed, "cannot verify packet until time: %d, current time: %d", validTime, currentTimestamp) } - } if delayBlockPeriod != 0 { diff --git a/modules/light-clients/07-tendermint/client_state_test.go b/modules/light-clients/07-tendermint/client_state_test.go index 0fa2222de6e..49bd513fd77 100644 --- a/modules/light-clients/07-tendermint/client_state_test.go +++ b/modules/light-clients/07-tendermint/client_state_test.go @@ -1,21 +1,11 @@ package tendermint_test import ( - "time" - ics23 "github.com/cosmos/ics23/go" - sdk "github.com/cosmos/cosmos-sdk/types" - - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" - "github.com/cosmos/ibc-go/v8/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v8/testing" - ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" ) const ( @@ -26,741 +16,121 @@ const ( var invalidProof = []byte("invalid proof") -func (suite *TendermintTestSuite) TestStatus() { - var ( - path *ibctesting.Path - clientState *ibctm.ClientState - ) - - testCases := []struct { - name string - malleate func() - expStatus exported.Status - }{ - {"client is active", func() {}, exported.Active}, - {"client is frozen", func() { - clientState.FrozenHeight = clienttypes.NewHeight(0, 1) - path.EndpointA.SetClientState(clientState) - }, exported.Frozen}, - {"client status without consensus state", func() { - clientState.LatestHeight = clientState.LatestHeight.Increment().(clienttypes.Height) - path.EndpointA.SetClientState(clientState) - }, exported.Expired}, - {"client status is expired", func() { - suite.coordinator.IncrementTimeBy(clientState.TrustingPeriod) - }, exported.Expired}, - } - - for _, tc := range testCases { - tc := tc - suite.Run(tc.name, func() { - suite.SetupTest() - - path = ibctesting.NewPath(suite.chainA, suite.chainB) - path.SetupClients() - - clientStore := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) - clientState = path.EndpointA.GetClientState().(*ibctm.ClientState) - - tc.malleate() - - status := clientState.Status(suite.chainA.GetContext(), clientStore, suite.chainA.App.AppCodec()) - suite.Require().Equal(tc.expStatus, status) - }) - - } -} - -func (suite *TendermintTestSuite) TestGetTimestampAtHeight() { - var ( - path *ibctesting.Path - height exported.Height - ) - expectedTimestamp := time.Unix(1, 0) - - testCases := []struct { - name string - malleate func() - expErr error - }{ - { - "success", - func() {}, - nil, - }, - { - "failure: consensus state not found for height", - func() { - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) - height = clientState.LatestHeight.Increment() - }, - clienttypes.ErrConsensusStateNotFound, - }, - } - - for _, tc := range testCases { - tc := tc - suite.Run(tc.name, func() { - suite.SetupTest() - - path = ibctesting.NewPath(suite.chainA, suite.chainB) - path.SetupClients() - - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) - height = clientState.LatestHeight - - store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) - - // grab consensusState from store and update with a predefined timestamp - consensusState := path.EndpointA.GetConsensusState(height) - tmConsensusState, ok := consensusState.(*ibctm.ConsensusState) - suite.Require().True(ok) - - tmConsensusState.Timestamp = expectedTimestamp - path.EndpointA.SetConsensusState(tmConsensusState, height) - - tc.malleate() - - timestamp, err := clientState.GetTimestampAtHeight(suite.chainA.GetContext(), store, suite.chainA.Codec, height) - - expPass := tc.expErr == nil - if expPass { - suite.Require().NoError(err) - - expectedTimestamp := uint64(expectedTimestamp.UnixNano()) - suite.Require().Equal(expectedTimestamp, timestamp) - } else { - suite.Require().ErrorIs(err, tc.expErr) - } - }) - } -} - func (suite *TendermintTestSuite) TestValidate() { testCases := []struct { name string clientState *ibctm.ClientState + expErr error expPass bool }{ { name: "valid client", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: true, + expErr: nil, }, { name: "valid client with nil upgrade path", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), nil), - expPass: true, + expErr: nil, }, { name: "invalid chainID", clientState: ibctm.NewClientState(" ", ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidChainID, }, { // NOTE: if this test fails, the code must account for the change in chainID length across tendermint versions! // Do not only fix the test, fix the code! // https://github.com/cosmos/ibc-go/issues/177 - name: "valid chainID - chainID validation failed for chainID of length 50! ", + name: "valid chainID - chainID validation did not fail for chainID of length 50! ", clientState: ibctm.NewClientState(fiftyCharChainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: true, + expErr: nil, }, { // NOTE: if this test fails, the code must account for the change in chainID length across tendermint versions! // Do not only fix the test, fix the code! // https://github.com/cosmos/ibc-go/issues/177 - name: "invalid chainID - chainID validation did not fail for chainID of length 51! ", + name: "invalid chainID - chainID validation failed for chainID of length 51! ", clientState: ibctm.NewClientState(fiftyOneCharChainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidChainID, }, { name: "invalid trust level", clientState: ibctm.NewClientState(chainID, ibctm.Fraction{Numerator: 0, Denominator: 1}, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidTrustLevel, }, { name: "invalid zero trusting period", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, 0, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidTrustingPeriod, }, { name: "invalid negative trusting period", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, -1, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidTrustingPeriod, }, { name: "invalid zero unbonding period", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, 0, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidUnbondingPeriod, }, { name: "invalid negative unbonding period", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, -1, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidUnbondingPeriod, }, { name: "invalid zero max clock drift", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, 0, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidMaxClockDrift, }, { name: "invalid negative max clock drift", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, -1, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidMaxClockDrift, }, { name: "invalid revision number", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidHeaderHeight, }, { name: "invalid revision height", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.ZeroHeight(), commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidHeaderHeight, }, { name: "trusting period not less than unbonding period", clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath), - expPass: false, + expErr: ibctm.ErrInvalidTrustingPeriod, }, { name: "proof specs is nil", - clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, nil, upgradePath), - expPass: false, + clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, nil, upgradePath), + expErr: ibctm.ErrInvalidProofSpecs, }, { name: "proof specs contains nil", - clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, ubdPeriod, ubdPeriod, maxClockDrift, height, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath), - expPass: false, - }, - } - - for _, tc := range testCases { - tc := tc - suite.Run(tc.name, func() { - err := tc.clientState.Validate() - if tc.expPass { - suite.Require().NoError(err, tc.name) - } else { - suite.Require().Error(err, tc.name) - } - }) - } -} - -func (suite *TendermintTestSuite) TestInitialize() { - testCases := []struct { - name string - consensusState exported.ConsensusState - expPass bool - }{ - { - name: "valid consensus", - consensusState: &ibctm.ConsensusState{}, - expPass: true, - }, - { - name: "invalid consensus: consensus state is solomachine consensus", - consensusState: ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).ConsensusState(), - expPass: false, - }, - } - - for _, tc := range testCases { - tc := tc - suite.Run(tc.name, func() { - suite.SetupTest() - path := ibctesting.NewPath(suite.chainA, suite.chainB) - - tmConfig, ok := path.EndpointB.ClientConfig.(*ibctesting.TendermintConfig) - suite.Require().True(ok) - - clientState := ibctm.NewClientState( - path.EndpointB.Chain.ChainID, - tmConfig.TrustLevel, tmConfig.TrustingPeriod, tmConfig.UnbondingPeriod, tmConfig.MaxClockDrift, - suite.chainB.LatestCommittedHeader.GetTrustedHeight(), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, - ) - - store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) - err := clientState.Initialize(suite.chainA.GetContext(), suite.chainA.Codec, store, tc.consensusState) - - if tc.expPass { - suite.Require().NoError(err, "valid case returned an error") - suite.Require().True(store.Has(host.ClientStateKey())) - suite.Require().True(store.Has(host.ConsensusStateKey(suite.chainB.LatestCommittedHeader.GetTrustedHeight()))) - } else { - suite.Require().Error(err, "invalid case didn't return an error") - suite.Require().False(store.Has(host.ClientStateKey())) - suite.Require().False(store.Has(host.ConsensusStateKey(suite.chainB.LatestCommittedHeader.GetTrustedHeight()))) - } - }) - } -} - -func (suite *TendermintTestSuite) TestVerifyMembership() { - var ( - testingpath *ibctesting.Path - delayTimePeriod uint64 - delayBlockPeriod uint64 - err error - proofHeight exported.Height - proof []byte - path exported.Path - value []byte - ) - - testCases := []struct { - name string - malleate func() - expPass bool - }{ - { - "successful ClientState verification", - func() { - // default proof construction uses ClientState - }, - true, - }, - { - "successful ConsensusState verification", func() { - latestHeight := testingpath.EndpointB.GetClientLatestHeight() - - key := host.FullConsensusStateKey(testingpath.EndpointB.ClientID, latestHeight) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - - consensusState := testingpath.EndpointB.GetConsensusState(latestHeight).(*ibctm.ConsensusState) - value, err = suite.chainB.Codec.MarshalInterface(consensusState) - suite.Require().NoError(err) - }, - true, - }, - { - "successful Connection verification", func() { - key := host.ConnectionKey(testingpath.EndpointB.ConnectionID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - - connection := testingpath.EndpointB.GetConnection() - value, err = suite.chainB.Codec.Marshal(&connection) - suite.Require().NoError(err) - }, - true, - }, - { - "successful Channel verification", func() { - key := host.ChannelKey(testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - - channel := testingpath.EndpointB.GetChannel() - value, err = suite.chainB.Codec.Marshal(&channel) - suite.Require().NoError(err) - }, - true, - }, - { - "successful PacketCommitment verification", func() { - // send from chainB to chainA since we are proving chainB sent a packet - sequence, err := testingpath.EndpointB.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) - suite.Require().NoError(err) - - // make packet commitment proof - packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, clienttypes.NewHeight(1, 100), 0) - key := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - - value = channeltypes.CommitPacket(suite.chainA.App.GetIBCKeeper().Codec(), packet) - }, true, - }, - { - "successful Acknowledgement verification", func() { - // send from chainA to chainB since we are proving chainB wrote an acknowledgement - sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) - suite.Require().NoError(err) - - // write receipt and ack - packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0) - err = testingpath.EndpointB.RecvPacket(packet) - suite.Require().NoError(err) - - key := host.PacketAcknowledgementKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - - value = channeltypes.CommitAcknowledgement(ibcmock.MockAcknowledgement.Acknowledgement()) - }, - true, - }, - { - "successful NextSequenceRecv verification", func() { - // send from chainA to chainB since we are proving chainB incremented the sequence recv - - // send packet - sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) - suite.Require().NoError(err) - - // next seq recv incremented - packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0) - err = testingpath.EndpointB.RecvPacket(packet) - suite.Require().NoError(err) - - key := host.NextSequenceRecvKey(packet.GetSourcePort(), packet.GetSourceChannel()) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - - value = sdk.Uint64ToBigEndian(packet.GetSequence() + 1) - }, - true, - }, - { - "successful verification outside IBC store", func() { - key := transfertypes.PortKey - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(commitmenttypes.NewMerklePrefix([]byte(transfertypes.StoreKey)), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProofForStore(transfertypes.StoreKey, key, int64(testingpath.EndpointA.GetClientLatestHeight().GetRevisionHeight())) - - value = []byte(suite.chainB.GetSimApp().TransferKeeper.GetPort(suite.chainB.GetContext())) - suite.Require().NoError(err) - }, - true, - }, - { - "delay time period has passed", func() { - delayTimePeriod = uint64(time.Second.Nanoseconds()) - }, - true, - }, - { - "delay time period has not passed", func() { - delayTimePeriod = uint64(time.Hour.Nanoseconds()) - }, - false, - }, - { - "delay block period has passed", func() { - delayBlockPeriod = 1 - }, - true, - }, - { - "delay block period has not passed", func() { - delayBlockPeriod = 1000 - }, - false, - }, - { - "latest client height < height", func() { - proofHeight = testingpath.EndpointA.GetClientLatestHeight().Increment() - }, false, - }, - { - "invalid path type", - func() { - path = ibcmock.KeyPath{} - }, - false, - }, - { - "failed to unmarshal merkle proof", func() { - proof = invalidProof - }, false, - }, - { - "consensus state not found", func() { - proofHeight = clienttypes.ZeroHeight() - }, false, + clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, []*ics23.ProofSpec{ics23.TendermintSpec, nil}, upgradePath), + expErr: ibctm.ErrInvalidProofSpecs, }, { - "proof verification failed", func() { - // change the value being proved - value = []byte("invalid value") - }, false, - }, - { - "proof is empty", func() { - // change the inserted proof - proof = []byte{} - }, false, + name: "invalid upgrade path", + clientState: ibctm.NewClientState(chainID, ibctm.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), invalidUpgradePath), + expErr: clienttypes.ErrInvalidClient, }, } for _, tc := range testCases { tc := tc - suite.Run(tc.name, func() { - suite.SetupTest() // reset - testingpath = ibctesting.NewPath(suite.chainA, suite.chainB) - testingpath.SetChannelOrdered() - testingpath.Setup() - - // reset time and block delays to 0, malleate may change to a specific non-zero value. - delayTimePeriod = 0 - delayBlockPeriod = 0 - - // create default proof, merklePath, and value which passes - // may be overwritten by malleate() - key := host.FullClientStateKey(testingpath.EndpointB.ClientID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - - clientState := testingpath.EndpointB.GetClientState().(*ibctm.ClientState) - value, err = suite.chainB.Codec.MarshalInterface(clientState) - suite.Require().NoError(err) - - tc.malleate() // make changes as necessary - - clientState = testingpath.EndpointA.GetClientState().(*ibctm.ClientState) - - ctx := suite.chainA.GetContext() - store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(ctx, testingpath.EndpointA.ClientID) - - err = clientState.VerifyMembership( - ctx, store, suite.chainA.Codec, proofHeight, delayTimePeriod, delayBlockPeriod, - proof, path, value, - ) - - if tc.expPass { - suite.Require().NoError(err) - } else { - suite.Require().Error(err) - } - }) - } -} - -func (suite *TendermintTestSuite) TestVerifyNonMembership() { - var ( - testingpath *ibctesting.Path - delayTimePeriod uint64 - delayBlockPeriod uint64 - err error - proofHeight exported.Height - path exported.Path - proof []byte - invalidClientID = "09-tendermint" - invalidConnectionID = "connection-100" - invalidChannelID = "channel-800" - invalidPortID = "invalid-port" - ) - - testCases := []struct { - name string - malleate func() - expPass bool - }{ - { - "successful ClientState verification of non membership", - func() { - // default proof construction uses ClientState - }, - true, - }, - { - "successful ConsensusState verification of non membership", func() { - key := host.FullConsensusStateKey(invalidClientID, testingpath.EndpointB.GetClientLatestHeight()) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - }, - true, - }, - { - "successful Connection verification of non membership", func() { - key := host.ConnectionKey(invalidConnectionID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - }, - true, - }, - { - "successful Channel verification of non membership", func() { - key := host.ChannelKey(testingpath.EndpointB.ChannelConfig.PortID, invalidChannelID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - }, - true, - }, - { - "successful PacketCommitment verification of non membership", func() { - // make packet commitment proof - key := host.PacketCommitmentKey(invalidPortID, invalidChannelID, 1) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - }, true, - }, - { - "successful Acknowledgement verification of non membership", func() { - key := host.PacketAcknowledgementKey(invalidPortID, invalidChannelID, 1) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - }, - true, - }, - { - "successful NextSequenceRecv verification of non membership", func() { - key := host.NextSequenceRecvKey(invalidPortID, invalidChannelID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = testingpath.EndpointB.QueryProof(key) - }, - true, - }, - { - "successful verification of non membership outside IBC store", func() { - key := []byte{0x08} - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(commitmenttypes.NewMerklePrefix([]byte(transfertypes.StoreKey)), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProofForStore(transfertypes.StoreKey, key, int64(testingpath.EndpointA.GetClientLatestHeight().GetRevisionHeight())) - }, - true, - }, - { - "delay time period has passed", func() { - delayTimePeriod = uint64(time.Second.Nanoseconds()) - }, - true, - }, - { - "delay time period has not passed", func() { - delayTimePeriod = uint64(time.Hour.Nanoseconds()) - }, - false, - }, - { - "delay block period has passed", func() { - delayBlockPeriod = 1 - }, - true, - }, - { - "delay block period has not passed", func() { - delayBlockPeriod = 1000 - }, - false, - }, - { - "latest client height < height", func() { - proofHeight = testingpath.EndpointA.GetClientLatestHeight().Increment() - }, false, - }, - { - "invalid path type", - func() { - path = ibcmock.KeyPath{} - }, - false, - }, - { - "failed to unmarshal merkle proof", func() { - proof = invalidProof - }, false, - }, - { - "consensus state not found", func() { - proofHeight = clienttypes.ZeroHeight() - }, false, - }, - { - "verify non membership fails as path exists", func() { - // change the value being proved - key := host.FullClientStateKey(testingpath.EndpointB.ClientID) - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - }, false, - }, - { - "proof is empty", func() { - // change the inserted proof - proof = []byte{} - }, false, - }, - } - - for _, tc := range testCases { - tc := tc - - suite.Run(tc.name, func() { - suite.SetupTest() // reset - testingpath = ibctesting.NewPath(suite.chainA, suite.chainB) - testingpath.SetChannelOrdered() - testingpath.Setup() - - // reset time and block delays to 0, malleate may change to a specific non-zero value. - delayTimePeriod = 0 - delayBlockPeriod = 0 - - // create default proof, merklePath, and value which passes - // may be overwritten by malleate() - key := host.FullClientStateKey("invalid-client-id") - - merklePath := commitmenttypes.NewMerklePath(string(key)) - path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) - suite.Require().NoError(err) - - proof, proofHeight = suite.chainB.QueryProof(key) - - tc.malleate() // make changes as necessary - - clientState := testingpath.EndpointA.GetClientState().(*ibctm.ClientState) - - ctx := suite.chainA.GetContext() - store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(ctx, testingpath.EndpointA.ClientID) - - err = clientState.VerifyNonMembership( - ctx, store, suite.chainA.Codec, proofHeight, delayTimePeriod, delayBlockPeriod, - proof, path, - ) + err := tc.clientState.Validate() - if tc.expPass { - suite.Require().NoError(err) + expPass := tc.expErr == nil + if expPass { + suite.Require().NoError(err, tc.name) } else { - suite.Require().Error(err) + suite.Require().ErrorContains(err, tc.expErr.Error()) } }) } diff --git a/modules/light-clients/07-tendermint/consensus_host_test.go b/modules/light-clients/07-tendermint/consensus_host_test.go index 7c79815ea22..bb2f03d5b1b 100644 --- a/modules/light-clients/07-tendermint/consensus_host_test.go +++ b/modules/light-clients/07-tendermint/consensus_host_test.go @@ -51,7 +51,7 @@ func (suite *TendermintTestSuite) TestGetSelfConsensusState() { return nil, mock.MockApplicationCallbackError }, } - suite.chainA.GetSimApp().GetIBCKeeper().ClientKeeper.SetSelfConsensusHost(consensusHost) + suite.chainA.GetSimApp().GetIBCKeeper().SetConsensusHost(consensusHost) }, expError: mock.MockApplicationCallbackError, }, @@ -63,7 +63,7 @@ func (suite *TendermintTestSuite) TestGetSelfConsensusState() { return &solomachine.ConsensusState{}, nil }, } - suite.chainA.GetSimApp().GetIBCKeeper().ClientKeeper.SetSelfConsensusHost(consensusHost) + suite.chainA.GetSimApp().GetIBCKeeper().SetConsensusHost(consensusHost) }, expError: nil, }, @@ -153,7 +153,7 @@ func (suite *TendermintTestSuite) TestValidateSelfClient() { } // add mock validation logic - suite.chainA.App.GetIBCKeeper().ClientKeeper.SetSelfConsensusHost(smConsensusHost) + suite.chainA.App.GetIBCKeeper().SetConsensusHost(smConsensusHost) }, expError: nil, }, diff --git a/modules/light-clients/07-tendermint/errors.go b/modules/light-clients/07-tendermint/errors.go index 8bbb58ec33a..11c2cc0c66d 100644 --- a/modules/light-clients/07-tendermint/errors.go +++ b/modules/light-clients/07-tendermint/errors.go @@ -19,4 +19,5 @@ var ( ErrUnbondingPeriodExpired = errorsmod.Register(ModuleName, 12, "time since latest trusted state has passed the unbonding period") ErrInvalidProofSpecs = errorsmod.Register(ModuleName, 13, "invalid proof specs") ErrInvalidValidatorSet = errorsmod.Register(ModuleName, 14, "invalid validator set") + ErrInvalidTrustLevel = errorsmod.Register(ModuleName, 15, "invalid trust level") ) diff --git a/modules/light-clients/07-tendermint/light_client_module.go b/modules/light-clients/07-tendermint/light_client_module.go index 46e52eec621..9a66b8d6e75 100644 --- a/modules/light-clients/07-tendermint/light_client_module.go +++ b/modules/light-clients/07-tendermint/light_client_module.go @@ -1,6 +1,8 @@ package tendermint import ( + "fmt" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -41,7 +43,7 @@ func (l *LightClientModule) RegisterStoreProvider(storeProvider exported.ClientS func (l LightClientModule) Initialize(ctx sdk.Context, clientID string, clientStateBz, consensusStateBz []byte) error { var clientState ClientState if err := l.keeper.Codec().Unmarshal(clientStateBz, &clientState); err != nil { - return err + return fmt.Errorf("failed to unmarshal client state bytes into client state: %w", err) } if err := clientState.Validate(); err != nil { @@ -50,7 +52,7 @@ func (l LightClientModule) Initialize(ctx sdk.Context, clientID string, clientSt var consensusState ConsensusState if err := l.keeper.Codec().Unmarshal(consensusStateBz, &consensusState); err != nil { - return err + return fmt.Errorf("failed to unmarshal consensus state bytes into consensus state: %w", err) } if err := consensusState.ValidateBasic(); err != nil { diff --git a/modules/light-clients/07-tendermint/light_client_module_test.go b/modules/light-clients/07-tendermint/light_client_module_test.go index fef8763a836..db1a9ea90d3 100644 --- a/modules/light-clients/07-tendermint/light_client_module_test.go +++ b/modules/light-clients/07-tendermint/light_client_module_test.go @@ -2,19 +2,24 @@ package tendermint_test import ( "crypto/sha256" + "fmt" "time" upgradetypes "cosmossdk.io/x/upgrade/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" ibcerrors "github.com/cosmos/ibc-go/v8/modules/core/errors" "github.com/cosmos/ibc-go/v8/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v8/testing" + ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" ) var ( @@ -22,6 +27,240 @@ var ( solomachineClientID = clienttypes.FormatClientIdentifier(exported.Solomachine, 0) ) +func (suite *TendermintTestSuite) TestStatus() { + var ( + path *ibctesting.Path + clientState *ibctm.ClientState + ) + + testCases := []struct { + name string + malleate func() + expStatus exported.Status + }{ + { + "client is active", + func() {}, + exported.Active, + }, + { + "client is frozen", + func() { + clientState.FrozenHeight = clienttypes.NewHeight(0, 1) + path.EndpointA.SetClientState(clientState) + }, + exported.Frozen, + }, + { + "client status without consensus state", + func() { + clientState.LatestHeight = clientState.LatestHeight.Increment().(clienttypes.Height) + path.EndpointA.SetClientState(clientState) + }, + exported.Expired, + }, + { + "client status is expired", + func() { + suite.coordinator.IncrementTimeBy(clientState.TrustingPeriod) + }, + exported.Expired, + }, + { + "client state not found", + func() { + store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) + store.Delete(host.ClientStateKey()) + }, + exported.Unknown, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTest() + + path = ibctesting.NewPath(suite.chainA, suite.chainB) + path.SetupClients() + + lightClientModule, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.Route(path.EndpointA.ClientID) + suite.Require().True(found) + + clientState = path.EndpointA.GetClientState().(*ibctm.ClientState) + + tc.malleate() + + status := lightClientModule.Status(suite.chainA.GetContext(), path.EndpointA.ClientID) + suite.Require().Equal(tc.expStatus, status) + }) + + } +} + +func (suite *TendermintTestSuite) TestGetTimestampAtHeight() { + var ( + path *ibctesting.Path + height exported.Height + ) + expectedTimestamp := time.Unix(1, 0) + + testCases := []struct { + name string + malleate func() + expErr error + }{ + { + "success", + func() {}, + nil, + }, + { + "failure: client state not found for height", + func() { + store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) + store.Delete(host.ClientStateKey()) + }, + clienttypes.ErrClientNotFound, + }, + { + "failure: consensus state not found for height", + func() { + clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + height = clientState.LatestHeight.Increment() + }, + clienttypes.ErrConsensusStateNotFound, + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTest() + + path = ibctesting.NewPath(suite.chainA, suite.chainB) + path.SetupClients() + + clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) + height = clientState.LatestHeight + + // grab consensusState from store and update with a predefined timestamp + consensusState := path.EndpointA.GetConsensusState(height) + tmConsensusState, ok := consensusState.(*ibctm.ConsensusState) + suite.Require().True(ok) + + tmConsensusState.Timestamp = expectedTimestamp + path.EndpointA.SetConsensusState(tmConsensusState, height) + + lightClientModule, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.Route(path.EndpointA.ClientID) + suite.Require().True(found) + + tc.malleate() + + timestamp, err := lightClientModule.TimestampAtHeight(suite.chainA.GetContext(), path.EndpointA.ClientID, height) + + expPass := tc.expErr == nil + if expPass { + suite.Require().NoError(err) + + expectedTimestamp := uint64(expectedTimestamp.UnixNano()) + suite.Require().Equal(expectedTimestamp, timestamp) + } else { + suite.Require().ErrorIs(err, tc.expErr) + } + }) + } +} + +func (suite *TendermintTestSuite) TestInitialize() { + var consensusState exported.ConsensusState + var clientState exported.ClientState + + testCases := []struct { + name string + malleate func() + expErr error + }{ + { + "valid consensus & client states", + func() {}, + nil, + }, + { + "invalid client state", + func() { + clientState.(*ibctm.ClientState).ChainId = "" + }, + ibctm.ErrInvalidChainID, + }, + { + "invalid client state: solomachine client state", + func() { + clientState = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).ClientState() + }, + fmt.Errorf("failed to unmarshal client state bytes into client state"), + }, + { + "invalid consensus: consensus state is solomachine consensus", + func() { + consensusState = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2).ConsensusState() + }, + fmt.Errorf("failed to unmarshal consensus state bytes into consensus state"), + }, + { + "invalid consensus state", + func() { + consensusState = ibctm.NewConsensusState(time.Now(), commitmenttypes.NewMerkleRoot([]byte(ibctm.SentinelRoot)), []byte("invalidNextValsHash")) + }, + fmt.Errorf("next validators hash is invalid"), + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + suite.SetupTest() + path := ibctesting.NewPath(suite.chainA, suite.chainB) + + tmConfig, ok := path.EndpointA.ClientConfig.(*ibctesting.TendermintConfig) + suite.Require().True(ok) + + clientState = ibctm.NewClientState( + path.EndpointA.Chain.ChainID, + tmConfig.TrustLevel, tmConfig.TrustingPeriod, tmConfig.UnbondingPeriod, tmConfig.MaxClockDrift, + suite.chainA.LatestCommittedHeader.GetHeight().(clienttypes.Height), commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, + ) + + consensusState = ibctm.NewConsensusState(time.Now(), commitmenttypes.NewMerkleRoot([]byte(ibctm.SentinelRoot)), suite.chainA.ProposedHeader.ValidatorsHash) + + clientID := suite.chainA.App.GetIBCKeeper().ClientKeeper.GenerateClientIdentifier(suite.chainA.GetContext(), clientState.ClientType()) + + lightClientModule, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.Route(clientID) + suite.Require().True(found) + + tc.malleate() + + clientStateBz := suite.chainA.Codec.MustMarshal(clientState) + consStateBz := suite.chainA.Codec.MustMarshal(consensusState) + + err := lightClientModule.Initialize(suite.chainA.GetContext(), path.EndpointA.ClientID, clientStateBz, consStateBz) + + store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), path.EndpointA.ClientID) + + expPass := tc.expErr == nil + if expPass { + suite.Require().NoError(err, "valid case returned an error") + suite.Require().True(store.Has(host.ClientStateKey())) + suite.Require().True(store.Has(host.ConsensusStateKey(suite.chainB.LatestCommittedHeader.GetHeight()))) + } else { + suite.Require().ErrorContains(err, tc.expErr.Error()) + suite.Require().False(store.Has(host.ClientStateKey())) + suite.Require().False(store.Has(host.ConsensusStateKey(suite.chainB.LatestCommittedHeader.GetHeight()))) + } + }) + } +} + func (suite *TendermintTestSuite) TestRecoverClient() { var ( subjectClientID, substituteClientID string @@ -276,3 +515,496 @@ func (suite *TendermintTestSuite) TestVerifyUpgradeAndUpdateState() { }) } } + +func (suite *TendermintTestSuite) TestVerifyMembership() { + var ( + testingpath *ibctesting.Path + delayTimePeriod uint64 + delayBlockPeriod uint64 + err error + proofHeight exported.Height + proof []byte + path exported.Path + value []byte + ) + + testCases := []struct { + name string + malleate func() + expErr error + }{ + { + "successful ClientState verification", + func() { + // default proof construction uses ClientState + }, + nil, + }, + { + "successful ConsensusState verification", func() { + latestHeight := testingpath.EndpointB.GetClientLatestHeight() + + key := host.FullConsensusStateKey(testingpath.EndpointB.ClientID, latestHeight) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + + consensusState := testingpath.EndpointB.GetConsensusState(latestHeight).(*ibctm.ConsensusState) + value, err = suite.chainB.Codec.MarshalInterface(consensusState) + suite.Require().NoError(err) + }, + nil, + }, + { + "successful Connection verification", func() { + key := host.ConnectionKey(testingpath.EndpointB.ConnectionID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + + connection := testingpath.EndpointB.GetConnection() + value, err = suite.chainB.Codec.Marshal(&connection) + suite.Require().NoError(err) + }, + nil, + }, + { + "successful Channel verification", func() { + key := host.ChannelKey(testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + + channel := testingpath.EndpointB.GetChannel() + value, err = suite.chainB.Codec.Marshal(&channel) + suite.Require().NoError(err) + }, + nil, + }, + { + "successful PacketCommitment verification", func() { + // send from chainB to chainA since we are proving chainB sent a packet + sequence, err := testingpath.EndpointB.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + suite.Require().NoError(err) + + // make packet commitment proof + packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, clienttypes.NewHeight(1, 100), 0) + key := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + + value = channeltypes.CommitPacket(suite.chainA.App.GetIBCKeeper().Codec(), packet) + }, nil, + }, + { + "successful Acknowledgement verification", func() { + // send from chainA to chainB since we are proving chainB wrote an acknowledgement + sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + suite.Require().NoError(err) + + // write receipt and ack + packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0) + err = testingpath.EndpointB.RecvPacket(packet) + suite.Require().NoError(err) + + key := host.PacketAcknowledgementKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + + value = channeltypes.CommitAcknowledgement(ibcmock.MockAcknowledgement.Acknowledgement()) + }, + nil, + }, + { + "successful NextSequenceRecv verification", func() { + // send from chainA to chainB since we are proving chainB incremented the sequence recv + + // send packet + sequence, err := testingpath.EndpointA.SendPacket(clienttypes.NewHeight(1, 100), 0, ibctesting.MockPacketData) + suite.Require().NoError(err) + + // next seq recv incremented + packet := channeltypes.NewPacket(ibctesting.MockPacketData, sequence, testingpath.EndpointA.ChannelConfig.PortID, testingpath.EndpointA.ChannelID, testingpath.EndpointB.ChannelConfig.PortID, testingpath.EndpointB.ChannelID, clienttypes.NewHeight(1, 100), 0) + err = testingpath.EndpointB.RecvPacket(packet) + suite.Require().NoError(err) + + key := host.NextSequenceRecvKey(packet.GetSourcePort(), packet.GetSourceChannel()) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + + value = sdk.Uint64ToBigEndian(packet.GetSequence() + 1) + }, + nil, + }, + { + "successful verification outside IBC store", func() { + key := transfertypes.PortKey + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(commitmenttypes.NewMerklePrefix([]byte(transfertypes.StoreKey)), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProofForStore(transfertypes.StoreKey, key, int64(testingpath.EndpointA.GetClientLatestHeight().GetRevisionHeight())) + + value = []byte(suite.chainB.GetSimApp().TransferKeeper.GetPort(suite.chainB.GetContext())) + suite.Require().NoError(err) + }, + nil, + }, + { + "delay time period has passed", func() { + delayTimePeriod = uint64(time.Second.Nanoseconds()) + }, + nil, + }, + { + "delay time period has not passed", func() { + delayTimePeriod = uint64(time.Hour.Nanoseconds()) + }, + ibctm.ErrDelayPeriodNotPassed, + }, + { + "delay block period has passed", func() { + delayBlockPeriod = 1 + }, + nil, + }, + { + "delay block period has not passed", func() { + delayBlockPeriod = 1000 + }, + ibctm.ErrDelayPeriodNotPassed, + }, + { + "latest client height < height", func() { + proofHeight = testingpath.EndpointA.GetClientLatestHeight().Increment() + }, + ibcerrors.ErrInvalidHeight, + }, + { + "invalid path type", + func() { + path = ibcmock.KeyPath{} + }, + ibcerrors.ErrInvalidType, + }, + { + "failed to unmarshal merkle proof", func() { + proof = invalidProof + }, + commitmenttypes.ErrInvalidProof, + }, + { + "consensus state not found", func() { + proofHeight = clienttypes.ZeroHeight() + }, + clienttypes.ErrConsensusStateNotFound, + }, + { + "proof verification failed", func() { + // change the value being proved + value = []byte("invalid value") + }, + commitmenttypes.ErrInvalidProof, + }, + { + "proof is empty", func() { + // change the inserted proof + proof = []byte{} + }, + commitmenttypes.ErrInvalidMerkleProof, + }, + { + "client state not found for height", + func() { + store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), testingpath.EndpointA.ClientID) + store.Delete(host.ClientStateKey()) + }, + clienttypes.ErrClientNotFound, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + suite.SetupTest() // reset + testingpath = ibctesting.NewPath(suite.chainA, suite.chainB) + testingpath.SetChannelOrdered() + testingpath.Setup() + + // reset time and block delays to 0, malleate may change to a specific non-zero value. + delayTimePeriod = 0 + delayBlockPeriod = 0 + + // create default proof, merklePath, and value which passes + // may be overwritten by malleate() + key := host.FullClientStateKey(testingpath.EndpointB.ClientID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + + clientState := testingpath.EndpointB.GetClientState().(*ibctm.ClientState) + value, err = suite.chainB.Codec.MarshalInterface(clientState) + suite.Require().NoError(err) + + tc.malleate() // make changes as necessary + + lightClientModule, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.Route(testingpath.EndpointA.ClientID) + suite.Require().True(found) + + err = lightClientModule.VerifyMembership( + suite.chainA.GetContext(), testingpath.EndpointA.ClientID, proofHeight, delayTimePeriod, delayBlockPeriod, + proof, path, value, + ) + expPass := tc.expErr == nil + if expPass { + suite.Require().NoError(err) + } else { + suite.Require().ErrorContains(err, tc.expErr.Error()) + } + }) + } +} + +func (suite *TendermintTestSuite) TestVerifyNonMembership() { + var ( + testingpath *ibctesting.Path + delayTimePeriod uint64 + delayBlockPeriod uint64 + err error + proofHeight exported.Height + path exported.Path + proof []byte + invalidClientID = "09-tendermint" + invalidConnectionID = "connection-100" + invalidChannelID = "channel-800" + invalidPortID = "invalid-port" + ) + + testCases := []struct { + name string + malleate func() + expErr error + }{ + { + "successful ClientState verification of non membership", + func() { + // default proof construction uses ClientState + }, + nil, + }, + { + "successful ConsensusState verification of non membership", func() { + key := host.FullConsensusStateKey(invalidClientID, testingpath.EndpointB.GetClientLatestHeight()) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + }, + nil, + }, + { + "successful Connection verification of non membership", func() { + key := host.ConnectionKey(invalidConnectionID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + }, + nil, + }, + { + "successful Channel verification of non membership", func() { + key := host.ChannelKey(testingpath.EndpointB.ChannelConfig.PortID, invalidChannelID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + }, + nil, + }, + { + "successful PacketCommitment verification of non membership", func() { + // make packet commitment proof + key := host.PacketCommitmentKey(invalidPortID, invalidChannelID, 1) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + }, + nil, + }, + { + "successful Acknowledgement verification of non membership", func() { + key := host.PacketAcknowledgementKey(invalidPortID, invalidChannelID, 1) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + }, + nil, + }, + { + "successful NextSequenceRecv verification of non membership", func() { + key := host.NextSequenceRecvKey(invalidPortID, invalidChannelID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = testingpath.EndpointB.QueryProof(key) + }, + nil, + }, + { + "successful verification of non membership outside IBC store", func() { + key := []byte{0x08} + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(commitmenttypes.NewMerklePrefix([]byte(transfertypes.StoreKey)), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProofForStore(transfertypes.StoreKey, key, int64(testingpath.EndpointA.GetClientLatestHeight().GetRevisionHeight())) + }, + nil, + }, + { + "delay time period has passed", func() { + delayTimePeriod = uint64(time.Second.Nanoseconds()) + }, + nil, + }, + { + "delay time period has not passed", func() { + delayTimePeriod = uint64(time.Hour.Nanoseconds()) + }, + ibctm.ErrDelayPeriodNotPassed, + }, + { + "delay block period has passed", func() { + delayBlockPeriod = 1 + }, + nil, + }, + { + "delay block period has not passed", func() { + delayBlockPeriod = 1000 + }, + ibctm.ErrDelayPeriodNotPassed, + }, + { + "latest client height < height", func() { + proofHeight = testingpath.EndpointA.GetClientLatestHeight().Increment() + }, + ibcerrors.ErrInvalidHeight, + }, + { + "invalid path type", + func() { + path = ibcmock.KeyPath{} + }, + ibcerrors.ErrInvalidType, + }, + { + "failed to unmarshal merkle proof", func() { + proof = invalidProof + }, + commitmenttypes.ErrInvalidProof, + }, + { + "consensus state not found", func() { + proofHeight = clienttypes.ZeroHeight() + }, + clienttypes.ErrConsensusStateNotFound, + }, + { + "verify non membership fails as path exists", func() { + // change the value being proved + key := host.FullClientStateKey(testingpath.EndpointB.ClientID) + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + }, + commitmenttypes.ErrInvalidProof, + }, + { + "proof is empty", func() { + // change the inserted proof + proof = []byte{} + }, + commitmenttypes.ErrInvalidMerkleProof, + }, + { + "client state not found for height", + func() { + store := suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), testingpath.EndpointA.ClientID) + store.Delete(host.ClientStateKey()) + }, + clienttypes.ErrClientNotFound, + }, + } + + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + suite.SetupTest() // reset + testingpath = ibctesting.NewPath(suite.chainA, suite.chainB) + testingpath.SetChannelOrdered() + testingpath.Setup() + + // reset time and block delays to 0, malleate may change to a specific non-zero value. + delayTimePeriod = 0 + delayBlockPeriod = 0 + + // create default proof, merklePath, and value which passes + // may be overwritten by malleate() + key := host.FullClientStateKey("invalid-client-id") + + merklePath := commitmenttypes.NewMerklePath(string(key)) + path, err = commitmenttypes.ApplyPrefix(suite.chainB.GetPrefix(), merklePath) + suite.Require().NoError(err) + + proof, proofHeight = suite.chainB.QueryProof(key) + + tc.malleate() // make changes as necessary + + lightClientModule, found := suite.chainA.App.GetIBCKeeper().ClientKeeper.Route(testingpath.EndpointA.ClientID) + suite.Require().True(found) + + err = lightClientModule.VerifyNonMembership( + suite.chainA.GetContext(), testingpath.EndpointA.ClientID, proofHeight, delayTimePeriod, delayBlockPeriod, + proof, path, + ) + + expPass := tc.expErr == nil + if expPass { + suite.Require().NoError(err) + } else { + suite.Require().ErrorContains(err, tc.expErr.Error()) + } + }) + } +} diff --git a/modules/light-clients/07-tendermint/tendermint_test.go b/modules/light-clients/07-tendermint/tendermint_test.go index 5dc7ec722a2..b39162b930d 100644 --- a/modules/light-clients/07-tendermint/tendermint_test.go +++ b/modules/light-clients/07-tendermint/tendermint_test.go @@ -29,9 +29,10 @@ const ( ) var ( - height = clienttypes.NewHeight(0, 4) - newClientHeight = clienttypes.NewHeight(1, 1) - upgradePath = []string{"upgrade", "upgradedIBCState"} + height = clienttypes.NewHeight(0, 4) + newClientHeight = clienttypes.NewHeight(1, 1) + upgradePath = []string{"upgrade", "upgradedIBCState"} + invalidUpgradePath = []string{"upgrade", ""} ) type TendermintTestSuite struct { diff --git a/modules/light-clients/08-wasm/go.mod b/modules/light-clients/08-wasm/go.mod index a347d533077..115854731d2 100644 --- a/modules/light-clients/08-wasm/go.mod +++ b/modules/light-clients/08-wasm/go.mod @@ -35,7 +35,7 @@ require ( github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de - google.golang.org/grpc v1.63.0 + google.golang.org/grpc v1.63.2 ) require ( diff --git a/modules/light-clients/08-wasm/go.sum b/modules/light-clients/08-wasm/go.sum index 99585381cb7..e01c7231918 100644 --- a/modules/light-clients/08-wasm/go.sum +++ b/modules/light-clients/08-wasm/go.sum @@ -1648,8 +1648,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.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/modules/light-clients/08-wasm/types/consensus_host_test.go b/modules/light-clients/08-wasm/types/consensus_host_test.go index f6249f382cf..f190cb2d164 100644 --- a/modules/light-clients/08-wasm/types/consensus_host_test.go +++ b/modules/light-clients/08-wasm/types/consensus_host_test.go @@ -60,9 +60,7 @@ func (suite *TypesTestSuite) TestGetSelfConsensusState() { consensusHost, err = types.NewWasmConsensusHost(suite.chainA.Codec, consensusHost) suite.Require().NoError(err) - suite.chainA.App.GetIBCKeeper().ClientKeeper.SetSelfConsensusHost( - consensusHost, - ) + suite.chainA.App.GetIBCKeeper().SetConsensusHost(consensusHost) cs, err := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetSelfConsensusState(suite.chainA.GetContext(), height) @@ -134,9 +132,7 @@ func (suite *TypesTestSuite) TestValidateSelfClient() { consensusHost, err = types.NewWasmConsensusHost(suite.chainA.Codec, consensusHost) suite.Require().NoError(err) - suite.chainA.App.GetIBCKeeper().ClientKeeper.SetSelfConsensusHost( - consensusHost, - ) + suite.chainA.App.GetIBCKeeper().ClientKeeper.SetConsensusHost(consensusHost) err = suite.chainA.App.GetIBCKeeper().ClientKeeper.ValidateSelfClient(suite.chainA.GetContext(), clientState) diff --git a/testing/chain.go b/testing/chain.go index 5b59e78fe40..01a7d27dea8 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -276,7 +276,8 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl // QueryConsensusStateProof performs an abci query for a consensus state // stored on the given clientID. The proof and consensusHeight are returned. func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) { - consensusHeight := chain.GetClientLatestHeight(clientID).(clienttypes.Height) + consensusHeight, ok := chain.GetClientLatestHeight(clientID).(clienttypes.Height) + require.True(chain.TB, ok) consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) consensusProof, _ := chain.QueryProof(consensusKey) diff --git a/testing/endpoint.go b/testing/endpoint.go index bde2146432f..e1adacafe0d 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -95,7 +95,8 @@ func (endpoint *Endpoint) CreateClient() (err error) { tmConfig, ok := endpoint.ClientConfig.(*TendermintConfig) require.True(endpoint.Chain.TB, ok) - height := endpoint.Counterparty.Chain.LatestCommittedHeader.GetHeight().(clienttypes.Height) + height, ok := endpoint.Counterparty.Chain.LatestCommittedHeader.GetHeight().(clienttypes.Height) + require.True(endpoint.Chain.TB, ok) clientState = ibctm.NewClientState( endpoint.Counterparty.Chain.ChainID, tmConfig.TrustLevel, tmConfig.TrustingPeriod, tmConfig.UnbondingPeriod, tmConfig.MaxClockDrift, height, commitmenttypes.GetSDKSpecs(), UpgradePath) @@ -138,7 +139,8 @@ func (endpoint *Endpoint) UpdateClient() (err error) { switch endpoint.ClientConfig.GetClientType() { case exported.Tendermint: - trustedHeight := endpoint.GetClientLatestHeight().(clienttypes.Height) + trustedHeight, ok := endpoint.GetClientLatestHeight().(clienttypes.Height) + require.True(endpoint.Chain.TB, ok) header, err = endpoint.Counterparty.Chain.IBCClientHeader(endpoint.Counterparty.Chain.LatestCommittedHeader, trustedHeight) default: err = fmt.Errorf("client type %s is not supported", endpoint.ClientConfig.GetClientType()) @@ -168,7 +170,8 @@ func (endpoint *Endpoint) UpgradeChain() error { } clientState := endpoint.Counterparty.GetClientState() - tmClientState := clientState.(*ibctm.ClientState) + tmClientState, ok := clientState.(*ibctm.ClientState) + require.True(endpoint.Chain.TB, ok) // increment revision number in chainID oldChainID := tmClientState.ChainId @@ -306,7 +309,9 @@ func (endpoint *Endpoint) QueryConnectionHandshakeProof() ( clientKey := host.FullClientStateKey(endpoint.Counterparty.ClientID) clientProof, proofHeight = endpoint.Counterparty.QueryProof(clientKey) - consensusHeight = endpoint.Counterparty.GetClientLatestHeight().(clienttypes.Height) + var ok bool + consensusHeight, ok = endpoint.Counterparty.GetClientLatestHeight().(clienttypes.Height) + require.True(endpoint.Chain.TB, ok) // query proof for the consensus state on the counterparty consensusKey := host.FullConsensusStateKey(endpoint.Counterparty.ClientID, consensusHeight) consensusProof, _ = endpoint.Counterparty.QueryProofAtHeight(consensusKey, proofHeight.GetRevisionHeight()) diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 4a8acb976d0..50e56e93145 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -67,7 +67,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensus "github.com/cosmos/cosmos-sdk/x/consensus" + "github.com/cosmos/cosmos-sdk/x/consensus" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" @@ -117,8 +117,8 @@ import ( ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" //nolint ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v8/modules/core" ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client" @@ -523,7 +523,11 @@ func NewSimApp( // initialize ICA module with mock module as the authentication module on the controller side var icaControllerStack porttypes.IBCModule icaControllerStack = ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp("", scopedICAMockKeeper)) - app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule) + var ok bool + app.ICAAuthModule, ok = icaControllerStack.(ibcmock.IBCModule) + if !ok { + panic(fmt.Errorf("cannot convert %T into %T", icaControllerStack, app.ICAAuthModule)) + } icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper) icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) diff --git a/testing/simapp/upgrades/upgrades.go b/testing/simapp/upgrades/upgrades.go index 0509ae15466..afe324e10b6 100644 --- a/testing/simapp/upgrades/upgrades.go +++ b/testing/simapp/upgrades/upgrades.go @@ -15,7 +15,7 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" - v6 "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/migrations/v6" + "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/migrations/v6" clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" "github.com/cosmos/ibc-go/v8/modules/core/exported" ibctmmigrations "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint/migrations" From c2b728a8b5d1345cea5e4ae70bd5c3ac10b1b974 Mon Sep 17 00:00:00 2001 From: Nikolas De Giorgis Date: Fri, 12 Apr 2024 13:54:48 +0100 Subject: [PATCH 2/2] Remove nolint directive --- testing/simapp/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 50e56e93145..cbb77eac3db 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -118,7 +118,7 @@ import ( ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" "github.com/cosmos/ibc-go/v8/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" //nolint + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v8/modules/core" ibcclient "github.com/cosmos/ibc-go/v8/modules/core/02-client"