diff --git a/.github/compatibility-test-matrices/release-v7.7.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/client-chain-a.json new file mode 100644 index 00000000000..fb695b1aaca --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/client-chain-a.json @@ -0,0 +1,18 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestClientTestSuite" + ], + "test": [ + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" + ], + "relayer-type": [ + "hermes" + ] +} diff --git a/.github/compatibility-test-matrices/release-v7.7.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/connection-chain-a.json new file mode 100644 index 00000000000..eb07f12daed --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/connection-chain-a.json @@ -0,0 +1,17 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestConnectionTestSuite" + ], + "test": [ + "TestMaxExpectedTimePerBlockParam" + ], + "relayer-type": [ + "hermes" + ] +} diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-chain-a.json new file mode 100644 index 00000000000..87c09699b9c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-chain-a.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.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.7.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-chain-b.json new file mode 100644 index 00000000000..44fcaf172c9 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-chain-b.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.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.7.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-gov-chain-a.json new file mode 100644 index 00000000000..c63fbeddca1 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-gov-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-gov-chain-b.json new file mode 100644 index 00000000000..c277ecdcdf2 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-gov-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-a.json new file mode 100644 index 00000000000..013673b1b0b --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-b.json new file mode 100644 index 00000000000..3d18035d861 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-groups-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-a.json new file mode 100644 index 00000000000..acb7a91222e --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-a.json @@ -0,0 +1,19 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v7.6.0", + "v7.5.0", + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsQueryTestSuite" + ], + "test": [ + "TestInterchainAccountsQuery" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-b.json new file mode 100644 index 00000000000..a4655b231b5 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-queries-chain-b.json @@ -0,0 +1,19 @@ +{ + "chain-a": [ + "v7.6.0", + "v7.5.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsQueryTestSuite" + ], + "test": [ + "TestInterchainAccountsQuery" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-a.json new file mode 100644 index 00000000000..610cf77fdc7 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-a.json @@ -0,0 +1,19 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulTransfer_UnorderedChannel" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-b.json new file mode 100644 index 00000000000..62144562908 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/ica-unordered-channel-chain-b.json @@ -0,0 +1,19 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.x" + ], + "entrypoint": [ + "TestInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulTransfer_UnorderedChannel" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-ica-chain-a.json new file mode 100644 index 00000000000..aa9fd58edb6 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-ica-chain-a.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.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.7.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-ica-chain-b.json new file mode 100644 index 00000000000..f11099a7d94 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-ica-chain-b.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.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.7.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-transfer-chain-a.json new file mode 100644 index 00000000000..131479dccca --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-transfer-chain-a.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "release-v7.7.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.7.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-transfer-chain-b.json new file mode 100644 index 00000000000..02f9a827bdb --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/incentivized-transfer-chain-b.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.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.7.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/localhost-ica-chain-a.json new file mode 100644 index 00000000000..d1c298e0653 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/localhost-ica-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v7.7.x" + ], + "entrypoint": [ + "LocalhostInterchainAccountsTestSuite" + ], + "test": [ + "TestInterchainAccounts_Localhost", + "TestInterchainAccounts_ReopenChannel_Localhost" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/localhost-transfer-chain-a.json new file mode 100644 index 00000000000..b4d3b65ce14 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/localhost-transfer-chain-a.json @@ -0,0 +1,22 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v7.7.x" + ], + "entrypoint": [ + "LocalhostTransferTestSuite" + ], + "test": [ + "TestMsgTransfer_Localhost" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.7.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/transfer-authz-chain-a.json new file mode 100644 index 00000000000..cfbe81f02d0 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/transfer-authz-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v7.7.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.7.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/transfer-authz-chain-b.json new file mode 100644 index 00000000000..e86db0f3a17 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/transfer-authz-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.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.7.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.7.x/transfer-chain-a.json new file mode 100644 index 00000000000..2b77b52df0a --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/transfer-chain-a.json @@ -0,0 +1,32 @@ +{ + "chain-a": [ + "release-v7.7.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", + "release-v7.7.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.7.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.7.x/transfer-chain-b.json new file mode 100644 index 00000000000..dc70af2ed74 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.7.x/transfer-chain-b.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", + "release-v7.7.x" + ], + "chain-b": [ + "release-v7.7.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.4.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/client-chain-a.json new file mode 100644 index 00000000000..f838479fa0c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/client-chain-a.json @@ -0,0 +1,20 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.x" + ], + "entrypoint": [ + "TestClientTestSuite" + ], + "test": [ + "TestRecoverClient_Succeeds", + "TestScheduleIBCUpgrade_Succeeds", + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" + ], + "relayer-type": [ + "hermes" + ] +} diff --git a/.github/compatibility-test-matrices/release-v8.4.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/connection-chain-a.json new file mode 100644 index 00000000000..a26255f90bb --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/connection-chain-a.json @@ -0,0 +1,17 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.x" + ], + "entrypoint": [ + "TestConnectionTestSuite" + ], + "test": [ + "TestMaxExpectedTimePerBlockParam" + ], + "relayer-type": [ + "hermes" + ] +} diff --git a/.github/compatibility-test-matrices/release-v8.4.x/genesis-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/genesis-chain-a.json new file mode 100644 index 00000000000..3b7d88a090f --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/genesis-chain-a.json @@ -0,0 +1,17 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.x" + ], + "entrypoint": [ + "TestGenesisTestSuite" + ], + "test": [ + "TestIBCGenesis" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-chain-a.json new file mode 100644 index 00000000000..cd9bdf4e1ee --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-chain-a.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.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.4.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-chain-b.json new file mode 100644 index 00000000000..808aff7be7a --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-chain-b.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/ica-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-channel-upgrade-chain-a.json new file mode 100644 index 00000000000..95d6c0d0c5c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-channel-upgrade-chain-a.json @@ -0,0 +1,20 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "release-v8.4.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.4.x/ica-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-channel-upgrade-chain-b.json new file mode 100644 index 00000000000..338cb5131f5 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-channel-upgrade-chain-b.json @@ -0,0 +1,20 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-gov-chain-a.json new file mode 100644 index 00000000000..5b5af16579f --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-gov-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-gov-chain-b.json new file mode 100644 index 00000000000..f975b83df95 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-gov-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-a.json new file mode 100644 index 00000000000..2b1ae3d2212 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-b.json new file mode 100644 index 00000000000..c78160f6e70 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-groups-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-a.json new file mode 100644 index 00000000000..462c7c79261 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-a.json @@ -0,0 +1,20 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v7.6.0", + "v7.5.0", + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsQueryTestSuite" + ], + "test": [ + "TestInterchainAccountsQuery" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-b.json new file mode 100644 index 00000000000..328b2891d9d --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-queries-chain-b.json @@ -0,0 +1,20 @@ +{ + "chain-a": [ + "v7.6.0", + "v7.5.0", + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "release-v8.4.x" + ], + "entrypoint": [ + "TestInterchainAccountsQueryTestSuite" + ], + "test": [ + "TestInterchainAccountsQuery" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/ica-unordered-channel-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-unordered-channel-chain-a.json new file mode 100644 index 00000000000..e62302c9f73 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-unordered-channel-chain-a.json @@ -0,0 +1,21 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "release-v8.4.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.4.x/ica-unordered-channel-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/ica-unordered-channel-chain-b.json new file mode 100644 index 00000000000..1f0b2895bac --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/ica-unordered-channel-chain-b.json @@ -0,0 +1,21 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-ica-chain-a.json new file mode 100644 index 00000000000..006efc39495 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-ica-chain-a.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.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.4.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-ica-chain-b.json new file mode 100644 index 00000000000..12f2091d9b6 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-ica-chain-b.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-transfer-chain-a.json new file mode 100644 index 00000000000..5b972d6789b --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-transfer-chain-a.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "release-v8.4.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.4.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-transfer-chain-b.json new file mode 100644 index 00000000000..bdf1c8e9c92 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/incentivized-transfer-chain-b.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/localhost-ica-chain-a.json new file mode 100644 index 00000000000..daec8ba1521 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/localhost-ica-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v8.4.x" + ], + "entrypoint": [ + "LocalhostInterchainAccountsTestSuite" + ], + "test": [ + "TestInterchainAccounts_Localhost", + "TestInterchainAccounts_ReopenChannel_Localhost" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/localhost-transfer-chain-a.json new file mode 100644 index 00000000000..925c1b2d14b --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/localhost-transfer-chain-a.json @@ -0,0 +1,22 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v8.4.x" + ], + "entrypoint": [ + "LocalhostTransferTestSuite" + ], + "test": [ + "TestMsgTransfer_Localhost" + ], + "relayer-type": [ + "hermes" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v8.4.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-authz-chain-a.json new file mode 100644 index 00000000000..7de2827921e --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-authz-chain-a.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v8.4.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.4.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-authz-chain-b.json new file mode 100644 index 00000000000..a5c2bca28a4 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-authz-chain-b.json @@ -0,0 +1,23 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-chain-a.json new file mode 100644 index 00000000000..9a7c0ca5618 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-chain-a.json @@ -0,0 +1,32 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", + "release-v8.4.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.4.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-chain-b.json new file mode 100644 index 00000000000..ebaddf363c8 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-chain-b.json @@ -0,0 +1,30 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "v7.6.0", + "v7.5.0", + "v7.4.0", + "v6.3.0", + "v5.4.0", + "v4.6.0", + "v3.4.0", + "v2.5.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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.4.x/transfer-channel-upgrade-chain-a.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-channel-upgrade-chain-a.json new file mode 100644 index 00000000000..36a92661bd7 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-channel-upgrade-chain-a.json @@ -0,0 +1,21 @@ +{ + "chain-a": [ + "release-v8.4.x" + ], + "chain-b": [ + "v8.3.0", + "v8.2.0", + "release-v8.4.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.4.x/transfer-channel-upgrade-chain-b.json b/.github/compatibility-test-matrices/release-v8.4.x/transfer-channel-upgrade-chain-b.json new file mode 100644 index 00000000000..311fa2bf2fe --- /dev/null +++ b/.github/compatibility-test-matrices/release-v8.4.x/transfer-channel-upgrade-chain-b.json @@ -0,0 +1,21 @@ +{ + "chain-a": [ + "v8.3.0", + "v8.2.0", + "release-v8.4.x" + ], + "chain-b": [ + "release-v8.4.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/unreleased/client-1.json b/.github/compatibility-test-matrices/unreleased/client-1.json index 385dd1cd16a..63b3ea6903a 100644 --- a/.github/compatibility-test-matrices/unreleased/client-1.json +++ b/.github/compatibility-test-matrices/unreleased/client-1.json @@ -1,12 +1,14 @@ { "chain-a": [ "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" ], "chain-b": [ "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" diff --git a/.github/compatibility-test-matrices/unreleased/client-2.json b/.github/compatibility-test-matrices/unreleased/client-2.json index 5d0dbd62375..d2fb086e90e 100644 --- a/.github/compatibility-test-matrices/unreleased/client-2.json +++ b/.github/compatibility-test-matrices/unreleased/client-2.json @@ -1,9 +1,11 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/connection.json b/.github/compatibility-test-matrices/unreleased/connection.json index 551cb942481..82cae4afd0d 100644 --- a/.github/compatibility-test-matrices/unreleased/connection.json +++ b/.github/compatibility-test-matrices/unreleased/connection.json @@ -1,14 +1,18 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" 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 1b030f6861f..1b975ef89fe 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,9 +1,11 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], 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 1b030f6861f..1b975ef89fe 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,9 +1,11 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/ica-gov.json b/.github/compatibility-test-matrices/unreleased/ica-gov.json index a2b90d46d5a..8b5fbe95ac5 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-gov.json +++ b/.github/compatibility-test-matrices/unreleased/ica-gov.json @@ -1,15 +1,19 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", "release-v6.3.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/ica-groups.json b/.github/compatibility-test-matrices/unreleased/ica-groups.json index fedd1523e24..be81c7e2989 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-groups.json +++ b/.github/compatibility-test-matrices/unreleased/ica-groups.json @@ -1,15 +1,19 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", "release-v6.3.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/ica-queries.json b/.github/compatibility-test-matrices/unreleased/ica-queries.json index 4dabd49fb5b..0de8ff881d2 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-queries.json +++ b/.github/compatibility-test-matrices/unreleased/ica-queries.json @@ -1,11 +1,15 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json b/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json index 37a3da3f8f8..673ebd9de69 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json +++ b/.github/compatibility-test-matrices/unreleased/ica-unordered-channel.json @@ -1,13 +1,17 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/ica.json b/.github/compatibility-test-matrices/unreleased/ica.json index 3d741b776d6..3990b8f3fb7 100644 --- a/.github/compatibility-test-matrices/unreleased/ica.json +++ b/.github/compatibility-test-matrices/unreleased/ica.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json index 603726089a9..685318a58dd 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json @@ -1,15 +1,19 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", "release-v6.3.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json index 08d059451dd..3268aed33d5 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json index 6f9a98cc996..b9336a8d807 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json index 57303a3621f..21a66b7db1a 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/localhost-ica.json b/.github/compatibility-test-matrices/unreleased/localhost-ica.json index 91089c87eaa..05fbfe894ee 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-ica.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-ica.json @@ -1,14 +1,18 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" diff --git a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json index 059113dae8c..153ca4a43da 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json @@ -1,14 +1,18 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-1.json b/.github/compatibility-test-matrices/unreleased/transfer-1.json index 7f0f868bb9c..4c63ab62717 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-1.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-2.json b/.github/compatibility-test-matrices/unreleased/transfer-2.json index cd82e851cbc..a63a9512151 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-2.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-3.json b/.github/compatibility-test-matrices/unreleased/transfer-3.json index 9bd23143164..a075f8fd93b 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-3.json @@ -1,7 +1,9 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", @@ -10,8 +12,10 @@ "release-v4.6.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-authz.json b/.github/compatibility-test-matrices/unreleased/transfer-authz.json index 41434e19b95..9ec7ab6c857 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-authz.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-authz.json @@ -1,14 +1,18 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x", + "release-v7.7.x", "release-v7.6.x", "release-v7.5.x", "release-v7.4.x" 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 0b934bfe86e..41ea4f9172f 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,9 +1,11 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], 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 0b934bfe86e..41ea4f9172f 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,11 @@ { "chain-a": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], "chain-b": [ + "release-v8.4.x", "release-v8.3.x", "release-v8.2.x" ], diff --git a/.github/mergify.yml b/.github/mergify.yml index cbc0334007f..d0209883bd2 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -113,7 +113,15 @@ pull_request_rules: actions: backport: branches: - - release/v7.6.x + - release/v7.6.x + - name: backport patches to v7.7.x branch + conditions: + - base=main + - label=backport-to-v7.7.x + actions: + backport: + branches: + - release/v7.7.x - name: backport patches to v8.2.x branch conditions: - base=main @@ -130,6 +138,14 @@ pull_request_rules: backport: branches: - release/v8.3.x + - name: backport patches to v8.4.x branch + conditions: + - base=main + - label=backport-to-v8.4.x + actions: + backport: + branches: + - release/v8.4.x - name: backport patches to v9.0.x branch conditions: - base=main diff --git a/.github/workflows/e2e-compatibility-unreleased.yaml b/.github/workflows/e2e-compatibility-unreleased.yaml index 68a0601ff39..db749502911 100644 --- a/.github/workflows/e2e-compatibility-unreleased.yaml +++ b/.github/workflows/e2e-compatibility-unreleased.yaml @@ -18,8 +18,10 @@ jobs: - release/v7.4.x - release/v7.5.x - release/v7.6.x + - release/v7.7.x - release/v8.2.x - release/v8.3.x + - release/v8.4.x - release/v9.0.x steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index 38069ac0b97..b22597b4a7e 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -16,8 +16,10 @@ on: - release/v7.4.x - release/v7.5.x - release/v7.6.x + - release/v7.7.x - release/v8.2.x - release/v8.3.x + - release/v8.4.x - release/v9.0.x - main ibc-go-version: @@ -55,8 +57,10 @@ jobs: - release/v7.4.x - release/v7.5.x - release/v7.6.x + - release/v7.7.x - release/v8.2.x - release/v8.3.x + - release/v8.4.x - release/v9.0.x - main steps: diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index d00ba181de0..0e37bb53c96 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.34.0 + - uses: bufbuild/buf-setup-action@v1.35.1 - uses: bufbuild/buf-push-action@v1 with: input: "proto" diff --git a/CHANGELOG.md b/CHANGELOG.md index ee56fa3031e..a6fda2ae855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,9 +45,16 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking +* (apps/27-interchain-accounts) [\#4977](https://github.com/cosmos/ibc-go/pull/4977) The `InitModule` function has been removed. +* (core/02-client) [\#5110](https://github.com/cosmos/ibc-go/pull/5110) The `header` attribute has been removed from the `update_client` event. +* (apps/27-interchain-accounts) [\#5396](https://github.com/cosmos/ibc-go/pull/5396) Remove `GetBytes` function of `CosmosTx` type. +* (core/04-channel) [\#5691](https://github.com/cosmos/ibc-go/pull/5691) Remove functions `IsOpen` and `IsClosed` of `Channel` type. +* (core/04-channel) [\#5705](https://github.com/cosmos/ibc-go/pull/5705) Remove functions `GetState`, `GetOrdering`, `GetCounterparty`, `GetConnectionHops`, `GetVersion` of the `Channel` type. +* (core/04-channel) [\#5603](https://github.com/cosmos/ibc-go/pull/5603) Rename attribute names and constants for channel upgrades events. * (core/02-client, light-clients) [\#5806](https://github.com/cosmos/ibc-go/pull/5806) Decouple light client routing from their encoding structure. * (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/04-channel) [\#6063](https://github.com/cosmos/ibc-go/pull/6063) Remove attributes `version`, `ordering` and `connection_hops` from the `channel_upgrade_init`, `channel_upgrade_try`, `channel_upgrade_ack`, `channel_upgrade_open`, `channel_upgrade_timeout` and `channel_upgrade_cancelled` events. * (light-clients/06-solomachine) [\#6230](https://github.com/cosmos/ibc-go/pull/6230) Remove `GetTimestampAtHeight`, `Status` and `UpdateStateOnMisbehaviour` functions from `ClientState` and move logic to functions 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. * (testing) [\#6070](https://github.com/cosmos/ibc-go/pull/6070) Remove `AssertEventsLegacy` function. @@ -87,6 +94,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * (apps/27-interchain-accounts) [\#6377](https://github.com/cosmos/ibc-go/pull/6377) Generate ICA simtest proposals only for provided keepers. +* (core/04-channel) [\#6935](https://github.com/cosmos/ibc-go/pull/6935) Check upgrade compatibility in `ChanUpgradeConfirm`. ## [v8.3.2](https://github.com/cosmos/ibc-go/releases/tag/v8.3.2) - 2024-06-20 diff --git a/docs/docs/01-ibc/02-integration.md b/docs/docs/01-ibc/02-integration.md index cb31b9a0805..9d6142a7e6c 100644 --- a/docs/docs/01-ibc/02-integration.md +++ b/docs/docs/01-ibc/02-integration.md @@ -246,11 +246,10 @@ import ( // app.go // after sealing the IBC router -clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) -clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule) +app.IBCKeeper.ClientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) app.ModuleManager = module.NewManager( // ... capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), diff --git a/docs/docs/02-apps/01-transfer/04-messages.md b/docs/docs/02-apps/01-transfer/04-messages.md index 4d121985fdc..0118b3e8166 100644 --- a/docs/docs/02-apps/01-transfer/04-messages.md +++ b/docs/docs/02-apps/01-transfer/04-messages.md @@ -63,7 +63,7 @@ Please note that the `Token` field is deprecated and users should now use `Token The denomination provided for transfer should correspond to the same denomination represented on this chain. The prefixes will be added as necessary upon by the receiving chain. -If the `Amount` is set to the maximum value for a 256-bit unsigned integer (i.e. 2^256 - 1), then the whole balance of the corrsponding denomination will be transferred. The helper function `UnboundedSpendLimit` in the `types` package of the `transfer` module provides the sentinel value that can be used. +If the `Amount` is set to the maximum value for a 256-bit unsigned integer (i.e. 2^256 - 1), then the whole balance of the corresponding denomination will be transferred. The helper function `UnboundedSpendLimit` in the `types` package of the `transfer` module provides the sentinel value that can be used. ### Memo diff --git a/docs/docs/02-apps/01-transfer/10-ICS20-v1/04-messages.md b/docs/docs/02-apps/01-transfer/10-ICS20-v1/04-messages.md index 08fc05e88c3..c2826f54426 100644 --- a/docs/docs/02-apps/01-transfer/10-ICS20-v1/04-messages.md +++ b/docs/docs/02-apps/01-transfer/10-ICS20-v1/04-messages.md @@ -44,7 +44,7 @@ This message will send a fungible token to the counterparty chain represented by The denomination provided for transfer should correspond to the same denomination represented on this chain. The prefixes will be added as necessary upon by the receiving chain. -If the `Amount` is set to the maximum value for a 256-bit unsigned integer (i.e. 2^256 - 1), then the whole balance of the corrsponding denomination will be transferred. The helper function `UnboundedSpendLimit` in the `types` package of the `transfer` module provides the sentinel value that can be used. +If the `Amount` is set to the maximum value for a 256-bit unsigned integer (i.e. 2^256 - 1), then the whole balance of the corresponding denomination will be transferred. The helper function `UnboundedSpendLimit` in the `types` package of the `transfer` module provides the sentinel value that can be used. ### Memo 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 fac273541a7..269a80b1a5a 100644 --- a/docs/docs/03-light-clients/04-wasm/03-integration.md +++ b/docs/docs/03-light-clients/04-wasm/03-integration.md @@ -89,9 +89,8 @@ func NewSimApp( app.GRPCQueryRouter(), ) - clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() wasmLightClientModule := wasm.NewLightClientModule(app.WasmClientKeeper) - clientRouter.AddRoute(ibcwasmtypes.ModuleName, &wasmLightClientModule) + app.IBCKeeper.ClientKeeper.AddRoute(ibcwasmtypes.ModuleName, &wasmLightClientModule) app.ModuleManager = module.NewManager( // SDK app modules diff --git a/docs/docs/05-migrations/13-v8-to-v9.md b/docs/docs/05-migrations/13-v8-to-v9.md index ff42acaf175..73013c092bf 100644 --- a/docs/docs/05-migrations/13-v8-to-v9.md +++ b/docs/docs/05-migrations/13-v8-to-v9.md @@ -11,29 +11,127 @@ This guide provides instructions for migrating to a new version of ibc-go. There are four sections based on the four potential user groups of this document: -- [Chains](#chains) -- [IBC Apps](#ibc-apps) -- [Relayers](#relayers) -- [IBC Light Clients](#ibc-light-clients) +- [Migrating from v8 to v9](#migrating-from-v8-to-v9) + - [Chains](#chains) + - [IBC core](#ibc-core) + - [API removals](#api-removals) + - [02-client](#02-client) + - [03-connection](#03-connection) + - [04-channel](#04-channel) + - [05-port](#05-port) + - [23-commitment](#23-commitment) + - [IBC Apps](#ibc-apps) + - [ICS20 - Transfer](#ics20---transfer) + - [ICS20 v2](#ics20-v2) + - [`DenomTrace` type refactoring](#denomtrace-type-refactoring) + - [ICS27 - Interchain Accounts](#ics27---interchain-accounts) + - [IBC testing package](#ibc-testing-package) + - [API deprecation notice](#api-deprecation-notice) + - [Relayers](#relayers) + - [Events](#events) + - [02-client](#02-client-1) + - [04-channel](#04-channel-1) + - [Channel upgrades](#channel-upgrades) + - [IBC Light Clients](#ibc-light-clients) + - [API removals](#api-removals-1) + - [06-solomachine](#06-solomachine) + - [07-tendermint](#07-tendermint) + - [08-wasm](#08-wasm) + - [09-localhost](#09-localhost) **Note:** ibc-go supports golang semantic versioning and therefore all imports must be updated on major version releases. ## Chains -Chains will need to remove the route for the legacy proposal handler for `02-client` from their `app/app.go`: +Chains will need to remove the route for the legacy proposal handler for 02-client from their `app/app.go`: ```diff // app.go govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). -- AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). -- AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) -+ AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) +- AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). +- AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) ++ AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) ``` +## IBC core + +### API removals + +- The [`exported.ChannelI`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/channel.go#L3-L11) and [`exported.CounterpartyChannelI`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/channel.go#L13-L19) interfaces have been removed. Please use the concrete types. +- The [`exported.ConnectionI`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/connection.go#L6-L13) and [`exported.CounterpartyConnectionI`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/connection.go#L15-L21) interfaces have been removed. Please use the concrete types. +- The [`Router` reference](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/keeper/keeper.go#L35) has been removed from the IBC core keeper in [#6138](https://github.com/cosmos/ibc-go/pull/6138). Please use `PortKeeper.Router` instead. +- The [composite interface `QueryServer`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/types/query.go#L14-L19) has been removed from package `core/types`. Please use the granular `QueryServer` interfaces for IBC submodules directly. +- The [`TypeClientMisbehaviour` constant](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/client.go#L17) has been removed. + +### 02-client + +- The `QueryVerifyMembershipRequest` protobuf message has been modified to include `commitment.v2.MerklePath`. The deprecated `commitment.v1.MerklePath` field has been `reserved`. [See 23-commitment](#23-commitment). +- The function [`CreateLocalhostClient`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/02-client/keeper/keeper.go#L56) has been removed. The localhost client is now stateless. +- The function [`NewClientProposalHandler`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/02-client/proposal_handler.go#L18) has been removed in [#6777](https://github.com/cosmos/ibc-go/pull/6777). +- The deprecated [`ClientUpdateProposal` and `UpgradeProposal` messages](https://github.com/cosmos/ibc-go/blob/v8.0.0/proto/ibc/core/client/v1/client.proto#L67-L113) have been removed in [\#6782](https://github.com/cosmos/ibc-go/pull/6782). Please use [`MsgRecoverClient`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/proto/ibc/core/client/v1/tx.proto#L125-L138) and [`MsgIBCSoftwareUpgrade`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/proto/ibc/core/client/v1/tx.proto#L143-L158) respectively instead. + +### 03-connection + +- The [functions `GetState()`, `GetClientID()`, `GetCounterparty()`, `GetVersions()`, and `GetDelayPeriod()`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/03-connection/types/connection.go#L25-L48) of the `Connection` type have been removed. +- The [functions `GetClientID()`, `GetConnectionID()`, and `GetPrefix()`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/03-connection/types/connection.go#L79-L92) of the `Counterparty` type have been removed. + +### 04-channel + +- The utility function [`QueryLatestConsensusState`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/client/utils/utils.go#L130) of the CLI has been removed. +- The [functions `GetState()`, `GetOrdering()`, `GetCounterparty()`, `GetConnectionHops()`, `GetVersion()`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/types/channel.go#L29-L52) of the `Channel` type have been removed. +- The [functions `IsOpen()` and `IsClosed()`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/types/channel.go#L54-L62) of the `Channel` type have been removed. +- The [functions `GetPortID()`, `GetChannelID()`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/types/channel.go#L92-L100) of the `CounterpartyChannel` type have been removed. +- Functions [`ChanCloseConfirmWithCounterpartyUpgradeSequence`](https://github.com/cosmos/ibc-go/blob/v8.1.0/modules/core/04-channel/keeper/handshake.go#L446) and [`TimeoutOnCloseWithCounterpartyUpgradeSequence`](https://github.com/cosmos/ibc-go/blob/v8.1.0/modules/core/04-channel/keeper/timeout.go#L226) have been removed. Please use `ChanCloseConfirm` and `TimeoutOnClose` with the updated signature that takes the counterparty upgrade sequence as extra argument: + +```diff +func (k *Keeper) ChanCloseConfirm( + ctx sdk.Context, + portID, + channelID string, + chanCap *capabilitytypes.Capability, + initProof []byte, + proofHeight exported.Height, ++ counterpartyUpgradeSequence uint64, +) + +func (k *Keeper) TimeoutOnClose( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet types.Packet, + proof, + closedProof []byte, + proofHeight exported.Height, + nextSequenceRecv uint64, ++ counterpartyUpgradeSequence uint64, +) +``` + +### 05-port + +- The signature of the `UnmarshalPacketData` function of the `PacketDataUnmarshaler` interface takes now extra arguments for the context and the port and channel identifiers. These parameters have been added so that implementations of the interface function can retrieve the channel version, which allows the provided packet data to be unmarshaled based on the channel version: + +```diff +type PacketDataUnmarshaler interface { + UnmarshalPacketData( ++ ctx sdk.Context, ++ portID, ++ channelID string, + bz []byte, + ) (interface{}, error) +} +``` + +### 23-commitment + +- The [`exported.Proof`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/commitment.go#L34-L44) interface has been removed. Please use the [`MerkleProof`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/core/23-commitment/types/commitment.pb.go#L161-L168) concrete type. +- The [`MerklePath` type](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/core/23-commitment/types/commitment.pb.go#L113-L119) has been deprecated and a new [`commitment.v2.MerklePath` type](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/core/23-commitment/types/v2/commitment.pb.go#L25-L30) has been introduced in [#6644](https://github.com/cosmos/ibc-go/pull/6644). The new `commitment.v2.MerklePath` contains `repeated bytes` in favour of `repeated string`. This allows users to prove values stored under keys which contain non-utf8 encoded symbols. As a result, changes have been made to the 02-client `Query` service and 08-wasm contract API messages for JSON blobs. See [02-client](#02-client) and [08-wasm](#08-wasm), respectively. + ## IBC Apps ### ICS20 - Transfer +#### ICS20 v2 + - With support for multidenom transfer packets and path forwarding, the `NewMsgTransfer` constructor function to create a new `MsgTransfer` instance now accepts multiple coins instead of just one, and an argument with forwarding information: ```diff @@ -48,22 +146,30 @@ func NewMsgTransfer( ) ``` -- The `ibc_transfer` and `fungible_token_packet` events do not include the attributes `denom` and `amount` anymore; instead they include the attribute `tokens` with the list of coins transferred in the packet. -- The helper function [`GetTransferCoin`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L46) has been removed. -- The helper function [`GetDenomPrefix`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L35) has been removed. -- The helper function [`GetPrefixedDenom`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L40) has been removed. Please construct the denom using the new [`Denom` type](https://github.com/cosmos/ibc-go/blob/7068760f7277cab75b760a0d6ca95ccbfe2f78ae/modules/apps/transfer/types/token.pb.go#L82). +- The `ibc_transfer` and `fungible_token_packet` events do not include the attributes `denom` and `amount` anymore; instead they include the attribute `tokens` with the list of coins transferred in the packet. +- A new type for the packet payload has been introduced: [`FungibleTokenPacketDataV2`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/proto/ibc/applications/transfer/v2/packet.proto#L27-L41). Transfer channels with version `ics20-2` will use this new type for the payload and it will be encoded using Protobuf (instead of JSON). Middleware that wraps the transfer application and unmarshals the packet data MUST take this into account when upgrading: depending on the channel version, packet data should unmarshal either as JSON (v1) or Protobuf (v2). The helper function [`UnmarshalPacketData`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/types/packet.go#L212) encapsulates this logic and can be used by middleware or other applications to correctly unmarshal the packet data: -#### `DenomTrace` type +```go +packetData, err := transfertypes.UnmarshalPacketData(packet.Data, version) +if err != nil { + return err +} +``` + +#### `DenomTrace` type refactoring -- The [`DenomTrace`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/transfer.pb.go#L25-L33) type has been made private and will be completely removed in a later release. -- The [`DenomTrace` and `DenomTraces` gRPCs](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/grpc_query.go#L22-L75) have therefore been removed as well. Please use the [`Denom` type](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/types/token.pb.go#L81-L87) instead, and the [`Denom` and `Denoms` gRPCs](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/keeper/grpc_query.go#L27-L80). -- An [automatic migration handler](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/keeper/migrations.go#L75-L113) is also configured to migrate the storage from using `DenomTrace` to `Denom`. -- The [`denomination_trace` event emitted in the `OnRecvPacket` callback](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/relay.go#L268-L274) has been replaced with the [`denom` event](https://github.com/cosmos/ibc-go/blob/18121380dec5cff5ec803f1088fd409e069c2c9e/modules/apps/transfer/keeper/relay.go#L247). +- The [`DenomTrace`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/transfer.pb.go#L25-L33) type has been made private and will be completely removed in a later release. Please use the [`Denom` type](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/types/token.pb.go#L81-L87) instead. +- The [`DenomTrace` and `DenomTraces` gRPCs](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/grpc_query.go#L22-L75) have been removed as well (together with the and `QueryDenomTraceResponse` and `QueryDenomTracesResponse` types). Please use the [`Denom` and `Denoms` gRPCs](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/keeper/grpc_query.go#L27-L80) instead. +- An [automatic migration handler](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/keeper/migrations.go#L75-L113) is also configured to migrate the storage from using `DenomTrace` to `Denom`. +- The [`denomination_trace` event emitted in the `OnRecvPacket` callback](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/relay.go#L268-L274) has been replaced with the [`denom` event](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/keeper/relay.go#L230). - The functions [`SenderChainIsSource` and `ReceiverChainIsSource`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L12-L32) have been replaced with the function `HasPrefix` of the newly added `Denom` type. +- The helper function [`GetTransferCoin`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L46) has been removed. +- The helper function [`GetDenomPrefix`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L35) has been removed. +- The helper function [`GetPrefixedDenom`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L40) has been removed. Please construct the denom using the new [`Denom` type](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/transfer/types/token.pb.go#L82). ### 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: +- 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/release/v9.0.x/proto/ibc/applications/interchain_accounts/host/v1/tx.proto#L40-L51) to perform queries that are module safe: ```diff func NewKeeper( @@ -76,7 +182,7 @@ func NewKeeper( ) Keeper ``` -The legacy function `RegisterInterchainAccount` now takes an extra parameter to specify the ordering of new ICA channels: +- The function [`RegisterInterchainAccountWithOrdering`](https://github.com/cosmos/ibc-go/blob/v8.3.0/modules/apps/27-interchain-accounts/controller/keeper/account.go#L68) has been removed. The legacy function `RegisterInterchainAccount` now takes an extra parameter to specify the ordering of new ICA channels: ```diff func (k Keeper) RegisterInterchainAccount( @@ -87,7 +193,7 @@ func (k Keeper) RegisterInterchainAccount( ) error { ``` -The `requests` repeated field of `MsgModuleQuerySafe` has been marked non-nullable, and therefore the signature of the constructor function `NewMsgModuleQuerySafe` has been updated: +- The `requests` repeated field of `MsgModuleQuerySafe` has been marked non-nullable, and therefore the signature of the constructor function `NewMsgModuleQuerySafe` has been updated: ```diff func NewMsgModuleQuerySafe( @@ -97,7 +203,7 @@ func NewMsgModuleQuerySafe( ) *MsgModuleQuerySafe { ``` -The signature of the [`NewIBCMiddleware` constructor function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L35) in the controller submodule now only takes the controller keeper as an argument: +- The signature of the [`NewIBCMiddleware` constructor function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L35) in the controller submodule now only takes the controller keeper as an argument. The base application is then set by default to nil and thus authentication is assumed to be done by a Cosmos SDK module, such as the `x/gov`, `x/group` or `x/auth`, that sends messages to the controller submodule's message server. An authentication module can be set using the newly added [`NewIBCMiddlewareWithAuth` constructor function](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L46). ```diff func NewIBCMiddleware( @@ -106,41 +212,15 @@ func NewIBCMiddleware( ) IBCMiddleware { ``` -The base application is then set by default to nil and thus authentication is assumed to be done by a Cosmos SDK module, such as the `x/gov`, `x/group` or `x/auth`, that sends messages to the controller submodule's message server. An authentication module can be set using the newly added [`NewIBCMiddlewareWithAuth` constructor function](https://github.com/cosmos/ibc-go/blob/82b5fb668b6f1c918023fb7be72a8606d2329d81/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L46). - -### IBC core - -### API removals - -- The `exported.ChannelI` and `exported.CounterpartyChannelI` interfaces have been removed. Please use the concrete types. -- The `exported.ConnectionI` and `exported.CounterpartyConnectionI` interfaces have been removed. Please use the concrete types. -- The `exported.Proof` interface has been removed. Please use the `MerkleProof` concrete type. -- The functions `GetState()`, `GetOrdering()`, `GetCounterparty()`, `GetConnectionHops()`, `GetVersion()` of the `Channel` type have been removed. -- The functions `GetPortID()`, `GetChannelID()` of the `CounterpartyChannel` type have been removed. -- The functions `GetClientID()`, `GetState()`, `GetCounterparty()`, `GetVersions()`, and `GetDelayPeriod` of the `Connection` type have been removed. -- The functions `GetClientID()`, `GetConnectionID()`, and `GetPrefix()` of the `CounterpartyConnection` type have been removed. -- The utility function `QueryLatestConsensusState` of `04-channel` CLI has been removed. -- `UnmarshalPacketData` now takes in the context, portID, and channelID. This allows the packet data to be unmarshaled based on the channel version. -- `Router` reference has been removed from IBC core keeper: [#6138](https://github.com/cosmos/ibc-go/pull/6138). Please use `PortKeeper.Router` instead. -- The function `CreateLocalhostClient` has been removed. The localhost client is now stateless. -- The function `NewClientProposalHandler` has been removed. [#6777](https://github.com/cosmos/ibc-go/pull/6777). -- The composite interface `QueryServer` has been removed from package `core/types`. Please use the granular `QueryServer` interfaces for ibc submodules directly. -- The `TypeClientMisbehaviour` constant has been removed. - -### 02-client - -- The `QueryVerifyMembershipRequest` protobuf message has been modified to include `commitment.v2.MerklePath`. The deprecated `commitment.v1.MerklePath` field has been `reserved`. [See 23-commitment](#23-commitment) - -### 23-commitment - -- The `MerklePath` type has been deprecated and a new `commitment.v2.MerklePath` type has been introduced (ref: [#6644](https://github.com/cosmos/ibc-go/pull/6644)). The new `commitment.v2.MerklePath` contains `repeated bytes` in favour of `repeated string`. This allows users to prove values stored under keys which contain non-utf8 encoded symbols. As a result, changes have been made to the 02-client `Query` service and 08-wasm contract API messages for JSON blobs. See [02-client](#02-client) and [08-wasm](#08-wasm), respectively. +- The [`InitModule` function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/27-interchain-accounts/module.go#L124-L143) has been removed. When adding the interchain accounts module to the chain, please set the desired params for controller and host submodules directly after calling `RunMigrations` in the upgrade handler. +- The [`GetBytes()` function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/27-interchain-accounts/types/packet.go#L65-L68) of the `CosmosTx` type has been removed. ### IBC testing package -- The `mock.PV` type has been removed in favour of [`cmttypes.MockPV`](https://github.com/cometbft/cometbft/blob/v0.38.5/types/priv_validator.go#L50) ([#5709](https://github.com/cosmos/ibc-go/pull/5709)). -- 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` -- `AssertEventsLegacy` function of `ibctesting` package (alias for `"github.com/cosmos/ibc-go/v9/testing"`) has been removed and `AssertEvents` function should be used instead (ref: [#6070](https://github.com/cosmos/ibc-go/pull/6070)). +- The `mock.PV` type has been removed in favour of [`cmttypes.MockPV`](https://github.com/cometbft/cometbft/blob/v0.38.5/types/priv_validator.go#L50) in [#5709](https://github.com/cosmos/ibc-go/pull/5709). +- [Functions `ConstructUpdateTMClientHeader` and `ConstructUpdateTMClientHeaderWithTrustedHeight`](https://github.com/cosmos/ibc-go/blob/v8.0.0/testing/chain.go#L446-L481) of `TestChain` type have been replaced with `IBCClientHeader` function. 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`](https://github.com/cosmos/ibc-go/blob/v8.0.0/testing/chain.go#L401) has been renamed to [`GetTrustedValidators`](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/testing/chain.go#L403). +- [`AssertEventsLegacy` function](https://github.com/cosmos/ibc-go/blob/v8.0.0/testing/events.go#L140) of `ibctesting` package (alias for `"github.com/cosmos/ibc-go/v9/testing"`) has been removed in [#6070](https://github.com/cosmos/ibc-go/pull/6070), and [`AssertEvents` function](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/testing/events.go#L187) should be used instead. ```diff // testing/events.go @@ -157,31 +237,40 @@ func AssertEvents( ) ``` -- The `QueryServer` interface has been removed from the `TestChain` struct. Submodule query servers can be constructed directly by passing their associated keeper to the appropriate constructor function. For example: +- The [`QueryServer` interface has been removed from the `TestChain` struct](https://github.com/cosmos/ibc-go/blob/v8.0.0/testing/chain.go#L61). Submodule query servers can be constructed directly by passing their associated keeper to the appropriate constructor function. For example: ```golang clientQueryServer := clientkeeper.NewQueryServer(app.IBCKeeper.ClientKeeper) ``` -#### API deprecation notice +### API deprecation notice -The testing package functions `coordinator.Setup`, `coordinator.SetupClients`, `coordinator.SetupConnections`, `coordinator.CreateConnections`, and `coordinator.CreateChannels` have been deprecated and will be removed in v10. -Please use the new functions `path.Setup`, `path.SetupClients`, `path.SetupConnections`, `path.CreateConnections`, `path.CreateChannels`. +- The testing package functions `Setup`, `SetupClients`, `SetupConnections`, `CreateConnections`, and `CreateChannels` of the `Coordinator` type have been deprecated and will be removed in v10. Please use the new functions `Setup`, `SetupClients`, `SetupConnections`, `CreateConnections`, `CreateChannels` of the `Path` type. ## Relayers -- Renaming of event attribute keys in [#5603](https://github.com/cosmos/ibc-go/pull/5603). -- Removal of duplicate non-hexlified event attributes in [#6023](https://github.com/cosmos/ibc-go/pull/6023). +### Events -## IBC Light Clients +#### 02-client -### API removals +- The [`header` attribute](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/02-client/keeper/events.go#L60) has been removed from the `update_client` event in [\#5110](https://github.com/cosmos/ibc-go/pull/5110). + +#### 04-channel + +- The constant [`AttributeVersion`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/types/events.go#L14) has been renamed to `AttributeKeyVersion`. +- The `packet_data` and the `packet_ack` attributes of the `send_packet`, `recv_packet` and `write_acknowledgement` events have been removed in [#6023](https://github.com/cosmos/ibc-go/pull/6023). The attributes `packet_data_hex` and `packet_ack_hex` should be used instead. The [constants `AttributeKeyData` and `AttributeKeyAck`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/04-channel/types/events.go#L24-L27) have also been removed. -The `ExportMetadata` interface function has been removed from the `ClientState` interface. Core IBC will export all key/value's within the 02-client store. +##### Channel upgrades + +- The attributes `version`, `ordering` and `connection_hops` from the `channel_upgrade_init`, `channel_upgrade_try`, `channel_upgrade_ack`, `channel_upgrade_open`, `channel_upgrade_timeout` and `channel_upgrade_cancelled` events have been removed in [\#6063](https://github.com/cosmos/ibc-go/pull/6063). -The `ZeroCustomFields` interface function has been removed from the `ClientState` interface. +## IBC Light Clients + +### API removals -The following functions have also been removed from the `ClientState` interface: `Initialize`, `Status`, `GetLatestHeight`, `GetTimestampAtHeight`, `VerifyClientMessage`, `VerifyMembership`, `VerifyNonMembership`, `CheckForMisbehaviour`, `UpdateState`, `UpdateStateOnMisbehaviour`, `CheckSubstituteAndUpdateState` and `VerifyUpgradeAndUpdateState`. ibc-go v9 decouples routing at the `02-client` layer from the light clients' encoding structure (i.e. every light client implementation of the `ClientState` interface is not used anymore to route the requests to the right light client at the `02-client` layer, instead a *light client module* is registered for every light client type and `02-client` routes the requests to the right light client module based on the client ID). Light client developers must implement the newly introduced `LightClientModule` interface and are encouraged to move the logic implemented in the functions of their light client's implementation of the `ClientState` interface to the equivalent function in the `LightClientModule` interface. The table below shows the equivalence between the `ClientState` interface functions that have been removed and the functions in the `LightClientModule` interface: +- The [`ExportMetadata` interface function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/client.go#L59) has been removed from the `ClientState` interface. Core IBC will export all key/value's within the 02-client store. +- The [`ZeroCustomFields` interface function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/core/exported/client.go#L64) has been removed from the `ClientState` interface. +- The following functions have also been removed from the `ClientState` interface: `Initialize`, `Status`, `GetLatestHeight`, `GetTimestampAtHeight`, `VerifyClientMessage`, `VerifyMembership`, `VerifyNonMembership`, `CheckForMisbehaviour`, `UpdateState`, `UpdateStateOnMisbehaviour`, `CheckSubstituteAndUpdateState` and `VerifyUpgradeAndUpdateState`. ibc-go v9 decouples routing at the 02-client layer from the light clients' encoding structure (i.e. every light client implementation of the `ClientState` interface is not used anymore to route the requests to the right light client at the `02-client` layer, instead a *light client module* is registered for every light client type and 02-client routes the requests to the right light client module based on the client ID). Light client developers must implement the newly introduced `LightClientModule` interface and are encouraged to move the logic implemented in the functions of their light client's implementation of the `ClientState` interface to the equivalent function in the `LightClientModule` interface. The table below shows the equivalence between the `ClientState` interface functions that have been removed and the functions in the `LightClientModule` interface: |`ClientState` interface|`LightClientModule` interface| |-----------------------|-----------------------------| @@ -200,24 +289,23 @@ The following functions have also been removed from the `ClientState` interface: |`ExportMetadata` | | |`ZeroCustomFields` | | -Please check also the [Light client developer guide](../03-light-clients/01-developer-guide/01-overview.md) for more information. The light client module implementation for `07-tendermint` may also be useful as reference. +Please check also the [Light client developer guide](../03-light-clients/01-developer-guide/01-overview.md) for more information. The light client module implementation for 07-tendermint may also be useful as reference. ### 06-solomachine -- The `Initialize`, `Status`, `GetTimestampAtHeight` and `UpdateStateOnMisbehaviour` functions in `ClientState` have been removed and all their logic has been moved to functions of the `LightClientModule`. The `VerifyMembership` and `VerifyNonMembership` functions have been made private. -- The `Type` method on `Misbehaviour` has been removed. +- The [`Initialize`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/client_state.go#L85), [`Status`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/client_state.go#L59), [`GetTimestampAtHeight`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/client_state.go#L46) and [`UpdateStateOnMisbehaviour`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/update.go#L105) functions in `ClientState` have been removed and all their logic has been moved to functions of the `LightClientModule`. The [`VerifyMembership`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/client_state.go#L111) and [`VerifyNonMembership`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/client_state.go#L168) functions have been made private. +- The [`Type` method](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/06-solomachine/misbehaviour.go#L20) on `Misbehaviour` has been removed. ### 07-tendermint -The `IterateConsensusMetadata` function has been removed. The `VerifyMembership`, `VerifyNonMembership`, `GetTimestampAtHeight`, `Status` and `Initialize` functions have been made private. +- The [`IterateConsensusMetadata` function](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/store.go#L81) has been removed. The [`Initialize`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/client_state.go#L192), [`Status`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/client_state.go#L84), [`GetTimestampAtHeight`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/client_state.go#L62), [`VerifyMembership`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/client_state.go#L209), [`VerifyNonMembership`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/light-clients/07-tendermint/client_state.go#L252) functions have been made private. ### 08-wasm -Refer to the [08-wasm migrations](../03-light-clients/04-wasm/09-migrations.md) for more information. +Refer to the [08-wasm migration documentation](../03-light-clients/04-wasm/09-migrations.md) for more information. ### 09-localhost -The `09-localhost` light client has been made stateless and will no longer update the client on every block. The `ClientState` is constructed on demand when required. -The `ClientState` itself is therefore no longer provable directly with `VerifyMembership` or `VerifyNonMembership`. +The 09-localhost light client has been made stateless and will no longer update the client on every block. The `ClientState` is constructed on demand when required. The `ClientState` itself is therefore no longer provable directly with `VerifyMembership` or `VerifyNonMembership`. -Previously stored client state data is pruned automatically on IBC module store migration from `ConsensusVersion` 6 to 7. +An [automatic migration handler](https://github.com/cosmos/ibc-go/blob/release/v9.0.x/modules/core/02-client/keeper/migrations.go#L49) is configured to prune all previously stored client state data on IBC module store migration from `ConsensusVersion` 6 to 7. diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 745a0d57f07..622c2c45afc 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -610,7 +610,11 @@ func (s *TransferTestSuite) TestMsgTransfer_EntireBalance() { }) t.Run("send entire balance from B to A", func(t *testing.T) { - transferCoins := sdk.NewCoins((sdk.NewCoin(chainBIBCToken.IBCDenom(), transfertypes.UnboundedSpendLimit())), sdk.NewCoin(chainB.Config().Denom, transfertypes.UnboundedSpendLimit())) + transferCoins := sdk.NewCoins(sdk.NewCoin(chainBIBCToken.IBCDenom(), transfertypes.UnboundedSpendLimit())) + if channelA.Version == transfertypes.V2 { + transferCoins.Add(sdk.NewCoin(chainB.Config().Denom, transfertypes.UnboundedSpendLimit())) + } + transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) s.AssertTxSuccess(transferTxResp) }) @@ -624,11 +628,13 @@ func (s *TransferTestSuite) TestMsgTransfer_EntireBalance() { s.Require().NoError(err) s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) - // test that chainA has the entirety of chainB's token IBC denom. - actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) + if channelA.Version == transfertypes.V2 { + // test that chainA has the entirety of chainB's token IBC denom. + actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) + s.Require().NoError(err) + s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) + } // Tests that chainB has a zero balance for both. actualBalance, err = query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index f6f14d894bf..595930b231b 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -183,6 +183,7 @@ func (im IBCMiddleware) OnChanCloseConfirm( // OnRecvPacket implements the IBCMiddleware interface func (IBCMiddleware) OnRecvPacket( ctx sdk.Context, + _ string, packet channeltypes.Packet, _ sdk.AccAddress, ) ibcexported.Acknowledgement { @@ -195,6 +196,7 @@ func (IBCMiddleware) OnRecvPacket( // OnAcknowledgementPacket implements the IBCMiddleware interface func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, @@ -210,7 +212,7 @@ func (im IBCMiddleware) OnAcknowledgementPacket( // call underlying app's OnAcknowledgementPacket callback. if im.app != nil && im.keeper.IsMiddlewareEnabled(ctx, packet.GetSourcePort(), connectionID) { - return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + return im.app.OnAcknowledgementPacket(ctx, channelVersion, packet, acknowledgement, relayer) } return nil @@ -219,6 +221,7 @@ func (im IBCMiddleware) OnAcknowledgementPacket( // OnTimeoutPacket implements the IBCMiddleware interface func (im IBCMiddleware) OnTimeoutPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { @@ -236,7 +239,7 @@ func (im IBCMiddleware) OnTimeoutPacket( } if im.app != nil && im.keeper.IsMiddlewareEnabled(ctx, packet.GetSourcePort(), connectionID) { - return im.app.OnTimeoutPacket(ctx, packet, relayer) + return im.app.OnTimeoutPacket(ctx, channelVersion, packet, relayer) } return nil 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 0028b325fd8..420771e8f5c 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go @@ -577,7 +577,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { ) ctx := suite.chainA.GetContext() - ack := cbs.OnRecvPacket(ctx, packet, nil) + ack := cbs.OnRecvPacket(ctx, path.EndpointA.GetChannel().Version, packet, nil) suite.Require().Equal(tc.expPass, ack.Success()) expectedEvents := sdk.Events{ @@ -621,7 +621,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { { "ICA auth module callback fails", func() { suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnAcknowledgementPacket = func( - ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error { return fmt.Errorf("mock ica auth fails") } @@ -637,7 +637,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { suite.chainA.GetSimApp().ICAControllerKeeper.DeleteMiddlewareEnabled(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ConnectionID) suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnAcknowledgementPacket = func( - ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error { return fmt.Errorf("error should be unreachable") } @@ -682,7 +682,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { cbs = controller.NewIBCMiddleware(suite.chainA.GetSimApp().ICAControllerKeeper) } - err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), packet, []byte("ack"), nil) + err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), path.EndpointA.GetChannel().Version, packet, []byte("ack"), nil) if tc.expPass { suite.Require().NoError(err) @@ -718,7 +718,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { { "ICA auth module callback fails", func() { suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnTimeoutPacket = func( - ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { return fmt.Errorf("mock ica auth fails") } @@ -734,7 +734,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { suite.chainA.GetSimApp().ICAControllerKeeper.DeleteMiddlewareEnabled(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ConnectionID) suite.chainA.GetSimApp().ICAAuthModule.IBCApp.OnTimeoutPacket = func( - ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { return fmt.Errorf("error should be unreachable") } @@ -779,7 +779,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { cbs = controller.NewIBCMiddleware(suite.chainA.GetSimApp().ICAControllerKeeper) } - err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, nil) + err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), path.EndpointA.GetChannel().Version, packet, nil) if tc.expPass { suite.Require().NoError(err) diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index 7e9d2eaed23..18339a7f9f8 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -37,14 +37,14 @@ func NewIBCModule(k keeper.Keeper) IBCModule { // OnChanOpenInit implements the IBCModule interface func (IBCModule) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, + _ sdk.Context, + _ channeltypes.Order, + _ []string, + _ string, + _ string, + _ *capabilitytypes.Capability, + _ channeltypes.Counterparty, + _ string, ) (string, error) { return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } @@ -69,11 +69,11 @@ func (im IBCModule) OnChanOpenTry( // OnChanOpenAck implements the IBCModule interface func (IBCModule) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyChannelID string, - counterpartyVersion string, + _ sdk.Context, + _, + _ string, + _ string, + _ string, ) error { return errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel handshake must be initiated by controller chain") } @@ -93,9 +93,9 @@ func (im IBCModule) OnChanOpenConfirm( // OnChanCloseInit implements the IBCModule interface func (IBCModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, + _ sdk.Context, + _ string, + _ string, ) error { // Disallow user-initiated channel closing for interchain account channels return errorsmod.Wrap(ibcerrors.ErrInvalidRequest, "user cannot close channel") @@ -113,6 +113,7 @@ func (im IBCModule) OnChanCloseConfirm( // OnRecvPacket implements the IBCModule interface func (im IBCModule) OnRecvPacket( ctx sdk.Context, + _ string, packet channeltypes.Packet, _ sdk.AccAddress, ) ibcexported.Acknowledgement { @@ -140,25 +141,27 @@ func (im IBCModule) OnRecvPacket( // OnAcknowledgementPacket implements the IBCModule interface func (IBCModule) OnAcknowledgementPacket( - ctx sdk.Context, - packet channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, + _ sdk.Context, + _ string, + _ channeltypes.Packet, + _ []byte, + _ sdk.AccAddress, ) error { return errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "cannot receive acknowledgement on a host channel end, a host chain does not send a packet over the channel") } // OnTimeoutPacket implements the IBCModule interface func (IBCModule) OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, + _ sdk.Context, + _ string, + _ channeltypes.Packet, + _ sdk.AccAddress, ) error { return errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "cannot cause a packet timeout on a host channel end, a host chain does not send a packet over the channel") } // OnChanUpgradeInit implements the IBCModule interface -func (IBCModule) OnChanUpgradeInit(ctx sdk.Context, portID, channelID string, proposedOrder channeltypes.Order, proposedConnectionHops []string, proposedVersion string) (string, error) { +func (IBCModule) OnChanUpgradeInit(_ sdk.Context, _, _ string, _ channeltypes.Order, _ []string, _ string) (string, error) { return "", errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel upgrade handshake must be initiated by controller chain") } @@ -172,12 +175,12 @@ func (im IBCModule) OnChanUpgradeTry(ctx sdk.Context, portID, channelID string, } // OnChanUpgradeAck implements the IBCModule interface -func (IBCModule) OnChanUpgradeAck(ctx sdk.Context, portID, channelID, counterpartyVersion string) error { +func (IBCModule) OnChanUpgradeAck(_ sdk.Context, _, _, _ string) error { return errorsmod.Wrap(icatypes.ErrInvalidChannelFlow, "channel upgrade handshake must be initiated by controller chain") } // OnChanUpgradeOpen implements the IBCModule interface -func (IBCModule) OnChanUpgradeOpen(ctx sdk.Context, portID, channelID string, proposedOrder channeltypes.Order, proposedConnectionHops []string, proposedVersion string) { +func (IBCModule) OnChanUpgradeOpen(_ sdk.Context, _, _ string, _ channeltypes.Order, _ []string, _ string) { } // UnmarshalPacketData attempts to unmarshal the provided packet data bytes 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 d13d71c3d52..cce0a8c76ee 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -424,7 +424,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { { "success with ICA auth module callback failure", func() { suite.chainB.GetSimApp().ICAAuthModule.IBCApp.OnRecvPacket = func( - ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { return channeltypes.NewErrorAcknowledgement(fmt.Errorf("failed OnRecvPacket mock callback")) } @@ -503,7 +503,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { suite.Require().True(ok) ctx := suite.chainB.GetContext() - ack := cbs.OnRecvPacket(ctx, packet, nil) + ack := cbs.OnRecvPacket(ctx, path.EndpointB.GetChannel().Version, packet, nil) expectedAttributes := []sdk.Attribute{ sdk.NewAttribute(sdk.AttributeKeyModule, icatypes.ModuleName), @@ -587,7 +587,7 @@ func (suite *InterchainAccountsTestSuite) TestOnAcknowledgementPacket() { 0, ) - err = cbs.OnAcknowledgementPacket(suite.chainB.GetContext(), packet, []byte("ackBytes"), nil) + err = cbs.OnAcknowledgementPacket(suite.chainB.GetContext(), path.EndpointB.GetChannel().Version, packet, []byte("ackBytes"), nil) if tc.expPass { suite.Require().NoError(err) @@ -642,7 +642,7 @@ func (suite *InterchainAccountsTestSuite) TestOnTimeoutPacket() { 0, ) - err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, nil) + err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), path.EndpointA.GetChannel().Version, packet, nil) if tc.expPass { suite.Require().NoError(err) diff --git a/modules/apps/29-fee/ibc_middleware.go b/modules/apps/29-fee/ibc_middleware.go index 5239754e6dc..be979487ddb 100644 --- a/modules/apps/29-fee/ibc_middleware.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -1,6 +1,7 @@ package fee import ( + "encoding/json" "strings" errorsmod "cosmossdk.io/errors" @@ -13,6 +14,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" + ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" "github.com/cosmos/ibc-go/v9/modules/core/exported" ) @@ -216,14 +218,16 @@ func (im IBCMiddleware) OnChanCloseConfirm( // If fees are not enabled, this callback will default to the ibc-core packet callback func (im IBCMiddleware) OnRecvPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { if !im.keeper.IsFeeEnabled(ctx, packet.DestinationPort, packet.DestinationChannel) { - return im.app.OnRecvPacket(ctx, packet, relayer) + return im.app.OnRecvPacket(ctx, channelVersion, packet, relayer) } - ack := im.app.OnRecvPacket(ctx, packet, relayer) + appVersion := unwrapAppVersion(channelVersion) + ack := im.app.OnRecvPacket(ctx, appVersion, packet, relayer) // in case of async acknowledgement (ack == nil) store the relayer address for use later during async WriteAcknowledgement if ack == nil { @@ -241,17 +245,20 @@ func (im IBCMiddleware) OnRecvPacket( // If fees are not enabled, this callback will default to the ibc-core packet callback func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error { if !im.keeper.IsFeeEnabled(ctx, packet.SourcePort, packet.SourceChannel) { - return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + return im.app.OnAcknowledgementPacket(ctx, channelVersion, packet, acknowledgement, relayer) } + appVersion := unwrapAppVersion(channelVersion) + var ack types.IncentivizedAcknowledgement - if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil { - return errorsmod.Wrapf(err, "cannot unmarshal ICS-29 incentivized packet acknowledgement: %v", ack) + if err := json.Unmarshal(acknowledgement, &ack); err != nil { + return errorsmod.Wrapf(ibcerrors.ErrInvalidType, "cannot unmarshal ICS-29 incentivized packet acknowledgement %v: %s", ack, err) } if im.keeper.IsLocked(ctx) { @@ -263,14 +270,14 @@ func (im IBCMiddleware) OnAcknowledgementPacket( // for fee enabled channels // // Please see ADR 004 for more information. - return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) + return im.app.OnAcknowledgementPacket(ctx, appVersion, packet, ack.AppAcknowledgement, relayer) } packetID := channeltypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence) feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID) if !found { // call underlying callback - return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) + return im.app.OnAcknowledgementPacket(ctx, appVersion, packet, ack.AppAcknowledgement, relayer) } payee, found := im.keeper.GetPayeeAddress(ctx, relayer.String(), packet.SourceChannel) @@ -286,30 +293,37 @@ func (im IBCMiddleware) OnAcknowledgementPacket( im.keeper.DistributePacketFeesOnAcknowledgement(ctx, ack.ForwardRelayerAddress, payeeAddr, feesInEscrow.PacketFees, packetID) // call underlying callback - return im.app.OnAcknowledgementPacket(ctx, packet, ack.AppAcknowledgement, relayer) + return im.app.OnAcknowledgementPacket(ctx, appVersion, packet, ack.AppAcknowledgement, relayer) } // OnTimeoutPacket implements the IBCMiddleware interface // If fees are not enabled, this callback will default to the ibc-core packet callback func (im IBCMiddleware) OnTimeoutPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { + if !im.keeper.IsFeeEnabled(ctx, packet.SourcePort, packet.SourceChannel) { + return im.app.OnTimeoutPacket(ctx, channelVersion, packet, relayer) + } + + appVersion := unwrapAppVersion(channelVersion) + // if the fee keeper is locked then fee logic should be skipped // this may occur in the presence of a severe bug which leads to invalid state // the fee keeper will be unlocked after manual intervention // // Please see ADR 004 for more information. - if !im.keeper.IsFeeEnabled(ctx, packet.SourcePort, packet.SourceChannel) || im.keeper.IsLocked(ctx) { - return im.app.OnTimeoutPacket(ctx, packet, relayer) + if im.keeper.IsLocked(ctx) { + return im.app.OnTimeoutPacket(ctx, appVersion, packet, relayer) } packetID := channeltypes.NewPacketID(packet.SourcePort, packet.SourceChannel, packet.Sequence) feesInEscrow, found := im.keeper.GetFeesInEscrow(ctx, packetID) if !found { // call underlying callback - return im.app.OnTimeoutPacket(ctx, packet, relayer) + return im.app.OnTimeoutPacket(ctx, appVersion, packet, relayer) } payee, found := im.keeper.GetPayeeAddress(ctx, relayer.String(), packet.SourceChannel) @@ -325,7 +339,7 @@ func (im IBCMiddleware) OnTimeoutPacket( im.keeper.DistributePacketFeesOnTimeout(ctx, payeeAddr, feesInEscrow.PacketFees, packetID) // call underlying callback - return im.app.OnTimeoutPacket(ctx, packet, relayer) + return im.app.OnTimeoutPacket(ctx, appVersion, packet, relayer) } // OnChanUpgradeInit implements the IBCModule interface @@ -480,3 +494,13 @@ func (im IBCMiddleware) UnmarshalPacketData(ctx sdk.Context, portID, channelID s return unmarshaler.UnmarshalPacketData(ctx, portID, channelID, bz) } + +func unwrapAppVersion(channelVersion string) string { + metadata, err := types.MetadataFromVersion(channelVersion) + if err != nil { + // This should not happen, as it would mean that the channel is broken. Only a severe bug would cause this. + panic(errorsmod.Wrap(err, "failed to unwrap app version from channel version")) + } + + return metadata.AppVersion +} diff --git a/modules/apps/29-fee/ibc_middleware_test.go b/modules/apps/29-fee/ibc_middleware_test.go index 4bf51bb56b2..7f1948482ba 100644 --- a/modules/apps/29-fee/ibc_middleware_test.go +++ b/modules/apps/29-fee/ibc_middleware_test.go @@ -1,6 +1,7 @@ package fee_test import ( + "encoding/json" "fmt" errorsmod "cosmossdk.io/errors" @@ -513,6 +514,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { // setup mock callback suite.chainB.GetSimApp().FeeMockModule.IBCApp.OnRecvPacket = func( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { @@ -565,7 +567,7 @@ func (suite *FeeTestSuite) TestOnRecvPacket() { // malleate test case tc.malleate() - result := cbs.OnRecvPacket(suite.chainB.GetContext(), packet, suite.chainA.SenderAccount.GetAddress()) + result := cbs.OnRecvPacket(suite.chainB.GetContext(), suite.path.EndpointB.GetChannel().Version, packet, suite.chainA.SenderAccount.GetAddress()) switch { case tc.name == "success": @@ -798,7 +800,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { { "application callback fails", func() { - suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnAcknowledgementPacket = func(_ sdk.Context, _ channeltypes.Packet, _ []byte, _ sdk.AccAddress) error { + suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnAcknowledgementPacket = func(_ sdk.Context, _ string, _ channeltypes.Packet, _ []byte, _ sdk.AccAddress) error { return fmt.Errorf("mock fee app callback fails") } }, @@ -839,7 +841,7 @@ func (suite *FeeTestSuite) TestOnAcknowledgementPacket() { cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) - err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), packet, ack, relayerAddr) + err = cbs.OnAcknowledgementPacket(suite.chainA.GetContext(), suite.path.EndpointA.GetChannel().Version, packet, ack, relayerAddr) if tc.expPass { suite.Require().NoError(err) @@ -1012,7 +1014,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { { "application callback fails", func() { - suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnTimeoutPacket = func(_ sdk.Context, _ channeltypes.Packet, _ sdk.AccAddress) error { + suite.chainA.GetSimApp().FeeMockModule.IBCApp.OnTimeoutPacket = func(_ sdk.Context, _ string, _ channeltypes.Packet, _ sdk.AccAddress) error { return fmt.Errorf("mock fee app callback fails") } }, @@ -1050,7 +1052,7 @@ func (suite *FeeTestSuite) TestOnTimeoutPacket() { cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) - err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, relayerAddr) + err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), suite.path.EndpointA.GetChannel().Version, packet, relayerAddr) if tc.expPass { suite.Require().NoError(err) @@ -1592,3 +1594,34 @@ func (suite *FeeTestSuite) TestPacketDataUnmarshalerInterfaceError() { expError := errorsmod.Wrapf(types.ErrUnsupportedAction, "underlying app does not implement %T", (*porttypes.PacketDataUnmarshaler)(nil)) suite.Require().ErrorIs(err, expError) } + +func (suite *FeeTestSuite) TestAckUnmarshal() { + testCases := []struct { + name string + ackBytes []byte + expPass bool + }{ + { + "success", + []byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true}`), + true, + }, + { + "failure: unknown fields", + []byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true, "extra_field": "foo"}`), + false, + }, + } + for _, tc := range testCases { + suite.Run(tc.name, func() { + ack := &types.IncentivizedAcknowledgement{} + err := json.Unmarshal(tc.ackBytes, ack) + + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/modules/apps/29-fee/types/encoding.go b/modules/apps/29-fee/types/encoding.go new file mode 100644 index 00000000000..7bf5b8a5f3b --- /dev/null +++ b/modules/apps/29-fee/types/encoding.go @@ -0,0 +1,26 @@ +package types + +import ( + "bytes" + "encoding/json" +) + +// UnmarshalJSON implements the Unmarshaller interface for IncentivizedAcknowledgement. +func (ack *IncentivizedAcknowledgement) UnmarshalJSON(bz []byte) error { + // Recursion protection. We cannot unmarshal into IncentivizedAcknowledgment directly + // else UnmarshalJSON is going to get invoked again, ad infinum. Create an alias + // and unmarshal into that, instead. + type ackAlias IncentivizedAcknowledgement + + d := json.NewDecoder(bytes.NewReader(bz)) + // Raise errors during decoding if unknown fields are encountered. + d.DisallowUnknownFields() + + var alias ackAlias + if err := d.Decode(&alias); err != nil { + return err + } + + *ack = IncentivizedAcknowledgement(alias) + return nil +} diff --git a/modules/apps/callbacks/ibc_middleware.go b/modules/apps/callbacks/ibc_middleware.go index ef6dbcbbfd0..dfe21cc8547 100644 --- a/modules/apps/callbacks/ibc_middleware.go +++ b/modules/apps/callbacks/ibc_middleware.go @@ -130,12 +130,13 @@ func (im IBCMiddleware) SendPacket( // reverted via a panic. func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error { // we first call the underlying app to handle the acknowledgement - err := im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + err := im.app.OnAcknowledgementPacket(ctx, channelVersion, packet, acknowledgement, relayer) if err != nil { return err } @@ -168,8 +169,8 @@ func (im IBCMiddleware) OnAcknowledgementPacket( // It defers to the underlying application and then calls the contract callback. // If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are // reverted via a panic. -func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error { - err := im.app.OnTimeoutPacket(ctx, packet, relayer) +func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) error { + err := im.app.OnTimeoutPacket(ctx, channelVersion, packet, relayer) if err != nil { return err } @@ -201,8 +202,8 @@ func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Pac // It defers to the underlying application and then calls the contract callback. // If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are // reverted via a panic. -func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement { - ack := im.app.OnRecvPacket(ctx, packet, relayer) +func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement { + ack := im.app.OnRecvPacket(ctx, channelVersion, packet, relayer) // if ack is nil (asynchronous acknowledgements), then the callback will be handled in WriteAcknowledgement // if ack is not successful, all state changes are reverted. If a packet cannot be received, then there is // no need to execute a callback on the receiving chain. diff --git a/modules/apps/callbacks/ibc_middleware_test.go b/modules/apps/callbacks/ibc_middleware_test.go index 25bc6db3785..e87c2317fd0 100644 --- a/modules/apps/callbacks/ibc_middleware_test.go +++ b/modules/apps/callbacks/ibc_middleware_test.go @@ -355,7 +355,7 @@ func (s *CallbacksTestSuite) TestOnAcknowledgementPacket() { s.Require().True(ok) onAcknowledgementPacket := func() error { - return transferStack.OnAcknowledgementPacket(ctx, packet, ack, s.chainA.SenderAccount.GetAddress()) + return transferStack.OnAcknowledgementPacket(ctx, s.path.EndpointA.GetChannel().Version, packet, ack, s.chainA.SenderAccount.GetAddress()) } switch tc.expError { @@ -519,7 +519,7 @@ func (s *CallbacksTestSuite) TestOnTimeoutPacket() { s.Require().True(ok) onTimeoutPacket := func() error { - return transferStack.OnTimeoutPacket(ctx, packet, s.chainA.SenderAccount.GetAddress()) + return transferStack.OnTimeoutPacket(ctx, s.path.EndpointA.GetChannel().Version, packet, s.chainA.SenderAccount.GetAddress()) } switch expValue := tc.expValue.(type) { @@ -687,7 +687,7 @@ func (s *CallbacksTestSuite) TestOnRecvPacket() { s.Require().True(ok) onRecvPacket := func() ibcexported.Acknowledgement { - return transferStack.OnRecvPacket(ctx, packet, s.chainB.SenderAccount.GetAddress()) + return transferStack.OnRecvPacket(ctx, s.path.EndpointA.GetChannel().Version, packet, s.chainB.SenderAccount.GetAddress()) } switch tc.expAck { @@ -1132,7 +1132,7 @@ func (s *CallbacksTestSuite) TestOnRecvPacketAsyncAck() { 0, ) - ack := mockFeeCallbackStack.OnRecvPacket(s.chainA.GetContext(), packet, s.chainA.SenderAccount.GetAddress()) + ack := mockFeeCallbackStack.OnRecvPacket(s.chainA.GetContext(), ibcmock.MockFeeVersion, packet, s.chainA.SenderAccount.GetAddress()) s.Require().Nil(ack) s.AssertHasExecutedExpectedCallback("none", true) } diff --git a/modules/apps/callbacks/testing/simapp/app.go b/modules/apps/callbacks/testing/simapp/app.go index 3def147154f..9a89526745e 100644 --- a/modules/apps/callbacks/testing/simapp/app.go +++ b/modules/apps/callbacks/testing/simapp/app.go @@ -568,14 +568,14 @@ func NewSimApp( // Seal the IBC Router app.IBCKeeper.SetRouter(ibcRouter) - clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() + clientKeeper := app.IBCKeeper.ClientKeeper storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(solomachine.ModuleName, &smLightClientModule) + clientKeeper.AddRoute(solomachine.ModuleName, &smLightClientModule) // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index d588128943c..4af345c339a 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -180,6 +180,7 @@ func (IBCModule) OnChanCloseConfirm( // A nil acknowledgement may be returned when using the packet forwarding feature. This signals to core IBC that the acknowledgement will be written asynchronously. func (im IBCModule) OnRecvPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) ibcexported.Acknowledgement { @@ -196,7 +197,7 @@ func (im IBCModule) OnRecvPacket( events.EmitOnRecvPacketEvent(ctx, data, ack, ackErr) }() - data, ackErr = im.getICS20PacketData(ctx, packet.GetData(), packet.GetDestPort(), packet.GetDestChannel()) + data, ackErr = types.UnmarshalPacketData(packet.GetData(), channelVersion) if ackErr != nil { ack = channeltypes.NewErrorAcknowledgement(ackErr) im.keeper.Logger(ctx).Error(fmt.Sprintf("%s sequence %d", ackErr.Error(), packet.Sequence)) @@ -223,6 +224,7 @@ func (im IBCModule) OnRecvPacket( // OnAcknowledgementPacket implements the IBCModule interface func (im IBCModule) OnAcknowledgementPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, @@ -232,7 +234,7 @@ func (im IBCModule) OnAcknowledgementPacket( return errorsmod.Wrapf(ibcerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet acknowledgement: %v", err) } - data, err := im.getICS20PacketData(ctx, packet.GetData(), packet.GetSourcePort(), packet.GetSourceChannel()) + data, err := types.UnmarshalPacketData(packet.GetData(), channelVersion) if err != nil { return err } @@ -249,10 +251,11 @@ func (im IBCModule) OnAcknowledgementPacket( // OnTimeoutPacket implements the IBCModule interface func (im IBCModule) OnTimeoutPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error { - data, err := im.getICS20PacketData(ctx, packet.GetData(), packet.GetSourcePort(), packet.GetSourceChannel()) + data, err := types.UnmarshalPacketData(packet.GetData(), channelVersion) if err != nil { return err } @@ -310,16 +313,10 @@ func (IBCModule) OnChanUpgradeOpen(ctx sdk.Context, portID, channelID string, pr // into a FungibleTokenPacketData. This function implements the optional // PacketDataUnmarshaler interface required for ADR 008 support. func (im IBCModule) UnmarshalPacketData(ctx sdk.Context, portID, channelID string, bz []byte) (interface{}, error) { - return im.getICS20PacketData(ctx, bz, portID, channelID) -} - -// getICS20PacketData determines the current version of ICS20 and unmarshals the packet data into either a FungibleTokenPacketData -// or a FungibleTokenPacketDataV2 depending on the application version. -func (im IBCModule) getICS20PacketData(ctx sdk.Context, packetData []byte, portID, channelID string) (types.FungibleTokenPacketDataV2, error) { ics20Version, found := im.keeper.GetICS4Wrapper().GetAppVersion(ctx, portID, channelID) if !found { return types.FungibleTokenPacketDataV2{}, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", portID, channelID) } - return types.UnmarshalPacketData(packetData, ics20Version) + return types.UnmarshalPacketData(bz, ics20Version) } diff --git a/modules/apps/transfer/ibc_module_test.go b/modules/apps/transfer/ibc_module_test.go index 2beb583cc5a..4dd4a505fd5 100644 --- a/modules/apps/transfer/ibc_module_test.go +++ b/modules/apps/transfer/ibc_module_test.go @@ -403,7 +403,7 @@ func (suite *TransferTestSuite) TestOnRecvPacket() { tc.malleate() // change fields in packet - ack := cbs.OnRecvPacket(ctx, packet, suite.chainB.SenderAccount.GetAddress()) + ack := cbs.OnRecvPacket(ctx, path.EndpointB.GetChannel().Version, packet, suite.chainB.SenderAccount.GetAddress()) suite.Require().Equal(tc.expAck, ack) @@ -448,7 +448,7 @@ func (suite *TransferTestSuite) TestOnTimeoutPacket() { func() { packet.SourceChannel = "channel-100" }, - ibcerrors.ErrNotFound, + errors.New("unable to unescrow tokens"), }, { "invalid packet data", @@ -468,7 +468,7 @@ func (suite *TransferTestSuite) TestOnTimeoutPacket() { cbs, ok := suite.chainA.App.GetIBCKeeper().PortKeeper.Route(module) suite.Require().True(ok) - suite.Require().NoError(cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, suite.chainA.SenderAccount.GetAddress())) + suite.Require().NoError(cbs.OnTimeoutPacket(suite.chainA.GetContext(), path.EndpointA.GetChannel().Version, packet, suite.chainA.SenderAccount.GetAddress())) }, errors.New("unable to unescrow tokens"), }, @@ -508,7 +508,7 @@ func (suite *TransferTestSuite) TestOnTimeoutPacket() { tc.malleate() // change fields in packet - err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), packet, suite.chainA.SenderAccount.GetAddress()) + err = cbs.OnTimeoutPacket(suite.chainA.GetContext(), path.EndpointA.GetChannel().Version, packet, suite.chainA.SenderAccount.GetAddress()) expPass := tc.expError == nil if expPass { diff --git a/modules/apps/transfer/keeper/forwarding.go b/modules/apps/transfer/keeper/forwarding.go index 642c94548c8..d4c2fb57168 100644 --- a/modules/apps/transfer/keeper/forwarding.go +++ b/modules/apps/transfer/keeper/forwarding.go @@ -44,18 +44,18 @@ func (k Keeper) forwardPacket(ctx sdk.Context, data types.FungibleTokenPacketDat return nil } -// acknowledgeForwardedPacket writes the async acknowledgement for packet -func (k Keeper) acknowledgeForwardedPacket(ctx sdk.Context, packet, forwardedPacket channeltypes.Packet, ack channeltypes.Acknowledgement) error { - capability, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(packet.DestinationPort, packet.DestinationChannel)) +// acknowledgeForwardedPacket writes the async acknowledgement for forwardedPacket +func (k Keeper) acknowledgeForwardedPacket(ctx sdk.Context, forwardedPacket, packet channeltypes.Packet, ack channeltypes.Acknowledgement) error { + capability, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(forwardedPacket.DestinationPort, forwardedPacket.DestinationChannel)) if !ok { return errorsmod.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability") } - if err := k.ics4Wrapper.WriteAcknowledgement(ctx, capability, packet, ack); err != nil { + if err := k.ics4Wrapper.WriteAcknowledgement(ctx, capability, forwardedPacket, ack); err != nil { return err } - k.deleteForwardedPacket(ctx, forwardedPacket.SourcePort, forwardedPacket.SourceChannel, forwardedPacket.Sequence) + k.deleteForwardedPacket(ctx, packet.SourcePort, packet.SourceChannel, packet.Sequence) return nil } diff --git a/modules/apps/transfer/keeper/relay_forwarding_test.go b/modules/apps/transfer/keeper/relay_forwarding_test.go index 9ba70cbe8db..542af7a4f59 100644 --- a/modules/apps/transfer/keeper/relay_forwarding_test.go +++ b/modules/apps/transfer/keeper/relay_forwarding_test.go @@ -982,7 +982,7 @@ func (suite *ForwardingTestSuite) TestOnTimeoutPacketForwarding() { suite.Require().True(ok) // Trigger OnTimeoutPacket for chainB - err = cbs.OnTimeoutPacket(suite.chainB.GetContext(), packet, nil) + err = cbs.OnTimeoutPacket(suite.chainB.GetContext(), pathBtoC.EndpointA.GetChannel().Version, packet, nil) suite.Require().NoError(err) // Ensure that chainB has an ack. diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index d3ee8ca4864..02bc0e9e18f 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -58,9 +58,9 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"/"+types.SubModuleName) } -// GetRouter returns the light client module router. -func (k *Keeper) GetRouter() *types.Router { - return k.router +// AddRoute adds a new route to the underlying router. +func (k *Keeper) AddRoute(clientType string, module exported.LightClientModule) { + k.router.AddRoute(clientType, module) } // GetStoreProvider returns the light client store provider. diff --git a/modules/core/02-client/types/client.pb.go b/modules/core/02-client/types/client.pb.go index 63653c7590a..0a61762a377 100644 --- a/modules/core/02-client/types/client.pb.go +++ b/modules/core/02-client/types/client.pb.go @@ -202,11 +202,14 @@ func (m *ClientConsensusStates) GetConsensusStates() []ConsensusStateWithHeight // breaking changes In these cases, the RevisionNumber is incremented so that // height continues to be monitonically increasing even as the RevisionHeight // gets reset +// +// Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag. +// This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height. type Height struct { // the revision that the client is currently on - RevisionNumber uint64 `protobuf:"varint,1,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"` + RevisionNumber uint64 `protobuf:"varint,1,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number"` // the height within the given revision - RevisionHeight uint64 `protobuf:"varint,2,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"` + RevisionHeight uint64 `protobuf:"varint,2,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height"` } func (m *Height) Reset() { *m = Height{} } @@ -300,35 +303,36 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 439 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x8b, 0xd3, 0x40, - 0x14, 0xce, 0x74, 0x97, 0xb2, 0x9d, 0x4a, 0x2b, 0x61, 0x17, 0x62, 0x85, 0xb4, 0xe4, 0x62, 0x0e, - 0xee, 0x8c, 0x8d, 0x07, 0x57, 0xc1, 0x83, 0xbb, 0x17, 0xf7, 0x22, 0x12, 0x0f, 0x82, 0x20, 0x25, - 0x99, 0xcc, 0x26, 0x03, 0xc9, 0xcc, 0x92, 0x99, 0x44, 0xfa, 0x1f, 0x78, 0x14, 0xbc, 0x78, 0xdc, - 0x3f, 0x67, 0x8f, 0x3d, 0x7a, 0x12, 0x69, 0xff, 0x11, 0xc9, 0xcc, 0x14, 0x89, 0xbf, 0xf0, 0xf6, - 0xf2, 0xbd, 0x2f, 0xdf, 0xfb, 0xde, 0x37, 0x0f, 0xce, 0x59, 0x4a, 0x30, 0x11, 0x35, 0xc5, 0xa4, - 0x64, 0x94, 0x2b, 0xdc, 0x2e, 0x6d, 0x85, 0xae, 0x6b, 0xa1, 0x84, 0xeb, 0xb2, 0x94, 0xa0, 0x8e, - 0x80, 0x2c, 0xdc, 0x2e, 0x67, 0xc7, 0xb9, 0xc8, 0x85, 0x6e, 0xe3, 0xae, 0x32, 0xcc, 0xd9, 0xbd, - 0x5c, 0x88, 0xbc, 0xa4, 0x58, 0x7f, 0xa5, 0xcd, 0x15, 0x4e, 0xf8, 0xda, 0xb4, 0x82, 0x0a, 0x9e, - 0x5c, 0x66, 0x94, 0x2b, 0x76, 0xc5, 0x68, 0x76, 0xa1, 0x75, 0xde, 0xa8, 0x44, 0x51, 0xf7, 0x3e, - 0x1c, 0x19, 0xd9, 0x15, 0xcb, 0x3c, 0xb0, 0x00, 0xe1, 0x28, 0x3e, 0x32, 0xc0, 0x65, 0xe6, 0x3e, - 0x81, 0x77, 0x6c, 0x53, 0x76, 0x64, 0x6f, 0xb0, 0x00, 0xe1, 0x38, 0x3a, 0x46, 0x66, 0x0e, 0xda, - 0xcf, 0x41, 0x2f, 0xf8, 0x3a, 0x1e, 0x93, 0x9f, 0xaa, 0xc1, 0x67, 0x00, 0xbd, 0x0b, 0xc1, 0x25, - 0xe5, 0xb2, 0x91, 0x1a, 0x7a, 0xcb, 0x54, 0xf1, 0x92, 0xb2, 0xbc, 0x50, 0xee, 0x19, 0x1c, 0x16, - 0xba, 0xd2, 0xf3, 0xc6, 0xd1, 0x0c, 0xfd, 0xbe, 0x21, 0x32, 0xdc, 0xf3, 0xc3, 0xdb, 0x6f, 0x73, - 0x27, 0xb6, 0x7c, 0xf7, 0x39, 0x9c, 0x92, 0xbd, 0xea, 0x7f, 0x58, 0x9a, 0x90, 0x9e, 0x85, 0xce, - 0xd5, 0x89, 0xd9, 0xbd, 0xef, 0x4d, 0xfe, 0x3b, 0x85, 0xf7, 0xf0, 0xee, 0x2f, 0x53, 0xa5, 0x37, - 0x58, 0x1c, 0x84, 0xe3, 0xe8, 0xe1, 0x9f, 0x9c, 0xff, 0x6d, 0x6f, 0xbb, 0xcb, 0xb4, 0x6f, 0x4a, - 0x06, 0x19, 0x1c, 0xda, 0x60, 0x1e, 0xc0, 0x69, 0x4d, 0x5b, 0x26, 0x99, 0xe0, 0x2b, 0xde, 0x54, - 0x29, 0xad, 0xb5, 0x97, 0xc3, 0x78, 0xb2, 0x87, 0x5f, 0x69, 0xb4, 0x47, 0xb4, 0x51, 0x0e, 0xfa, - 0x44, 0xa3, 0xf8, 0xec, 0xe8, 0xe3, 0xcd, 0xdc, 0xf9, 0x72, 0x33, 0x77, 0x82, 0x25, 0x1c, 0xbe, - 0x4e, 0xea, 0xa4, 0x92, 0xdd, 0xcf, 0x49, 0x59, 0x8a, 0x0f, 0x34, 0x5b, 0x19, 0xd3, 0xd2, 0x03, - 0x8b, 0x83, 0x70, 0x14, 0x4f, 0x2c, 0x6c, 0x22, 0x92, 0xe7, 0xf1, 0xed, 0xd6, 0x07, 0x9b, 0xad, - 0x0f, 0xbe, 0x6f, 0x7d, 0xf0, 0x69, 0xe7, 0x3b, 0x9b, 0x9d, 0xef, 0x7c, 0xdd, 0xf9, 0xce, 0xbb, - 0xb3, 0x9c, 0xa9, 0xa2, 0x49, 0x11, 0x11, 0x15, 0x26, 0x42, 0x56, 0x42, 0x62, 0x96, 0x92, 0xd3, - 0x5c, 0xe0, 0xf6, 0x29, 0xae, 0x44, 0xd6, 0x94, 0x54, 0x9a, 0x9b, 0x7e, 0x14, 0x9d, 0xda, 0xb3, - 0x56, 0xeb, 0x6b, 0x2a, 0xd3, 0xa1, 0x7e, 0xa0, 0xc7, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf5, - 0xca, 0xb7, 0xeb, 0xf6, 0x02, 0x00, 0x00, + // 456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xf6, 0xa5, 0x55, 0xd4, 0x5c, 0x50, 0x82, 0x4c, 0x2b, 0x99, 0x20, 0xd9, 0x51, 0x16, 0x32, + 0xd0, 0x3b, 0x12, 0x06, 0x0a, 0x82, 0x81, 0x74, 0xa1, 0x0b, 0x42, 0x66, 0x40, 0x42, 0x42, 0x91, + 0x7d, 0xbe, 0xda, 0x27, 0xd9, 0x77, 0x95, 0xef, 0x6c, 0x94, 0x7f, 0xc0, 0x84, 0x90, 0x58, 0x18, + 0xfb, 0x73, 0x3a, 0x76, 0x64, 0xaa, 0x50, 0xb2, 0xf1, 0x2b, 0x90, 0xef, 0x2e, 0xaa, 0x5c, 0x0a, + 0x62, 0x7b, 0xf7, 0xbe, 0xef, 0xbd, 0xef, 0xfb, 0x5e, 0x62, 0x18, 0xb0, 0x98, 0x60, 0x22, 0x4a, + 0x8a, 0x49, 0xce, 0x28, 0x57, 0xb8, 0x9e, 0xd9, 0x0a, 0x9d, 0x95, 0x42, 0x09, 0xd7, 0x65, 0x31, + 0x41, 0x0d, 0x01, 0xd9, 0x76, 0x3d, 0x1b, 0xed, 0xa7, 0x22, 0x15, 0x1a, 0xc6, 0x4d, 0x65, 0x98, + 0xa3, 0xfb, 0xa9, 0x10, 0x69, 0x4e, 0xb1, 0x7e, 0xc5, 0xd5, 0x29, 0x8e, 0xf8, 0xca, 0x40, 0x93, + 0x02, 0x1e, 0x9c, 0x24, 0x94, 0x2b, 0x76, 0xca, 0x68, 0x72, 0xac, 0xf7, 0xbc, 0x53, 0x91, 0xa2, + 0xee, 0x03, 0xd8, 0x33, 0x6b, 0x97, 0x2c, 0xf1, 0xc0, 0x18, 0x4c, 0x7b, 0xe1, 0x9e, 0x69, 0x9c, + 0x24, 0xee, 0x53, 0x78, 0xc7, 0x82, 0xb2, 0x21, 0x7b, 0x9d, 0x31, 0x98, 0xf6, 0xe7, 0xfb, 0xc8, + 0xe8, 0xa0, 0xad, 0x0e, 0x7a, 0xc5, 0x57, 0x61, 0x9f, 0x5c, 0x6f, 0x9d, 0x7c, 0x03, 0xd0, 0x3b, + 0x16, 0x5c, 0x52, 0x2e, 0x2b, 0xa9, 0x5b, 0xef, 0x99, 0xca, 0x5e, 0x53, 0x96, 0x66, 0xca, 0x3d, + 0x82, 0xdd, 0x4c, 0x57, 0x5a, 0xaf, 0x3f, 0x1f, 0xa1, 0x3f, 0x13, 0x22, 0xc3, 0x5d, 0xec, 0x5e, + 0x5c, 0x05, 0x4e, 0x68, 0xf9, 0xee, 0x4b, 0x38, 0x24, 0xdb, 0xad, 0xff, 0x61, 0x69, 0x40, 0x5a, + 0x16, 0x1a, 0x57, 0x07, 0x26, 0x7b, 0xdb, 0x9b, 0xfc, 0xf7, 0x15, 0x3e, 0xc2, 0xbb, 0x37, 0x54, + 0xa5, 0xd7, 0x19, 0xef, 0x4c, 0xfb, 0xf3, 0x47, 0xb7, 0x39, 0xff, 0x5b, 0x6e, 0x9b, 0x65, 0xd8, + 0x36, 0x25, 0x27, 0x5f, 0x00, 0xec, 0xda, 0xcb, 0xbc, 0x80, 0xc3, 0x92, 0xd6, 0x4c, 0x32, 0xc1, + 0x97, 0xbc, 0x2a, 0x62, 0x5a, 0x6a, 0x33, 0xbb, 0x8b, 0x7b, 0xbf, 0xae, 0x82, 0x9b, 0x50, 0x38, + 0xd8, 0x36, 0xde, 0xe8, 0x77, 0x6b, 0xda, 0x1e, 0xb8, 0x73, 0xcb, 0xb4, 0x81, 0xae, 0xa7, 0x8d, + 0xf6, 0xf3, 0xbd, 0xcf, 0xe7, 0x81, 0xf3, 0xfd, 0x3c, 0x70, 0x26, 0x33, 0xd8, 0x7d, 0x1b, 0x95, + 0x51, 0x21, 0xdd, 0x87, 0x70, 0x18, 0xe5, 0xb9, 0xf8, 0x44, 0x93, 0xa5, 0xc9, 0x27, 0x3d, 0x30, + 0xde, 0x99, 0xf6, 0xc2, 0x81, 0x6d, 0x9b, 0x6b, 0xca, 0x45, 0x78, 0xb1, 0xf6, 0xc1, 0xe5, 0xda, + 0x07, 0x3f, 0xd7, 0x3e, 0xf8, 0xba, 0xf1, 0x9d, 0xcb, 0x8d, 0xef, 0xfc, 0xd8, 0xf8, 0xce, 0x87, + 0xa3, 0x94, 0xa9, 0xac, 0x8a, 0x11, 0x11, 0x05, 0x26, 0x42, 0x16, 0x42, 0x62, 0x16, 0x93, 0xc3, + 0x54, 0xe0, 0xfa, 0x19, 0x2e, 0x44, 0x52, 0xe5, 0x54, 0x9a, 0xbf, 0xff, 0xe3, 0xf9, 0xa1, 0xfd, + 0x02, 0xd4, 0xea, 0x8c, 0xca, 0xb8, 0xab, 0x7f, 0xcb, 0x27, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x94, 0x27, 0x25, 0x2c, 0x21, 0x03, 0x00, 0x00, } func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) { diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index f56b578096f..04f8768a712 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -111,14 +111,14 @@ func (k *Keeper) RecvPacket( packet types.Packet, proof []byte, proofHeight exported.Height, -) error { +) (string, error) { channel, found := k.GetChannel(ctx, packet.GetDestPort(), packet.GetDestChannel()) if !found { - return errorsmod.Wrap(types.ErrChannelNotFound, packet.GetDestChannel()) + return "", errorsmod.Wrap(types.ErrChannelNotFound, packet.GetDestChannel()) } if !slices.Contains([]types.State{types.OPEN, types.FLUSHING, types.FLUSHCOMPLETE}, channel.State) { - return errorsmod.Wrapf(types.ErrInvalidChannelState, "expected channel state to be one of [%s, %s, %s], but got %s", types.OPEN, types.FLUSHING, types.FLUSHCOMPLETE, channel.State) + return "", errorsmod.Wrapf(types.ErrInvalidChannelState, "expected channel state to be one of [%s, %s, %s], but got %s", types.OPEN, types.FLUSHING, types.FLUSHCOMPLETE, channel.State) } // If counterpartyUpgrade is stored we need to ensure that the @@ -130,14 +130,14 @@ func (k *Keeper) RecvPacket( if found { counterpartyNextSequenceSend := counterpartyUpgrade.NextSequenceSend if packet.GetSequence() >= counterpartyNextSequenceSend { - return errorsmod.Wrapf(types.ErrInvalidPacket, "cannot flush packet at sequence greater than or equal to counterparty next sequence send (%d) ≥ (%d).", packet.GetSequence(), counterpartyNextSequenceSend) + return "", errorsmod.Wrapf(types.ErrInvalidPacket, "cannot flush packet at sequence greater than or equal to counterparty next sequence send (%d) ≥ (%d).", packet.GetSequence(), counterpartyNextSequenceSend) } } // Authenticate capability to ensure caller has authority to receive packet on this channel capName := host.ChannelCapabilityPath(packet.GetDestPort(), packet.GetDestChannel()) if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidChannelCapability, "channel capability failed authentication for capability name %s", capName, ) @@ -145,14 +145,14 @@ func (k *Keeper) RecvPacket( // packet must come from the channel's counterparty if packet.GetSourcePort() != channel.Counterparty.PortId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet source port doesn't match the counterparty's port (%s ≠ %s)", packet.GetSourcePort(), channel.Counterparty.PortId, ) } if packet.GetSourceChannel() != channel.Counterparty.ChannelId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet source channel doesn't match the counterparty's channel (%s ≠ %s)", packet.GetSourceChannel(), channel.Counterparty.ChannelId, ) @@ -163,18 +163,18 @@ func (k *Keeper) RecvPacket( // connection and channel must both be open connectionEnd, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !found { - return errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) + return "", errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) } if connectionEnd.State != connectiontypes.OPEN { - return errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectionEnd.State) + return "", errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectionEnd.State) } // check if packet timed out by comparing it with the latest height of the chain selfHeight, selfTimestamp := clienttypes.GetSelfHeight(ctx), uint64(ctx.BlockTime().UnixNano()) timeout := types.NewTimeout(packet.GetTimeoutHeight().(clienttypes.Height), packet.GetTimeoutTimestamp()) if timeout.Elapsed(selfHeight, selfTimestamp) { - return errorsmod.Wrap(timeout.ErrTimeoutElapsed(selfHeight, selfTimestamp), "packet timeout elapsed") + return "", errorsmod.Wrap(timeout.ErrTimeoutElapsed(selfHeight, selfTimestamp), "packet timeout elapsed") } commitment := types.CommitPacket(k.cdc, packet) @@ -185,11 +185,11 @@ func (k *Keeper) RecvPacket( packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), commitment, ); err != nil { - return errorsmod.Wrap(err, "couldn't verify counterparty packet commitment") + return "", errorsmod.Wrap(err, "couldn't verify counterparty packet commitment") } if err := k.applyReplayProtection(ctx, packet, channel); err != nil { - return err + return "", err } // log that a packet has been received & executed @@ -205,7 +205,7 @@ func (k *Keeper) RecvPacket( // emit an event that the relayer can query for emitRecvPacketEvent(ctx, packet, channel) - return nil + return channel.Version, nil } // applyReplayProtection ensures a packet has not already been received @@ -374,23 +374,23 @@ func (k *Keeper) AcknowledgePacket( acknowledgement []byte, proof []byte, proofHeight exported.Height, -) error { +) (string, error) { channel, found := k.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) if !found { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", packet.GetSourcePort(), packet.GetSourceChannel(), ) } if !slices.Contains([]types.State{types.OPEN, types.FLUSHING}, channel.State) { - return errorsmod.Wrapf(types.ErrInvalidChannelState, "packets cannot be acknowledged on channel with state (%s)", channel.State) + return "", errorsmod.Wrapf(types.ErrInvalidChannelState, "packets cannot be acknowledged on channel with state (%s)", channel.State) } // Authenticate capability to ensure caller has authority to receive packet on this channel capName := host.ChannelCapabilityPath(packet.GetSourcePort(), packet.GetSourceChannel()) if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidChannelCapability, "channel capability failed authentication for capability name %s", capName, ) @@ -398,14 +398,14 @@ func (k *Keeper) AcknowledgePacket( // packet must have been sent to the channel's counterparty if packet.GetDestPort() != channel.Counterparty.PortId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination port doesn't match the counterparty's port (%s ≠ %s)", packet.GetDestPort(), channel.Counterparty.PortId, ) } if packet.GetDestChannel() != channel.Counterparty.ChannelId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination channel doesn't match the counterparty's channel (%s ≠ %s)", packet.GetDestChannel(), channel.Counterparty.ChannelId, ) @@ -413,11 +413,11 @@ func (k *Keeper) AcknowledgePacket( connectionEnd, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !found { - return errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) + return "", errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) } if connectionEnd.State != connectiontypes.OPEN { - return errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectionEnd.State) + return "", errorsmod.Wrapf(connectiontypes.ErrInvalidConnectionState, "connection state is not OPEN (got %s)", connectionEnd.State) } commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) @@ -428,35 +428,35 @@ func (k *Keeper) AcknowledgePacket( // or there is a misconfigured relayer attempting to prove an acknowledgement // for a packet never sent. Core IBC will treat this error as a no-op in order to // prevent an entire relay transaction from failing and consuming unnecessary fees. - return types.ErrNoOpMsg + return "", types.ErrNoOpMsg } packetCommitment := types.CommitPacket(k.cdc, packet) // verify we sent the packet and haven't cleared it out yet if !bytes.Equal(commitment, packetCommitment) { - return errorsmod.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", packetCommitment, commitment) + return "", errorsmod.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", packetCommitment, commitment) } if err := k.connectionKeeper.VerifyPacketAcknowledgement( ctx, connectionEnd, proofHeight, proof, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), acknowledgement, ); err != nil { - return err + return "", err } // assert packets acknowledged in order if channel.Ordering == types.ORDERED { nextSequenceAck, found := k.GetNextSequenceAck(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) if !found { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrSequenceAckNotFound, "source port: %s, source channel: %s", packet.GetSourcePort(), packet.GetSourceChannel(), ) } if packet.GetSequence() != nextSequenceAck { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrPacketSequenceOutOfOrder, "packet sequence ≠ next ack sequence (%d ≠ %d)", packet.GetSequence(), nextSequenceAck, ) @@ -491,11 +491,11 @@ func (k *Keeper) AcknowledgePacket( if channel.State == types.FLUSHING { if aborted := k.handleFlushState(ctx, packet, channel); aborted { k.Logger(ctx).Info("upgrade aborted", "port_id", packet.GetSourcePort(), "channel_id", packet.GetSourceChannel(), "upgrade_sequence", channel.UpgradeSequence) - return nil + return channel.Version, nil } } - return nil + return channel.Version, nil } // handleFlushState is called when a packet is acknowledged or timed out and the channel is in diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 97b6e5795bf..acd7197af19 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -666,11 +666,12 @@ func (suite *KeeperTestSuite) TestRecvPacket() { packetKey := host.PacketCommitmentKey(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) proof, proofHeight := path.EndpointA.QueryProof(packetKey) - err := suite.chainB.App.GetIBCKeeper().ChannelKeeper.RecvPacket(suite.chainB.GetContext(), channelCap, packet, proof, proofHeight) + channelVersion, err := suite.chainB.App.GetIBCKeeper().ChannelKeeper.RecvPacket(suite.chainB.GetContext(), channelCap, packet, proof, proofHeight) expPass := tc.expError == nil if expPass { suite.Require().NoError(err) + suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion, "channel version is incorrect") channelB, _ := suite.chainB.App.GetIBCKeeper().ChannelKeeper.GetChannel(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel()) nextSeqRecv, found := suite.chainB.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceRecv(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel()) @@ -688,6 +689,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { } else { suite.Require().Error(err) suite.Require().ErrorIs(err, tc.expError) + suite.Require().Equal("", channelVersion) } }) } @@ -838,24 +840,27 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap *capabilitytypes.Capability ) - assertErr := func(errType *errors.Error) func(commitment []byte, err error) { - return func(commitment []byte, err error) { + assertErr := func(errType *errors.Error) func(commitment []byte, channelVersion string, err error) { + return func(commitment []byte, channelVersion string, err error) { suite.Require().Error(err) suite.Require().ErrorIs(err, errType) suite.Require().NotNil(commitment) + suite.Require().Equal("", channelVersion) } } - assertNoOp := func(commitment []byte, err error) { + assertNoOp := func(commitment []byte, channelVersion string, err error) { suite.Require().Error(err) suite.Require().ErrorIs(err, types.ErrNoOpMsg) suite.Require().Nil(commitment) + suite.Require().Equal("", channelVersion) } - assertSuccess := func(seq func() uint64, msg string) func(commitment []byte, err error) { - return func(commitment []byte, err error) { + assertSuccess := func(seq func() uint64, msg string) func(commitment []byte, channelVersion string, err error) { + return func(commitment []byte, channelVersion string, err error) { suite.Require().NoError(err) suite.Require().Nil(commitment) + suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion) nextSequenceAck, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceAck(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel()) @@ -867,7 +872,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { testCases := []struct { name string malleate func() - expResult func(commitment []byte, err error) + expResult func(commitment []byte, channelVersion string, err error) expEvents func(path *ibctesting.Path) []abci.Event }{ { @@ -927,12 +932,13 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.FLUSHING }) }, - expResult: func(commitment []byte, err error) { + expResult: func(commitment []byte, channelVersion string, err error) { suite.Require().NoError(err) suite.Require().Nil(commitment) channel := path.EndpointA.GetChannel() suite.Require().Equal(types.FLUSHING, channel.State) + suite.Require().Equal(channel.Version, channelVersion) nextSequenceAck, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceAck(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel()) suite.Require().True(found) @@ -964,12 +970,13 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { path.EndpointA.SetChannelCounterpartyUpgrade(counterpartyUpgrade) }, - expResult: func(commitment []byte, err error) { + expResult: func(commitment []byte, channelVersion string, err error) { suite.Require().NoError(err) suite.Require().Nil(commitment) channel := path.EndpointA.GetChannel() suite.Require().Equal(types.FLUSHCOMPLETE, channel.State) + suite.Require().Equal(channel.Version, channelVersion) nextSequenceAck, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceAck(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel()) suite.Require().True(found) @@ -1024,12 +1031,13 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { path.EndpointA.SetChannelUpgrade(upgrade) path.EndpointA.SetChannelCounterpartyUpgrade(counterpartyUpgrade) }, - expResult: func(commitment []byte, err error) { + expResult: func(commitment []byte, channelVersion string, err error) { suite.Require().NoError(err) suite.Require().Nil(commitment) channel := path.EndpointA.GetChannel() suite.Require().Equal(types.OPEN, channel.State) + suite.Require().Equal(channel.Version, channelVersion) nextSequenceAck, found := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceAck(suite.chainA.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel()) suite.Require().True(found) @@ -1123,10 +1131,11 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { path.EndpointA.UpdateChannel(func(channel *types.Channel) { channel.State = types.FLUSHCOMPLETE }) }, - expResult: func(commitment []byte, err error) { + expResult: func(commitment []byte, channelVersion string, err error) { suite.Require().Error(err) suite.Require().ErrorIs(err, types.ErrInvalidChannelState) suite.Require().Nil(commitment) + suite.Require().Equal("", channelVersion) }, }, { @@ -1193,7 +1202,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel( suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{"connection-1000"}, path.EndpointA.ChannelConfig.Version), + types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{"connection-1000"}, path.EndpointA.GetChannel().Version), ) suite.chainA.CreateChannelCapability(suite.chainA.GetSimApp().ScopedIBCMockKeeper, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) @@ -1220,7 +1229,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetChannel( suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{path.EndpointA.ConnectionID}, path.EndpointA.ChannelConfig.Version), + types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID), []string{path.EndpointA.ConnectionID}, path.EndpointA.GetChannel().Version), ) suite.chainA.CreateChannelCapability(suite.chainA.GetSimApp().ScopedIBCMockKeeper, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) @@ -1334,10 +1343,10 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { packetKey := host.PacketAcknowledgementKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) proof, proofHeight := path.EndpointB.QueryProof(packetKey) - err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.AcknowledgePacket(ctx, channelCap, packet, ack.Acknowledgement(), proof, proofHeight) + channelVersion, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.AcknowledgePacket(ctx, channelCap, packet, ack.Acknowledgement(), proof, proofHeight) commitment := suite.chainA.App.GetIBCKeeper().ChannelKeeper.GetPacketCommitment(ctx, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, packet.GetSequence()) - tc.expResult(commitment, err) + tc.expResult(commitment, channelVersion, err) if tc.expEvents != nil { events := ctx.EventManager().ABCIEvents() diff --git a/modules/core/04-channel/keeper/timeout.go b/modules/core/04-channel/keeper/timeout.go index 1f8649e0f7a..36d82873707 100644 --- a/modules/core/04-channel/keeper/timeout.go +++ b/modules/core/04-channel/keeper/timeout.go @@ -28,10 +28,10 @@ func (k *Keeper) TimeoutPacket( proof []byte, proofHeight exported.Height, nextSequenceRecv uint64, -) error { +) (string, error) { channel, found := k.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) if !found { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", packet.GetSourcePort(), packet.GetSourceChannel(), ) @@ -41,14 +41,14 @@ func (k *Keeper) TimeoutPacket( // so the capability authentication can be omitted here if packet.GetDestPort() != channel.Counterparty.PortId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination port doesn't match the counterparty's port (%s ≠ %s)", packet.GetDestPort(), channel.Counterparty.PortId, ) } if packet.GetDestChannel() != channel.Counterparty.ChannelId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination channel doesn't match the counterparty's channel (%s ≠ %s)", packet.GetDestChannel(), channel.Counterparty.ChannelId, ) @@ -56,7 +56,7 @@ func (k *Keeper) TimeoutPacket( connectionEnd, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !found { - return errorsmod.Wrap( + return "", errorsmod.Wrap( connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0], ) @@ -65,12 +65,12 @@ func (k *Keeper) TimeoutPacket( // check that timeout height or timeout timestamp has passed on the other end proofTimestamp, err := k.clientKeeper.GetClientTimestampAtHeight(ctx, connectionEnd.ClientId, proofHeight) if err != nil { - return err + return "", err } timeout := types.NewTimeout(packet.GetTimeoutHeight().(clienttypes.Height), packet.GetTimeoutTimestamp()) if !timeout.Elapsed(proofHeight.(clienttypes.Height), proofTimestamp) { - return errorsmod.Wrap(timeout.ErrTimeoutNotReached(proofHeight.(clienttypes.Height), proofTimestamp), "packet timeout not reached") + return "", errorsmod.Wrap(timeout.ErrTimeoutNotReached(proofHeight.(clienttypes.Height), proofTimestamp), "packet timeout not reached") } commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) @@ -81,21 +81,21 @@ func (k *Keeper) TimeoutPacket( // or there is a misconfigured relayer attempting to prove a timeout // for a packet never sent. Core IBC will treat this error as a no-op in order to // prevent an entire relay transaction from failing and consuming unnecessary fees. - return types.ErrNoOpMsg + return "", types.ErrNoOpMsg } packetCommitment := types.CommitPacket(k.cdc, packet) // verify we sent the packet and haven't cleared it out yet if !bytes.Equal(commitment, packetCommitment) { - return errorsmod.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) + return "", errorsmod.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) } switch channel.Ordering { case types.ORDERED: // check that packet has not been received if nextSequenceRecv > packet.GetSequence() { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrPacketReceived, "packet already received, next sequence receive > packet sequence (%d > %d)", nextSequenceRecv, packet.GetSequence(), ) @@ -116,11 +116,11 @@ func (k *Keeper) TimeoutPacket( } if err != nil { - return err + return "", err } // NOTE: the remaining code is located in the TimeoutExecuted function - return nil + return channel.Version, nil } // TimeoutExecuted deletes the commitment send from this chain after it verifies timeout. @@ -203,29 +203,29 @@ func (k *Keeper) TimeoutOnClose( proofHeight exported.Height, nextSequenceRecv uint64, counterpartyUpgradeSequence uint64, -) error { +) (string, error) { channel, found := k.GetChannel(ctx, packet.GetSourcePort(), packet.GetSourceChannel()) if !found { - return errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", packet.GetSourcePort(), packet.GetSourceChannel()) + return "", errorsmod.Wrapf(types.ErrChannelNotFound, "port ID (%s) channel ID (%s)", packet.GetSourcePort(), packet.GetSourceChannel()) } capName := host.ChannelCapabilityPath(packet.GetSourcePort(), packet.GetSourceChannel()) if !k.scopedKeeper.AuthenticateCapability(ctx, chanCap, capName) { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidChannelCapability, "channel capability failed authentication with capability name %s", capName, ) } if packet.GetDestPort() != channel.Counterparty.PortId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination port doesn't match the counterparty's port (%s ≠ %s)", packet.GetDestPort(), channel.Counterparty.PortId, ) } if packet.GetDestChannel() != channel.Counterparty.ChannelId { - return errorsmod.Wrapf( + return "", errorsmod.Wrapf( types.ErrInvalidPacket, "packet destination channel doesn't match the counterparty's channel (%s ≠ %s)", packet.GetDestChannel(), channel.Counterparty.ChannelId, ) @@ -233,7 +233,7 @@ func (k *Keeper) TimeoutOnClose( connectionEnd, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) if !found { - return errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) + return "", errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, channel.ConnectionHops[0]) } commitment := k.GetPacketCommitment(ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) @@ -244,14 +244,14 @@ func (k *Keeper) TimeoutOnClose( // or there is a misconfigured relayer attempting to prove a timeout // for a packet never sent. Core IBC will treat this error as a no-op in order to // prevent an entire relay transaction from failing and consuming unnecessary fees. - return types.ErrNoOpMsg + return "", types.ErrNoOpMsg } packetCommitment := types.CommitPacket(k.cdc, packet) // verify we sent the packet and haven't cleared it out yet if !bytes.Equal(commitment, packetCommitment) { - return errorsmod.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) + return "", errorsmod.Wrapf(types.ErrInvalidPacket, "packet commitment bytes are not equal: got (%v), expected (%v)", commitment, packetCommitment) } counterpartyHops := []string{connectionEnd.Counterparty.ConnectionId} @@ -272,7 +272,7 @@ func (k *Keeper) TimeoutOnClose( channel.Counterparty.PortId, channel.Counterparty.ChannelId, expectedChannel, ); err != nil { - return err + return "", err } var err error @@ -280,7 +280,7 @@ func (k *Keeper) TimeoutOnClose( case types.ORDERED: // check that packet has not been received if nextSequenceRecv > packet.GetSequence() { - return errorsmod.Wrapf(types.ErrInvalidPacket, "packet already received, next sequence receive > packet sequence (%d > %d", nextSequenceRecv, packet.GetSequence()) + return "", errorsmod.Wrapf(types.ErrInvalidPacket, "packet already received, next sequence receive > packet sequence (%d > %d", nextSequenceRecv, packet.GetSequence()) } // check that the recv sequence is as claimed @@ -298,9 +298,9 @@ func (k *Keeper) TimeoutOnClose( } if err != nil { - return err + return "", err } // NOTE: the remaining code is located in the TimeoutExecuted function - return nil + return channel.Version, nil } diff --git a/modules/core/04-channel/keeper/timeout_test.go b/modules/core/04-channel/keeper/timeout_test.go index 126bb783764..26b55158907 100644 --- a/modules/core/04-channel/keeper/timeout_test.go +++ b/modules/core/04-channel/keeper/timeout_test.go @@ -220,12 +220,14 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { } } - err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutPacket(suite.chainA.GetContext(), packet, proof, proofHeight, nextSeqRecv) + channelVersion, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutPacket(suite.chainA.GetContext(), packet, proof, proofHeight, nextSeqRecv) if tc.expPass { suite.Require().NoError(err) + suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion) } else { suite.Require().Error(err) + suite.Require().Equal("", channelVersion) // only check if expError is set, since not all error codes can be known if expError != nil { suite.Require().True(errors.Is(err, expError)) @@ -757,7 +759,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { proof, _ = suite.chainB.QueryProof(unorderedPacketKey) } - err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutOnClose( + channelVersion, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.TimeoutOnClose( suite.chainA.GetContext(), chanCap, packet, @@ -770,8 +772,10 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { if tc.expPass { suite.Require().NoError(err) + suite.Require().Equal(path.EndpointA.GetChannel().Version, channelVersion) } else { suite.Require().Error(err) + suite.Require().Equal("", channelVersion) } }) } diff --git a/modules/core/04-channel/keeper/upgrade.go b/modules/core/04-channel/keeper/upgrade.go index 5c1848f223b..2fd44ca10b5 100644 --- a/modules/core/04-channel/keeper/upgrade.go +++ b/modules/core/04-channel/keeper/upgrade.go @@ -446,6 +446,21 @@ func (k *Keeper) ChanUpgradeConfirm( return errorsmod.Wrap(err, "failed to verify counterparty upgrade") } + // if we have cancelled our upgrade after performing UpgradeInit, + // UpgradeTry or UpgradeAck, the lack of a stored upgrade will prevent + // us from continuing the upgrade handshake + upgrade, found := k.GetUpgrade(ctx, portID, channelID) + if !found { + return errorsmod.Wrapf(types.ErrUpgradeNotFound, "failed to retrieve channel upgrade: port ID (%s) channel ID (%s)", portID, channelID) + } + + // in the crossing-hello case it is possible that both chains execute the + // INIT, TRY and CONFIRM steps without any of them executing ACK, therefore + // we also need to check that the upgrades are compatible on this step + if err := k.checkForUpgradeCompatibility(ctx, upgrade.Fields, counterpartyUpgrade.Fields); err != nil { + return types.NewUpgradeError(channel.UpgradeSequence, err) + } + timeout := counterpartyUpgrade.Timeout selfHeight, selfTimestamp := clienttypes.GetSelfHeight(ctx), uint64(ctx.BlockTime().UnixNano()) diff --git a/modules/core/04-channel/keeper/upgrade_test.go b/modules/core/04-channel/keeper/upgrade_test.go index 0f75a7df868..8189e2d9bd8 100644 --- a/modules/core/04-channel/keeper/upgrade_test.go +++ b/modules/core/04-channel/keeper/upgrade_test.go @@ -1073,6 +1073,27 @@ func (suite *KeeperTestSuite) TestChanUpgradeConfirm() { }, types.NewUpgradeError(1, types.ErrTimeoutElapsed), }, + { + "upgrade not found", + func() { + path.EndpointB.Chain.DeleteKey(host.ChannelUpgradeKey(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID)) + }, + types.ErrUpgradeNotFound, + }, + { + "upgrades are not compatible", + func() { + // the expected upgrade version is mock-version-v2 + counterpartyUpgrade.Fields.Version = fmt.Sprintf("%s-v3", mock.Version) + path.EndpointA.SetChannelUpgrade(counterpartyUpgrade) + + suite.coordinator.CommitBlock(suite.chainA) + + err := path.EndpointB.UpdateClient() + suite.Require().NoError(err) + }, + types.NewUpgradeError(1, types.ErrIncompatibleCounterpartyUpgrade), + }, } for _, tc := range testCases { diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index 7e9b3bf672e..8b2ccf94248 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -88,12 +88,14 @@ type IBCModule interface { // and the acknowledgement is written (in synchronous cases). OnRecvPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement OnAcknowledgementPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, @@ -101,6 +103,7 @@ type IBCModule interface { OnTimeoutPacket( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error diff --git a/modules/core/ante/ante.go b/modules/core/ante/ante.go index 9b37e0d79b4..2d08ba0db16 100644 --- a/modules/core/ante/ante.go +++ b/modules/core/ante/ante.go @@ -117,7 +117,7 @@ func (rrd RedundantRelayDecorator) recvPacketCheckTx(ctx sdk.Context, msg *chann // If the packet was already received, perform a no-op // Use a cached context to prevent accidental state changes cacheCtx, writeFn := ctx.CacheContext() - err = rrd.k.ChannelKeeper.RecvPacket(cacheCtx, capability, msg.Packet, msg.ProofCommitment, msg.ProofHeight) + _, err = rrd.k.ChannelKeeper.RecvPacket(cacheCtx, capability, msg.Packet, msg.ProofCommitment, msg.ProofHeight) switch err { case nil: diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index f60b75ebd50..1757d3d3534 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -351,7 +351,7 @@ func (suite *AnteTestSuite) TestAnteDecoratorCheckTx() { "success on app callback error, app callbacks are skipped for performance", func(suite *AnteTestSuite) []sdk.Msg { suite.chainB.GetSimApp().IBCMockModule.IBCApp.OnRecvPacket = func( - ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { panic(fmt.Errorf("failed OnRecvPacket mock callback")) } @@ -587,7 +587,7 @@ func (suite *AnteTestSuite) TestAnteDecoratorReCheckTx() { "success on app callback error, app callbacks are skipped for performance", func(suite *AnteTestSuite) []sdk.Msg { suite.chainB.GetSimApp().IBCMockModule.IBCApp.OnRecvPacket = func( - ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, + ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement { panic(fmt.Errorf("failed OnRecvPacket mock callback")) } diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 173706e4b21..2f9a2acc7be 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -473,7 +473,7 @@ func (k *Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPack // If the packet was already received, perform a no-op // Use a cached context to prevent accidental state changes cacheCtx, writeFn := ctx.CacheContext() - err = k.ChannelKeeper.RecvPacket(cacheCtx, capability, msg.Packet, msg.ProofCommitment, msg.ProofHeight) + channelVersion, err := k.ChannelKeeper.RecvPacket(cacheCtx, capability, msg.Packet, msg.ProofCommitment, msg.ProofHeight) switch err { case nil: @@ -491,7 +491,7 @@ func (k *Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPack // // Cache context so that we may discard state changes from callback if the acknowledgement is unsuccessful. cacheCtx, writeFn = ctx.CacheContext() - ack := cbs.OnRecvPacket(cacheCtx, msg.Packet, relayer) + ack := cbs.OnRecvPacket(cacheCtx, channelVersion, msg.Packet, relayer) if ack == nil || ack.Success() { // write application state changes for asynchronous and successful acknowledgements writeFn() @@ -545,7 +545,7 @@ func (k *Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (* // If the timeout was already received, perform a no-op // Use a cached context to prevent accidental state changes cacheCtx, writeFn := ctx.CacheContext() - err = k.ChannelKeeper.TimeoutPacket(cacheCtx, msg.Packet, msg.ProofUnreceived, msg.ProofHeight, msg.NextSequenceRecv) + channelVersion, err := k.ChannelKeeper.TimeoutPacket(cacheCtx, msg.Packet, msg.ProofUnreceived, msg.ProofHeight, msg.NextSequenceRecv) switch err { case nil: @@ -565,7 +565,7 @@ func (k *Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (* } // Perform application logic callback - err = cbs.OnTimeoutPacket(ctx, msg.Packet, relayer) + err = cbs.OnTimeoutPacket(ctx, channelVersion, msg.Packet, relayer) if err != nil { ctx.Logger().Error("timeout failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "timeout packet callback failed")) return nil, errorsmod.Wrap(err, "timeout packet callback failed") @@ -607,7 +607,7 @@ func (k *Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTime // If the timeout was already received, perform a no-op // Use a cached context to prevent accidental state changes cacheCtx, writeFn := ctx.CacheContext() - err = k.ChannelKeeper.TimeoutOnClose(cacheCtx, capability, msg.Packet, msg.ProofUnreceived, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv, msg.CounterpartyUpgradeSequence) + channelVersion, err := k.ChannelKeeper.TimeoutOnClose(cacheCtx, capability, msg.Packet, msg.ProofUnreceived, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv, msg.CounterpartyUpgradeSequence) switch err { case nil: @@ -630,7 +630,7 @@ func (k *Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTime // // NOTE: MsgTimeout and MsgTimeoutOnClose use the same "OnTimeoutPacket" // application logic callback. - err = cbs.OnTimeoutPacket(ctx, msg.Packet, relayer) + err = cbs.OnTimeoutPacket(ctx, channelVersion, msg.Packet, relayer) if err != nil { ctx.Logger().Error("timeout on close failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "timeout on close callback failed")) return nil, errorsmod.Wrap(err, "timeout on close callback failed") @@ -672,7 +672,7 @@ func (k *Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAck // If the acknowledgement was already received, perform a no-op // Use a cached context to prevent accidental state changes cacheCtx, writeFn := ctx.CacheContext() - err = k.ChannelKeeper.AcknowledgePacket(cacheCtx, capability, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight) + channelVersion, err := k.ChannelKeeper.AcknowledgePacket(cacheCtx, capability, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight) switch err { case nil: @@ -687,7 +687,7 @@ func (k *Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAck } // Perform application logic callback - err = cbs.OnAcknowledgementPacket(ctx, msg.Packet, msg.Acknowledgement, relayer) + err = cbs.OnAcknowledgementPacket(ctx, channelVersion, msg.Packet, msg.Acknowledgement, relayer) if err != nil { ctx.Logger().Error("acknowledgement failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "acknowledge packet callback failed")) return nil, errorsmod.Wrap(err, "acknowledge packet callback failed") diff --git a/modules/light-clients/08-wasm/CHANGELOG.md b/modules/light-clients/08-wasm/CHANGELOG.md index 5a9da678180..fcc8961a0ed 100644 --- a/modules/light-clients/08-wasm/CHANGELOG.md +++ b/modules/light-clients/08-wasm/CHANGELOG.md @@ -38,17 +38,31 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [\#6807](https://github.com/cosmos/ibc-go/pull/6807) Update wasmvm to v2.1.0. * [\#6848](https://github.com/cosmos/ibc-go/pull/6848) Bump CometBFT to v0.38.10. ### API Breaking -* [\#6644](https://github.com/cosmos/ibc-go/pull/6644) api!: add `v2.MerklePath` for contract api `VerifyMembershipMsg` and `VerifyNonMembershipMsg` structs. Note, this requires a migration for existing client contracts to correctly handle deserialization of `MerklePath.KeyPath` which has changed from `repeated string` to `repeated bytes`. In JSON message structures this change is reflected as the `KeyPath` being a marshalled as a list of base64 encoded byte strings. - ### State Machine Breaking ### Improvements +### Features + +### Bug Fixes + + +## [v0.3.0+ibc-go-v8.3-wasmvm-v2.0](https://github.com/cosmos/ibc-go/releases/tag/modules%2Flight-clients%2F08-wasm%2Fv0.3.0%2Bibc-go-v8.3-wasmvm-v2.0) - 2024-07-17 + +### Dependencies + +* [\#6807](https://github.com/cosmos/ibc-go/pull/6807) Update wasmvm to v2.1.0. + +### API Breaking + +* [\#6644](https://github.com/cosmos/ibc-go/pull/6644) Add `v2.MerklePath` for contract api `VerifyMembershipMsg` and `VerifyNonMembershipMsg` structs. Note, this requires a migration for existing client contracts to correctly handle deserialization of `MerklePath.KeyPath` which has changed from `[]string` to `[][]bytes`. In JSON message structures this change is reflected as the `KeyPath` being a marshalled as a list of base64 encoded byte strings. This change supports proving values stored under keys which contain non-utf8 encoded symbols. See migration docs for more details. + +### Improvements + * [\#5923](https://github.com/cosmos/ibc-go/pull/5923) imp: add 08-wasm build opts for libwasmvm linking disabled ### Features @@ -59,6 +73,21 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#6815](https://github.com/cosmos/ibc-go/pull/6815) Decode to bytes the hex-encoded checksum argument of the `migrate-contract` CLI. + +## [v0.2.0+ibc-go-v7.3-wasmvm-v1.5](https://github.com/cosmos/ibc-go/releases/tag/modules%2Flight-clients%2F08-wasm%2Fv0.2.0%2Bibc-go-v7.3-wasmvm-v1.5) - 2024-07-17 + +### API Breaking + +* [\#6644](https://github.com/cosmos/ibc-go/pull/6644) Add `v2.MerklePath` for contract api `VerifyMembershipMsg` and `VerifyNonMembershipMsg` structs. Note, this requires a migration for existing client contracts to correctly handle deserialization of `MerklePath.KeyPath` which has changed from `[]string` to `[][]byte`. In JSON message structures this change is reflected as the `KeyPath` being a marshalled as a list of base64 encoded byte strings. This change supports proving values stored under keys which contain non-utf8 encoded symbols. See migration docs for more details. + +### Features + +* [#\6231](https://github.com/cosmos/ibc-go/pull/6231) feat: add CLI to broadcast transaction with `MsgMigrateContract`. + +### Bug Fixes + +* [\#6815](https://github.com/cosmos/ibc-go/pull/6815) Decode to bytes the hex-encoded checksum argument of the `migrate-contract` CLI. + ## [v0.2.0+ibc-go-v8.3-wasmvm-v2.0](https://github.com/cosmos/ibc-go/releases/tag/modules%2Flight-clients%2F08-wasm%2Fv0.2.0%2Bibc-go-v8.3-wasmvm-v2.0) - 2024-05-23 @@ -73,6 +102,17 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#5821](https://github.com/cosmos/ibc-go/pull/5821) feat: add `VerifyMembershipProof` RPC query (querier approach for conditional clients). * [\#6231](https://github.com/cosmos/ibc-go/pull/6231) feat: add CLI to broadcast transaction with `MsgMigrateContract`. + +## [v0.1.1+ibc-go-v7.3-wasmvm-v1.5](https://github.com/cosmos/ibc-go/releases/tag/modules%2Flight-clients%2F08-wasm%2Fv0.1.1%2Bibc-go-v7.3-wasmvm-v1.5) - 2024-04-12 + +### Dependencies + +* [\#6149](https://github.com/cosmos/ibc-go/pull/6149) Bump wasmvm to v1.5.2. + +### Bug Fixes + +* (cli) [\#5610](https://github.com/cosmos/ibc-go/pull/5610) Register wasm tx cli. + ## [v0.1.0+ibc-go-v8.0-wasmvm-v1.5](https://github.com/cosmos/ibc-go/releases/tag/modules%2Flight-clients%2F08-wasm%2Fv0.1.0%2Bibc-go-v7.3-wasmvm-v1.5) - 2023-12-18 diff --git a/modules/light-clients/08-wasm/testing/simapp/app.go b/modules/light-clients/08-wasm/testing/simapp/app.go index db2b6c69927..801b35a9ecc 100644 --- a/modules/light-clients/08-wasm/testing/simapp/app.go +++ b/modules/light-clients/08-wasm/testing/simapp/app.go @@ -593,17 +593,17 @@ func NewSimApp( // Seal the IBC Router app.IBCKeeper.SetRouter(ibcRouter) - clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() + clientKeeper := app.IBCKeeper.ClientKeeper storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(solomachine.ModuleName, &smLightClientModule) + clientKeeper.AddRoute(solomachine.ModuleName, &smLightClientModule) wasmLightClientModule := wasm.NewLightClientModule(app.WasmClientKeeper, storeProvider) - clientRouter.AddRoute(wasmtypes.ModuleName, &wasmLightClientModule) + clientKeeper.AddRoute(wasmtypes.ModuleName, &wasmLightClientModule) // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index cc245a4f98f..d2ff2a2801c 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -44,14 +44,17 @@ message ClientConsensusStates { // breaking changes In these cases, the RevisionNumber is incremented so that // height continues to be monitonically increasing even as the RevisionHeight // gets reset +// +// Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag. +// This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height. message Height { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; // the revision that the client is currently on - uint64 revision_number = 1; + uint64 revision_number = 1 [(gogoproto.jsontag) = "revision_number"]; // the height within the given revision - uint64 revision_height = 2; + uint64 revision_height = 2 [(gogoproto.jsontag) = "revision_height"]; } // Params defines the set of IBC light client parameters. diff --git a/simapp/app.go b/simapp/app.go index 821177ed9cf..89cf28c63b8 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -551,14 +551,14 @@ func NewSimApp( // Seal the IBC Router app.IBCKeeper.SetRouter(ibcRouter) - clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() - storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() + clientKeeper := app.IBCKeeper.ClientKeeper + storeProvider := clientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(solomachine.ModuleName, &smLightClientModule) + clientKeeper.AddRoute(solomachine.ModuleName, &smLightClientModule) // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( diff --git a/testing/mock/ibc_app.go b/testing/mock/ibc_app.go index b99ebc84b94..798bd35749a 100644 --- a/testing/mock/ibc_app.go +++ b/testing/mock/ibc_app.go @@ -69,12 +69,14 @@ type IBCApp struct { // and the acknowledgement is written (in synchronous cases). OnRecvPacket func( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement OnAcknowledgementPacket func( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, @@ -82,6 +84,7 @@ type IBCApp struct { OnTimeoutPacket func( ctx sdk.Context, + channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress, ) error diff --git a/testing/mock/ibc_module.go b/testing/mock/ibc_module.go index db7917d3c9b..c698c05d1bd 100644 --- a/testing/mock/ibc_module.go +++ b/testing/mock/ibc_module.go @@ -123,9 +123,9 @@ func (im IBCModule) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string } // OnRecvPacket implements the IBCModule interface. -func (im IBCModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement { +func (im IBCModule) OnRecvPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement { if im.IBCApp.OnRecvPacket != nil { - return im.IBCApp.OnRecvPacket(ctx, packet, relayer) + return im.IBCApp.OnRecvPacket(ctx, channelVersion, packet, relayer) } // set state by claiming capability to check if revert happens return @@ -148,9 +148,9 @@ func (im IBCModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, re } // OnAcknowledgementPacket implements the IBCModule interface. -func (im IBCModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress) error { +func (im IBCModule) OnAcknowledgementPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress) error { if im.IBCApp.OnAcknowledgementPacket != nil { - return im.IBCApp.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + return im.IBCApp.OnAcknowledgementPacket(ctx, channelVersion, packet, acknowledgement, relayer) } capName := GetMockAckCanaryCapabilityName(packet) @@ -166,9 +166,9 @@ func (im IBCModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes } // OnTimeoutPacket implements the IBCModule interface. -func (im IBCModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error { +func (im IBCModule) OnTimeoutPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) error { if im.IBCApp.OnTimeoutPacket != nil { - return im.IBCApp.OnTimeoutPacket(ctx, packet, relayer) + return im.IBCApp.OnTimeoutPacket(ctx, channelVersion, packet, relayer) } capName := GetMockTimeoutCanaryCapabilityName(packet) diff --git a/testing/mock/middleware.go b/testing/mock/middleware.go index 7a5b572cd0d..6d6a33a1a1f 100644 --- a/testing/mock/middleware.go +++ b/testing/mock/middleware.go @@ -114,9 +114,9 @@ func (im BlockUpgradeMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, cha } // OnRecvPacket implements the IBCModule interface. -func (im BlockUpgradeMiddleware) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement { +func (im BlockUpgradeMiddleware) OnRecvPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement { if im.IBCApp.OnRecvPacket != nil { - return im.IBCApp.OnRecvPacket(ctx, packet, relayer) + return im.IBCApp.OnRecvPacket(ctx, channelVersion, packet, relayer) } // set state by claiming capability to check if revert happens return @@ -137,9 +137,9 @@ func (im BlockUpgradeMiddleware) OnRecvPacket(ctx sdk.Context, packet channeltyp } // OnAcknowledgementPacket implements the IBCModule interface. -func (im BlockUpgradeMiddleware) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress) error { +func (im BlockUpgradeMiddleware) OnAcknowledgementPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress) error { if im.IBCApp.OnAcknowledgementPacket != nil { - return im.IBCApp.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + return im.IBCApp.OnAcknowledgementPacket(ctx, channelVersion, packet, acknowledgement, relayer) } capName := GetMockAckCanaryCapabilityName(packet) @@ -153,9 +153,9 @@ func (im BlockUpgradeMiddleware) OnAcknowledgementPacket(ctx sdk.Context, packet } // OnTimeoutPacket implements the IBCModule interface. -func (im BlockUpgradeMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error { +func (im BlockUpgradeMiddleware) OnTimeoutPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) error { if im.IBCApp.OnTimeoutPacket != nil { - return im.IBCApp.OnTimeoutPacket(ctx, packet, relayer) + return im.IBCApp.OnTimeoutPacket(ctx, channelVersion, packet, relayer) } capName := GetMockTimeoutCanaryCapabilityName(packet) diff --git a/testing/simapp/app.go b/testing/simapp/app.go index f018d3e70f6..dca117000b3 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -514,14 +514,14 @@ func NewSimApp( // Seal the IBC Router app.IBCKeeper.SetRouter(ibcRouter) - clientRouter := app.IBCKeeper.ClientKeeper.GetRouter() + clientKeeper := app.IBCKeeper.ClientKeeper storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider() tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(ibctm.ModuleName, &tmLightClientModule) + clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider) - clientRouter.AddRoute(solomachine.ModuleName, &smLightClientModule) + clientKeeper.AddRoute(solomachine.ModuleName, &smLightClientModule) // **** Module Options ****