diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bfbcfb6335f..18484388b1f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -43,7 +43,7 @@ write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. -- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/10-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). +- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`). - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). diff --git a/.github/compatibility-test-matrices/main/client-chain-a.json b/.github/compatibility-test-matrices/main/client-chain-a.json index 23b1b5325d5..1a446fd2a2d 100644 --- a/.github/compatibility-test-matrices/main/client-chain-a.json +++ b/.github/compatibility-test-matrices/main/client-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["main"], - "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "entrypoint": ["TestClientTestSuite"], "test": [ "TestClientUpdateProposal_Succeeds" diff --git a/.github/compatibility-test-matrices/main/client-chain-b.json b/.github/compatibility-test-matrices/main/client-chain-b.json index f97107801af..f7903a19947 100644 --- a/.github/compatibility-test-matrices/main/client-chain-b.json +++ b/.github/compatibility-test-matrices/main/client-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "chain-b": ["main"], "entrypoint": ["TestClientTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/main/connection-chain-a.json b/.github/compatibility-test-matrices/main/connection-chain-a.json index c41bca7f985..b5999f05fc5 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-a.json +++ b/.github/compatibility-test-matrices/main/connection-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["main"], - "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "entrypoint": ["TestConnectionTestSuite"], "test": [ "TestMaxExpectedTimePerBlockParam" diff --git a/.github/compatibility-test-matrices/main/connection-chain-b.json b/.github/compatibility-test-matrices/main/connection-chain-b.json index 030e84d84fe..4481da803ae 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-b.json +++ b/.github/compatibility-test-matrices/main/connection-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "chain-b": ["main"], "entrypoint": ["TestConnectionTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/main/transfer-chain-a.json b/.github/compatibility-test-matrices/main/transfer-chain-a.json index 425b14fdfc1..f8fe0ae83a1 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["main"], - "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/main/transfer-chain-b.json b/.github/compatibility-test-matrices/main/transfer-chain-b.json index 916d1e58744..7d105a140be 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["main", "v5.1.0", "v5.0.1", "v4.2.0", "v4.1.1"], "chain-b": ["main"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-a.json deleted file mode 100644 index 407e9ebd616..00000000000 --- a/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-a.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "chain-a": ["release-v3.4.x"], - "chain-b": ["release-v3.4.x", "v6.1.0", "v5.2.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], - "entrypoint": ["TestTransferTestSuite"], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": ["rly"], - "chain-binary": ["simd"], - "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] -} diff --git a/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-b.json deleted file mode 100644 index ae95e67834a..00000000000 --- a/.github/compatibility-test-matrices/release-v3.4.x/transfer-chain-b.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "chain-a": ["release-v3.4.x", "v6.1.0", "v5.2.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], - "chain-b": ["release-v3.4.x"], - "entrypoint": ["TestTransferTestSuite"], - "test": [ - "TestMsgTransfer_Succeeds_Nonincentivized", - "TestMsgTransfer_Fails_InvalidAddress", - "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" - ], - "relayer-type": ["rly"], - "chain-binary": ["simd"], - "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] -} diff --git a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json index 191ca1e3d01..a934e02f6fe 100644 --- a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v4.2.x"], - "chain-b": ["release-v4.2.x", "v6.1.0", "v5.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v4.2.x", "v6.1.0", "v5.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json index b7024615f69..e6fae7619b4 100644 --- a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v4.2.x", "v6.1.0", "v5.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v4.2.x", "v6.1.0", "v5.2.0", "v4.1.1"], "chain-b": ["release-v4.2.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json index d4711252f4e..1afd7419551 100644 --- a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v4.3.x"], - "chain-b": ["release-v4.3.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v4.3.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json index ad11eec6e39..35b2ecf9d42 100644 --- a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v4.3.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v4.3.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v4.3.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-a.json index 7f18e5f202d..1108cf97cbd 100644 --- a/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v5.2.x"], - "chain-b": ["release-v5.2.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v5.2.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-b.json index b4f20372860..c058ae21948 100644 --- a/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v5.2.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v5.2.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v5.2.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v5.2.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v6.1.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/client-chain-a.json index aa86869814c..0d3148cb223 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/client-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/client-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v6.1.x"], - "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestClientTestSuite"], "test": [ "TestClientUpdateProposal_Succeeds", diff --git a/.github/compatibility-test-matrices/release-v6.1.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/client-chain-b.json index d7dd9c32f0c..f2a5ba229c2 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/client-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/client-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v6.1.x"], "entrypoint": ["TestClientTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-a.json index a740b2701d0..077238d28a0 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v6.1.x"], - "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestConnectionTestSuite"], "test": [ "TestMaxExpectedTimePerBlockParam" diff --git a/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-b.json index eae5513e627..cbd2aaab6e9 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/connection-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v6.1.x"], "entrypoint": ["TestConnectionTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-a.json index 14d9ee98579..dffc3f21cb7 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v6.1.x"], - "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-b.json index 468049cc707..85d479e1c35 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v6.1.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v6.1.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json index 9cd17bbbf12..187f3c58c80 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestClientTestSuite"], "test": [ "TestClientUpdateProposal_Succeeds", diff --git a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json index 452dca0061c..7b1c6b855db 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestClientTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json index 0cc16812e03..627ddf6fe1b 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestConnectionTestSuite"], "test": [ "TestMaxExpectedTimePerBlockParam" diff --git a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json index c6aa5e28dbb..4b4642311e1 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestConnectionTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json index f6a63997f3d..6eb0f0467be 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsTestSuite"], "test": [ "TestMsgSendTx_SuccessfulTransfer", diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json index 452fbebe98b..b8a26f53fed 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestInterchainAccountsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json index c339471ea3d..5962864aa18 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestInterchainAccountsGovTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json index c8489613a48..ae25f8f7eba 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsGovTestSuite"], "test": [ "TestInterchainAccountsGovIntegration" diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json index 888f7e22e07..bd209c5fe15 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsGroupsTestSuite"], "test": [ "TestInterchainAccountsGroupsIntegration" diff --git a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json index ff75181eb46..2012cacc120 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestInterchainAccountsGroupsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json index bc937f1d6a5..767f8af98cc 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestIncentivizedInterchainAccountsTestSuite"], "test": [ "TestMsgSendTx_SuccessfulBankSend_Incentivized", diff --git a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json index 000e6fcf2be..43b5c25a9f3 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestIncentivizedInterchainAccountsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json index 54841e7e08c..964241f7c78 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestIncentivizedTransferTestSuite"], "test": [ "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", diff --git a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json index f62e5040c05..8ca0ebf533f 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestIncentivizedTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json index 23ac0a9ed1b..a689e709292 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json @@ -1,11 +1,12 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x"], + "chain-b": ["release-v7.0.x", "v7.0.0"], "entrypoint": ["TestAuthzTransferTestSuite"], "test": [ "TestAuthz_MsgTransfer_Succeeds", "TestAuthz_InvalidTransferAuthorizations" ], + "relayer-type": ["rly"], "chain-binary": ["simd"], "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] } diff --git a/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-b.json new file mode 100644 index 00000000000..13c9f1c9a64 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-b.json @@ -0,0 +1,12 @@ +{ + "chain-a": ["release-v7.0.x", "v7.0.0"], + "chain-b": ["release-v7.0.x"], + "entrypoint": ["TestAuthzTransferTestSuite"], + "test": [ + "TestAuthz_MsgTransfer_Succeeds", + "TestAuthz_InvalidTransferAuthorizations" + ], + "relayer-type": ["rly"], + "chain-binary": ["simd"], + "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] +} diff --git a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json index afc45db5d08..9900028af83 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.0.x"], - "chain-b": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json index d3cf643c553..95168b8db3c 100644 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.0.x", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.0.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.0.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json index d149b4a035a..ab830bd3076 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestClientTestSuite"], "test": [ "TestClientUpdateProposal_Succeeds", diff --git a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json index 9e093343acf..a161eb48df0 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestClientTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json index b37a70bc4bd..3e101bf4979 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestConnectionTestSuite"], "test": [ "TestMaxExpectedTimePerBlockParam" diff --git a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json index a8869f1ed8c..8da137bde10 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestConnectionTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json index 36379c9d38d..a3d30079a9e 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsTestSuite"], "test": [ "TestMsgSendTx_SuccessfulTransfer", diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json index 0dc7aed2695..944952d3140 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestInterchainAccountsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json index 77a29a799d4..be313dcb0e4 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestInterchainAccountsGovTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json index 00d59180c4d..5926babf87e 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsGovTestSuite"], "test": [ "TestInterchainAccountsGovIntegration" diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json index 35012389202..ca93ca756dd 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestInterchainAccountsGroupsTestSuite"], "test": [ "TestInterchainAccountsGroupsIntegration" diff --git a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json index 412f0e21d1c..71a6dc8168a 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestInterchainAccountsGroupsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json index b84d56409e5..861939f800b 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "entrypoint": ["TestIncentivizedInterchainAccountsTestSuite"], "test": [ "TestMsgSendTx_SuccessfulBankSend_Incentivized", diff --git a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json index b5074245c8b..f6f7149ce4e 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestIncentivizedInterchainAccountsTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json index d8f9a15f240..02ae0d96087 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestIncentivizedTransferTestSuite"], "test": [ "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", diff --git a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json index 3c303671554..3aacc37432a 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestIncentivizedTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-1.json b/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-a.json similarity index 100% rename from .github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-1.json rename to .github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-a.json diff --git a/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json index f4a08d01392..e986f41f14c 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json @@ -1,11 +1,12 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1"], + "chain-b": ["release-v7.1.x", "v7.0.0"], "entrypoint": ["TestAuthzTransferTestSuite"], "test": [ "TestAuthz_MsgTransfer_Succeeds", "TestAuthz_InvalidTransferAuthorizations" ], + "relayer-type": ["rly"], "chain-binary": ["simd"], "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] } diff --git a/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-b.json new file mode 100644 index 00000000000..5add6e403ac --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-b.json @@ -0,0 +1,12 @@ +{ + "chain-a": ["release-v7.1.x", "v7.0.0"], + "chain-b": ["release-v7.1.x"], + "entrypoint": ["TestAuthzTransferTestSuite"], + "test": [ + "TestAuthz_MsgTransfer_Succeeds", + "TestAuthz_InvalidTransferAuthorizations" + ], + "relayer-type": ["rly"], + "chain-binary": ["simd"], + "chain-image": ["ghcr.io/cosmos/ibc-go-simd"] +} diff --git a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json index 069150e1c8c..87469c1c25b 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json @@ -1,6 +1,6 @@ { "chain-a": ["release-v7.1.x"], - "chain-b": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-b": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json index d2c524b69d3..7406f39d1f0 100644 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json @@ -1,5 +1,5 @@ { - "chain-a": ["release-v7.1.x", "v7.0.0-rc1", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1", "v3.4.0", "v3.3.1"], + "chain-a": ["release-v7.1.x", "v7.0.0", "v6.1.0", "v5.2.0", "v4.3.0", "v4.2.0", "v4.1.1"], "chain-b": ["release-v7.1.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ diff --git a/.github/compatibility-test-matrices/unreleased/client.json b/.github/compatibility-test-matrices/unreleased/client.json index 48d0bab8140..ff6d4cbe334 100644 --- a/.github/compatibility-test-matrices/unreleased/client.json +++ b/.github/compatibility-test-matrices/unreleased/client.json @@ -1,6 +1,6 @@ { - "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x", "release-v3.4.x"], - "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x", "release-v3.4.x"], + "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x"], + "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x"], "entrypoint": ["TestClientTestSuite"], "test": [ "TestClientUpdateProposal_Succeeds" diff --git a/.github/compatibility-test-matrices/unreleased/connection.json b/.github/compatibility-test-matrices/unreleased/connection.json index f386a945054..dc3c3d45c63 100644 --- a/.github/compatibility-test-matrices/unreleased/connection.json +++ b/.github/compatibility-test-matrices/unreleased/connection.json @@ -1,6 +1,6 @@ { - "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x", "release-v3.4.x"], - "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x", "release-v3.4.x"], + "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x"], + "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.3.x", "release-v4.2.x"], "entrypoint": ["TestConnectionTestSuite"], "test": [ "TestMaxExpectedTimePerBlockParam" diff --git a/.github/compatibility-test-matrices/unreleased/transfer.json b/.github/compatibility-test-matrices/unreleased/transfer.json index dc93ca6f85b..c11a04c0e1e 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer.json +++ b/.github/compatibility-test-matrices/unreleased/transfer.json @@ -1,6 +1,6 @@ { - "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.2.x", "release-v3.4.x"], - "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.2.x", "release-v3.4.x"], + "chain-a": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.2.x"], + "chain-b": ["release-v7.0.x", "release-v6.1.x", "release-v5.2.x", "release-v4.2.x"], "entrypoint": ["TestTransferTestSuite"], "test": [ "TestMsgTransfer_Succeeds_Nonincentivized", diff --git a/.github/mergify.yml b/.github/mergify.yml index 2c619590029..3e09cad7eaa 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -18,22 +18,6 @@ pull_request_rules: commit_message_template: | {{ title }} (#{{ number }}) {{ body }} - - name: backport patches to v3.3.x branch - conditions: - - base=main - - label=backport-to-v3.3.x - actions: - backport: - branches: - - release/v3.3.x - - name: backport patches to v3.4.x branch - conditions: - - base=main - - label=backport-to-v3.4.x - actions: - backport: - branches: - - release/v3.4.x - name: backport patches to v4.1.x branch conditions: - base=main diff --git a/.github/workflows/e2e-compatibility-workflow-call.yaml b/.github/workflows/e2e-compatibility-workflow-call.yaml index e77026d2f33..3204dbb899c 100644 --- a/.github/workflows/e2e-compatibility-workflow-call.yaml +++ b/.github/workflows/e2e-compatibility-workflow-call.yaml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@v3 with: repository: cosmos/ibc-go - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - name: Run e2e Test diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index 5151bd71a68..bdffa51b671 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -7,7 +7,6 @@ on: required: true type: choice options: - - release/v3.4.x - release/v4.2.x - release/v4.3.x - release/v5.2.x @@ -45,7 +44,6 @@ jobs: strategy: matrix: release-branch: - - release/v3.4.x - release/v4.2.x - release/v4.3.x - release/v5.2.x @@ -105,6 +103,15 @@ jobs: test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}" test-suite: "transfer-authz-chain-a" + transfer-authz-chain-b: + needs: + - build-release-images + - determine-test-directory + uses: ./.github/workflows/e2e-compatibility-workflow-call.yaml + with: + test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}" + test-suite: "transfer-authz-chain-b" + connection-chain-a: needs: - build-release-images diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index faa18d3aca5..74be0232202 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -18,7 +18,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - id: set-matrix @@ -29,6 +29,7 @@ jobs: e2e: env: CHAIN_A_TAG: latest + CHAIN_B_TAG: latest CHAIN_IMAGE: ibc-go-simd if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} needs: @@ -42,7 +43,7 @@ jobs: - name: Docker Build run: docker build . -t "${CHAIN_IMAGE}:${CHAIN_A_TAG}" --build-arg IBC_GO_VERSION=latest - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: 1.19 - name: Run e2e Test diff --git a/.github/workflows/e2e-manual-icad.yaml b/.github/workflows/e2e-manual-icad.yaml index 4e01772ef75..1e48f8d384f 100644 --- a/.github/workflows/e2e-manual-icad.yaml +++ b/.github/workflows/e2e-manual-icad.yaml @@ -25,10 +25,10 @@ on: default: master options: - master + - v0.5.1 - v0.4.3 - v0.3.6 - v0.2.6 - - v0.1.7 chain-b-tag: default: master description: 'The tag to use for chain B' @@ -36,10 +36,10 @@ on: type: choice options: - master + - v0.5.1 - v0.4.3 - v0.3.6 - v0.2.6 - - v0.1.7 relayer-type: default: rly description: 'The relayer to use' diff --git a/.github/workflows/e2e-manual-simd.yaml b/.github/workflows/e2e-manual-simd.yaml index 3aea4fe4f6f..109e61247ff 100644 --- a/.github/workflows/e2e-manual-simd.yaml +++ b/.github/workflows/e2e-manual-simd.yaml @@ -35,31 +35,29 @@ on: default: main options: - main + - v7.0.0 - v6.1.0 - v5.2.0 - v4.3.0 - v4.2.0 - v4.1.1 - - v3.4.0 - - v3.3.1 chain-a-tag-override: description: 'Specify an arbitrary tag for chain A' required: false type: string chain-b-tag: - default: v6.0.0 + default: v7.0.0 description: 'The tag to use for chain B' required: true type: choice options: - main + - v7.0.0 - v6.1.0 - v5.2.0 - v4.3.0 - v4.2.0 - v4.1.1 - - v3.4.0 - - v3.3.1 chain-b-tag-override: description: 'Specify an arbitrary tag for chain B' required: false diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index 756a69b0ead..a8eec8b690e 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -130,7 +130,7 @@ jobs: - uses: actions/checkout@v3 with: repository: cosmos/ibc-go - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - id: set-matrix @@ -161,7 +161,7 @@ jobs: - uses: actions/checkout@v3 with: repository: cosmos/ibc-go - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - name: Run e2e Test diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 644d70d04e1..3bf5444c490 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -39,7 +39,7 @@ jobs: chain-binary: simd chain-a-tag: v6.1.0 chain-b-tag: v6.1.0 - chain-upgrade-tag: v7.0.0-rc1 + chain-upgrade-tag: v7.0.0 upgrade-plan-name: "v7" test-entry-point: "TestUpgradeTestSuite" test: "TestV6ToV7ChainUpgrade" diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 585d4eca11d..a4d497e1992 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -2,6 +2,11 @@ name: Tests / E2E on: workflow_dispatch: pull_request: + types: + # trigger workflow if changes are pushed to the branch. + - synchronize + # trigger workflow if PR is marked ready for review. + - ready_for_review paths-ignore: - "docs/**" - "**.md" @@ -16,13 +21,13 @@ on: jobs: determine-image-tag: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest outputs: simd-tag: ${{ steps.get-tag.outputs.simd-tag }} steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.18 - id: get-tag @@ -37,11 +42,11 @@ jobs: fi build-e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - name: Build e2e @@ -54,7 +59,9 @@ jobs: done e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + # we will be running this job if the PR has not yet been marked for review, and we push additional changes. + # we skip the job in this case. + if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag - build-e2e # don't attempt any tests unless the e2e code compiles successfully. diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index 30d745b89e5..ce49a707781 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -15,12 +15,12 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3.4.0 with: - version: latest + version: v1.52.0 args: --timeout 5m diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f775032c128..ccd16658ab2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: '1.19' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16f7fb5a421..bc0f3e20652 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: install-tparse: runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - name: Display go version @@ -39,7 +39,7 @@ jobs: go-arch: ["amd64", "arm", "arm64"] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - uses: technote-space/get-diff-action@v6.1.2 @@ -95,7 +95,7 @@ jobs: part: ["00", "01", "02", "03"] steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: 1.19 - uses: technote-space/get-diff-action@v6.1.2 diff --git a/.golangci.yml b/.golangci.yml index 76204d5471c..123234d42f2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,6 +29,9 @@ linters: issues: exclude-rules: + - text: "unused-parameter" + linters: + - revive - text: "SA1019:" linters: - staticcheck diff --git a/CHANGELOG.md b/CHANGELOG.md index 60372e74200..28354f0c7c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,8 +38,24 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [#2672](https://github.com/cosmos/ibc-go/issues/2672) Update to cosmos-sdk v0.47. -* [#3175](https://github.com/cosmos/ibc-go/issues/3175) Migrate to cometbft v0.37. +### API Breaking + +### State Machine Breaking + +### Improvements + +* (tests) [\#3138](https://github.com/cosmos/ibc-go/pull/3138) Support benchmarks and fuzz tests through `testing.TB`. + +### Features + +### Bug Fixes + +## [v7.0.0](https://github.com/cosmos/ibc-go/releases/tag/v6.1.0) - 2023-03-17 + +### Dependencies + +* [\#2672](https://github.com/cosmos/ibc-go/issues/2672) Update to cosmos-sdk v0.47. +* [\#3175](https://github.com/cosmos/ibc-go/issues/3175) Migrate to cometbft v0.37. ### API Breaking @@ -61,20 +77,19 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (apps/27-interchain-accounts) [\#2638](https://github.com/cosmos/ibc-go/pull/2638) Interchain accounts host and controller Keepers now expects a keeper which fulfills the expected `exported.ScopedKeeper` interface for the capability keeper. * (06-solomachine) [\#2761](https://github.com/cosmos/ibc-go/pull/2761) Removed deprecated `ClientId` field from `Misbehaviour` and `allow_update_after_proposal` field from `ClientState`. * (apps) [\#3154](https://github.com/cosmos/ibc-go/pull/3154) Remove unused `ProposalContents` function. -* (apps) [#3149](https://github.com/cosmos/ibc-go/pull/3149) Remove legacy interface function `RandomizedParams`, which is no longer used. -* (light-clients/06-solomachine) [#2941](https://github.com/cosmos/ibc-go/pull/2941) Remove solomachine header sequence. -* (core) [#2982](https://github.com/cosmos/ibc-go/pull/2982) Moved the ibc module name into the exported package. +* (apps) [\#3149](https://github.com/cosmos/ibc-go/pull/3149) Remove legacy interface function `RandomizedParams`, which is no longer used. +* (light-clients/06-solomachine) [\#2941](https://github.com/cosmos/ibc-go/pull/2941) Remove solomachine header sequence. +* (core) [\#2982](https://github.com/cosmos/ibc-go/pull/2982) Moved the ibc module name into the exported package. ### State Machine Breaking * (06-solomachine) [\#2744](https://github.com/cosmos/ibc-go/pull/2744) `Misbehaviour.ValidateBasic()` now only enforces that signature data does not match when the signature paths are different. * (06-solomachine) [\#2748](https://github.com/cosmos/ibc-go/pull/2748) Adding sentinel value for header path in 06-solomachine. * (apps/29-fee) [\#2942](https://github.com/cosmos/ibc-go/pull/2942) Check `x/bank` send enabled before escrowing fees. -* (core/04-channel) [#3009](https://github.com/cosmos/ibc-go/pull/3009) Change check to disallow optimistic sends. +* (core/04-channel) [\#3009](https://github.com/cosmos/ibc-go/pull/3009) Change check to disallow optimistic sends. ### Improvements -* (tests) [\#3138](https://github.com/cosmos/ibc-go/pull/3138) Support benchmarks and fuzz tests through `testing.TB`. * (core) [\#3082](https://github.com/cosmos/ibc-go/pull/3082) Add `HasConnection` and `HasChannel` methods. * (tests) [\#2926](https://github.com/cosmos/ibc-go/pull/2926) Lint tests * (apps/transfer) [\#2643](https://github.com/cosmos/ibc-go/pull/2643) Add amount, denom, and memo to transfer event emission. @@ -84,55 +99,56 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules/core/02-client) [\#1188](https://github.com/cosmos/ibc-go/pull/1188/files) Routing `MsgSubmitMisbehaviour` to `UpdateClient` keeper function. Deprecating `SubmitMisbehaviour` endpoint. * (modules/core/02-client) [\#1208](https://github.com/cosmos/ibc-go/pull/1208) Replace `CheckHeaderAndUpdateState` usage in 02-client with calls to `VerifyClientMessage`, `CheckForMisbehaviour`, `UpdateStateOnMisbehaviour` and `UpdateState`. * (modules/light-clients/09-localhost) [\#1187](https://github.com/cosmos/ibc-go/pull/1187/) Removing localhost light client implementation as it is not functional. An upgrade handler is provided in `modules/migrations/v5` to prune `09-localhost` clients and consensus states from the store. -* [\#1186](https://github.com/cosmos/ibc-go/pull/1186/files) Removing `GetRoot` function from ConsensusState interface in `02-client`. `GetRoot` is unused by core IBC. +* (modules/core/02-client) [\#1186](https://github.com/cosmos/ibc-go/pull/1186) Removing `GetRoot` function from ConsensusState interface in `02-client`. `GetRoot` is unused by core IBC. * (modules/core/02-client) [\#1196](https://github.com/cosmos/ibc-go/pull/1196) Adding VerifyClientMessage to ClientState interface. * (modules/core/02-client) [\#1198](https://github.com/cosmos/ibc-go/pull/1198) Adding UpdateStateOnMisbehaviour to ClientState interface. * (modules/core/02-client) [\#1170](https://github.com/cosmos/ibc-go/pull/1170) Updating `ClientUpdateProposal` to set client state in lightclient implementations `CheckSubstituteAndUpdateState` methods. * (modules/core/02-client) [\#1197](https://github.com/cosmos/ibc-go/pull/1197) Adding `CheckForMisbehaviour` to `ClientState` interface. -* (modules/core/02-client) [\#1195](https://github.com/cosmos/ibc-go/pull/1210) Removing `CheckHeaderAndUpdateState` from `ClientState` interface & associated light client implementations. -* (modules/core/02-client) [\#1189](https://github.com/cosmos/ibc-go/pull/1212) Removing `CheckMisbehaviourAndUpdateState` from `ClientState` interface & associated light client implementations. +* (modules/core/02-client) [\#1210](https://github.com/cosmos/ibc-go/pull/1210) Removing `CheckHeaderAndUpdateState` from `ClientState` interface & associated light client implementations. +* (modules/core/02-client) [\#1212](https://github.com/cosmos/ibc-go/pull/1212) Removing `CheckMisbehaviourAndUpdateState` from `ClientState` interface & associated light client implementations. * (modules/core/exported) [\#1206](https://github.com/cosmos/ibc-go/pull/1206) Adding new method `UpdateState` to `ClientState` interface. * (modules/core/02-client) [\#1741](https://github.com/cosmos/ibc-go/pull/1741) Emitting a new `upgrade_chain` event upon setting upgrade consensus state. * (client) [\#724](https://github.com/cosmos/ibc-go/pull/724) `IsRevisionFormat` and `IsClientIDFormat` have been updated to disallow newlines before the dash used to separate the chainID and revision number, and the client type and client sequence. * (02-client/cli) [\#897](https://github.com/cosmos/ibc-go/pull/897) Remove `GetClientID()` from `Misbehaviour` interface. Submit client misbehaviour cli command requires an explicit client id now. -* (06-solomachine) [\#1972](https://github.com/cosmos/ibc-go/pull/1972) Solo machine implementation of `ZeroCustomFields` fn now panics as the fn is only used for upgrades which solo machine does not support. +* (06-solomachine) [\#1972](https://github.com/cosmos/ibc-go/pull/1972) Solo machine implementation of `ZeroCustomFields` fn now panics as the fn is only used for upgrades which solo machine does not support. * (light-clients/06-solomachine) Moving `verifyMisbehaviour` function from update.go to misbehaviour_handle.go. * [\#2434](https://github.com/cosmos/ibc-go/pull/2478) Removed all `TypeMsg` constants -* (modules/core/exported) [#1689](https://github.com/cosmos/ibc-go/pull/2539) Removing `GetVersions` from `ConnectionI` interface. -* (core/02-connection) [#2419](https://github.com/cosmos/ibc-go/pull/2419) Add optional proof data to proto definitions of `MsgConnectionOpenTry` and `MsgConnectionOpenAck` for host state machines that are unable to introspect their own consensus state. -* (light-clients/07-tendermint) [#3046](https://github.com/cosmos/ibc-go/pull/3046) Moved non-verification misbehaviour checks to `CheckForMisbehaviour`. -* (apps/29-fee) [#2975](https://github.com/cosmos/ibc-go/pull/2975) Adding distribute fee events to ics29. -* (light-clients/07-tendermint) [#2965](https://github.com/cosmos/ibc-go/pull/2965) Prune expired `07-tendermint` consensus states on duplicate header updates. -* (light-clients) [#2736](https://github.com/cosmos/ibc-go/pull/2736) Updating `VerifyMembership` and `VerifyNonMembership` methods to use `Path` interface. -* (light-clients) [#3113](https://github.com/cosmos/ibc-go/pull/3113) Align light client module names. +* (modules/core/exported) [\#2539] (https://github.com/cosmos/ibc-go/pull/2539) Removing `GetVersions` from `ConnectionI` interface. +* (core/02-connection) [\#2419](https://github.com/cosmos/ibc-go/pull/2419) Add optional proof data to proto definitions of `MsgConnectionOpenTry` and `MsgConnectionOpenAck` for host state machines that are unable to introspect their own consensus state. +* (light-clients/07-tendermint) [\#3046](https://github.com/cosmos/ibc-go/pull/3046) Moved non-verification misbehaviour checks to `CheckForMisbehaviour`. +* (apps/29-fee) [\#2975](https://github.com/cosmos/ibc-go/pull/2975) Adding distribute fee events to ics29. +* (light-clients/07-tendermint) [\#2965](https://github.com/cosmos/ibc-go/pull/2965) Prune expired `07-tendermint` consensus states on duplicate header updates. +* (light-clients) [\#2736](https://github.com/cosmos/ibc-go/pull/2736) Updating `VerifyMembership` and `VerifyNonMembership` methods to use `Path` interface. +* (light-clients) [\#3113](https://github.com/cosmos/ibc-go/pull/3113) Align light client module names. ### Features -* (apps/transfer) [#3079](https://github.com/cosmos/ibc-go/pull/3079) Added authz support for ics20. +* (apps/transfer) [\#3079](https://github.com/cosmos/ibc-go/pull/3079) Added authz support for ics20. * (core/02-client) [\#2824](https://github.com/cosmos/ibc-go/pull/2824) Add genesis migrations for v6 to v7. The migration migrates the solo machine client state definition, removes all solo machine consensus states and removes the localhost client. * (core/24-host) [\#2856](https://github.com/cosmos/ibc-go/pull/2856) Add `PrefixedClientStorePath` and `PrefixedClientStoreKey` functions to 24-host * (core/02-client) [\#2819](https://github.com/cosmos/ibc-go/pull/2819) Add automatic in-place store migrations to remove the localhost client and migrate existing solo machine definitions. -* (light-clients/06-solomachine) [\#2826](https://github.com/cosmos/ibc-go/pull/2826) Add `AppModuleBasic` for the 06-solomachine client and remove solo machine type registration from core IBC. Chains must register the `AppModuleBasic` of light clients. -* (light-clients/07-tendermint) [\#2825](https://github.com/cosmos/ibc-go/pull/2825) Add `AppModuleBasic` for the 07-tendermint client and remove tendermint type registration from core IBC. Chains must register the `AppModuleBasic` of light clients. +* (light-clients/06-solomachine) [\#2826](https://github.com/cosmos/ibc-go/pull/2826) Add `AppModuleBasic` for the 06-solomachine client and remove solo machine type registration from core IBC. Chains must register the `AppModuleBasic` of light clients. +* (light-clients/07-tendermint) [\#2825](https://github.com/cosmos/ibc-go/pull/2825) Add `AppModuleBasic` for the 07-tendermint client and remove tendermint type registration from core IBC. Chains must register the `AppModuleBasic` of light clients. * (light-clients/07-tendermint) [\#2800](https://github.com/cosmos/ibc-go/pull/2800) Add optional in-place store migration function to prune all expired tendermint consensus states. -* (core/24-host) [\#2820](https://github.com/cosmos/ibc-go/pull/2820) Add `MustParseClientStatePath` which parses the clientID from a client state key path. +* (core/24-host) [\#2820](https://github.com/cosmos/ibc-go/pull/2820) Add `MustParseClientStatePath` which parses the clientID from a client state key path. * (testing/simapp) [\#2842](https://github.com/cosmos/ibc-go/pull/2842) Adding the new upgrade handler for v6 -> v7 to simapp which prunes expired Tendermint consensus states. * (testing) [\#2829](https://github.com/cosmos/ibc-go/pull/2829) Add `AssertEvents` which asserts events against expected event map. ### Bug Fixes -* (light-clients/solomachine) [#1839](https://github.com/cosmos/ibc-go/pull/1839) Fixed usage of the new diversifier in validation of changing diversifiers for the solo machine. The current diversifier must sign over the new diversifier. +* (testing) [\#3295](https://github.com/cosmos/ibc-go/pull/3295) The function `SetupWithGenesisValSet` will set the baseapp chainID before running `InitChain` +* (light-clients/solomachine) [\#1839](https://github.com/cosmos/ibc-go/pull/1839) Fixed usage of the new diversifier in validation of changing diversifiers for the solo machine. The current diversifier must sign over the new diversifier. * (light-clients/07-tendermint) [\#1674](https://github.com/cosmos/ibc-go/pull/1674) Submitted ClientState is zeroed out before checking the proof in order to prevent the proposal from containing information governance is not actually voting on. * (modules/core/02-client)[\#1676](https://github.com/cosmos/ibc-go/pull/1676) ClientState must be zeroed out for `UpgradeProposals` to pass validation. This prevents a proposal containing information governance is not actually voting on. * (core/02-client) [\#2510](https://github.com/cosmos/ibc-go/pull/2510) Fix client ID validation regex to conform closer to spec. -* (apps/transfer) [#3045](https://github.com/cosmos/ibc-go/pull/3045) Allow value with slashes in URL template. -* (apps/27-interchain-accounts) [#2601](https://github.com/cosmos/ibc-go/pull/2601) Remove bech32 check from owner address on ICA controller msgs RegisterInterchainAccount and SendTx. -* (apps/transfer) [#2651](https://github.com/cosmos/ibc-go/pull/2651) Skip emission of unpopulated memo field in ics20. -* (apps/27-interchain-accounts) [#2682](https://github.com/cosmos/ibc-go/pull/2682) Avoid race conditions in ics27 handshakes. -* (light-clients/06-solomachine) [#2741](https://github.com/cosmos/ibc-go/pull/2741) Added check for empty path in 06-solomachine. -* (light-clients/07-tendermint) [#3022](https://github.com/cosmos/ibc-go/pull/3022) Correctly close iterator in `07-tendermint` store. -* (core/02-client) [#3010](https://github.com/cosmos/ibc-go/pull/3010) Update `Paginate` to use `FilterPaginate` in `ClientStates` and `ConnectionChannels` grpc queries. - +* (apps/transfer) [\#3045](https://github.com/cosmos/ibc-go/pull/3045) Allow value with slashes in URL template. +* (apps/27-interchain-accounts) [\#2601](https://github.com/cosmos/ibc-go/pull/2601) Remove bech32 check from owner address on ICA controller msgs RegisterInterchainAccount and SendTx. +* (apps/transfer) [\#2651](https://github.com/cosmos/ibc-go/pull/2651) Skip emission of unpopulated memo field in ics20. +* (apps/27-interchain-accounts) [\#2682](https://github.com/cosmos/ibc-go/pull/2682) Avoid race conditions in ics27 handshakes. +* (light-clients/06-solomachine) [\#2741](https://github.com/cosmos/ibc-go/pull/2741) Added check for empty path in 06-solomachine. +* (light-clients/07-tendermint) [\#3022](https://github.com/cosmos/ibc-go/pull/3022) Correctly close iterator in `07-tendermint` store. +* (core/02-client) [\#3010](https://github.com/cosmos/ibc-go/pull/3010) Update `Paginate` to use `FilterPaginate` in `ClientStates` and `ConnectionChannels` grpc queries. + ## [v6.1.0](https://github.com/cosmos/ibc-go/releases/tag/v6.1.0) - 2022-12-20 ### Dependencies @@ -171,7 +187,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (27-interchain-accounts) [\#2590](https://github.com/cosmos/ibc-go/pull/2590) Removing port prefix requirement from the ICA host channel handshake * (transfer) [\#2377](https://github.com/cosmos/ibc-go/pull/2377) Adding `sequence` to `MsgTransferResponse`. * (light-clients/07-tendermint) [\#2555](https://github.com/cosmos/ibc-go/pull/2555) Forbid negative values for `TrustingPeriod`, `UnbondingPeriod` and `MaxClockDrift` (as specified in ICS-07). -* (core/04-channel) [#2973](https://github.com/cosmos/ibc-go/pull/2973) Write channel state before invoking app callbacks in ack and confirm channel handshake steps. +* (core/04-channel) [\#2973](https://github.com/cosmos/ibc-go/pull/2973) Write channel state before invoking app callbacks in ack and confirm channel handshake steps. ### Improvements @@ -284,28 +300,28 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [#3049](https://github.com/cosmos/ibc-go/pull/3049) Bump Cosmos SDK to v0.45.12. -* [#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ics23 to v0.9.0. +* [\#3049](https://github.com/cosmos/ibc-go/pull/3049) Bump Cosmos SDK to v0.45.12. +* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ics23 to v0.9.0. ### State Machine Breaking -* (core/04-channel) [#2973](https://github.com/cosmos/ibc-go/pull/2973) Write channel state before invoking app callbacks in ack and confirm channel handshake steps. +* (core/04-channel) [\#2973](https://github.com/cosmos/ibc-go/pull/2973) Write channel state before invoking app callbacks in ack and confirm channel handshake steps. ### Improvements -* (apps/29-fee) [#2786](https://github.com/cosmos/ibc-go/pull/2786) Save gas on `IsFeeEnabled`. +* (apps/29-fee) [\#2786](https://github.com/cosmos/ibc-go/pull/2786) Save gas on `IsFeeEnabled`. ### Bug Fixes -* (apps/29-fee) [#2942](https://github.com/cosmos/ibc-go/pull/2942) Check `x/bank` send enabled before escrowing fees. +* (apps/29-fee) [\#2942](https://github.com/cosmos/ibc-go/pull/2942) Check `x/bank` send enabled before escrowing fees. ### Documentation -* [#2737](https://github.com/cosmos/ibc-go/pull/2737) Fix migration/docs for ICA controller middleware. +* [\#2737](https://github.com/cosmos/ibc-go/pull/2737) Fix migration/docs for ICA controller middleware. ### Miscellaneous Tasks -* [#2772](https://github.com/cosmos/ibc-go/pull/2772) Integrated git cliff into the code base to automate generation of changelogs. +* [\#2772](https://github.com/cosmos/ibc-go/pull/2772) Integrated git cliff into the code base to automate generation of changelogs. ## [v4.2.0](https://github.com/cosmos/ibc-go/releases/tag/v4.2.0) - 2022-11-07 diff --git a/README.md b/README.md index 1469fcd021d..d3f65b8d58f 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ For the latest information on the progress of the work or the decisions made tha ## Releases -The release lines currently supported are v3, v4, v5 and v6. +The release lines currently supported are v4, v5, v6 and v7. Please refer to the [Stable Release Policy section of RELEASES.md](https://github.com/cosmos/ibc-go/blob/main/RELEASES.md#stable-release-policy) for more details. diff --git a/RELEASES.md b/RELEASES.md index 68c40632c34..6be4caef671 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -67,13 +67,12 @@ Only the following major release series have a stable release status: |Release|End of Life Date| |-------|----------------| -|`v3.3.x`|March 15, 2023| -|`v3.4.x`|March 15, 2023| |`v4.1.x`|August 12, 2023| |`v4.2.x`|August 12, 2023| |`v4.3.x`|August 12, 2023| |`v5.2.x`|September 28, 2023| |`v6.1.x`|December 09, 2023| +|`v7.0.x`|March 17, 2024| All missing minor release versions have been discontinued. @@ -102,15 +101,14 @@ As rule of thumb, the following changes will **NOT** be automatically accepted i Versions of Golang, Cosmos SDK and Tendermint used by ibc-go in the currently active releases: -| Go | ibc-go | Cosmos SDK | Tendermint | -|----|--------|------------|------------| -| 1.18 | v3.3.1 | v0.45.10 | v0.34.22 | -| 1.18 | v3.4.0 | v0.45.10 | v0.34.22 | +| Go | ibc-go | Cosmos SDK | Tendermint/CometBFT | +|----|--------|------------|---------------------| | 1.18 | v4.1.1 | v0.45.10 | v0.34.22 | | 1.18 | v4.2.0 | v0.45.10 | v0.34.22 | | 1.18 | v4.3.0 | v0.45.12 | v0.34.24 | -| 1.18 | v5.2.0 | v0.46.7 | v0.34.24 | -| 1.18 | v6.1.0 | v0.46.7 | v0.34.24 | +| 1.18 | v5.2.0 | v0.46.7 | v0.34.24 | +| 1.18 | v6.1.0 | v0.46.7 | v0.34.24 | +| 1.19 | v7.0.0 | v0.47.0 | v0.37.0 | ## Graphics diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 90e172b6cf4..5dd9f2c1577 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -160,6 +160,10 @@ module.exports = { label: "v6.1.0", key: "v6.1.0", }, + { + label: "v7.0.0", + key: "v7.0.0", + }, ], topbar: { banner: true, diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 213cbc138b2..cbea1a892f6 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -31,6 +31,7 @@ To suggest an ADR, please make use of the [ADR template](./adr-template.md) prov | [002](./adr-002-go-module-versioning.md) | Go module versioning | Accepted | | [003](./adr-003-ics27-acknowledgement.md) | ICS27 acknowledgement format | Accepted | | [004](./adr-004-ics29-lock-fee-module.md) | ICS29 module locking upon escrow out of balance | Accepted | +| [008](./adr-008-app-caller-cbs/adr-008-app-caller-cbs.md) | Callback to IBC ACtors | Accepted | | [015](./adr-015-ibc-packet-receiver.md) | IBC Packet Routing | Accepted | | [025](./adr-025-ibc-passive-channels.md) | IBC passive channels | Deprecated | | [026](./adr-026-ibc-client-recovery-mechanisms.md) | IBC client recovery mechansisms | Accepted | diff --git a/docs/architecture/adr-003-ics27-acknowledgement.md b/docs/architecture/adr-003-ics27-acknowledgement.md index 5704af0d98c..4a192795ca5 100644 --- a/docs/architecture/adr-003-ics27-acknowledgement.md +++ b/docs/architecture/adr-003-ics27-acknowledgement.md @@ -92,14 +92,14 @@ Replicate the transaction response format as provided by the current SDK verison When the SDK version changes, adjust the transaction response format to use the updated transaction response format. Include the transaction response bytes in the result channel acknowledgement. -A test has been [written](https://github.com/cosmos/ibc-go/blob/v3.0.0-beta1/modules/apps/27-interchain-accounts/host/ibc_module_test.go#L716-#L774) to fail if the `MsgResponse` is no longer included in consensus. +A test has been [written](https://github.com/cosmos/ibc-go/blob/v3.0.0/modules/apps/27-interchain-accounts/host/ibc_module_test.go#L716-#L774) to fail if the `MsgResponse` is no longer included in consensus. ### Error acknowledgements As indicated above, the `abci.ResponseDeliverTx.Code` is determinstic. Upon transaction execution errors, an error acknowledgement should be returned including the abci code. -A test has been [written](https://github.com/cosmos/ibc-go/blob/v3.0.0-beta1/modules/apps/27-interchain-accounts/host/types/ack_test.go#L41-#L82) to fail if the ABCI code is no longer determinstic. +A test has been [written](https://github.com/cosmos/ibc-go/blob/v3.0.0/modules/apps/27-interchain-accounts/host/types/ack_test.go#L41-#L82) to fail if the ABCI code is no longer determinstic. ## Consequences diff --git a/docs/architecture/adr-008-app-caller-cbs/adr-008-app-caller-cbs.md b/docs/architecture/adr-008-app-caller-cbs/adr-008-app-caller-cbs.md new file mode 100644 index 00000000000..b67275ccf49 --- /dev/null +++ b/docs/architecture/adr-008-app-caller-cbs/adr-008-app-caller-cbs.md @@ -0,0 +1,421 @@ +# ADR 008: Callback to IBC Actors + +## Changelog + +* 2022-08-10: Initial Draft +* 2023-03-22: Merged + +## Status + +Accepted, packet callback interface implemented + +## Context + +IBC was designed with callbacks between core IBC and IBC applications. IBC apps would send a packet to core IBC. When the result of the packet lifecycle eventually resolved into either an acknowledgement or a timeout, core IBC called a callback on the IBC application so that the IBC application could take action on the basis of the result (e.g. unescrow tokens for ICS-20). + +This setup worked well for off-chain users interacting with IBC applications. + +We are now seeing the desire for secondary applications (e.g. smart contracts, modules) to call into IBC apps as part of their state machine logic and then do some actions on the basis of the packet result. Or to receive a packet from IBC and do some logic upon receipt. + +Example Usecases: +- Send an ICS-20 packet, and if it is successful, then send an ICA-packet to swap tokens on LP and return funds to sender +- Execute some logic upon receipt of token transfer to a smart contract address + +This requires a second layer of callbacks. The IBC application already gets the result of the packet from core IBC, but currently there is no standardized way to pass this information on to an actor module/smart contract. + +## Definitions + +- Actor: an actor is an on-chain module (this may be a hardcoded module in the chain binary or a smart contract) that wishes to execute custom logic whenever IBC receives a packet flow that it has either sent or received. It **must** be addressable by a string value. + +## Decision + +Create a standardized callback interface that actors can implement. IBC applications (or middleware that wraps IBC applications) can now call this callback to route the result of the packet/channel handshake from core IBC to the IBC application to the original actor on the sending chain. IBC applications can route the packet receipt to the destination actor on the receiving chain. + +IBC actors may implement the following interface: + +```go +type IBCActor interface { + // OnChannelOpen will be called on the IBCActor when the channel opens + // this will happen either on ChanOpenAck or ChanOpenConfirm + OnChannelOpen(ctx sdk.Context, portID, channelID, version string) + + // OnChannelClose will be called on the IBCActor if the channel closes + // this will be called on either ChanCloseInit or ChanCloseConfirm and if the channel handshake fails on our end + // NOTE: currently the channel does not automatically close if the counterparty fails the handhshake so actors must be prepared for an OpenInit to never return a callback for the time being + OnChannelClose(ctx sdk.Context, portID, channelID string) + + // IBCActor must also implement PacketActor interface + PacketActor +} + +// PacketActor is split out into its own separate interface since implementors may choose +// to only support callbacks for packet methods rather than supporting the full IBCActor interface +type PacketActor interface { + // OnRecvPacket will be called on the IBCActor after the IBC Application + // handles the RecvPacket callback if the packet has an IBC Actor as a receiver. + OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error + + // OnAcknowledgementPacket will be called on the IBC Actor + // after the IBC Application handles its own OnAcknowledgementPacket callback + OnAcknowledgmentPacket( + ctx sdk.Context, + packet channeltypes.Packet, + ack exported.Acknowledgement, + relayer sdk.AccAddress, + ) error + + // OnTimeoutPacket will be called on the IBC Actor + // after the IBC Application handles its own OnTimeoutPacket callback + OnTimeoutPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, + ) error +} +``` + +The `CallbackPacketData` interface will get created to add `GetSourceCallbackAddress` and `GetDestCallbackAddress` methods. These may return an address +or they may return the empty string. The address may reference an PacketActor or it may be a regular user address. If the address is not a PacketActor, the actor callback must continue processing (no-op). Any IBC application or middleware that uses these methods must handle these cases. In most cases, the `GetSourceCallbackAddress` will be the sender address and the `GetDestCallbackAddress` will be the receiver address. However, these are named generically so that implementors may choose a different contract address for the callback if they choose. + +The interface also defines a `UserDefinedGasLimit` method. Any middleware targeting this interface for callback handling should cap the gas that a callback is allowed to take (especially on AcknowledgePacket and TimeoutPacket) so that a custom callback does not prevent the packet lifecycle from completing. However, since this is a global cap it is likely to be very large. Thus, users may specify a smaller limit to cap the amount of fees a relayer must pay in order to complete the packet lifecycle on the user's behalf. + +IBC applications which provide the base packet data type must implement the `CallbackPacketData` interface to allow `PacketActor` callbacks. + +```go +// Implemented by any packet data type that wants to support PacketActor callbacks +// PacketActor's will be unable to act on any packet data type that does not implement +// this interface. +type CallbackPacketData interface { + // GetSourceCallbackAddress should return the callback address of a packet data on the source chain. + // This may or may not be the sender of the packet. If no source callback address exists for the packet, + // an empty string may be returned. + GetSourceCallbackAddress() string + + // GetDestCallbackAddress should return the callback address of a packet data on the destination chain. + // This may or may not be the receiver of the packet. If no dest callback address exists for the packet, + // an empty string may be returned. + GetDestCallbackAddress() string + + // UserDefinedGasLimit allows the sender of the packet to define inside the packet data + // a gas limit for how much the ADR-8 callbacks can consume. If defined, this will be passed + // in as the gas limit so that the callback is guaranteed to complete within a specific limit. + // On recvPacket, a gas-overflow will just fail the transaction allowing it to timeout on the sender side. + // On ackPacket and timeoutPacket, a gas-overflow will reject state changes made during callback but still + // commit the transaction. This ensures the packet lifecycle can always complete. + // If the packet data returns 0, the remaining gas limit will be passed in (modulo any chain-defined limit) + // Otherwise, we will set the gas limit passed into the callback to the `min(ctx.GasLimit, UserDefinedGasLimit())` + UserDefinedGasLimit() uint64 +} +``` + +IBC Apps or middleware can then call the IBCActor callbacks like so in their own callbacks: + +### Handshake Callbacks + +The `OnChanOpenInit` handshake callback will need to include an additional field so that the initiating actor can be tracked and called upon during handshake completion. +The actor provided in the `OnChanOpenInit` callback will be the signer of the `MsgChanOpenInit` message. + +```go +func OnChanOpenInit( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID string, + channelID string, + channelCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, + actor string, +) (string, error) { + acc := k.getAccount(ctx, actor) + ibcActor, ok := acc.(IBCActor) + if ok { + k.setActor(ctx, portID, channelID, actor) + } + + // continued logic +} + +func OnChanOpenAck( + ctx sdk.Context, + portID, + channelID string, + counterpartyChannelID string, + counterpartyVersion string, +) error { + // run any necessary logic first + // negotiate final version + + actor := k.getActor(ctx, portID, channelID) + if actor != "" { + ibcActor, _ := acc.(IBCActor) + ibcActor.OnChanOpen(ctx, portID, channelID, version) + } + + // the same actor will be used for channel closure +} + +func OnChanCloseInit( + ctx sdk.Context, + portID, + channelID, +) error { + // run any necesssary logic first + + actor := k.getActor(ctx, portID, channelID) + if actor != "" { + ibcActor, _ := acc.(IBCActor) + ibcActor.OnChanClose(ctx, portID, channelID) + } + // cleanup state + k.deleteActor(ctx, portID, channelID) +} + +func OnChanCloseConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + // run any necesssary logic first + + actor := k.getActor(ctx, portID, channelID) + if actor != "" { + ibcActor, _ := acc.(IBCActor) + ibcActor.OnChanClose(ctx, portID, channelID) + } + // cleanup state + k.deleteActor(ctx, portID, channelID) +} +``` + +NOTE: The handshake calls `OnChanOpenTry` and `OnChanOpenConfirm` are explicitly left out as it is still to be determined how the actor of the `OnChanOpenTry` step should be provided. Initially only the initiating side of the channel handshake may support setting a channel actor, future improvements should allow both sides of the channel handshake to set channel actors. + +### PacketCallbacks + +No packet callback API will need to change. + +```go +// Call the IBCActor recvPacket callback after processing the packet +// if the recvPacket callback exists. If the callback returns an error +// then return an error ack to revert all packet data processing. +func OnRecvPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) (ack exported.Acknowledgement) { + // run any necesssary logic first + // IBCActor logic will postprocess + + // postprocessing should only if the underlying application + // returns a successful ack + + // unmarshal packet data into expected interface + var cbPacketData callbackPacketData + unmarshalInterface(packet.GetData(), cbPacketData) + + if cbPacketData == nil { + // the packet data does not implement the CallbackPacketData interface + // continue processing (no-op) + return + } + + acc := k.getAccount(ctx, cbPacketData.GetDstCallbackAddress()) + ibcActor, ok := acc.(IBCActor) + if ok { + // set gas limit for callback + gasLimit := getGasLimit(ctx, cbPacketData) + cbCtx = ctx.WithGasLimit(gasLimit) + + err := ibcActor.OnRecvPacket(cbCtx, packet, relayer) + + // deduct consumed gas from original context + ctx = ctx.WithGasLimit(ctx.GasMeter().RemainingGas() - cbCtx.GasMeter().GasConsumed()) + if err != nil { + // NOTE: by returning an error acknowledgement, it is assumed that the + // base IBC application on the counterparty callback stack will be able + // to properly unmarshal the error acknowledgement. It should not expect + // some custom error acknowledgement. If it does, failed acknowledgements + // will be unsuccessfully processed which can be catastrophic in processing + // refund logic. + // + // If this issue is a serious concern, an ADR 8 implementation can construct its own + // acknowledgement type which wraps the underlying application acknowledgement. This + // would require deployment on both sides of the packet flow, in addition to version + // negotiation to enable the custom acknowledgement type usage. + // + // Future improvmenets should allow for each IBC application in a stack of + // callbacks to provide their own acknowledgement without disrupting the unmarshaling + // of an application above or below it in the stack. + return AcknowledgementError(err) + } + } + return +} + +// Call the IBCActor acknowledgementPacket callback after processing the packet +// if the ackPacket callback exists and returns an error +// DO NOT return the error upstream. The acknowledgement must complete for the packet +// lifecycle to end, so the custom callback cannot block completion. +// Instead we emit error events and set the error in state +// so that users and on-chain logic can handle this appropriately +func (im IBCModule) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, +) error { + // application-specific onAcknowledgmentPacket logic + + // unmarshal packet data into expected interface + var cbPacketData callbackPacketData + unmarshalInterface(packet.GetData(), cbPacketData) + + if cbPacketData == nil { + // the packet data does not implement the CallbackPacketData interface + // continue processing (no-op) + return + } + + // unmarshal ack bytes into the acknowledgment interface + var ack exported.Acknowledgement + unmarshal(acknowledgement, ack) + + // send acknowledgement to original actor + acc := k.getAccount(ctx, cbPacketData.GetSourceCallbackAddress()) + ibcActor, ok := acc.(IBCActor) + if ok { + gasLimit := getGasLimit(ctx, cbPacketData) + + + handleCallback := func() error { + // create cached context with gas limit + cacheCtx, writeFn := ctx.CacheContext() + cacheCtx = cacheCtx.WithGasLimit(gasLimit) + + defer func() { + if e := recover(); e != nil { + log("ran out of gas in callback. reverting callback state") + } else if err == nil { + // only write callback state if we did not panic during execution + // and the error returned is nil + writeFn() + } + } + + err := ibcActor.OnAcknowledgementPacket(cacheCtx, packet, ack, relayer) + + // deduct consumed gas from original context + ctx = ctx.WithGasLimit(ctx.GasMeter().RemainingGas() - cbCtx.GasMeter().GasConsumed()) + + return err + } + + if err := handleCallback(); err != nil { + setAckCallbackError(ctx, packet, err) // optional + emitAckCallbackErrorEvents(err) + } + } + + return nil +} + +// Call the IBCActor timeoutPacket callback after processing the packet +// if the timeoutPacket callback exists and returns an error +// DO NOT return the error upstream. The timeout must complete for the packet +// lifecycle to end, so the custom callback cannot block completion. +// Instead we emit error events and set the error in state +// so that users and on-chain logic can handle this appropriately +func (im IBCModule) OnTimeoutPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) error { + // application-specific onTimeoutPacket logic + + // unmarshal packet data into expected interface + var cbPacketData callbackPacketData + unmarshalInterface(packet.GetData(), cbPacketData) + + if cbPacketData == nil { + // the packet data does not implement the CallbackPacketData interface + // continue processing (no-op) + return + } + + // call timeout callback on original actor + acc := k.getAccount(ctx, cbPacketData.GetSourceCallbackAddress()) + ibcActor, ok := acc.(IBCActor) + if ok { + gasLimit := getGasLimit(ctx, cbPacketData) + + handleCallback := func() error { + // create cached context with gas limit + cacheCtx, writeFn := ctx.CacheContext() + cacheCtx = cacheCtx.WithGasLimit(gasLimit) + + defer func() { + if e := recover(); e != nil { + log("ran out of gas in callback. reverting callback state") + } else if err == nil { + // only write callback state if we did not panic during execution + // and the error returned is nil + writeFn() + } + } + + err := ibcActor.OnTimeoutPacket(ctx, packet, relayer) + + // deduct consumed gas from original context + ctx = ctx.WithGasLimit(ctx.GasMeter().RemainingGas() - cbCtx.GasMeter().GasConsumed()) + + return err + } + + if err := handleCallback(); err != nil { + setTimeoutCallbackError(ctx, packet, err) // optional + emitTimeoutCallbackErrorEvents(err) + } + } + + return nil +} + +func getGasLimit(ctx sdk.Context, cbPacketData CallbackPacketData) uint64 { + // getGasLimit returns the gas limit to pass into the actor callback + // this will be the minimum of the remaining gas limit in the tx + // and the config defined gas limit. The config limit is itself + // the minimum of a user defined gas limit and the chain-defined gas limit + // for actor callbacks + var configLimit uint64 + if cbPacketData == 0 { + configLimit = chainDefinedActorCallbackLimit + } else { + configLimit = min(chainDefinedActorCallbackLimit, cbPacketData.UserDefinedGasLimit()) + } + return min(ctx.GasMeter().GasRemaining(), configLimit) +} +``` + +Chains are expected to specify a `chainDefinedActorCallbackLimit` to ensure that callbacks do not consume an arbitrary amount of gas. Thus, it should always be possible for a relayer to complete the packet lifecycle even if the actor callbacks cannot run successfully. + +## Consequences + +### Positive + +- IBC Actors can now programatically execute logic that involves sending a packet and then performing some additional logic once the packet lifecycle is complete +- Middleware implementing ADR-8 can be generally used for any application +- Leverages the same callback architecture used between core IBC and IBC applications + +### Negative + +- Callbacks may now have unbounded gas consumption since the actor may execute arbitrary logic. Chains implementing this feature should take care to place limitations on how much gas an actor callback can consume. + +### Neutral + +- Application packets that want to support ADR-8 must additionally have their packet data implement the `CallbackPacketData` interface and register their implementation on the chain codec + +## References + +- [Original issue](https://github.com/cosmos/ibc-go/issues/1660) +- [CallbackPacketData interface implementation](https://github.com/cosmos/ibc-go/pull/3287) +- [ICS 20, ICS 27 implementations of the CallbackPacketData interface](https://github.com/cosmos/ibc-go/pull/3287) diff --git a/docs/architecture/adr-008-app-caller-cbs/transfer-callback-scaffold.md b/docs/architecture/adr-008-app-caller-cbs/transfer-callback-scaffold.md new file mode 100644 index 00000000000..904a6c52423 --- /dev/null +++ b/docs/architecture/adr-008-app-caller-cbs/transfer-callback-scaffold.md @@ -0,0 +1,223 @@ +# Scaffold for ICS20 Callback Middleware + +The following is a very simple scaffold for middleware that implements actor callbacks for transfer channels. Since a channel does not need to be owned by a single actor, the handshake callbacks are no-ops. The packet callbacks will call into the relevant actor. For `OnRecvPacket`, this will be `data.Receiver`, and for `OnAcknowledgePacket` and `OnTimeoutPacket` this will be `data.Sender`. + +The exact nature of the callbacks to the smart contract will depend on the environment in question (e.g. cosmwasm, evm). Thus the place where the callbacks to the smart contract are stubbed out and commented so that it can be completed by implementers for the specific environment they are targetting. + +Implementers may wish to support callbacks to more IBC applications by adding a switch statement to unmarshal the specific packet data types they wish to support and passing them into the smart contract callback functions. + +### Scaffold Middleware + +```go +package callbacks + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + + transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v6/modules/core/exported" +) + +var _ porttypes.Middleware = &IBCMiddleware{} + +// IBCMiddleware implements the ICS26 callbacks for the fee middleware given the +// fee keeper and the underlying application. +type IBCMiddleware struct { + app porttypes.IBCModule + chanWrapper porttypes.ICS4Wrapper +} + +// NewIBCMiddleware creates a new IBCMiddlware given the keeper and underlying application +func NewIBCMiddleware(app porttypes.IBCModule, chanWrapper porttypes.ICS4Wrapper) IBCMiddleware { + return IBCMiddleware{ + app: app, + chanWrapper: chanWrapper, + } +} + +// OnChanOpenInit implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenInit( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID string, + channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, +) (string, error) { + // call underlying app's OnChanOpenInit callback + return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, + chanCap, counterparty, version) +} + +// OnChanOpenTry implements the IBCMiddleware interface +// If the channel is not fee enabled the underlying application version will be returned +// If the channel is fee enabled we merge the underlying application version with the ics29 version +func (im IBCMiddleware) OnChanOpenTry( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID, + channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + counterpartyVersion string, +) (string, error) { + // call underlying app's OnChanOpenTry callback + return im.app.OnChanOpenTry(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, counterpartyVersion) +} + +// OnChanOpenAck implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenAck( + ctx sdk.Context, + portID, + channelID string, + counterpartyChannelID string, + counterpartyVersion string, +) error { + // call underlying app's OnChanOpenAck callback + return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) +} + +// OnChanOpenConfirm implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanOpenConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + // call underlying app's OnChanOpenConfirm callback. + return im.app.OnChanOpenConfirm(ctx, portID, channelID) +} + +// OnChanCloseInit implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseInit( + ctx sdk.Context, + portID, + channelID string, +) error { + // call underlying app's OnChanCloseInit callback. + return im.app.OnChanCloseInit(ctx, portID, channelID) +} + +// OnChanCloseConfirm implements the IBCMiddleware interface +func (im IBCMiddleware) OnChanCloseConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + // call underlying app's OnChanCloseConfirm callback. + return im.app.OnChanCloseConfirm(ctx, portID, channelID) +} + +// OnRecvPacket implements the IBCMiddleware interface. +// If fees are not enabled, this callback will default to the ibc-core packet callback +func (im IBCMiddleware) OnRecvPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) exported.Acknowledgement { + // first do the underlying ibc app callback + ack := im.app.OnRecvPacket(ctx, packet, relayer) + + // postprocess the ibc application by executing a callback to the receiver smart contract + // if the receiver of the transfer packet is a smart contract + var data transfertypes.FungibleTokenPacketData + if err := transfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err == nil { + // check if data.Receiver is a smart contract address + // if it is a smart contract address + // then call the smart-contract defined callback for RecvPacket and pass in the transfer packet data + // if the callback returns an error, then return an error acknowledgement + if isSmartContract(data.Receiver) { + err := data.Receiver.recvPacketCallback(data) + if err != nil { + return channeltypes.NewErrorAcknowledgement(err) + } + } + } + return ack +} + +// OnAcknowledgementPacket implements the IBCMiddleware interface +// If fees are not enabled, this callback will default to the ibc-core packet callback +func (im IBCMiddleware) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, +) error { + // call underlying callback + err := im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + + // postprocess the ibc application by executing a callback to the sender smart contract + // if the sender of the transfer packet is a smart contract + var data transfertypes.FungibleTokenPacketData + if err := transfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err == nil { + // check if data.Sender is a smart contract address + // if it is a smart contract address + // then call the smart-contract defined callback for RecvPacket and pass in the transfer packet data + // if the callback returns an error, then return an error + if isSmartContract(data.Sender) { + data.Sender.ackPacketCallback(data) + } + } + return err +} + +// 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, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) error { + // call underlying callback + err := im.app.OnTimeoutPacket(ctx, packet, relayer) + + // postprocess the ibc application by executing a callback to the sender smart contract + // if the sender of the transfer packet is a smart contract + var data transfertypes.FungibleTokenPacketData + if err := transfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err == nil { + // check if data.Sender is a smart contract address + // if it is a smart contract address + // then call the smart-contract defined callback for RecvPacket and pass in the transfer packet data + // if the callback returns an error, then return an error + if isSmartContract(data.Sender) { + data.Sender.timeoutPacketCallback(data) + } + } + return err +} + +// SendPacket implements the ICS4 Wrapper interface +func (im IBCMiddleware) SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + data []byte, +) (uint64, error) { + return im.chanWrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) +} + +// WriteAcknowledgement implements the ICS4 Wrapper interface +func (im IBCMiddleware) WriteAcknowledgement( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet exported.PacketI, + ack exported.Acknowledgement, +) error { + return im.chanWrapper.WriteAcknowledgement(ctx, chanCap, packet, ack) +} + +// GetAppVersion returns the application version of the underlying application +func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { + return im.chanWrapper.GetAppVersion(ctx, portID, channelID) +} +``` \ No newline at end of file diff --git a/docs/architecture/adr-010-light-clients-as-sdk-modules.md b/docs/architecture/adr-010-light-clients-as-sdk-modules.md index 62186debaf3..0c8f2bb8e6e 100644 --- a/docs/architecture/adr-010-light-clients-as-sdk-modules.md +++ b/docs/architecture/adr-010-light-clients-as-sdk-modules.md @@ -17,7 +17,7 @@ ibc-go has 3 main consumers: Relayers listen and respond to events emitted by ibc-go while IBC light clients and applications are invoked by core IBC. Currently there exists two different approaches to callbacks being invoked by core IBC. -IBC light clients currently are invoked by a `ClientState` and `ConsensusState` interface as defined by [core IBC](https://github.com/cosmos/ibc-go/blob/fb9dedd706e5835cdd607392320df79fcea7ca7f/modules/core/exported/client.go#L36). +IBC light clients currently are invoked by a `ClientState` and `ConsensusState` interface as defined by [core IBC](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L36). The 02-client submodule will retrieve the `ClientState` or `ConsensusState` from the IBC store in order to perform callbacks to the light client. This design requires all required information for the light client to function to be stored in the `ClientState` or `ConsensusState` or potentially under metadata keys for a specific client instance. Additional information may be provided by core IBC via the defined interface arguments if that information is generic enough to be useful to all IBC light clients. diff --git a/docs/dev/go-style-guide.md b/docs/dev/go-style-guide.md index 8e50b592030..7cf50598000 100644 --- a/docs/dev/go-style-guide.md +++ b/docs/dev/go-style-guide.md @@ -93,7 +93,7 @@ import ( ## Testing -- Make use of table driven testing where possible and not-cumbersome. Read [this blog post](https://dave.cheney.net/2013/06/09/writing-table-driven-tests-in-go) for more information. See the [tests](https://github.com/cosmos/ibc-go/blob/f24f41ea8a61fe87f6becab94e84de08c8aa9381/modules/apps/transfer/keeper/msg_server_test.go#L11) for [`Transfer`](https://github.com/cosmos/ibc-go/blob/f24f41ea8a61fe87f6becab94e84de08c8aa9381/modules/apps/transfer/keeper/msg_server.go#L15) for an example. +- Make use of table driven testing where possible and not-cumbersome. Read [this blog post](https://dave.cheney.net/2013/06/09/writing-table-driven-tests-in-go) for more information. See the [tests](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/apps/transfer/keeper/msg_server_test.go#L11) for [`Transfer`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/apps/transfer/keeper/msg_server.go#L15) for an example. - Make use of Testify [assert](https://godoc.org/github.com/stretchr/testify/assert) and [require](https://godoc.org/github.com/stretchr/testify/require). - When using mocks, it is recommended to use Testify [mock](https://pkg.go.dev/github.com/stretchr/testify/mock) along with [Mockery](https://github.com/vektra/mockery) for autogeneration. diff --git a/docs/dev/project-structure.md b/docs/dev/project-structure.md index 01fcf6b04da..7e5e68d70cd 100644 --- a/docs/dev/project-structure.md +++ b/docs/dev/project-structure.md @@ -1,6 +1,6 @@ # Project structure -If you're not familiar with the overall module structure from the SDK modules, please check this [document](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/10-structure.md) as prerequisite reading. +If you're not familiar with the overall module structure from the SDK modules, please check this [document](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md) as prerequisite reading. Every Interchain Standard (ICS) has been developed in its own package. The development team separated the IBC TAO (Transport, Authentication, Ordering) ICS specifications from the IBC application level specification. The following sections describe the architecture of the most relevant directories that comprise this repository. diff --git a/docs/ibc/apps.md b/docs/ibc/apps.md index be0457f4fe6..0d80d412337 100644 --- a/docs/ibc/apps.md +++ b/docs/ibc/apps.md @@ -191,7 +191,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, state types.GenesisState // Only try to bind to port if it is not already bound, since we may already own // port capability from capability InitGenesis - if !isBound(ctx, state.PortID) { + if !hasCapability(ctx, state.PortID) { // module binds to desired ports on InitChain // and claims returned capabilities cap1 := keeper.IBCPortKeeper.BindPort(ctx, port1) diff --git a/docs/ibc/apps/bindports.md b/docs/ibc/apps/bindports.md index bf35fc0df0d..07bdff224e1 100644 --- a/docs/ibc/apps/bindports.md +++ b/docs/ibc/apps/bindports.md @@ -79,7 +79,7 @@ Currently, ports must be bound on app initialization. In order to bind modules t // Only try to bind to port if it is not already bound, since we may already own // port capability from capability InitGenesis - if !k.IsBound(ctx, state.PortId) { + if !k.HasCapability(ctx, state.PortId) { // transfer module binds to the transfer port on InitChain // and claims the returned capability err := k.BindPort(ctx, state.PortId) diff --git a/docs/ibc/apps/keeper.md b/docs/ibc/apps/keeper.md index 809ac46d8d7..f108d0b9f32 100644 --- a/docs/ibc/apps/keeper.md +++ b/docs/ibc/apps/keeper.md @@ -48,8 +48,8 @@ func NewKeeper( } } -// IsBound checks if the IBC app module is already bound to the desired port -func (k Keeper) IsBound(ctx sdk.Context, portID string) bool { +// HasCapability checks if the IBC app module owns the port capability for the desired port +func (k Keeper) HasCapability(ctx sdk.Context, portID string) bool { _, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID)) return ok } diff --git a/docs/ibc/integration.md b/docs/ibc/integration.md index 26b55c9f3a9..9c709d96826 100644 --- a/docs/ibc/integration.md +++ b/docs/ibc/integration.md @@ -157,7 +157,7 @@ func NewApp(...args) *App { ### Module Managers -In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/13-simulator.md). +In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/14-simulator.md). ```go // app.go diff --git a/docs/ibc/light-clients/client-state.md b/docs/ibc/light-clients/client-state.md index b72b73ad217..b9290fbbb03 100644 --- a/docs/ibc/light-clients/client-state.md +++ b/docs/ibc/light-clients/client-state.md @@ -4,7 +4,7 @@ order: 2 # Implementing the `ClientState` interface -Learn how to implement the [`ClientState`](https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/core/exported/client.go#L40) interface. This list of methods described here does not include all methods of the interface. Some methods are explained in detail in the relevant sections of the guide. +Learn how to implement the [`ClientState`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L36) interface. This list of methods described here does not include all methods of the interface. Some methods are explained in detail in the relevant sections of the guide. ## `ClientType` method @@ -18,7 +18,7 @@ The format is created as follows: `ClientType-{N}` where `{N}` is the unique glo ## `Validate` method `Validate` should validate every client state field and should return an error if any value is invalid. The light client -implementer is in charge of determining which checks are required. See the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/light-clients/07-tendermint/types/client_state.go#L101) as a reference. +implementer is in charge of determining which checks are required. See the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/client_state.go#L111) as a reference. ## `Status` method @@ -29,14 +29,14 @@ implementer is in charge of determining which checks are required. See the [Tend - An `Expired` status indicates that a client is not allowed to be used because it was not updated for longer than the trusting period. - An `Unknown` status indicates that there was an error in determining the status of a client. -All possible `Status` types can be found [here](https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/core/exported/client.go#L26-L36). +All possible `Status` types can be found [here](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L22-L32). -This field is returned in the response of the gRPC [`ibc.core.client.v1.Query/ClientStatus`](https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/core/02-client/types/query.pb.go#L665) endpoint. +This field is returned in the response of the gRPC [`ibc.core.client.v1.Query/ClientStatus`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/types/query.pb.go#L665) endpoint. ## `ZeroCustomFields` method `ZeroCustomFields` should return a copy of the light client with all client customizable fields with their zero value. It should not mutate the fields of the light client. -This method is used when [scheduling upgrades](https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/core/02-client/keeper/proposal.go#L89). Upgrades are used to upgrade chain specific fields. +This method is used when [scheduling upgrades](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/keeper/proposal.go#L82). Upgrades are used to upgrade chain specific fields. In the tendermint case, this may be the chain ID or the unbonding period. For more information about client upgrades see the [Handling upgrades](./upgrades.md) section. @@ -50,7 +50,7 @@ This value is used to facilitate timeouts by checking the packet timeout timesta Clients must validate the initial consensus state, and set the initial client state and consensus state in the provided client store. Clients may also store any necessary client-specific metadata. -`Initialize` is called when a [client is created](https://github.com/cosmos/ibc-go/blob/main/modules/core/02-client/keeper/client.go#L32). +`Initialize` is called when a [client is created](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/keeper/client.go#L30). ## `VerifyMembership` method diff --git a/docs/ibc/light-clients/consensus-state.md b/docs/ibc/light-clients/consensus-state.md index 26166bc41a7..6e33785a7cf 100644 --- a/docs/ibc/light-clients/consensus-state.md +++ b/docs/ibc/light-clients/consensus-state.md @@ -8,7 +8,7 @@ A `ConsensusState` is the snapshot of the counterparty chain, that an IBC client The further development of multiple types of IBC light clients and the difficulties presented by this generalization problem (see [ADR-006](https://github.com/cosmos/ibc-go/blob/main/docs/architecture/adr-006-02-client-refactor.md) for more information about this historical context) led to the design decision of each client keeping track of and set its own `ClientState` and `ConsensusState`, as well as the simplification of client `ConsensusState` updates through the generalized `ClientMessage` interface. -The below [`ConsensusState`](https://github.com/cosmos/ibc-go/blob/main/modules/core/exported/client.go#L134) interface is a generalized interface for the types of information a `ConsensusState` could contain. For a reference `ConsensusState` implementation, please see the [Tendermint light client `ConsensusState`](https://github.com/cosmos/ibc-go/blob/main/modules/light-clients/07-tendermint/consensus_state.go). +The below [`ConsensusState`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L133) interface is a generalized interface for the types of information a `ConsensusState` could contain. For a reference `ConsensusState` implementation, please see the [Tendermint light client `ConsensusState`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/consensus_state.go). ## `ClientType` method diff --git a/docs/ibc/light-clients/genesis.md b/docs/ibc/light-clients/genesis.md index 234cfa4002e..9a0eb6249b6 100644 --- a/docs/ibc/light-clients/genesis.md +++ b/docs/ibc/light-clients/genesis.md @@ -12,7 +12,7 @@ Learn how to implement the `ExportMetadata` interface {synopsis} `ClientState` instances are provided their own isolated and namespaced client store upon initialisation. `ClientState` implementations may choose to store any amount of arbitrary metadata in order to verify counterparty consensus state and perform light client updates correctly. -The `ExportMetadata` method of the [`ClientState` interface](https://github.com/cosmos/ibc-go/blob/e650be91614ced7be687c30eb42714787a3bbc59/modules/core/exported/client.go) provides light client modules with the ability to persist metadata in genesis exports. +The `ExportMetadata` method of the [`ClientState` interface](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L47) provides light client modules with the ability to persist metadata in genesis exports. ```go ExportMetadata(clientStore sdk.KVStore) []GenesisMetadata @@ -31,6 +31,6 @@ type GenesisMetadata interface { This allows `ClientState` instances to retrieve and export any number of key-value pairs which are maintained within the store in their raw `[]byte` form. -When a chain is started with a `genesis.json` file which contains `ClientState` metadata (for example, when performing manual upgrades using an exported `genesis.json`) the `02-client` submodule of core IBC will handle setting the key-value pairs within their respective client stores. [See `02-client` `InitGenesis`](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/02-client/genesis.go#L18-L22). +When a chain is started with a `genesis.json` file which contains `ClientState` metadata (for example, when performing manual upgrades using an exported `genesis.json`) the `02-client` submodule of core IBC will handle setting the key-value pairs within their respective client stores. [See `02-client` `InitGenesis`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/genesis.go#L18-L22). -Please refer to the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/genesis.go#L12) for an example. +Please refer to the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/genesis.go#L12) for an example. diff --git a/docs/ibc/light-clients/localhost/integration.md b/docs/ibc/light-clients/localhost/integration.md index a818507f1fd..15a236e2efe 100644 --- a/docs/ibc/light-clients/localhost/integration.md +++ b/docs/ibc/light-clients/localhost/integration.md @@ -6,7 +6,7 @@ order: 2 The 09-localhost light client module registers codec types within the core IBC module. This differs from other light client module implementations which are expected to register codec types using the `AppModuleBasic` interface. -The localhost client is added to the 02-client submodule param [`allowed_clients`](https://github.com/cosmos/ibc-go/blob/v7.0.0-rc0/proto/ibc/core/client/v1/client.proto#L102) by default in ibc-go. +The localhost client is added to the 02-client submodule param [`allowed_clients`](https://github.com/cosmos/ibc-go/blob/v7.0.0/proto/ibc/core/client/v1/client.proto#L102) by default in ibc-go. ```go var ( diff --git a/docs/ibc/light-clients/overview.md b/docs/ibc/light-clients/overview.md index a06ae4afa31..b5d973f79a2 100644 --- a/docs/ibc/light-clients/overview.md +++ b/docs/ibc/light-clients/overview.md @@ -54,11 +54,11 @@ The methods which make up this interface are detailed at a more granular level i ### `Height` `Height` defines a monotonically increasing sequence number which provides ordering of consensus state data persisted through client updates. -IBC light client module developers are expected to use the [concrete type](https://github.com/cosmos/ibc-go/tree/02-client-refactor-beta1/proto/ibc/core/client/v1/client.proto#L89) provided by the `02-client` submodule. This implements the expectations required by the [`Height`](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/exported/client.go#L157) interface defined in `modules/core/exported/client.go`. +IBC light client module developers are expected to use the [concrete type](https://github.com/cosmos/ibc-go/tree/02-client-refactor-beta1/proto/ibc/core/client/v1/client.proto#L89) provided by the `02-client` submodule. This implements the expectations required by the [`Height`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L156) interface defined in `modules/core/exported/client.go`. ### `ClientMessage` -`ClientMessage` refers to the interface type [`ClientMessage`](https://github.com/cosmos/ibc-go/tree/02-client-refactor-beta1/modules/core/exported/client.go#L148) used for performing updates to a `ClientState` stored on chain. +`ClientMessage` refers to the interface type [`ClientMessage`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L147) used for performing updates to a `ClientState` stored on chain. This may be any concrete type which produces a change in state to the IBC client when verified. The following are considered as valid update scenarios: diff --git a/docs/ibc/light-clients/proofs.md b/docs/ibc/light-clients/proofs.md index fa4e5a84126..acb7f82ed1e 100644 --- a/docs/ibc/light-clients/proofs.md +++ b/docs/ibc/light-clients/proofs.md @@ -28,7 +28,7 @@ In some cases, there is a necessity to "mock" non-existence proofs if the counte The state verification functions for all IBC data types have been consolidated into two generic methods, `VerifyMembership` and `VerifyNonMembership`. -From the [`ClientState` interface definition](https://github.com/cosmos/ibc-go/blob/e650be91614ced7be687c30eb42714787a3bbc59/modules/core/exported/client.go#L68-L91), we find: +From the [`ClientState` interface definition](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go#L68-L91), we find: ```go VerifyMembership( @@ -59,4 +59,4 @@ VerifyNonMembership( Both are expected to be provided with a standardised key path, `exported.Path`, as defined in [ICS-24 host requirements](https://github.com/cosmos/ibc/tree/main/spec/core/ics-024-host-requirements). Membership verification requires callers to provide the value marshalled as `[]byte`. Delay period values should be zero for non-packet processing verification. A zero proof height is now allowed by core IBC and may be passed into `VerifyMembership` and `VerifyNonMembership`. Light clients are responsible for returning an error if a zero proof height is invalid behaviour. -Please refer to the [ICS-23 implementation](https://github.com/cosmos/ibc-go/blob/e093d85b533ab3572b32a7de60b88a0816bed4af/modules/core/23-commitment/types/merkle.go#L131-L205) for a concrete example. +Please refer to the [ICS-23 implementation](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/23-commitment/types/merkle.go#L131-L205) for a concrete example. diff --git a/docs/ibc/light-clients/proposals.md b/docs/ibc/light-clients/proposals.md index c2a0a57adef..8247cc8fe38 100644 --- a/docs/ibc/light-clients/proposals.md +++ b/docs/ibc/light-clients/proposals.md @@ -8,7 +8,7 @@ It is possible to update the client with the state of the substitute client thro ## Implementing `CheckSubstituteAndUpdateState` -In the [`ClientState`interface](https://github.com/cosmos/ibc-go/blob/e650be91614ced7be687c30eb42714787a3bbc59/modules/core/exported/client.go), we find: +In the [`ClientState`interface](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/exported/client.go), we find: ```go // CheckSubstituteAndUpdateState must verify that the provided substitute may be used to update the subject client. @@ -24,9 +24,9 @@ CheckSubstituteAndUpdateState( Prior to updating, this function must verify that: -- the substitute client is the same type as the subject client. For a reference implementation, please see the [Tendermint light client](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/proposal_handle.go#L32). -- the provided substitute may be used to update the subject client. This may mean that certain parameters must remain unaltered. For example, a [valid substitute Tendermint light client](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/proposal_handle.go#L84) must NOT change the chain ID, trust level, max clock drift, unbonding period, proof specs or upgrade path. Please note that `AllowUpdateAfterMisbehaviour` and `AllowUpdateAfterExpiry` have been deprecated (see ADR 026 for more information). +- the substitute client is the same type as the subject client. For a reference implementation, please see the [Tendermint light client](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/proposal_handle.go#L32). +- the provided substitute may be used to update the subject client. This may mean that certain parameters must remain unaltered. For example, a [valid substitute Tendermint light client](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/proposal_handle.go#L84) must NOT change the chain ID, trust level, max clock drift, unbonding period, proof specs or upgrade path. Please note that `AllowUpdateAfterMisbehaviour` and `AllowUpdateAfterExpiry` have been deprecated (see ADR 026 for more information). -After these checks are performed, the function must [set the updated client and consensus states](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/proposal_handle.go#L77) within the client store for the subject client. +After these checks are performed, the function must [set the updated client and consensus states](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/proposal_handle.go#L77) within the client store for the subject client. -Please refer to the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/proposal_handle.go#L27) for reference. +Please refer to the [Tendermint light client implementation](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/proposal_handle.go#L27) for reference. diff --git a/docs/ibc/light-clients/setup.md b/docs/ibc/light-clients/setup.md index 84d5a924fff..9e97ab22de5 100644 --- a/docs/ibc/light-clients/setup.md +++ b/docs/ibc/light-clients/setup.md @@ -12,7 +12,7 @@ Finally, a succinct rundown is given of the remaining steps to make the light cl ## Configuring a light client module -An IBC light client module must implement the [`AppModuleBasic`](https://github.com/cosmos/cosmos-sdk/blob/main/types/module/module.go#L50) interface in order to register its concrete types against the core IBC interfaces defined in `modules/core/exported`. This is accomplished via the `RegisterInterfaces` method which provides the light client module with the opportunity to register codec types using the chain's `InterfaceRegistry`. Please refer to the [`07-tendermint` codec registration](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/light-clients/07-tendermint/codec.go#L11). +An IBC light client module must implement the [`AppModuleBasic`](https://github.com/cosmos/cosmos-sdk/blob/main/types/module/module.go#L50) interface in order to register its concrete types against the core IBC interfaces defined in `modules/core/exported`. This is accomplished via the `RegisterInterfaces` method which provides the light client module with the opportunity to register codec types using the chain's `InterfaceRegistry`. Please refer to the [`07-tendermint` codec registration](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/light-clients/07-tendermint/codec.go#L11). The `AppModuleBasic` interface may also be leveraged to install custom CLI handlers for light client module users. Light client modules can safely no-op for interface methods which it does not wish to implement. @@ -77,7 +77,7 @@ See below for a list of IBC relayer implementations: - [informalsystems/hermes](https://github.com/informalsystems/hermes) - [confio/ts-relayer](https://github.com/confio/ts-relayer) -Stateless checks are performed within the [`ValidateBasic`](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/02-client/types/msgs.go#L48) method of `MsgCreateClient`. +Stateless checks are performed within the [`ValidateBasic`](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/types/msgs.go#L48) method of `MsgCreateClient`. ```protobuf // MsgCreateClient defines a message to create an IBC client @@ -95,11 +95,11 @@ message MsgCreateClient { } ``` -Leveraging protobuf `Any` encoding allows core IBC to [unpack](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/keeper/msg_server.go#L28-L36) both the `ClientState` and `ConsensusState` into their respective interface types registered previously using the light client module's `RegisterInterfaces` method. +Leveraging protobuf `Any` encoding allows core IBC to [unpack](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/keeper/msg_server.go#L28-L36) both the `ClientState` and `ConsensusState` into their respective interface types registered previously using the light client module's `RegisterInterfaces` method. -Within the `02-client` submodule, the [`ClientState` is then initialized](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/02-client/keeper/client.go#L30-L34) with its own isolated key-value store, namespaced using a unique client identifier. +Within the `02-client` submodule, the [`ClientState` is then initialized](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/keeper/client.go#L30-L32) with its own isolated key-value store, namespaced using a unique client identifier. -In order to successfully create an IBC client using a new client type, it [must be supported](https://github.com/cosmos/ibc-go/blob/02-client-refactor-beta1/modules/core/02-client/keeper/client.go#L18-L24). Light client support in IBC is gated by on-chain governance. The allow list may be updated by submitting a new governance proposal to update the `02-client` parameter `AllowedClients`. +In order to successfully create an IBC client using a new client type, it [must be supported](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/02-client/keeper/client.go#L19-L25). Light client support in IBC is gated by on-chain governance. The allow list may be updated by submitting a new governance proposal to update the `02-client` parameter `AllowedClients`.