From b41d59698211540742ce902ba40829ec3567e669 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 26 Jun 2023 15:41:15 +0200 Subject: [PATCH 01/23] chore: post v7.2.0 release (#3945) * chores post v7.2.0 release * removed unsupported releases * update changelog * update changelog --- .../main/client-chain-a.json | 5 +-- .../main/client-chain-b.json | 5 +-- .../main/connection-chain-a.json | 5 +-- .../main/connection-chain-b.json | 5 +-- .../main/ica-chain-a.json | 5 +-- .../main/ica-chain-b.json | 5 +-- .../main/ica-gov-chain-a.json | 5 +-- .../main/ica-gov-chain-b.json | 5 +-- .../main/ica-groups-chain-a.json | 5 +-- .../main/ica-groups-chain-b.json | 5 +-- .../main/incentivized-ica-chain-a.json | 5 +-- .../main/incentivized-ica-chain-b.json | 5 +-- .../main/incentivized-transfer-chain-a.json | 5 +-- .../main/incentivized-transfer-chain-b.json | 5 +-- .../main/localhost-ica-chain-a.json | 4 +- .../main/localhost-ica-chain-b.json | 4 +- .../main/localhost-transfer-chain-a.json | 4 +- .../main/localhost-transfer-chain-b.json | 4 +- .../main/transfer-authz-chain-a.json | 5 +-- .../main/transfer-authz-chain-b.json | 5 +-- .../main/transfer-chain-a.json | 5 +-- .../main/transfer-chain-b.json | 5 +-- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v4.1.x/transfer-chain-a.json | 9 ++--- .../release-v4.1.x/transfer-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v4.2.x/transfer-chain-a.json | 9 ++--- .../release-v4.2.x/transfer-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v4.3.x/transfer-chain-a.json | 9 ++--- .../release-v4.3.x/transfer-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v4.4.x/transfer-chain-a.json | 9 ++--- .../release-v4.4.x/transfer-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v5.2.x/transfer-chain-a.json | 9 ++--- .../release-v5.2.x/transfer-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v5.3.x/transfer-chain-a.json | 9 ++--- .../release-v5.3.x/transfer-chain-b.json | 9 ++--- .../release-v6.1.x/client-chain-a.json | 9 ++--- .../release-v6.1.x/client-chain-b.json | 9 ++--- .../release-v6.1.x/connection-chain-a.json | 9 ++--- .../release-v6.1.x/connection-chain-b.json | 9 ++--- .../release-v6.1.x/ica-chain-a.json | 9 ++--- .../release-v6.1.x/ica-chain-b.json | 9 ++--- .../release-v6.1.x/ica-gov-chain-a.json | 9 ++--- .../release-v6.1.x/ica-gov-chain-b.json | 9 ++--- .../release-v6.1.x/ica-groups-chain-a.json | 9 ++--- .../release-v6.1.x/ica-groups-chain-b.json | 9 ++--- .../incentivized-ica-chain-a.json | 9 ++--- .../incentivized-ica-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v6.1.x/transfer-chain-a.json | 9 ++--- .../release-v6.1.x/transfer-chain-b.json | 9 ++--- .../release-v6.2.x/client-chain-a.json | 9 ++--- .../release-v6.2.x/client-chain-b.json | 9 ++--- .../release-v6.2.x/connection-chain-a.json | 9 ++--- .../release-v6.2.x/connection-chain-b.json | 9 ++--- .../release-v6.2.x/ica-chain-a.json | 9 ++--- .../release-v6.2.x/ica-chain-b.json | 9 ++--- .../release-v6.2.x/ica-gov-chain-a.json | 9 ++--- .../release-v6.2.x/ica-gov-chain-b.json | 9 ++--- .../release-v6.2.x/ica-groups-chain-a.json | 9 ++--- .../release-v6.2.x/ica-groups-chain-b.json | 9 ++--- .../incentivized-ica-chain-a.json | 9 ++--- .../incentivized-ica-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../transfer-authz-chain-a.json | 9 ++--- .../transfer-authz-chain-b.json | 9 ++--- .../release-v6.2.x/transfer-chain-a.json | 9 ++--- .../release-v6.2.x/transfer-chain-b.json | 9 ++--- .../release-v7.0.x/client-chain-a.json | 34 ----------------- .../release-v7.0.x/client-chain-b.json | 34 ----------------- .../release-v7.0.x/connection-chain-a.json | 33 ---------------- .../release-v7.0.x/connection-chain-b.json | 33 ---------------- .../release-v7.0.x/ica-chain-a.json | 29 -------------- .../release-v7.0.x/ica-chain-b.json | 29 -------------- .../release-v7.0.x/ica-gov-chain-a.json | 27 ------------- .../release-v7.0.x/ica-gov-chain-b.json | 27 ------------- .../release-v7.0.x/ica-groups-chain-a.json | 27 ------------- .../release-v7.0.x/ica-groups-chain-b.json | 27 ------------- .../incentivized-ica-chain-a.json | 28 -------------- .../incentivized-ica-chain-b.json | 28 -------------- .../incentivized-transfer-chain-a.json | 38 ------------------- .../incentivized-transfer-chain-b.json | 38 ------------------- .../transfer-authz-chain-a.json | 27 ------------- .../transfer-authz-chain-b.json | 27 ------------- .../release-v7.0.x/transfer-chain-a.json | 38 ------------------- .../release-v7.0.x/transfer-chain-b.json | 38 ------------------- .../release-v7.1.x/client-chain-a.json | 34 ----------------- .../release-v7.1.x/client-chain-b.json | 34 ----------------- .../release-v7.1.x/connection-chain-a.json | 33 ---------------- .../release-v7.1.x/connection-chain-b.json | 33 ---------------- .../release-v7.1.x/ica-chain-a.json | 29 -------------- .../release-v7.1.x/ica-chain-b.json | 29 -------------- .../release-v7.1.x/ica-gov-chain-a.json | 27 ------------- .../release-v7.1.x/ica-gov-chain-b.json | 27 ------------- .../release-v7.1.x/ica-groups-chain-a.json | 27 ------------- .../release-v7.1.x/ica-groups-chain-b.json | 27 ------------- .../incentivized-ica-chain-a.json | 28 -------------- .../incentivized-ica-chain-b.json | 28 -------------- .../incentivized-transfer-chain-a.json | 38 ------------------- .../incentivized-transfer-chain-b.json | 38 ------------------- .../release-v7.1.x/localhost-ica-chain-a.json | 25 ------------ .../release-v7.1.x/localhost-ica-chain-b.json | 25 ------------ .../localhost-transfer-chain-a.json | 24 ------------ .../localhost-transfer-chain-b.json | 24 ------------ .../transfer-authz-chain-a.json | 27 ------------- .../transfer-authz-chain-b.json | 27 ------------- .../release-v7.1.x/transfer-chain-a.json | 38 ------------------- .../release-v7.1.x/transfer-chain-b.json | 38 ------------------- .../release-v7.2.x/client-chain-a.json | 9 ++--- .../release-v7.2.x/client-chain-b.json | 9 ++--- .../release-v7.2.x/connection-chain-a.json | 9 ++--- .../release-v7.2.x/connection-chain-b.json | 9 ++--- .../release-v7.2.x/ica-chain-a.json | 9 ++--- .../release-v7.2.x/ica-chain-b.json | 9 ++--- .../release-v7.2.x/ica-gov-chain-a.json | 9 ++--- .../release-v7.2.x/ica-gov-chain-b.json | 9 ++--- .../release-v7.2.x/ica-groups-chain-a.json | 9 ++--- .../release-v7.2.x/ica-groups-chain-b.json | 9 ++--- .../incentivized-ica-chain-a.json | 9 ++--- .../incentivized-ica-chain-b.json | 9 ++--- .../incentivized-transfer-chain-a.json | 9 ++--- .../incentivized-transfer-chain-b.json | 9 ++--- .../release-v7.2.x/localhost-ica-chain-a.json | 6 +-- .../release-v7.2.x/localhost-ica-chain-b.json | 6 +-- .../localhost-transfer-chain-a.json | 6 +-- .../localhost-transfer-chain-b.json | 6 +-- .../transfer-authz-chain-a.json | 9 ++--- .../transfer-authz-chain-b.json | 9 ++--- .../release-v7.2.x/transfer-chain-a.json | 9 ++--- .../release-v7.2.x/transfer-chain-b.json | 9 ++--- .github/mergify.yml | 16 -------- .../e2e-compatibility-unreleased.yaml | 2 - .github/workflows/e2e-compatibility.yaml | 4 -- .github/workflows/e2e-manual-simd.yaml | 8 ++-- CHANGELOG.md | 13 ++++++- RELEASES.md | 6 +-- docs/.vuepress/config.js | 4 ++ docs/roadmap/roadmap.md | 4 +- docs/versions | 3 +- e2e/go.mod | 2 +- modules/capability/go.mod | 2 +- 153 files changed, 386 insertions(+), 1714 deletions(-) delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json delete mode 100644 .github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json diff --git a/.github/compatibility-test-matrices/main/client-chain-a.json b/.github/compatibility-test-matrices/main/client-chain-a.json index b25e145acfa..013909a76b0 100644 --- a/.github/compatibility-test-matrices/main/client-chain-a.json +++ b/.github/compatibility-test-matrices/main/client-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -32,4 +31,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/client-chain-b.json b/.github/compatibility-test-matrices/main/client-chain-b.json index 0b044814678..1042bec4085 100644 --- a/.github/compatibility-test-matrices/main/client-chain-b.json +++ b/.github/compatibility-test-matrices/main/client-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -32,4 +31,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/connection-chain-a.json b/.github/compatibility-test-matrices/main/connection-chain-a.json index f7c92ebb8da..b58deb6f0d5 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-a.json +++ b/.github/compatibility-test-matrices/main/connection-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/connection-chain-b.json b/.github/compatibility-test-matrices/main/connection-chain-b.json index bd871c5cbc4..cbf603ad648 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-b.json +++ b/.github/compatibility-test-matrices/main/connection-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-chain-a.json b/.github/compatibility-test-matrices/main/ica-chain-a.json index e46b672d8c3..22aafb9324b 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-chain-b.json b/.github/compatibility-test-matrices/main/ica-chain-b.json index f6020edaab6..da650ca6a6d 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-gov-chain-a.json b/.github/compatibility-test-matrices/main/ica-gov-chain-a.json index 5396da5c712..f567466b318 100644 --- a/.github/compatibility-test-matrices/main/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-gov-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-gov-chain-b.json b/.github/compatibility-test-matrices/main/ica-gov-chain-b.json index 4f9000f12c4..378e90b8fc2 100644 --- a/.github/compatibility-test-matrices/main/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-gov-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-groups-chain-a.json b/.github/compatibility-test-matrices/main/ica-groups-chain-a.json index 4f4e80ba8ba..8bdc00c2733 100644 --- a/.github/compatibility-test-matrices/main/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-groups-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/ica-groups-chain-b.json b/.github/compatibility-test-matrices/main/ica-groups-chain-b.json index ebd10126748..25b61baeed1 100644 --- a/.github/compatibility-test-matrices/main/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-groups-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json index 3fff8495663..b4718bd0ac1 100644 --- a/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/incentivized-ica-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json index 4d412987d5a..035eb6484fb 100644 --- a/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/incentivized-ica-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1" ], @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json index 11351481fc1..aff52b15cb2 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -36,4 +35,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json index 7887e777405..73b1c428d92 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -36,4 +35,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json index 3b574676e72..c61c057495e 100644 --- a/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/localhost-ica-chain-a.json @@ -1,7 +1,7 @@ { "chain-a": [ "main", - "v7.1.0" + "v7.2.0" ], "chain-b": [ "main" @@ -22,4 +22,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json index fca82378e3a..eac6016978a 100644 --- a/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/localhost-ica-chain-b.json @@ -4,7 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0" + "v7.2.0" ], "entrypoint": [ "LocalhostInterchainAccountsTestSuite" @@ -22,4 +22,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json index e740ac4ea89..0cbcc646b86 100644 --- a/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/localhost-transfer-chain-a.json @@ -1,7 +1,7 @@ { "chain-a": [ "main", - "v7.1.0" + "v7.2.0" ], "chain-b": [ "main" @@ -21,4 +21,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json index 82d5aaa6afa..989ea78bf56 100644 --- a/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/localhost-transfer-chain-b.json @@ -4,7 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0" + "v7.2.0" ], "entrypoint": [ "LocalhostTransferTestSuite" @@ -21,4 +21,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json index cf5b88c8f5f..191d8ed574d 100644 --- a/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-authz-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0" ], "entrypoint": [ @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json index 97f1f07a572..c0571b51a2a 100644 --- a/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-authz-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0" ], "chain-b": [ @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/transfer-chain-a.json b/.github/compatibility-test-matrices/main/transfer-chain-a.json index a50376b9787..9608048bc0a 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-a.json @@ -4,8 +4,7 @@ ], "chain-b": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -36,4 +35,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/main/transfer-chain-b.json b/.github/compatibility-test-matrices/main/transfer-chain-b.json index e3b5ee7fb64..315ec9ba417 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-b.json @@ -1,8 +1,7 @@ { "chain-a": [ "main", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -36,4 +35,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-a.json index 085d3086886..049100b375a 100644 --- a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-a.json @@ -3,9 +3,7 @@ "release-v4.1.x" ], "chain-b": [ - "release-v4.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.1.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-b.json index 06626b45e0e..0bdedfcc85e 100644 --- a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-b.json @@ -1,8 +1,6 @@ { "chain-a": [ - "release-v4.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.1.x" ], "chain-b": [ "release-v4.1.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-a.json index 6c7b6477473..34026e7c227 100644 --- a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-a.json @@ -3,9 +3,7 @@ "release-v4.1.x" ], "chain-b": [ - "release-v4.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.1.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-b.json index a8c2c1682a6..1915cd0a1fa 100644 --- a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-b.json @@ -1,8 +1,6 @@ { "chain-a": [ - "release-v4.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.1.x" ], "chain-b": [ "release-v4.1.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-a.json index fb838eeb606..ff71c9a09bd 100644 --- a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-a.json @@ -3,9 +3,7 @@ "release-v4.2.x" ], "chain-b": [ - "release-v4.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.2.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json index 66be8260ee1..7ca1a125ec5 100644 --- a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json @@ -1,8 +1,6 @@ { "chain-a": [ - "release-v4.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.2.x" ], "chain-b": [ "release-v4.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 29e772496db..e255ec380a5 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 @@ -3,9 +3,7 @@ "release-v4.2.x" ], "chain-b": [ - "release-v4.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.2.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 104934ec71c..bfbe772cb14 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,8 +1,6 @@ { "chain-a": [ - "release-v4.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.2.x" ], "chain-b": [ "release-v4.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json index 48236820e05..8c3eff54202 100644 --- a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json @@ -3,9 +3,7 @@ "release-v4.3.x" ], "chain-b": [ - "release-v4.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.3.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json index 57b04499f0f..8b2e1092ca6 100644 --- a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json @@ -1,8 +1,6 @@ { "chain-a": [ - "release-v4.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.3.x" ], "chain-b": [ "release-v4.3.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 b1eadff60b0..295f21d9549 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 @@ -3,9 +3,7 @@ "release-v4.3.x" ], "chain-b": [ - "release-v4.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -13,7 +11,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.3.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 eabf601d377..f4c37592cf4 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,8 +1,6 @@ { "chain-a": [ - "release-v4.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", "v5.3.1", @@ -10,7 +8,8 @@ "v4.4.2", "v4.3.1", "v4.2.2", - "v4.1.3" + "v4.1.3", + "release-v4.3.x" ], "chain-b": [ "release-v4.3.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-a.json index ed997d59866..9866b401ac3 100644 --- a/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v4.4.x" ], "chain-b": [ - "release-v4.4.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v4.4.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-b.json index 7f8af804dc4..8f24fc1dc9e 100644 --- a/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v4.4.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v4.4.x" ], "chain-b": [ "release-v4.4.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-a.json index 748e9f8b06d..f27fecf1b1d 100644 --- a/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v4.4.x" ], "chain-b": [ - "release-v4.4.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v4.4.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-b.json index 95c17bb073f..cb732e20691 100644 --- a/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v4.4.x/transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v4.4.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v4.4.x" ], "chain-b": [ "release-v4.4.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-a.json index dd385d4d1cb..248027986ce 100644 --- a/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v5.2.x" ], "chain-b": [ - "release-v5.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.2.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-b.json index 3cff1f341e5..9595653457e 100644 --- a/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v5.2.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v5.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.2.x" ], "chain-b": [ "release-v5.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 a54b88d76f3..3ccde696de9 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 @@ -3,17 +3,16 @@ "release-v5.2.x" ], "chain-b": [ - "release-v5.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.2.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 b38f34a2fbe..f4db7c06505 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,16 +1,15 @@ { "chain-a": [ - "release-v5.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.2.x" ], "chain-b": [ "release-v5.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-a.json index 829eb8a396b..dc4004b3085 100644 --- a/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v5.3.x" ], "chain-b": [ - "release-v5.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.3.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-b.json index c9c4e83780a..b537bb718d9 100644 --- a/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v5.3.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v5.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.3.x" ], "chain-b": [ "release-v5.3.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-a.json index 055350eb7a1..4b9f6af7500 100644 --- a/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v5.3.x" ], "chain-b": [ - "release-v5.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.3.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-b.json index ef7000569cc..98962c778e0 100644 --- a/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v5.3.x/transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v5.3.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v5.3.x" ], "chain-b": [ "release-v5.3.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 3ab2680e911..2f5ce2f51da 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 @@ -3,17 +3,16 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "entrypoint": [ "TestClientTestSuite" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 9cdd4a5a918..659212b3cf8 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,16 +1,15 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 7fe8ae4a1f8..f465fa3cf58 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 @@ -3,17 +3,16 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "entrypoint": [ "TestConnectionTestSuite" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 763783f65f6..e95aa652fce 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,16 +1,15 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-a.json index 7dfee44c8ab..799883e45d4 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-a.json @@ -3,11 +3,10 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "entrypoint": [ "TestInterchainAccountsTestSuite" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-b.json index f12ac9d7fb3..f1f18f7ae71 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-a.json index ca97799ff55..106a3cb0e8e 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-a.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-b.json index a3bc435db70..1b9aac5f7aa 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-gov-chain-b.json @@ -3,11 +3,10 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "entrypoint": [ "TestInterchainAccountsGovTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-a.json index 7ccc1dee1c7..4438aa0ddb8 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-a.json @@ -3,11 +3,10 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "entrypoint": [ "TestInterchainAccountsGroupsTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-b.json index 7bf8d065e39..259f2481717 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/ica-groups-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-a.json index 6458dd65ca6..211985966a5 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-a.json @@ -3,11 +3,10 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "entrypoint": [ "TestIncentivizedInterchainAccountsTestSuite" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-b.json index f70cba2d0a6..6ac3f47322e 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-a.json index 757d78434eb..e0ad49bf25b 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-b.json index 807eb666c86..33b22fa10b4 100644 --- a/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.1.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 88d3b3e3341..51a817ac49e 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 @@ -3,17 +3,16 @@ "release-v6.1.x" ], "chain-b": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 db5f62e36ec..2eb2eafe4ba 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,16 +1,15 @@ { "chain-a": [ - "release-v6.1.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.1.x" ], "chain-b": [ "release-v6.1.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/client-chain-a.json index 4ee28fdc9af..0e6b2e7e087 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/client-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/client-chain-a.json @@ -3,17 +3,16 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "entrypoint": [ "TestClientTestSuite" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/client-chain-b.json index fa1254c1254..014e2152fa0 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/client-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/client-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-a.json index cd59900f36c..7fd80f5333f 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-a.json @@ -3,17 +3,16 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "entrypoint": [ "TestConnectionTestSuite" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-b.json index 52a4c1571d5..d289a85ffc6 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/connection-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-a.json index 82aff9785fe..7ed9089e323 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-a.json @@ -3,11 +3,10 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "entrypoint": [ "TestInterchainAccountsTestSuite" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-b.json index 7a974f07951..21b17c19f1b 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-a.json index 71d742cde5c..da53a786d46 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-a.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-b.json index fc77f10c610..dd22b7a1b21 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-gov-chain-b.json @@ -3,11 +3,10 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "entrypoint": [ "TestInterchainAccountsGovTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-a.json index 7419e737bab..2598e05718e 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-a.json @@ -3,11 +3,10 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "entrypoint": [ "TestInterchainAccountsGroupsTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-b.json index 09f3a3d3d64..3b526ae6d5c 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/ica-groups-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-a.json index 5b20a126272..5be6e96edf7 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-a.json @@ -3,11 +3,10 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "entrypoint": [ "TestIncentivizedInterchainAccountsTestSuite" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-b.json index 8811661d938..cb15346c12d 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-a.json index 27d89f13c85..b930e9561a3 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-b.json index 072155fbc56..7a8fb57f7f9 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-a.json index 1f523d4417f..091e07ad29b 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-a.json @@ -3,10 +3,9 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", - "v6.2.0" + "v7.2.0", + "v6.2.0", + "release-v6.2.x" ], "entrypoint": [ "TestAuthzTransferTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-b.json index 389a20f9c8d..6baeaeb6d18 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/transfer-authz-chain-b.json @@ -1,9 +1,8 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", - "v6.2.0" + "v7.2.0", + "v6.2.0", + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-a.json index cca2695d35c..4395b829822 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v6.2.x" ], "chain-b": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-b.json index 52e43e0ef9e..2ee45e2e3ad 100644 --- a/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v6.2.x/transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v6.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v6.2.x" ], "chain-b": [ "release-v6.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file 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 deleted file mode 100644 index e808018eba3..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-a.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" - ], - "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/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json deleted file mode 100644 index b9899b809d2..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/client-chain-b.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" - ], - "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/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json deleted file mode 100644 index edc644b4f93..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-a.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "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/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json deleted file mode 100644 index f24fb9300e8..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/connection-chain-b.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "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/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json deleted file mode 100644 index d8687953fc4..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" - ], - "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/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json deleted file mode 100644 index d920abf004a..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" - ], - "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/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json deleted file mode 100644 index 09ffc8aabf0..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "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/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json deleted file mode 100644 index 598809af822..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-gov-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "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/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json deleted file mode 100644 index 853fe96747a..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "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/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json deleted file mode 100644 index 6443ea3fc78..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/ica-groups-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "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/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json deleted file mode 100644 index 5a723782e85..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "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/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json deleted file mode 100644 index 4b5789c65aa..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "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/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json deleted file mode 100644 index 84f9a134b4c..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "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/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json deleted file mode 100644 index ce7e3f3df6a..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.0.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "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-a.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json deleted file mode 100644 index f57828428b5..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.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 deleted file mode 100644 index 7447682660b..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.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 deleted file mode 100644 index a7d98669308..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-a.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x" - ], - "chain-b": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.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-v7.0.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json deleted file mode 100644 index ea9a51a123f..00000000000 --- a/.github/compatibility-test-matrices/release-v7.0.x/transfer-chain-b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.0.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.0.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-v7.1.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json deleted file mode 100644 index 6c0aeb372dc..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-a.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" - ], - "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/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json deleted file mode 100644 index d6e795a34b4..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/client-chain-b.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestClientTestSuite" - ], - "test": [ - "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" - ], - "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/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json deleted file mode 100644 index 345a8b00312..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-a.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "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/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json deleted file mode 100644 index 598d5d90a2e..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/connection-chain-b.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestConnectionTestSuite" - ], - "test": [ - "TestMaxExpectedTimePerBlockParam" - ], - "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/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json deleted file mode 100644 index bad2a50820f..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-a.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" - ], - "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/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json deleted file mode 100644 index a24454ea7be..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-chain-b.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulTransfer", - "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" - ], - "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/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json deleted file mode 100644 index 326f67e3b52..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "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/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json deleted file mode 100644 index ed5212aa68d..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-gov-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsGovTestSuite" - ], - "test": [ - "TestInterchainAccountsGovIntegration" - ], - "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/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json deleted file mode 100644 index 0e74fd1268d..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "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/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json deleted file mode 100644 index 6c80cf610f8..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/ica-groups-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestInterchainAccountsGroupsTestSuite" - ], - "test": [ - "TestInterchainAccountsGroupsIntegration" - ], - "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/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json deleted file mode 100644 index 6eaef335089..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-a.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "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/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json deleted file mode 100644 index 545f5057b28..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-ica-chain-b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestIncentivizedInterchainAccountsTestSuite" - ], - "test": [ - "TestMsgSendTx_SuccessfulBankSend_Incentivized", - "TestMsgSendTx_FailedBankSend_Incentivized" - ], - "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/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json deleted file mode 100644 index fe3225d2666..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "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/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json deleted file mode 100644 index 81c8e8c3f37..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "TestIncentivizedTransferTestSuite" - ], - "test": [ - "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", - "TestMsgPayPacketFee_InvalidReceiverAccount", - "TestMultiMsg_MsgPayPacketFeeSingleSender", - "TestMsgPayPacketFee_SingleSender_TimesOut", - "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", - "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" - ], - "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/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-a.json deleted file mode 100644 index 049b443d27c..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-a.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "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/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-b.json deleted file mode 100644 index ea3bffac837..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/localhost-ica-chain-b.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "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/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-a.json deleted file mode 100644 index 9852c7ee4e5..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-a.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0" - ], - "chain-b": [ - "release-v7.1.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "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/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-b.json deleted file mode 100644 index 7a72e566acc..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/localhost-transfer-chain-b.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "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-a.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json deleted file mode 100644 index 8d324f92bc8..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-a.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.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 deleted file mode 100644 index 30c47d84466..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-authz-chain-b.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.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 deleted file mode 100644 index 1725541ee08..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-a.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x" - ], - "chain-b": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.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-v7.1.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json deleted file mode 100644 index f7abcfbc9cd..00000000000 --- a/.github/compatibility-test-matrices/release-v7.1.x/transfer-chain-b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "chain-a": [ - "release-v7.1.x", - "v7.1.0", - "v7.0.1", - "v6.2.0", - "v6.1.1", - "v5.2.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", - "v5.3.1" - ], - "chain-b": [ - "release-v7.1.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-v7.2.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json index 941431336d4..69e13955205 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/client-chain-a.json @@ -3,17 +3,16 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "entrypoint": [ "TestClientTestSuite" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/client-chain-b.json index 5e9f298df27..8f1288b1fb8 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/client-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/client-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -31,4 +30,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json index 93cd82722ff..8edfa6164cc 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-a.json @@ -3,17 +3,16 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "entrypoint": [ "TestConnectionTestSuite" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-b.json index 0c2f88fd3de..69205acc2d6 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/connection-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -30,4 +29,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json index 8a5cd87edf9..bd0159aeffb 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-a.json @@ -3,11 +3,10 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "entrypoint": [ "TestInterchainAccountsTestSuite" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json index 1e7f985799e..045b12ee4f1 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -26,4 +25,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json index e751749c15c..a2ec3b15aa0 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-a.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json index a6dfe9584cc..96ee69466e1 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-gov-chain-b.json @@ -3,11 +3,10 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "entrypoint": [ "TestInterchainAccountsGovTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json index 50c0d028f59..e19f069a7ed 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-a.json @@ -3,11 +3,10 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "entrypoint": [ "TestInterchainAccountsGroupsTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json index 5e1e7fbb302..0da5eab20a3 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/ica-groups-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json index 15e54afa956..dc5f83f4955 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-a.json @@ -3,11 +3,10 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "entrypoint": [ "TestIncentivizedInterchainAccountsTestSuite" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json index d7b9577eeb6..5a6f63ef085 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-ica-chain-b.json @@ -1,10 +1,9 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", - "v6.1.1" + "v6.1.1", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -25,4 +24,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json index 8710a544bd2..78748381095 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json index de265c59fdb..c7f98b0fede 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/incentivized-transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json index 5f2f47bd881..d15719ac570 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json @@ -1,7 +1,7 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0" + "v7.2.0", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -22,4 +22,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json index 44fc4cacf0d..c492bc400e2 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json @@ -3,8 +3,8 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0" + "v7.2.0", + "release-v7.2.x" ], "entrypoint": [ "LocalhostInterchainAccountsTestSuite" @@ -22,4 +22,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json index 7ee659b3e62..d39ef20862c 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json @@ -1,7 +1,7 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0" + "v7.2.0", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -21,4 +21,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json index c1c30c297ae..e8317c16106 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json @@ -3,8 +3,8 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0" + "v7.2.0", + "release-v7.2.x" ], "entrypoint": [ "LocalhostTransferTestSuite" @@ -21,4 +21,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json index f53d39d7cb3..ff463e840f8 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-a.json @@ -3,10 +3,9 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", - "v6.2.0" + "v7.2.0", + "v6.2.0", + "release-v7.2.x" ], "entrypoint": [ "TestAuthzTransferTestSuite" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json index bc30aee49c2..9801cf24029 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/transfer-authz-chain-b.json @@ -1,9 +1,8 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", - "v6.2.0" + "v7.2.0", + "v6.2.0", + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -24,4 +23,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json index 025222efcdf..ef50d8a6678 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-a.json @@ -3,17 +3,16 @@ "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "entrypoint": [ "TestTransferTestSuite" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json index b1986449f8b..adf3bf80813 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/transfer-chain-b.json @@ -1,16 +1,15 @@ { "chain-a": [ - "release-v7.2.x", - "v7.1.0", - "v7.0.1", + "v7.2.0", "v6.2.0", "v6.1.1", + "v5.3.1", "v5.2.1", "v4.4.2", "v4.3.1", "v4.2.2", "v4.1.3", - "v5.3.1" + "release-v7.2.x" ], "chain-b": [ "release-v7.2.x" @@ -35,4 +34,4 @@ "chain-image": [ "ghcr.io/cosmos/ibc-go-simd" ] -} +} \ No newline at end of file diff --git a/.github/mergify.yml b/.github/mergify.yml index 0048d078b29..a76ef5c3022 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -82,22 +82,6 @@ pull_request_rules: backport: branches: - release/v6.2.x - - name: backport patches to v7.0.x branch - conditions: - - base=main - - label=backport-to-v7.0.x - actions: - backport: - branches: - - release/v7.0.x - - name: backport patches to v7.1.x branch - conditions: - - base=main - - label=backport-to-v7.1.x - actions: - backport: - branches: - - release/v7.1.x - name: backport patches to v7.2.x branch conditions: - base=main diff --git a/.github/workflows/e2e-compatibility-unreleased.yaml b/.github/workflows/e2e-compatibility-unreleased.yaml index 35d0c990737..c7aae3e31af 100644 --- a/.github/workflows/e2e-compatibility-unreleased.yaml +++ b/.github/workflows/e2e-compatibility-unreleased.yaml @@ -20,8 +20,6 @@ jobs: - release/v5.3.x - release/v6.1.x - release/v6.2.x - - release/v7.0.x - - release/v7.1.x - release/v7.2.x steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index 29dd7393622..e90828ade14 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -15,8 +15,6 @@ on: - release/v5.3.x - release/v6.1.x - release/v6.2.x - - release/v7.0.x - - release/v7.1.x - release/v7.2.x - main ibc-go-version: @@ -58,8 +56,6 @@ jobs: - release/v5.3.x - release/v6.1.x - release/v6.2.x - - release/v7.0.x - - release/v7.1.x - release/v7.2.x - main steps: diff --git a/.github/workflows/e2e-manual-simd.yaml b/.github/workflows/e2e-manual-simd.yaml index 670b8933f58..b36a5dbebc3 100644 --- a/.github/workflows/e2e-manual-simd.yaml +++ b/.github/workflows/e2e-manual-simd.yaml @@ -35,8 +35,7 @@ on: default: main options: - main - - v7.1.0 - - v7.0.1 + - v7.2.0 - v6.2.0 - v6.1.1 - v5.2.1 @@ -50,14 +49,13 @@ on: required: false type: string chain-b-tag: - default: v7.1.0 + default: v7.2.0 description: 'The tag to use for chain B' required: true type: choice options: - main - - v7.1.0 - - v7.0.1 + - v7.2.0 - v6.2.0 - v6.1.1 - v5.2.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 69aa9ad0a39..943ee5d93ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,8 +42,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### State Machine Breaking -* [\#3907](https://github.com/cosmos/ibc-go/pull/3907) Re-implemented missing functions of `LegacyMsg` interface to fix transaction signing with ledger. - ### Improvements * (tests) [\#3138](https://github.com/cosmos/ibc-go/pull/3138) Support benchmarks and fuzz tests through `testing.TB`. @@ -52,6 +50,17 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +## [v7.2.0](https://github.com/cosmos/ibc-go/releases/tag/v7.2.0) - 2023-06-22 + +### Dependencies + +* [\#3810](https://github.com/cosmos/ibc-go/pull/3810) Update Cosmos SDK to v0.47.3. +* [\#3862](https://github.com/cosmos/ibc-go/pull/3862) Update CometBFT to v0.37.2. + +### State Machine Breaking + +* [\#3907](https://github.com/cosmos/ibc-go/pull/3907) Re-implemented missing functions of `LegacyMsg` interface to fix transaction signing with ledger. + ## [v7.1.0](https://github.com/cosmos/ibc-go/releases/tag/v7.1.0) - 2023-06-09 ### Dependencies diff --git a/RELEASES.md b/RELEASES.md index 3e2e73385c7..94091889a2b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -75,8 +75,7 @@ Only the following major release series have a stable release status: |`v5.3.x`|October 31, 2023| |`v6.1.x`|December 09, 2023| |`v6.2.x`|December 09, 2023| -|`v7.0.x`|March 17, 2024| -|`v7.1.x`|March 17, 2024| +|`v7.2.x`|March 17, 2024| All missing minor release versions have been discontinued. @@ -116,8 +115,7 @@ Versions of Golang, Cosmos SDK and Tendermint used by ibc-go in the currently ac | 1.19 | v5.3.1 | v0.46.12 | v0.34.27 | | 1.18 | v6.1.1 | v0.46.7 | v0.34.24 | | 1.19 | v6.2.0 | v0.46.12 | v0.34.27 | -| 1.19 | v7.0.1 | v0.47.0 | v0.37.0 | -| 1.19 | v7.1.0 | v0.47.2 | v0.37.1 | +| 1.19 | v7.2.0 | v0.47.3 | v0.37.2 | ## Graphics diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 22df81c3547..a52f6e8e925 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -180,6 +180,10 @@ module.exports = { label: "v7.1.0", key: "v7.1.0", }, + { + label: "v7.2.0", + key: "v7.2.0", + }, ], topbar: { banner: true, diff --git a/docs/roadmap/roadmap.md b/docs/roadmap/roadmap.md index 4f9f8dc4c8d..51a221738c4 100644 --- a/docs/roadmap/roadmap.md +++ b/docs/roadmap/roadmap.md @@ -4,13 +4,13 @@ order: 1 # Roadmap ibc-go -_Lastest update: April 6th, 2023_ +_Lastest update: June 23th, 2023_ This document endeavours to inform the wider IBC community about plans and priorities for work on ibc-go by the team at Interchain GmbH. It is intended to broadly inform all users of ibc-go, including developers and operators of IBC, relayer, chain and wallet applications. This roadmap should be read as a high-level guide, rather than a commitment to schedules and deliverables. The degree of specificity is inversely proportional to the timeline. We will update this document periodically to reflect the status and plans. For the latest expected release timelines, please check [here](https://github.com/cosmos/ibc-go/wiki/Release-timeline). -## v7.2.0 +## v7.3.0 Follow the progress with the [milestone](https://github.com/cosmos/ibc-go/milestone/37). diff --git a/docs/versions b/docs/versions index 496769f30fe..0f8d474ab6c 100644 --- a/docs/versions +++ b/docs/versions @@ -1,4 +1,5 @@ -release/v7.0.x v7.1.0 +release/v7.2.x v7.2.0 +release/v7.1.x v7.1.0 release/v7.0.x v7.0.0 release/v6.2.x v6.2.0 release/v6.1.x v6.1.0 diff --git a/e2e/go.mod b/e2e/go.mod index 4698710729d..f1925c85dea 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -8,7 +8,7 @@ require ( github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-sdk v0.47.3 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.1.0 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/cosmos/interchain-accounts v0.5.1 github.com/docker/docker v20.10.19+incompatible github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230503171723-5e55f37618b7 diff --git a/modules/capability/go.mod b/modules/capability/go.mod index 5e82bd40fce..2adf7138ef0 100644 --- a/modules/capability/go.mod +++ b/modules/capability/go.mod @@ -14,7 +14,7 @@ require ( github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-sdk v0.47.3 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.1.0 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 From 6fcedcae3559acf82e07e48373d2e821be8df5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:26:59 +0200 Subject: [PATCH 02/23] nit: code readability (#3961) --- testing/chain.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testing/chain.go b/testing/chain.go index 17513334525..9f38cf86f86 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -472,9 +472,6 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, ) require.NotNil(chain.TB, tmValSet) - vsetHash := tmValSet.Hash() - nextValHash := nextVals.Hash() - tmHeader := tmtypes.Header{ Version: tmprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, ChainID: chainID, @@ -483,8 +480,8 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, LastBlockID: MakeBlockID(make([]byte, tmhash.Size), 10_000, make([]byte, tmhash.Size)), LastCommitHash: chain.App.LastCommitID().Hash, DataHash: tmhash.Sum([]byte("data_hash")), - ValidatorsHash: vsetHash, - NextValidatorsHash: nextValHash, + ValidatorsHash: tmValSet.Hash(), + NextValidatorsHash: nextVals.Hash(), ConsensusHash: tmhash.Sum([]byte("consensus_hash")), AppHash: chain.CurrentHeader.AppHash, LastResultsHash: tmhash.Sum([]byte("last_results_hash")), From 30297b720186e5c2ace3941b8d2c20876645a7e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 16:55:19 +0200 Subject: [PATCH 03/23] build(deps): Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#3966) * build(deps): Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 Bumps google.golang.org/protobuf from 1.30.0 to 1.31.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * go mod tidy --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Damian Nolan --- e2e/go.mod | 2 +- e2e/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- modules/capability/go.mod | 2 +- modules/capability/go.sum | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index f1925c85dea..9e47c47ea71 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -209,7 +209,7 @@ require ( google.golang.org/api v0.122.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 9b86e48f646..893a5db400d 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1667,8 +1667,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.mod b/go.mod index d05b8376e91..e60babb9b33 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/grpc v1.56.1 - google.golang.org/protobuf v1.30.0 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index a5c7114278b..c3032e1a5e7 100644 --- a/go.sum +++ b/go.sum @@ -1562,8 +1562,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/modules/capability/go.mod b/modules/capability/go.mod index 2adf7138ef0..0a8e5b8395c 100644 --- a/modules/capability/go.mod +++ b/modules/capability/go.mod @@ -163,7 +163,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.1 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/modules/capability/go.sum b/modules/capability/go.sum index 8e4f46fd4e3..7d2b3c1b9d0 100644 --- a/modules/capability/go.sum +++ b/modules/capability/go.sum @@ -1570,8 +1570,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 8824b2d78ea0a0675af8f9b5c0270b3e12782e14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 15:19:47 +0000 Subject: [PATCH 04/23] build(deps): Bump bufbuild/buf-setup-action from 1.21.0 to 1.22.0 (#3965) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.21.0 to 1.22.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.21.0...v1.22.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/proto-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 6f3ead6c176..7997352fceb 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.21.0 + - uses: bufbuild/buf-setup-action@v1.22.0 - uses: bufbuild/buf-push-action@v1 with: input: "proto" From 2b955f8741d979340b6f289dbf858f1cb6bf89dd Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 27 Jun 2023 16:09:32 +0800 Subject: [PATCH 05/23] marshaler -> codec (#3970) --- .../controller/types/msgs_test.go | 4 ++-- .../apps/27-interchain-accounts/types/codec_test.go | 10 +++++----- testing/app.go | 2 +- testing/simapp/app.go | 2 +- testing/simapp/params/encoding.go | 2 +- testing/simapp/params/proto.go | 6 +++--- testing/simapp/simd/cmd/root.go | 2 +- testing/simapp/test_helpers.go | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go index 2a84109fad0..48b383e0026 100644 --- a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go +++ b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go @@ -143,7 +143,7 @@ func TestMsgSendTxValidateBasic(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ @@ -179,7 +179,7 @@ func TestMsgSendTxGetSigners(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 33616d38790..f47219862cb 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -110,10 +110,10 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, tc.msgs) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.msgs) suite.Require().NoError(err, tc.name) - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz) if tc.expPass { suite.Require().NoError(err, tc.name) } else { @@ -127,16 +127,16 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { } // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []proto.Message{&banktypes.MsgSendResponse{}}) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{&banktypes.MsgSendResponse{}}) suite.Require().NoError(err) suite.Require().NotEmpty(bz) // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, bz) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz) suite.Require().Error(err) // unregistered type // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Marshaler, []byte("invalid")) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid")) suite.Require().Error(err) suite.Require().Empty(msgs) } diff --git a/testing/app.go b/testing/app.go index 61f804c4a8d..d6a0848c616 100644 --- a/testing/app.go +++ b/testing/app.go @@ -57,7 +57,7 @@ func SetupTestingApp() (TestingApp, map[string]json.RawMessage) { db := dbm.NewMemDB() encCdc := simapp.MakeTestEncodingConfig() app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 5, encCdc, simtestutil.EmptyAppOptions{}) - return app, simapp.NewDefaultGenesisState(encCdc.Marshaler) + return app, simapp.NewDefaultGenesisState(encCdc.Codec) } // SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 90b9e5ab5bd..00af5593018 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -277,7 +277,7 @@ func NewSimApp( homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { - appCodec := encodingConfig.Marshaler + appCodec := encodingConfig.Codec legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry diff --git a/testing/simapp/params/encoding.go b/testing/simapp/params/encoding.go index 3d634abf16b..8ff9ea04b39 100644 --- a/testing/simapp/params/encoding.go +++ b/testing/simapp/params/encoding.go @@ -10,7 +10,7 @@ import ( // This is provided for compatibility between protobuf and amino implementations. type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry - Marshaler codec.Codec + Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino } diff --git a/testing/simapp/params/proto.go b/testing/simapp/params/proto.go index a752d107907..2a38fff0400 100644 --- a/testing/simapp/params/proto.go +++ b/testing/simapp/params/proto.go @@ -16,12 +16,12 @@ import ( func MakeTestEncodingConfig() EncodingConfig { cdc := codec.NewLegacyAmino() interfaceRegistry := types.NewInterfaceRegistry() - marshaler := codec.NewProtoCodec(interfaceRegistry) + codec := codec.NewProtoCodec(interfaceRegistry) return EncodingConfig{ InterfaceRegistry: interfaceRegistry, - Marshaler: marshaler, - TxConfig: tx.NewTxConfig(marshaler, tx.DefaultSignModes), + Codec: codec, + TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), Amino: cdc, } } diff --git a/testing/simapp/simd/cmd/root.go b/testing/simapp/simd/cmd/root.go index 7a7d59a5453..4afecc5f716 100644 --- a/testing/simapp/simd/cmd/root.go +++ b/testing/simapp/simd/cmd/root.go @@ -43,7 +43,7 @@ import ( func NewRootCmd() (*cobra.Command, params.EncodingConfig) { encodingConfig := simapp.MakeTestEncodingConfig() initClientCtx := client.Context{}. - WithCodec(encodingConfig.Marshaler). + WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). diff --git a/testing/simapp/test_helpers.go b/testing/simapp/test_helpers.go index 7399cf697c6..4915eb4c923 100644 --- a/testing/simapp/test_helpers.go +++ b/testing/simapp/test_helpers.go @@ -55,7 +55,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { encCdc := MakeTestEncodingConfig() app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, simtestutil.EmptyAppOptions{}) if withGenesis { - return app, NewDefaultGenesisState(encCdc.Marshaler) + return app, NewDefaultGenesisState(encCdc.Codec) } return app, GenesisState{} } From 3559e5862665e71b045a9ed60a1b3d9874a6862b Mon Sep 17 00:00:00 2001 From: Vishal Potpelliwar <71565171+vishal-kanna@users.noreply.github.com> Date: Tue, 27 Jun 2023 15:37:53 +0530 Subject: [PATCH 06/23] Docs: changed the comment in handdshake.go (#3969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * idk * changed the comment * Update handshake.go * Update modules/core/04-channel/keeper/handshake.go Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --------- Co-authored-by: Carlos Rodriguez Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- modules/core/04-channel/keeper/handshake.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/04-channel/keeper/handshake.go b/modules/core/04-channel/keeper/handshake.go index 3bc06ba83a4..92241432503 100644 --- a/modules/core/04-channel/keeper/handshake.go +++ b/modules/core/04-channel/keeper/handshake.go @@ -290,8 +290,8 @@ func (k Keeper) WriteOpenAckChannel( emitChannelOpenAckEvent(ctx, portID, channelID, channel) } -// ChanOpenConfirm is called by the counterparty module to close their end of the -// channel, since the other end has been closed. +// ChanOpenConfirm is called by the handshake-accepting module to confirm the acknowledgement +// of the handshake-originating module on the other chain and finish the channel opening handshake. func (k Keeper) ChanOpenConfirm( ctx sdk.Context, portID, From 4a43279f8694d47c022b7ae6fcc63d2b881fe071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 27 Jun 2023 14:54:59 +0200 Subject: [PATCH 07/23] imp!: add encoding type as argument to ICA encoding/decoding functions (#3967) --- e2e/tests/interchain_accounts/base_test.go | 8 +++--- e2e/tests/interchain_accounts/gov_test.go | 2 +- e2e/tests/interchain_accounts/groups_test.go | 2 +- .../interchain_accounts/incentivized_test.go | 4 +-- .../interchain_accounts/localhost_test.go | 6 ++-- e2e/tests/upgrades/upgrade_test.go | 2 +- .../controller/keeper/msg_server_test.go | 2 +- .../controller/keeper/relay_test.go | 6 ++-- .../controller/types/msgs_test.go | 4 +-- .../host/client/cli/tx.go | 2 +- .../host/client/cli/tx_test.go | 2 +- .../host/ibc_module_test.go | 4 +-- .../host/keeper/keeper.go | 4 +-- .../host/keeper/relay.go | 2 +- .../host/keeper/relay_test.go | 28 +++++++++---------- .../27-interchain-accounts/types/codec.go | 4 +-- .../types/codec_test.go | 14 +++++----- modules/apps/29-fee/ica_test.go | 2 +- 18 files changed, 49 insertions(+), 49 deletions(-) diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index fbfdc886797..c31e1b63880 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -97,7 +97,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -189,7 +189,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -295,7 +295,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -370,7 +370,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 2f572c35596..2daa2be095d 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -90,7 +90,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index bf1f524f413..de24999cddb 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -162,7 +162,7 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 21af9b137dc..2d3dc532e0a 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -140,7 +140,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -309,7 +309,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index fa5ba918e83..7008c7ab8c4 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -140,7 +140,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -297,7 +297,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ @@ -425,7 +425,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan } cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}) + bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 25e024dedd9..0a68bc4c813 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -408,7 +408,7 @@ func (s *UpgradeTestSuite) TestV5ToV6ChainUpgrade() { Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), } - data, err := icatypes.SerializeCosmosTx(testsuite.Codec(), []proto.Message{msgSend}) + data, err := icatypes.SerializeCosmosTx(testsuite.Codec(), []proto.Message{msgSend}, icatypes.EncodingProtobuf) s.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go index ef55faef863..7960af5b01b 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go @@ -171,7 +171,7 @@ func (suite *KeeperTestSuite) TestSubmitTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go index c363643a484..856cda7fdfe 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay_test.go @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) TestSendTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ @@ -67,7 +67,7 @@ func (suite *KeeperTestSuite) TestSendTx() { }, } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), msgsBankSend) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), msgsBankSend, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ @@ -125,7 +125,7 @@ func (suite *KeeperTestSuite) TestSendTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainB.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData = icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go index 48b383e0026..d2347dc3c41 100644 --- a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go +++ b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go @@ -143,7 +143,7 @@ func TestMsgSendTxValidateBasic(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ @@ -179,7 +179,7 @@ func TestMsgSendTxGetSigners(t *testing.T) { Amount: ibctesting.TestCoins, } - data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}) + data, err := icatypes.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) require.NoError(t, err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx.go b/modules/apps/27-interchain-accounts/host/client/cli/tx.go index 159dff22449..c536fbde43f 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx.go @@ -130,7 +130,7 @@ func convertBytesIntoProtoMessages(cdc *codec.ProtoCodec, msgBytes []byte) ([]pr // generateIcaPacketDataFromProtoMessages generates ica packet data as bytes from a given set of proto encoded sdk messages and a memo. func generateIcaPacketDataFromProtoMessages(cdc *codec.ProtoCodec, sdkMessages []proto.Message, memo string) ([]byte, error) { - icaPacketDataBytes, err := icatypes.SerializeCosmosTx(cdc, sdkMessages) + icaPacketDataBytes, err := icatypes.SerializeCosmosTx(cdc, sdkMessages, icatypes.EncodingProtobuf) if err != nil { return nil, err } diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go index a1ca3e0f547..63422405696 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go @@ -125,7 +125,7 @@ func TestGeneratePacketData(t *testing.T) { require.Equal(t, tc.memo, packetData.Memo) data := packetData.Data - messages, err := icatypes.DeserializeCosmosTx(cdc, data) + messages, err := icatypes.DeserializeCosmosTx(cdc, data, icatypes.EncodingProtobuf) require.NoError(t, err) require.NotNil(t, messages) diff --git a/modules/apps/27-interchain-accounts/host/ibc_module_test.go b/modules/apps/27-interchain-accounts/host/ibc_module_test.go index 373bdbc7226..3ad31f13012 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -446,7 +446,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: amount, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -655,7 +655,7 @@ func (suite *InterchainAccountsTestSuite) TestControlAccountAfterChannelClose() Amount: tokenAmt, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 1dd233aa76b..9234117c4fe 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -24,7 +24,7 @@ import ( // Keeper defines the IBC interchain accounts host keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.Codec legacySubspace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper @@ -43,7 +43,7 @@ type Keeper struct { // NewKeeper creates a new interchain accounts host Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, accountKeeper icatypes.AccountKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, authority string, diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index 2f0037558ea..b49df0a38b2 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -26,7 +26,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byt switch data.Type { case icatypes.EXECUTE_TX: - msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data) + msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data, icatypes.EncodingProtobuf) if err != nil { return nil, errorsmod.Wrapf(err, "failed to deserialize interchain account transaction") } diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index 034263f1039..d829259ecce 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -59,7 +59,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -86,7 +86,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -114,7 +114,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -148,7 +148,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -183,7 +183,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Proposer: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -225,7 +225,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -251,7 +251,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Depositor: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -277,7 +277,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -316,7 +316,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { TimeoutTimestamp: uint64(0), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -336,7 +336,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { func() { msg := &banktypes.MsgSendResponse{} - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -375,7 +375,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { { "invalid packet type - UNSPECIFIED", func() { - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -392,7 +392,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { func() { path.EndpointA.ChannelConfig.PortID = "invalid-port-id" - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -413,7 +413,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -434,7 +434,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index 4456173c79a..d8ba2d05433 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -28,7 +28,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are // packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx // bytes are returned. Only the ProtoCodec is supported for serializing messages. -func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, err error) { +func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) (bz []byte, err error) { // only ProtoCodec is supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") @@ -58,7 +58,7 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message) (bz []byte, // DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes // into a slice of sdk.Msg's. Only the ProtoCodec is supported for message // deserialization. -func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte) ([]sdk.Msg, error) { +func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { // only ProtoCodec is supported if _, ok := cdc.(*codec.ProtoCodec); !ok { return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index f47219862cb..886fb21a77c 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -110,10 +110,10 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.msgs) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.msgs, types.EncodingProtobuf) suite.Require().NoError(err, tc.name) - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, types.EncodingProtobuf) if tc.expPass { suite.Require().NoError(err, tc.name) } else { @@ -127,16 +127,16 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { } // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{&banktypes.MsgSendResponse{}}) + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) suite.Require().NoError(err) suite.Require().NotEmpty(bz) // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, types.EncodingProtobuf) suite.Require().Error(err) // unregistered type // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid")) + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(msgs) } @@ -148,11 +148,11 @@ func (suite *TypesTestSuite) TestDeserializeAndSerializeCosmosTxWithAmino() { cdc := codec.NewLegacyAmino() marshaler := codec.NewAminoCodec(cdc) - msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}) + msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}, types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(msgs) - bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}) + bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}, types.EncodingProtobuf) suite.Require().Error(err) suite.Require().Empty(bz) } diff --git a/modules/apps/29-fee/ica_test.go b/modules/apps/29-fee/ica_test.go index 451c54b8b73..1e009e75d56 100644 --- a/modules/apps/29-fee/ica_test.go +++ b/modules/apps/29-fee/ica_test.go @@ -146,7 +146,7 @@ func (suite *FeeTestSuite) TestFeeInterchainAccounts() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate}) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ From 6bb56d842e99cd40dbdb0e8a0066723c828a54b1 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 27 Jun 2023 14:56:25 +0200 Subject: [PATCH 08/23] update v7-to-v8.md --- docs/migrations/v7-to-v8.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index d49bd178e6e..141dd642810 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -76,7 +76,9 @@ TODO: https://github.com/cosmos/ibc-go/pull/3505 (extra parameter added to trans ## IBC Apps -TODO: https://github.com/cosmos/ibc-go/pull/3303 +TODO: +- https://github.com/cosmos/ibc-go/pull/3303 +- https://github.com/cosmos/ibc-go/pull/3967 ## Relayers From cbdb85660772f356724c68a591482844e66d739e Mon Sep 17 00:00:00 2001 From: Damian Nolan Date: Wed, 28 Jun 2023 13:32:55 +0200 Subject: [PATCH 09/23] fix: add relayer as an output in e2e workflow (#3977) --- .github/workflows/e2e.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 71bbf1c48d7..db9a9db2f58 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,6 +31,7 @@ jobs: runs-on: ubuntu-latest outputs: simd-tag: ${{ steps.get-tag.outputs.simd-tag }} + relayer: ${{ steps.get-relayer.outputs.relayer }} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 @@ -100,4 +101,4 @@ jobs: chain-binary: 'simd' # on regular PRs we won't run interchain account or upgrade tests. test-exclusions: 'TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite' - relayer-tag: "${{ needs.determine-image-tag.outputs.relayer }}" + relayer-type: "${{ needs.determine-image-tag.outputs.relayer }}" From a88fc76f865a16d8bc1885e73e119961304ffb16 Mon Sep 17 00:00:00 2001 From: Alice <111279925+Alice-Interchain@users.noreply.github.com> Date: Thu, 29 Jun 2023 14:18:12 +0100 Subject: [PATCH 10/23] chore: update discord links in documentation and readme (#3983) * discord security patch Update README.md update old links to https://discord.gg/cosmosnetwork * discord security patch Update config.js updating old links to https://discord.gg/cosmosnetwork --- README.md | 2 +- docs/.vuepress/config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1eabe9861dd..798bc38f4d7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Lines Of Code - + Discord diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index a52f6e8e925..bd4af9289b0 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -608,7 +608,7 @@ module.exports = { }, footer: { question: { - text: "Chat with IBC developers in Discord.", + text: "Chat with IBC developers in Discord.", }, textLink: { text: "ibcprotocol.dev", @@ -673,7 +673,7 @@ module.exports = { }, { title: "Chat", - url: "https://discord.gg/W8trcGV", + url: "https://discord.gg/cosmosnetwork", }, ], }, From 99e1d7e03eb4f1cd44783324f42ea7470b374503 Mon Sep 17 00:00:00 2001 From: ruthishvitwit <122080147+ruthishvitwit@users.noreply.github.com> Date: Fri, 30 Jun 2023 15:40:21 +0530 Subject: [PATCH 11/23] chore(api)!: Remove unnecessary event attribute from INIT Handshake Msgs --- docs/migrations/v7-to-v8.md | 1 + modules/core/03-connection/keeper/events.go | 1 - modules/core/04-channel/keeper/events.go | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index 141dd642810..5822db920cc 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -83,6 +83,7 @@ TODO: ## Relayers - Getter functions in `MsgChannelOpenInitResponse`, `MsgChannelOpenTryResponse`, `MsgTransferResponse`, `MsgRegisterInterchainAccountResponse` and `MsgSendTxResponse` have been removed. The fields can be accessed directly. +- Attribute with key `counterparty_connection_id` has been removed from event with key `connectiontypes.EventTypeConnectionOpenInit` (where `connectiontypes` is an import alias for `"github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"`) and attribute with key `counterparty_channel_id` has been removed from event with key `channeltypes.EventTypeChannelOpenInit` (where `channeltypes` is an import alias for `"github.com/cosmos/ibc-go/v8/modules/core/04-channel"`) since both (counterparty connection ID and counterparty channel ID) are empty on `ConnectionOpenInit` and `ChannelOpenInit` respectively. ## IBC Light Clients diff --git a/modules/core/03-connection/keeper/events.go b/modules/core/03-connection/keeper/events.go index e9e5a575990..2ed0507fdf1 100644 --- a/modules/core/03-connection/keeper/events.go +++ b/modules/core/03-connection/keeper/events.go @@ -14,7 +14,6 @@ func emitConnectionOpenInitEvent(ctx sdk.Context, connectionID string, clientID sdk.NewAttribute(types.AttributeKeyConnectionID, connectionID), sdk.NewAttribute(types.AttributeKeyClientID, clientID), sdk.NewAttribute(types.AttributeKeyCounterpartyClientID, counterparty.ClientId), - sdk.NewAttribute(types.AttributeKeyCounterpartyConnectionID, counterparty.ConnectionId), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index 07b105f363a..a7afcb35a8b 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -18,7 +18,6 @@ func emitChannelOpenInitEvent(ctx sdk.Context, portID string, channelID string, sdk.NewAttribute(types.AttributeKeyPortID, portID), sdk.NewAttribute(types.AttributeKeyChannelID, channelID), sdk.NewAttribute(types.AttributeCounterpartyPortID, channel.Counterparty.PortId), - sdk.NewAttribute(types.AttributeCounterpartyChannelID, channel.Counterparty.ChannelId), sdk.NewAttribute(types.AttributeKeyConnectionID, channel.ConnectionHops[0]), sdk.NewAttribute(types.AttributeVersion, channel.Version), ), From 445187e4cc704381853fbd8d2cb512a5f3bac3eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:28:56 +0200 Subject: [PATCH 12/23] build(deps): Bump bufbuild/buf-setup-action from 1.22.0 to 1.23.0 (#3992) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.22.0 to 1.23.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/proto-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 7997352fceb..b8fbda91a60 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.22.0 + - uses: bufbuild/buf-setup-action@v1.23.0 - uses: bufbuild/buf-push-action@v1 with: input: "proto" From dffc7b7d12f644fad4b8f1b8b882b35653322ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:35:20 +0200 Subject: [PATCH 13/23] refactor: change sdk.Events usage to []abci.Event in the testing pkg (#3980) * refactor, change sdk.Events usage to []abci.Event * fix, e2e build --- e2e/tests/interchain_accounts/localhost_test.go | 15 +++++---------- e2e/tests/transfer/localhost_test.go | 6 ++---- modules/apps/29-fee/keeper/events_test.go | 8 ++++---- modules/apps/29-fee/transfer_test.go | 2 +- modules/apps/transfer/keeper/msg_server_test.go | 2 +- modules/apps/transfer/keeper/relay_test.go | 6 +++--- modules/apps/transfer/transfer_test.go | 6 +++--- testing/endpoint.go | 10 +++++----- testing/events.go | 14 +++++++------- testing/path.go | 4 ++-- testing/solomachine.go | 6 +++--- 11 files changed, 36 insertions(+), 43 deletions(-) diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index 7008c7ab8c4..7a0b1181893 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -154,8 +154,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - packet, err = ibctesting.ParsePacketFromEvents(events) + packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(packet) }) @@ -166,8 +165,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - ack, err = ibctesting.ParseAckFromEvents(events) + ack, err = ibctesting.ParseAckFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(ack) }) @@ -311,8 +309,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - packet, err = ibctesting.ParsePacketFromEvents(events) + packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(packet) }) @@ -439,8 +436,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - packet, err = ibctesting.ParsePacketFromEvents(events) + packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(packet) }) @@ -451,8 +447,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - ack, err = ibctesting.ParseAckFromEvents(events) + ack, err = ibctesting.ParseAckFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(ack) }) diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go index e09331fc98c..efca34f1fd4 100644 --- a/e2e/tests/transfer/localhost_test.go +++ b/e2e/tests/transfer/localhost_test.go @@ -118,8 +118,7 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() { txResp := s.Transfer(ctx, chainA, userAWallet, transfertypes.PortID, msgChanOpenInitRes.ChannelId, testvalues.DefaultTransferAmount(chainADenom), userAWallet.FormattedAddress(), userBWallet.FormattedAddress(), clienttypes.NewHeight(1, 100), 0, "") s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - packet, err = ibctesting.ParsePacketFromEvents(events) + packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(packet) }) @@ -139,8 +138,7 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() { txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) s.AssertTxSuccess(txResp) - events := testsuite.ABCIToSDKEvents(txResp.Events) - ack, err = ibctesting.ParseAckFromEvents(events) + ack, err = ibctesting.ParseAckFromEvents(txResp.Events) s.Require().NoError(err) s.Require().NotNil(ack) }) diff --git a/modules/apps/29-fee/keeper/events_test.go b/modules/apps/29-fee/keeper/events_test.go index 2cd5b265b6d..f2d5c34d9ae 100644 --- a/modules/apps/29-fee/keeper/events_test.go +++ b/modules/apps/29-fee/keeper/events_test.go @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() { suite.Require().NotNil(res) // parse the packet from result events and recv packet on chainB - packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) suite.Require().NotNil(packet) @@ -134,7 +134,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() { suite.Require().NotNil(res) // parse the acknowledgement from result events and acknowledge packet on chainA - ack, err := ibctesting.ParseAckFromEvents(res.GetEvents()) + ack, err := ibctesting.ParseAckFromEvents(res.Events) suite.Require().NoError(err) suite.Require().NotNil(ack) @@ -146,7 +146,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() { suite.Require().NoError(err) suite.Require().NotNil(res) - events := res.GetEvents() + events := res.Events expectedEvents := sdk.Events{ sdk.NewEvent( types.EventTypeDistributeFee, @@ -163,7 +163,7 @@ func (suite *KeeperTestSuite) TestDistributeFeeEvent() { sdk.NewAttribute(types.AttributeKeyReceiver, suite.chainA.SenderAccount.GetAddress().String()), sdk.NewAttribute(types.AttributeKeyFee, defaultTimeoutFee.String()), ), - } + }.ToABCIEvents() for _, evt := range expectedEvents { suite.Require().Contains(events, evt) diff --git a/modules/apps/29-fee/transfer_test.go b/modules/apps/29-fee/transfer_test.go index 7cf070113ec..0cdc934daf7 100644 --- a/modules/apps/29-fee/transfer_test.go +++ b/modules/apps/29-fee/transfer_test.go @@ -38,7 +38,7 @@ func (suite *FeeTestSuite) TestFeeTransfer() { // after incentivizing the packets originalChainASenderAccountBalance := sdk.NewCoins(suite.chainA.GetSimApp().BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)) - packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) // register counterparty address on chainB diff --git a/modules/apps/transfer/keeper/msg_server_test.go b/modules/apps/transfer/keeper/msg_server_test.go index 552d43be0d4..e8c3a0a099b 100644 --- a/modules/apps/transfer/keeper/msg_server_test.go +++ b/modules/apps/transfer/keeper/msg_server_test.go @@ -104,7 +104,7 @@ func (suite *KeeperTestSuite) TestMsgTransfer() { res, err := suite.chainA.GetSimApp().TransferKeeper.Transfer(sdk.WrapSDKContext(ctx), msg) // Verify events - events := ctx.EventManager().Events() + events := ctx.EventManager().Events().ToABCIEvents() expEvents := ibctesting.EventsMap{ "ibc_transfer": { "sender": suite.chainA.SenderAccount.GetAddress().String(), diff --git a/modules/apps/transfer/keeper/relay_test.go b/modules/apps/transfer/keeper/relay_test.go index 6d723cd107c..d591402e020 100644 --- a/modules/apps/transfer/keeper/relay_test.go +++ b/modules/apps/transfer/keeper/relay_test.go @@ -126,7 +126,7 @@ func (suite *KeeperTestSuite) TestSendTransfer() { result, err := suite.chainB.SendMsgs(transferMsg) suite.Require().NoError(err) // message committed - packet, err := ibctesting.ParsePacketFromEvents(result.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(result.Events) suite.Require().NoError(err) err = path.RelayPacket(packet) @@ -210,7 +210,7 @@ func (suite *KeeperTestSuite) TestSendTransferSetsTotalEscrowAmountForSourceIBCT result, err := suite.chainA.SendMsgs(transferMsg) suite.Require().NoError(err) // message committed - packet, err := ibctesting.ParsePacketFromEvents(result.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(result.Events) suite.Require().NoError(err) err = path1.RelayPacket(packet) @@ -357,7 +357,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { res, err := suite.chainB.SendMsgs(transferMsg) suite.Require().NoError(err) // message committed - packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) err = path.RelayPacket(packet) diff --git a/modules/apps/transfer/transfer_test.go b/modules/apps/transfer/transfer_test.go index 74315f35fd6..a213147baa9 100644 --- a/modules/apps/transfer/transfer_test.go +++ b/modules/apps/transfer/transfer_test.go @@ -66,7 +66,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { res, err := suite.chainA.SendMsgs(msg) suite.Require().NoError(err) // message committed - packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err := ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) // relay send @@ -96,7 +96,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { res, err = suite.chainB.SendMsgs(msg) suite.Require().NoError(err) // message committed - packet, err = ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err = ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) err = pathBtoC.RelayPacket(packet) @@ -119,7 +119,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { res, err = suite.chainC.SendMsgs(msg) suite.Require().NoError(err) // message committed - packet, err = ibctesting.ParsePacketFromEvents(res.GetEvents()) + packet, err = ibctesting.ParsePacketFromEvents(res.Events) suite.Require().NoError(err) err = pathBtoC.RelayPacket(packet) diff --git a/testing/endpoint.go b/testing/endpoint.go index c938f99d5e6..78c725c8cb8 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -122,7 +122,7 @@ func (endpoint *Endpoint) CreateClient() (err error) { return err } - endpoint.ClientID, err = ParseClientIDFromEvents(res.GetEvents()) + endpoint.ClientID, err = ParseClientIDFromEvents(res.Events) require.NoError(endpoint.Chain.TB, err) return nil @@ -219,7 +219,7 @@ func (endpoint *Endpoint) ConnOpenInit() error { return err } - endpoint.ConnectionID, err = ParseConnectionIDFromEvents(res.GetEvents()) + endpoint.ConnectionID, err = ParseConnectionIDFromEvents(res.Events) require.NoError(endpoint.Chain.TB, err) return nil @@ -245,7 +245,7 @@ func (endpoint *Endpoint) ConnOpenTry() error { } if endpoint.ConnectionID == "" { - endpoint.ConnectionID, err = ParseConnectionIDFromEvents(res.GetEvents()) + endpoint.ConnectionID, err = ParseConnectionIDFromEvents(res.Events) require.NoError(endpoint.Chain.TB, err) } @@ -327,7 +327,7 @@ func (endpoint *Endpoint) ChanOpenInit() error { return err } - endpoint.ChannelID, err = ParseChannelIDFromEvents(res.GetEvents()) + endpoint.ChannelID, err = ParseChannelIDFromEvents(res.Events) require.NoError(endpoint.Chain.TB, err) // update version to selected app version @@ -358,7 +358,7 @@ func (endpoint *Endpoint) ChanOpenTry() error { } if endpoint.ChannelID == "" { - endpoint.ChannelID, err = ParseChannelIDFromEvents(res.GetEvents()) + endpoint.ChannelID, err = ParseChannelIDFromEvents(res.Events) require.NoError(endpoint.Chain.TB, err) } diff --git a/testing/events.go b/testing/events.go index 69fef9d1f8c..34f7a147d40 100644 --- a/testing/events.go +++ b/testing/events.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/suite" - sdk "github.com/cosmos/cosmos-sdk/types" + abci "github.com/cometbft/cometbft/abci/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" @@ -17,7 +17,7 @@ type EventsMap map[string]map[string]string // ParseClientIDFromEvents parses events emitted from a MsgCreateClient and returns the // client identifier. -func ParseClientIDFromEvents(events sdk.Events) (string, error) { +func ParseClientIDFromEvents(events []abci.Event) (string, error) { for _, ev := range events { if ev.Type == clienttypes.EventTypeCreateClient { for _, attr := range ev.Attributes { @@ -32,7 +32,7 @@ func ParseClientIDFromEvents(events sdk.Events) (string, error) { // ParseConnectionIDFromEvents parses events emitted from a MsgConnectionOpenInit or // MsgConnectionOpenTry and returns the connection identifier. -func ParseConnectionIDFromEvents(events sdk.Events) (string, error) { +func ParseConnectionIDFromEvents(events []abci.Event) (string, error) { for _, ev := range events { if ev.Type == connectiontypes.EventTypeConnectionOpenInit || ev.Type == connectiontypes.EventTypeConnectionOpenTry { @@ -48,7 +48,7 @@ func ParseConnectionIDFromEvents(events sdk.Events) (string, error) { // ParseChannelIDFromEvents parses events emitted from a MsgChannelOpenInit or // MsgChannelOpenTry and returns the channel identifier. -func ParseChannelIDFromEvents(events sdk.Events) (string, error) { +func ParseChannelIDFromEvents(events []abci.Event) (string, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeChannelOpenInit || ev.Type == channeltypes.EventTypeChannelOpenTry { for _, attr := range ev.Attributes { @@ -63,7 +63,7 @@ func ParseChannelIDFromEvents(events sdk.Events) (string, error) { // ParsePacketFromEvents parses events emitted from a MsgRecvPacket and returns the // acknowledgement. -func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { +func ParsePacketFromEvents(events []abci.Event) (channeltypes.Packet, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeSendPacket { packet := channeltypes.Packet{} @@ -121,7 +121,7 @@ func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { // ParseAckFromEvents parses events emitted from a MsgRecvPacket and returns the // acknowledgement. -func ParseAckFromEvents(events sdk.Events) ([]byte, error) { +func ParseAckFromEvents(events []abci.Event) ([]byte, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeWriteAck { for _, attr := range ev.Attributes { @@ -139,7 +139,7 @@ func ParseAckFromEvents(events sdk.Events) ([]byte, error) { func AssertEvents( suite *suite.Suite, expected EventsMap, - actual sdk.Events, + actual []abci.Event, ) { hasEvents := make(map[string]bool) for eventType := range expected { diff --git a/testing/path.go b/testing/path.go index 4fb605ecbe8..9a97c8fe18d 100644 --- a/testing/path.go +++ b/testing/path.go @@ -52,7 +52,7 @@ func (path *Path) RelayPacket(packet channeltypes.Packet) error { return err } - ack, err := ParseAckFromEvents(res.GetEvents()) + ack, err := ParseAckFromEvents(res.Events) if err != nil { return err } @@ -73,7 +73,7 @@ func (path *Path) RelayPacket(packet channeltypes.Packet) error { return err } - ack, err := ParseAckFromEvents(res.GetEvents()) + ack, err := ParseAckFromEvents(res.Events) if err != nil { return err } diff --git a/testing/solomachine.go b/testing/solomachine.go index df683d3ea0c..13185d40d87 100644 --- a/testing/solomachine.go +++ b/testing/solomachine.go @@ -133,7 +133,7 @@ func (solo *Solomachine) CreateClient(chain *TestChain) string { require.NoError(solo.t, err) require.NotNil(solo.t, res) - clientID, err := ParseClientIDFromEvents(res.GetEvents()) + clientID, err := ParseClientIDFromEvents(res.Events) require.NoError(solo.t, err) return clientID @@ -277,7 +277,7 @@ func (solo *Solomachine) ConnOpenInit(chain *TestChain, clientID string) string require.NoError(solo.t, err) require.NotNil(solo.t, res) - connectionID, err := ParseConnectionIDFromEvents(res.GetEvents()) + connectionID, err := ParseConnectionIDFromEvents(res.Events) require.NoError(solo.t, err) return connectionID @@ -386,7 +386,7 @@ func (solo *Solomachine) SendTransfer(chain *TestChain, portID, channelID string res, err := chain.SendMsgs(&msgTransfer) require.NoError(solo.t, err) - packet, err := ParsePacketFromEvents(res.GetEvents()) + packet, err := ParsePacketFromEvents(res.Events) require.NoError(solo.t, err) return packet From 8351f6520d6c57bee2e1f8772cbee9ef8224534e Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 3 Jul 2023 13:23:23 +0200 Subject: [PATCH 14/23] testing: add function `RelayPacketWithResults` (#3986) --- testing/path.go | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/testing/path.go b/testing/path.go index 9a97c8fe18d..ff93f3f48ca 100644 --- a/testing/path.go +++ b/testing/path.go @@ -4,6 +4,8 @@ import ( "bytes" "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) @@ -39,25 +41,39 @@ func (path *Path) SetChannelOrdered() { // if EndpointA does not contain a packet commitment for that packet. An error is returned // if a relay step fails or the packet commitment does not exist on either endpoint. func (path *Path) RelayPacket(packet channeltypes.Packet) error { + _, _, err := path.RelayPacketWithResults(packet) + return err +} + +// RelayPacketWithResults attempts to relay the packet first on EndpointA and then on EndpointB +// if EndpointA does not contain a packet commitment for that packet. The function returns: +// - The result of the packet receive transaction. +// - The acknowledgement written on the receiving chain. +// - An error if a relay step fails or the packet commitment does not exist on either endpoint. +func (path *Path) RelayPacketWithResults(packet channeltypes.Packet) (*sdk.Result, []byte, error) { pc := path.EndpointA.Chain.App.GetIBCKeeper().ChannelKeeper.GetPacketCommitment(path.EndpointA.Chain.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) if bytes.Equal(pc, channeltypes.CommitPacket(path.EndpointA.Chain.App.AppCodec(), packet)) { // packet found, relay from A to B if err := path.EndpointB.UpdateClient(); err != nil { - return err + return nil, nil, err } res, err := path.EndpointB.RecvPacketWithResult(packet) if err != nil { - return err + return nil, nil, err } ack, err := ParseAckFromEvents(res.Events) if err != nil { - return err + return nil, nil, err } - return path.EndpointA.AcknowledgePacket(packet, ack) + if err := path.EndpointA.AcknowledgePacket(packet, ack); err != nil { + return nil, nil, err + } + + return res, ack, nil } pc = path.EndpointB.Chain.App.GetIBCKeeper().ChannelKeeper.GetPacketCommitment(path.EndpointB.Chain.GetContext(), packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) @@ -65,21 +81,25 @@ func (path *Path) RelayPacket(packet channeltypes.Packet) error { // packet found, relay B to A if err := path.EndpointA.UpdateClient(); err != nil { - return err + return nil, nil, err } res, err := path.EndpointA.RecvPacketWithResult(packet) if err != nil { - return err + return nil, nil, err } ack, err := ParseAckFromEvents(res.Events) if err != nil { - return err + return nil, nil, err + } + + if err := path.EndpointB.AcknowledgePacket(packet, ack); err != nil { + return nil, nil, err } - return path.EndpointB.AcknowledgePacket(packet, ack) + return res, ack, nil } - return fmt.Errorf("packet commitment does not exist on either endpoint for provided packet") + return nil, nil, fmt.Errorf("packet commitment does not exist on either endpoint for provided packet") } From 1f4550fca41a5cd4a026688d73f95b919393709a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 13:48:56 +0000 Subject: [PATCH 15/23] build(deps): Bump bufbuild/buf-setup-action from 1.23.0 to 1.23.1 (#3994) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.23.0 to 1.23.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bufbuild/buf-setup-action&package-manager=github_actions&previous-version=1.23.0&new-version=1.23.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/proto-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index b8fbda91a60..d291b4c925a 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.23.0 + - uses: bufbuild/buf-setup-action@v1.23.1 - uses: bufbuild/buf-push-action@v1 with: input: "proto" From e5b057da434a9b1e910a25ee5416d160b0d3e517 Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:45:16 +0200 Subject: [PATCH 16/23] feat(ica)!: support json tx encoding for interchain accounts (#3796) * feat(ica): added EncodingJson to supported encodings * imp(ica): changed the type of cdc to Codec in ica/host * imp(ica): changed the type of cdc to Codec in ica/controller * imp(ica.test): added a test cases for EncodingJSON * imp(ica): created invalid encoding err * feat(ica)!: first prototype of json supporting DeserializeCosmosTx * docs(ica): updated godoc of DeserializeCosmosTx * docs(ica): added comments to DeserializeCosmosTx * fix(ica.test): fixed tests for DeserializeCosmosTx * fix(ica): fixed 'OnRecvPacket' in relay.go * fix(ica): fixed unhandled error * style(ica): made DeserializeCosmosTx more compact * fix(ica/host.cli.test): fixed a cli test * style(ica): ran gofumpt * style(ica): changed err message * feat(ica): first prototype of SerializeCosmosTx is implemented * fix(ica): fixed codec tests * fix(ica/host.test): fix test * fix(ica/host.test): fix test * fix(ica/host.cli): cli always uses protobuf * nil(ica/host.test): removed unneeded comment * fix(ica/controller.test): fix test * fix(ica/controller.test): fix test * fix(ica/controller.test): fix test * fix(fee.test): fix test * nit: temporary save commit * fix(ica): fixed json serde tests not passing * fix(ica): fix panic if message does not implement sdk.Msg * imp(ica): improved json serde functions * style(ica): pleased the linter * style(ica): ran gofumpt * fix(e2e): fix compilation errors by adding icatypes.EncodingProtobuf arg to serde functions * feat(ica.test): added important wip test for deserializing directly from cosmwasm * imp(ica.test): added a new test case to cw codec unit test * imp(ica): added another test case * imp(ica.test): added another test case * imp(ica.test): added another test case * style(ica.test): improved test style * style(ica.test): improved test style * style(ica.test): ran gofumpt * imp(ica.test): added json encoding version string for testing * imp(ica.test): added new 'NewJSONICAPath' function * imp(ica.test): added encoding field to ica test setup functions * fix(ica.test): fixed test setups using the new encoding field * feat(ica.test): added json test case * style(ica.test): ran gofumpt * feat(ica.test): got two cases of cosmwasm tests working in relay * style(ica.test): ran gofumpt * feat(ica): started progress on recursive handling of Anys * imp(ica.test): added a new test case for ica json encoding, this fails * feat(ica): achieved total json serialization (excluding any lists) * refactor(ica): made function shorter and removed duplicated code * style(ica): ran gofumpt * imp(ica): added more err handling code * refactor(ica): made deserialize code shorter * style(ica): made linter a bit more happy * fix(ica.test): fixed one codec test case * feat(ica): added []Any handling code * fix(ica): added more safety * nit: deleted testing codec.go * feat(ica): all works * style(ica): ran gofumpt * style(ica): made linter happy * refactor(ica): reduced code duplication * nit(ica): uncommented some test cases * imp(ica.test): added more test cases * feat(ica.test): finished test cases * style(ica.test): reorganized test cases * refactor(ica.test): combined the two test cases into one * style(ica.test): ran gofumpt * style(ica.test): renamed wallet address * fix(ica.test): fixed test case names * imp(ica.test): added more test cases * style(ica.test): ran gofumpt * test(ica): added more codec test cases * style(ica.test): ran gofumpt * feat(ica): removed JSONAny and JSONCosmosTx types * feat(ica): implemented json encoding using module codec * fix(ica.test): tests now match the new codec implementation * fix(ica.test): fixed the tests to the new implementation * style(ica.test): reorgenized the order of tests so that git diff makes sense * imp(ica/controller): controller codec need not be codec.Codec * imp(ica): replaced BinaryCodec with Codec * test(ica): fixed codec test * docs(ica.test): codec comment updated * docs(ica.test): updated comments * style(ica.test): removed 'from cosmwasm' from test case name as it is aparent from test name * style(ica.test): ran gofumpt * fix: fix merge error * deps(ica): replaced sdk.NewInt with sdkmath.NewInt * style(ica): ran 'gofumpt' * imp(ica): removed redundant cosmwasm tests * revert: "imp(ica): removed redundant cosmwasm tests" This reverts commit 5123fbaad61b18a1b16c9d75caa72bbb8ba2dac6. * imp(ica.test): made codec_test human readable * imp(ica.test): made relay_test human readable * style(ica.test): ran 'golanci-lint run --fix' * imp(ica/host): created 'GetAppMetadata' function * refactor(ica/host): used GetAppMetadata function * imp(ica.test): removed unneeded encoding argument * imp(ica): removed ErrUnsupportedEncoding * imp(ica.test): used suite chainB height instead of clienttypes.NewHeight(1, 100) * imp(ica.test): add nil check for unsupported encoding * imp(ica.test): added a empty/nil checks * style(ica.test): renamed version variable to TestVersionWithJSONEncoding * imp(ica): wrapped some errors * style(ica): ran 'golanci-lint run --fix' * style(ica)!: renamed EncodingJSON to EncodingProto3JSON * docs(ica): improved godocs * imp(ica): passing codec instead of binary codec * style(ica): improved error messages and godocs * docs(ica.test): improved godocs for tests * imp(ica.test): improved unsupported encoding test case slightly * style(ica.test): test style improvements * imp(ica.test): added expError to some codec tests * imp(ica.test): added more error type checks to codec tests * style(ica.test): ran 'golangci-lint run --fix' * imp(ica/host.test): added 'TestMetadataNotFound' * imp(ica/host.test): reduce test size * docs(ica/host.test): updated godocs for test * docs(ica/host): improved godoc * imp(ica/host): made GetAppMetadata private --------- Co-authored-by: Carlos Rodriguez --- .../controller/keeper/keeper.go | 4 +- .../controller/keeper/msg_server_test.go | 2 +- .../host/client/cli/tx_test.go | 1 + .../host/ibc_module_test.go | 2 +- .../host/keeper/export_test.go | 16 + .../host/keeper/genesis_test.go | 2 +- .../host/keeper/handshake_test.go | 6 +- .../host/keeper/keeper.go | 19 + .../host/keeper/keeper_test.go | 49 +- .../host/keeper/relay.go | 7 +- .../host/keeper/relay_test.go | 436 +++++++++++++++-- .../27-interchain-accounts/types/codec.go | 59 ++- .../types/codec_test.go | 440 +++++++++++++++--- .../27-interchain-accounts/types/metadata.go | 4 +- .../types/metadata_test.go | 41 +- 15 files changed, 954 insertions(+), 134 deletions(-) create mode 100644 modules/apps/27-interchain-accounts/host/keeper/export_test.go diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 9aa172a6f15..2c98ce3f9b1 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -27,7 +27,7 @@ import ( // Keeper defines the IBC interchain accounts controller keeper type Keeper struct { storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.Codec legacySubspace paramtypes.Subspace ics4Wrapper porttypes.ICS4Wrapper channelKeeper icatypes.ChannelKeeper @@ -44,7 +44,7 @@ type Keeper struct { // NewKeeper creates a new interchain accounts controller Keeper instance func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, legacySubspace paramtypes.Subspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, authority string, ) Keeper { diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go index 7960af5b01b..08d3fd4ce5c 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server_test.go @@ -171,7 +171,7 @@ func (suite *KeeperTestSuite) TestSubmitTx() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{icaMsg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{icaMsg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) packetData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go index 63422405696..f9c4c0a4d71 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx_test.go @@ -125,6 +125,7 @@ func TestGeneratePacketData(t *testing.T) { require.Equal(t, tc.memo, packetData.Memo) data := packetData.Data + // cli tx commands always use protobuf encoding messages, err := icatypes.DeserializeCosmosTx(cdc, data, icatypes.EncodingProtobuf) require.NoError(t, err) diff --git a/modules/apps/27-interchain-accounts/host/ibc_module_test.go b/modules/apps/27-interchain-accounts/host/ibc_module_test.go index 3ad31f13012..35687bbdc1b 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -446,7 +446,7 @@ func (suite *InterchainAccountsTestSuite) TestOnRecvPacket() { ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: amount, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.Codec, []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ diff --git a/modules/apps/27-interchain-accounts/host/keeper/export_test.go b/modules/apps/27-interchain-accounts/host/keeper/export_test.go new file mode 100644 index 00000000000..03c13e894d5 --- /dev/null +++ b/modules/apps/27-interchain-accounts/host/keeper/export_test.go @@ -0,0 +1,16 @@ +package keeper + +/* + This file is to allow for unexported functions to be accessible to the testing package. +*/ + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" +) + +// GetAppMetadata is a wrapper around getAppMetadata to allow the function to be directly called in tests. +func (k Keeper) GetAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { + return k.getAppMetadata(ctx, portID, channelID) +} diff --git a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go index 8e9893be333..3a24e8555dd 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/genesis_test.go @@ -109,7 +109,7 @@ func (suite *KeeperTestSuite) TestGenesisParams() { func (suite *KeeperTestSuite) TestExportGenesis() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) diff --git a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go index 034550a7d50..c6984fe3181 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake_test.go @@ -276,7 +276,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) @@ -356,7 +356,7 @@ func (suite *KeeperTestSuite) TestOnChanOpenConfirm() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := RegisterInterchainAccount(path.EndpointA, TestOwnerAddress) @@ -399,7 +399,7 @@ func (suite *KeeperTestSuite) TestOnChanCloseConfirm() { suite.Run(tc.name, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 9234117c4fe..467d88b9792 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -4,6 +4,8 @@ import ( "fmt" "strings" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,6 +20,7 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" "github.com/cosmos/ibc-go/v7/modules/core/exported" ) @@ -106,6 +109,22 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string return k.ics4Wrapper.GetAppVersion(ctx, portID, channelID) } +// GetAppMetadata retrieves the interchain accounts channel metadata from the store associated with the provided portID and channelID +func (k Keeper) getAppMetadata(ctx sdk.Context, portID, channelID string) (icatypes.Metadata, error) { + appVersion, found := k.GetAppVersion(ctx, portID, channelID) + if !found { + return icatypes.Metadata{}, errorsmod.Wrapf(ibcerrors.ErrNotFound, "app version not found for port %s and channel %s", portID, channelID) + } + + var metadata icatypes.Metadata + if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(appVersion), &metadata); err != nil { + // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks + return icatypes.Metadata{}, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata") + } + + return metadata, nil +} + // GetActiveChannelID retrieves the active channelID from the store keyed by the provided connectionID and portID func (k Keeper) GetActiveChannelID(ctx sdk.Context, connectionID, portID string) (string, bool) { store := ctx.KVStore(k.storeKey) diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go index 71854cbbe16..b8b91e83df8 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "fmt" "testing" "github.com/stretchr/testify/suite" @@ -9,6 +10,7 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) @@ -27,6 +29,15 @@ var ( Encoding: icatypes.EncodingProtobuf, TxType: icatypes.TxTypeSDKMultiMsg, })) + + // TestVersionWithJSONEncoding defines a reusable interchainaccounts version string that uses JSON encoding for testing purposes + TestVersionWithJSONEncoding = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ + Version: icatypes.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Encoding: icatypes.EncodingProto3JSON, + TxType: icatypes.TxTypeSDKMultiMsg, + })) ) type KeeperTestSuite struct { @@ -47,14 +58,25 @@ func (suite *KeeperTestSuite) SetupTest() { suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3)) } -func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { +func NewICAPath(chainA, chainB *ibctesting.TestChain, encoding string) *ibctesting.Path { path := ibctesting.NewPath(chainA, chainB) + + var version string + switch encoding { + case icatypes.EncodingProtobuf: + version = TestVersion + case icatypes.EncodingProto3JSON: + version = TestVersionWithJSONEncoding + default: + panic(fmt.Sprintf("unsupported encoding type: %s", encoding)) + } + path.EndpointA.ChannelConfig.PortID = icatypes.HostPortID path.EndpointB.ChannelConfig.PortID = icatypes.HostPortID path.EndpointA.ChannelConfig.Order = channeltypes.ORDERED path.EndpointB.ChannelConfig.Order = channeltypes.ORDERED - path.EndpointA.ChannelConfig.Version = TestVersion - path.EndpointB.ChannelConfig.Version = TestVersion + path.EndpointA.ChannelConfig.Version = version + path.EndpointB.ChannelConfig.Version = version return path } @@ -85,7 +107,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro channelSequence := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextChannelSequence(endpoint.Chain.GetContext()) - if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, TestVersion); err != nil { + if err := endpoint.Chain.GetSimApp().ICAControllerKeeper.RegisterInterchainAccount(endpoint.Chain.GetContext(), endpoint.ConnectionID, owner, endpoint.ChannelConfig.Version); err != nil { return err } @@ -106,7 +128,7 @@ func TestKeeperTestSuite(t *testing.T) { func (suite *KeeperTestSuite) TestGetInterchainAccountAddress() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) @@ -131,7 +153,7 @@ func (suite *KeeperTestSuite) TestGetAllActiveChannels() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) @@ -165,7 +187,7 @@ func (suite *KeeperTestSuite) TestGetAllInterchainAccounts() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) @@ -197,7 +219,7 @@ func (suite *KeeperTestSuite) TestGetAllInterchainAccounts() { func (suite *KeeperTestSuite) TestIsActiveChannel() { suite.SetupTest() - path := NewICAPath(suite.chainA, suite.chainB) + path := NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProtobuf) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) @@ -220,6 +242,17 @@ func (suite *KeeperTestSuite) TestSetInterchainAccountAddress() { suite.Require().Equal(expectedAccAddr, retrievedAddr) } +func (suite *KeeperTestSuite) TestMetadataNotFound() { + var ( + invalidPortID = "invalid-port" + invalidChannelID = "invalid-channel" + ) + + _, err := suite.chainB.GetSimApp().ICAHostKeeper.GetAppMetadata(suite.chainB.GetContext(), invalidPortID, invalidChannelID) + suite.Require().ErrorIs(err, ibcerrors.ErrNotFound) + suite.Require().Contains(err.Error(), fmt.Sprintf("app version not found for port %s and channel %s", invalidPortID, invalidChannelID)) +} + func (suite *KeeperTestSuite) TestParams() { expParams := types.DefaultParams() diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index b49df0a38b2..74dd7c6f832 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -24,9 +24,14 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byt return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain account packet data") } + metadata, err := k.getAppMetadata(ctx, packet.DestinationPort, packet.DestinationChannel) + if err != nil { + return nil, err + } + switch data.Type { case icatypes.EXECUTE_TX: - msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data, icatypes.EncodingProtobuf) + msgs, err := icatypes.DeserializeCosmosTx(k.cdc, data.Data, metadata.Encoding) if err != nil { return nil, errorsmod.Wrapf(err, "failed to deserialize interchain account transaction") } diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go index d829259ecce..d76fe3e5cae 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay_test.go @@ -1,6 +1,9 @@ package keeper_test import ( + "fmt" + "strings" + "github.com/cosmos/gogoproto/proto" sdkmath "cosmossdk.io/math" @@ -16,12 +19,12 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) func (suite *KeeperTestSuite) TestOnRecvPacket() { + testedEncodings := []string{icatypes.EncodingProtobuf, icatypes.EncodingProto3JSON} var ( path *ibctesting.Path packetData []byte @@ -29,12 +32,12 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { testCases := []struct { msg string - malleate func() + malleate func(encoding string) expPass bool }{ { "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -59,7 +62,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -76,7 +79,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes banktypes.MsgSend", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -86,7 +89,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -103,7 +106,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes stakingtypes.MsgDelegate", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -114,7 +117,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -131,7 +134,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes stakingtypes.MsgDelegate and stakingtypes.MsgUndelegate sequentially", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -148,7 +151,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msgDelegate, msgUndelegate}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -165,7 +168,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgSubmitProposal", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -183,7 +186,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Proposer: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -200,7 +203,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes govtypes.MsgVote", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -225,7 +228,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Option: govtypes.OptionYes, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -242,7 +245,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes disttypes.MsgFundCommunityPool", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -251,7 +254,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Depositor: interchainAccountAddr, } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -268,7 +271,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes disttypes.MsgSetWithdrawAddress", - func() { + func(encoding string) { interchainAccountAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, path.EndpointA.ChannelConfig.PortID) suite.Require().True(found) @@ -277,7 +280,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { WithdrawAddress: suite.chainB.SenderAccount.GetAddress().String(), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -294,7 +297,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "interchain account successfully executes transfertypes.MsgTransfer", - func() { + func(encoding string) { transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort @@ -312,11 +315,11 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { Token: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)), Sender: interchainAccountAddr, Receiver: suite.chainA.SenderAccount.GetAddress().String(), - TimeoutHeight: clienttypes.NewHeight(1, 100), + TimeoutHeight: suite.chainB.GetTimeoutHeight(), TimeoutTimestamp: uint64(0), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -333,10 +336,10 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "unregistered sdk.Msg", - func() { + func(encoding string) { msg := &banktypes.MsgSendResponse{} - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -353,14 +356,14 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "cannot unmarshal interchain account packet data", - func() { + func(encoding string) { packetData = []byte{} }, false, }, { "cannot deserialize interchain account packet data messages", - func() { + func(encoding string) { data := []byte("invalid packet data") icaPacketData := icatypes.InterchainAccountPacketData{ @@ -374,8 +377,8 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "invalid packet type - UNSPECIFIED", - func() { - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) + func(encoding string) { + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -389,10 +392,10 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "unauthorised: interchain account not found for controller port ID", - func() { + func(encoding string) { path.EndpointA.ChannelConfig.PortID = "invalid-port-id" - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{&banktypes.MsgSend{}}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -406,14 +409,14 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "unauthorised: message type not allowed", // NOTE: do not update params to explicitly force the error - func() { + func(encoding string) { msg := &banktypes.MsgSend{ FromAddress: suite.chainB.SenderAccount.GetAddress().String(), ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -427,14 +430,14 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, { "unauthorised: signer address is not the interchain account associated with the controller portID", - func() { + func(encoding string) { msg := &banktypes.MsgSend{ FromAddress: suite.chainB.SenderAccount.GetAddress().String(), // unexpected signer ToAddress: suite.chainB.SenderAccount.GetAddress().String(), Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100))), } - data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, icatypes.EncodingProtobuf) + data, err := icatypes.SerializeCosmosTx(suite.chainA.GetSimApp().AppCodec(), []proto.Message{msg}, encoding) suite.Require().NoError(err) icaPacketData := icatypes.InterchainAccountPacketData{ @@ -451,13 +454,363 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { }, } + for _, encoding := range testedEncodings { + for _, tc := range testCases { + tc := tc + + suite.Run(tc.msg, func() { + suite.SetupTest() // reset + + path = NewICAPath(suite.chainA, suite.chainB, encoding) + suite.coordinator.SetupConnections(path) + + err := SetupICAPath(path, TestOwnerAddress) + suite.Require().NoError(err) + + portID, err := icatypes.NewControllerPortID(TestOwnerAddress) + suite.Require().NoError(err) + + // Get the address of the interchain account stored in state during handshake step + storedAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) + suite.Require().True(found) + + icaAddr, err := sdk.AccAddressFromBech32(storedAddr) + suite.Require().NoError(err) + + // Check if account is created + interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) + suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) + + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10000)))) + + tc.malleate(encoding) // malleate mutates test data + + packet := channeltypes.NewPacket( + packetData, + suite.chainA.SenderAccount.GetSequence(), + path.EndpointA.ChannelConfig.PortID, + path.EndpointA.ChannelID, + path.EndpointB.ChannelConfig.PortID, + path.EndpointB.ChannelID, + suite.chainB.GetTimeoutHeight(), + 0, + ) + + txResponse, err := suite.chainB.GetSimApp().ICAHostKeeper.OnRecvPacket(suite.chainB.GetContext(), packet) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(txResponse) + } else { + suite.Require().Error(err) + suite.Require().Nil(txResponse) + } + }) + } + } +} + +func (suite *KeeperTestSuite) TestJSONOnRecvPacket() { + var ( + path *ibctesting.Path + packetData []byte + ) + interchainAccountAddr := "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk" + + testCases := []struct { + msg string + malleate func(icaAddress string) + expPass bool + }{ + { + "interchain account successfully executes an arbitrary message type using the * (allow all message types) param", + func(icaAddress string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "Description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "` + icaAddress + `", + "proposal_id": 1, + "option": 1 + } + ] + }`) + // this is the way cosmwasm encodes byte arrays by default + // golang doesn't use this encoding by default, but it can still deserialize: + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes banktypes.MsgSend", + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + icaAddress + `", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal", + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.gov.v1beta1.TextProposal", + "title": "IBC Gov Proposal", + "description": "tokens for all!" + }, + "initial_deposit": [{ "denom": "stake", "amount": "5000" }], + "proposer": "` + icaAddress + `" + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgVote", + func(icaAddress string) { + // Populate the gov keeper in advance with an active proposal + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + + proposalMsg, err := govv1.NewLegacyContent(testProposal, interchainAccountAddr) + suite.Require().NoError(err) + + proposal, err := govv1.NewProposal([]sdk.Msg{proposalMsg}, govtypes.DefaultStartingProposalID, suite.chainA.GetContext().BlockTime(), suite.chainA.GetContext().BlockTime(), "test proposal", "title", "description", sdk.AccAddress(interchainAccountAddr)) + suite.Require().NoError(err) + + suite.chainB.GetSimApp().GovKeeper.SetProposal(suite.chainB.GetContext(), proposal) + suite.chainB.GetSimApp().GovKeeper.ActivateVotingPeriod(suite.chainB.GetContext(), proposal) + + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "` + icaAddress + `", + "proposal_id": 1, + "option": 1 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes govtypes.MsgSubmitProposal, govtypes.MsgDeposit, and then govtypes.MsgVote sequentially", + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.gov.v1beta1.TextProposal", + "title": "IBC Gov Proposal", + "description": "tokens for all!" + }, + "initial_deposit": [{ "denom": "stake", "amount": "5000" }], + "proposer": "` + icaAddress + `" + }, + { + "@type": "/cosmos.gov.v1beta1.MsgDeposit", + "proposal_id": 1, + "depositor": "` + icaAddress + `", + "amount": [{ "denom": "stake", "amount": "10000000" }] + }, + { + "@type": "/cosmos.gov.v1beta1.MsgVote", + "voter": "` + icaAddress + `", + "proposal_id": 1, + "option": 1 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*govtypes.MsgSubmitProposal)(nil)), sdk.MsgTypeURL((*govtypes.MsgDeposit)(nil)), sdk.MsgTypeURL((*govtypes.MsgVote)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "interchain account successfully executes transfertypes.MsgTransfer", + func(icaAddress string) { + transferPath := ibctesting.NewPath(suite.chainB, suite.chainC) + transferPath.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + transferPath.EndpointA.ChannelConfig.Version = transfertypes.Version + transferPath.EndpointB.ChannelConfig.Version = transfertypes.Version + + suite.coordinator.Setup(transferPath) + + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/ibc.applications.transfer.v1.MsgTransfer", + "source_port": "transfer", + "source_channel": "channel-1", + "token": { "denom": "stake", "amount": "100" }, + "sender": "` + icaAddress + `", + "receiver": "cosmos15ulrf36d4wdtrtqzkgaan9ylwuhs7k7qz753uk", + "timeout_height": { "revision_number": 1, "revision_height": 100 }, + "timeout_timestamp": 0 + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + true, + }, + { + "unregistered sdk.Msg", + func(icaAddress string) { + msgBytes := []byte(`{"messages":[{}]}`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{"*"}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "message type not allowed banktypes.MsgSend", + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + icaAddress + `", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*transfertypes.MsgTransfer)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + { + "unauthorised: signer address is not the interchain account associated with the controller portID", + func(icaAddress string) { + msgBytes := []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + ibctesting.InvalidID + `", + "to_address": "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs", + "amount": [{ "denom": "stake", "amount": "100" }] + } + ] + }`) + byteArrayString := strings.Join(strings.Fields(fmt.Sprint(msgBytes)), ",") + + packetData = []byte(`{ + "type": 1, + "data":` + byteArrayString + ` + }`) + + params := types.NewParams(true, []string{sdk.MsgTypeURL((*banktypes.MsgSend)(nil))}) + suite.chainB.GetSimApp().ICAHostKeeper.SetParams(suite.chainB.GetContext(), params) + }, + false, + }, + } + for _, tc := range testCases { tc := tc suite.Run(tc.msg, func() { suite.SetupTest() // reset - path = NewICAPath(suite.chainA, suite.chainB) + path = NewICAPath(suite.chainA, suite.chainB, icatypes.EncodingProto3JSON) suite.coordinator.SetupConnections(path) err := SetupICAPath(path, TestOwnerAddress) @@ -467,19 +820,12 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { suite.Require().NoError(err) // Get the address of the interchain account stored in state during handshake step - storedAddr, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) + icaAddress, found := suite.chainB.GetSimApp().ICAHostKeeper.GetInterchainAccountAddress(suite.chainB.GetContext(), ibctesting.FirstConnectionID, portID) suite.Require().True(found) - icaAddr, err := sdk.AccAddressFromBech32(storedAddr) - suite.Require().NoError(err) - - // Check if account is created - interchainAccount := suite.chainB.GetSimApp().AccountKeeper.GetAccount(suite.chainB.GetContext(), icaAddr) - suite.Require().Equal(interchainAccount.GetAddress().String(), storedAddr) - - suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(10000)))) + suite.fundICAWallet(suite.chainB.GetContext(), path.EndpointA.ChannelConfig.PortID, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000)))) - tc.malleate() // malleate mutates test data + tc.malleate(icaAddress) // malleate mutates test data packet := channeltypes.NewPacket( packetData, @@ -488,7 +834,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - clienttypes.NewHeight(1, 100), + suite.chainB.GetTimeoutHeight(), 0, ) diff --git a/modules/apps/27-interchain-accounts/types/codec.go b/modules/apps/27-interchain-accounts/types/codec.go index d8ba2d05433..68d19fb0db3 100644 --- a/modules/apps/27-interchain-accounts/types/codec.go +++ b/modules/apps/27-interchain-accounts/types/codec.go @@ -26,14 +26,18 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { } // SerializeCosmosTx serializes a slice of sdk.Msg's using the CosmosTx type. The sdk.Msg's are -// packed into Any's and inserted into the Messages field of a CosmosTx. The proto marshaled CosmosTx -// bytes are returned. Only the ProtoCodec is supported for serializing messages. -func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding string) (bz []byte, err error) { - // only ProtoCodec is supported +// packed into Any's and inserted into the Messages field of a CosmosTx. The CosmosTx is marshaled +// depending on the encoding type passed in. The marshaled bytes are returned. Only the ProtoCodec +// is supported for serializing messages. Both protobuf and proto3 JSON are supported. +func SerializeCosmosTx(cdc codec.Codec, msgs []proto.Message, encoding string) ([]byte, error) { + // this is a defensive check to ensure only the ProtoCodec is used for message serialization if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "only the ProtoCodec may be used for receiving messages on the host chain") } + var bz []byte + var err error + msgAnys := make([]*codectypes.Any, len(msgs)) for i, msg := range msgs { @@ -47,38 +51,57 @@ func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []proto.Message, encoding str Messages: msgAnys, } - bz, err = cdc.Marshal(cosmosTx) - if err != nil { - return nil, err + switch encoding { + case EncodingProtobuf: + bz, err = cdc.Marshal(cosmosTx) + if err != nil { + return nil, errorsmod.Wrapf(err, "cannot marshal CosmosTx with protobuf") + } + case EncodingProto3JSON: + bz, err = cdc.MarshalJSON(cosmosTx) + if err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot marshal CosmosTx with proto3 json") + } + default: + return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) } return bz, nil } -// DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes -// into a slice of sdk.Msg's. Only the ProtoCodec is supported for message -// deserialization. -func DeserializeCosmosTx(cdc codec.BinaryCodec, data []byte, encoding string) ([]sdk.Msg, error) { - // only ProtoCodec is supported +// DeserializeCosmosTx unmarshals and unpacks a slice of transaction bytes into a slice of sdk.Msg's. +// The transaction bytes are unmarshaled depending on the encoding type passed in. The sdk.Msg's are +// unpacked from Any's and returned. Only the ProtoCodec is supported for serializing messages. Both +// protobuf and proto3 JSON are supported. +func DeserializeCosmosTx(cdc codec.Codec, data []byte, encoding string) ([]sdk.Msg, error) { + // this is a defensive check to ensure only the ProtoCodec is used for message deserialization if _, ok := cdc.(*codec.ProtoCodec); !ok { - return nil, errorsmod.Wrap(ErrInvalidCodec, "only ProtoCodec is supported for receiving messages on the host chain") + return nil, errorsmod.Wrap(ErrInvalidCodec, "only the ProtoCodec may be used for receiving messages on the host chain") } var cosmosTx CosmosTx - if err := cdc.Unmarshal(data, &cosmosTx); err != nil { - return nil, err + + switch encoding { + case EncodingProtobuf: + if err := cdc.Unmarshal(data, &cosmosTx); err != nil { + return nil, errorsmod.Wrapf(err, "cannot unmarshal CosmosTx with protobuf") + } + case EncodingProto3JSON: + if err := cdc.UnmarshalJSON(data, &cosmosTx); err != nil { + return nil, errorsmod.Wrapf(ErrUnknownDataType, "cannot unmarshal CosmosTx with proto3 json") + } + default: + return nil, errorsmod.Wrapf(ErrInvalidCodec, "unsupported encoding format %s", encoding) } msgs := make([]sdk.Msg, len(cosmosTx.Messages)) for i, protoAny := range cosmosTx.Messages { var msg sdk.Msg - err := cdc.UnpackAny(protoAny, &msg) if err != nil { return nil, err } - msgs[i] = msg } diff --git a/modules/apps/27-interchain-accounts/types/codec_test.go b/modules/apps/27-interchain-accounts/types/codec_test.go index 886fb21a77c..e120c393c16 100644 --- a/modules/apps/27-interchain-accounts/types/codec_test.go +++ b/modules/apps/27-interchain-accounts/types/codec_test.go @@ -6,9 +6,12 @@ import ( sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" "github.com/cosmos/ibc-go/v7/testing/simapp" @@ -40,14 +43,316 @@ func (mockSdkMsg) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } +// TestSerializeAndDeserializeCosmosTx tests the SerializeCosmosTx and DeserializeCosmosTx functions +// for all supported encoding types. +// +// expPass set to false means that: +// - the test case is expected to fail on deserialization for protobuf encoding. +// - the test case is expected to fail on serialization for proto3 json encoding. func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { + testedEncodings := []string{types.EncodingProtobuf, types.EncodingProto3JSON} + // each test case will have a corresponding expected errors in case of failures: + expSerializeErrorStrings := make([]string, len(testedEncodings)) + expDeserializeErrorStrings := make([]string, len(testedEncodings)) + + var msgs []proto.Message testCases := []struct { - name string - msgs []proto.Message - expPass bool + name string + malleate func() + expPass bool }{ { "single msg", + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + } + }, + true, + }, + { + "multiple msgs, same types", + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(200))), + }, + } + }, + true, + }, + { + "success: multiple msgs, different types", + func() { + msgs = []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), + }, + } + }, + true, + }, + { + "success: msg with nested any", + func() { + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + content, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + + msgs = []proto.Message{ + &govtypes.MsgSubmitProposal{ + Content: content, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), + Proposer: TestOwnerAddress, + }, + } + }, + true, + }, + { + "success: msg with nested array of any", + func() { + sendMsg := &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + } + sendAny, err := codectypes.NewAnyWithValue(sendMsg) + suite.Require().NoError(err) + + testProposal := &govtypes.TextProposal{ + Title: "IBC Gov Proposal", + Description: "tokens for all!", + } + content, err := codectypes.NewAnyWithValue(testProposal) + suite.Require().NoError(err) + legacyPropMsg := &govtypes.MsgSubmitProposal{ + Content: content, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), + Proposer: TestOwnerAddress, + } + legacyPropAny, err := codectypes.NewAnyWithValue(legacyPropMsg) + suite.Require().NoError(err) + + delegateMsg := &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), + } + delegateAny, err := codectypes.NewAnyWithValue(delegateMsg) + suite.Require().NoError(err) + + messages := []*codectypes.Any{sendAny, legacyPropAny, delegateAny} + + propMsg := &govtypesv1.MsgSubmitProposal{ + Messages: messages, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), + Proposer: TestOwnerAddress, + Metadata: "", + Title: "New IBC Gov Proposal", + Summary: "more tokens for all!", + } + + msgs = []proto.Message{propMsg} + }, + true, + }, + { + "success: empty messages", + func() { + msgs = []proto.Message{} + }, + true, + }, + { + "failure: unregistered msg type", + func() { + msgs = []proto.Message{ + &mockSdkMsg{}, + } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} + }, + false, + }, + { + "failure: multiple unregistered msg types", + func() { + msgs = []proto.Message{ + &mockSdkMsg{}, + &mockSdkMsg{}, + &mockSdkMsg{}, + } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} + }, + false, + }, + { + "failure: nested unregistered msg", + func() { + mockMsg := &mockSdkMsg{} + mockAny, err := codectypes.NewAnyWithValue(mockMsg) + suite.Require().NoError(err) + + msgs = []proto.Message{ + &govtypes.MsgSubmitProposal{ + Content: mockAny, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), + Proposer: TestOwnerAddress, + }, + } + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} + }, + false, + }, + { + "failure: nested array of unregistered msg", + func() { + mockMsg := &mockSdkMsg{} + mockAny, err := codectypes.NewAnyWithValue(mockMsg) + suite.Require().NoError(err) + + messages := []*codectypes.Any{mockAny, mockAny, mockAny} + + propMsg := &govtypesv1.MsgSubmitProposal{ + Messages: messages, + InitialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000))), + Proposer: TestOwnerAddress, + Metadata: "", + Title: "New IBC Gov Proposal", + Summary: "more tokens for all!", + } + + msgs = []proto.Message{propMsg} + + expSerializeErrorStrings = []string{"NO_ERROR_EXPECTED", "cannot marshal CosmosTx with proto3 json"} + expDeserializeErrorStrings = []string{"cannot unmarshal CosmosTx with protobuf", "cannot unmarshal CosmosTx with proto3 json"} + }, + false, + }, + } + + for i, encoding := range testedEncodings { + for _, tc := range testCases { + tc := tc + + suite.Run(tc.name, func() { + tc.malleate() + + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, encoding) + if encoding == types.EncodingProto3JSON && !tc.expPass { + suite.Require().Error(err, tc.name) + suite.Require().Contains(err.Error(), expSerializeErrorStrings[1], tc.name) + } else { + suite.Require().NoError(err, tc.name) + } + + deserializedMsgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, encoding) + if tc.expPass { + suite.Require().NoError(err, tc.name) + } else { + suite.Require().Error(err, tc.name) + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i], tc.name) + } + + if tc.expPass { + for i, msg := range msgs { + // We're using proto.CompactTextString() for comparison instead of suite.Require().Equal() or proto.Equal() + // for two main reasons: + // + // 1. When deserializing from JSON, the `Any` type has private fields and cached values + // that do not match the original message, causing equality checks to fail. + // + // 2. proto.Equal() does not have built-in support for comparing sdk's math.Int types. + // + // Using proto.CompactTextString() mitigates these issues by focusing on serialized string representation, + // rather than internal details of the types. + suite.Require().Equal(proto.CompactTextString(msg), proto.CompactTextString(deserializedMsgs[i])) + } + } + }) + } + + // test serializing non sdk.Msg type + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{&banktypes.MsgSendResponse{}}, encoding) + suite.Require().NoError(err) + suite.Require().NotEmpty(bz) + + // test deserializing unknown bytes + msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, encoding) + suite.Require().Error(err) // unregistered type + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i]) + suite.Require().Empty(msgs) + + // test deserializing unknown bytes + msgs, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), encoding) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), expDeserializeErrorStrings[i]) + suite.Require().Empty(msgs) + } +} + +// unregistered bytes causes amino to panic. +// test that DeserializeCosmosTx gracefully returns an error on +// unsupported amino codec. +func (suite *TypesTestSuite) TestProtoDeserializeAndSerializeCosmosTxWithAmino() { + cdc := codec.NewLegacyAmino() + marshaler := codec.NewAminoCodec(cdc) + + msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}, types.EncodingProtobuf) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) + suite.Require().Empty(msgs) + + bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}, types.EncodingProtobuf) + suite.Require().ErrorIs(err, types.ErrInvalidCodec) + suite.Require().Empty(bz) +} + +func (suite *TypesTestSuite) TestJSONDeserializeCosmosTx() { + testCases := []struct { + name string + jsonBytes []byte + expMsgs []proto.Message + expError error + }{ + { + "success: single msg", + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`), []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -55,10 +360,26 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, }, - true, + nil, }, { - "multiple msgs, same types", + "success: multiple msgs, same types", + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + }, + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + } + ] + }`), []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, @@ -68,41 +389,66 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, - Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(200))), + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, }, - true, + nil, }, { - "multiple msgs, different types", + "success: multiple msgs, different types", + []byte(`{ + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "` + TestOwnerAddress + `", + "to_address": "` + TestOwnerAddress + `", + "amount": [{ "denom": "bananas", "amount": "100" }] + }, + { + "@type": "/cosmos.staking.v1beta1.MsgDelegate", + "delegator_address": "` + TestOwnerAddress + `", + "validator_address": "` + TestOwnerAddress + `", + "amount": { "denom": "stake", "amount": "5000" } + } + ] + }`), []proto.Message{ &banktypes.MsgSend{ FromAddress: TestOwnerAddress, ToAddress: TestOwnerAddress, Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), }, - &govtypes.MsgSubmitProposal{ - InitialDeposit: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), - Proposer: TestOwnerAddress, + &stakingtypes.MsgDelegate{ + DelegatorAddress: TestOwnerAddress, + ValidatorAddress: TestOwnerAddress, + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), }, }, - true, + nil, }, { - "unregistered msg type", + "failure: unregistered msg type", + []byte(`{"messages":[{}]}`), []proto.Message{ &mockSdkMsg{}, }, - false, + types.ErrUnknownDataType, }, { - "multiple unregistered msg types", + "failure: multiple unregistered msg types", + []byte(`{"messages":[{},{},{}]}`), []proto.Message{ &mockSdkMsg{}, &mockSdkMsg{}, &mockSdkMsg{}, }, - false, + types.ErrUnknownDataType, + }, + { + "failure: empty bytes", + []byte{}, + nil, + types.ErrUnknownDataType, }, } @@ -110,49 +456,39 @@ func (suite *TypesTestSuite) TestSerializeAndDeserializeCosmosTx() { tc := tc suite.Run(tc.name, func() { - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.msgs, types.EncodingProtobuf) - suite.Require().NoError(err, tc.name) - - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, types.EncodingProtobuf) - if tc.expPass { - suite.Require().NoError(err, tc.name) + msgs, errDeserialize := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, tc.jsonBytes, types.EncodingProto3JSON) + if tc.expError == nil { + suite.Require().NoError(errDeserialize, tc.name) + for i, msg := range msgs { + suite.Require().Equal(tc.expMsgs[i], msg) + } } else { - suite.Require().Error(err, tc.name) - } - - for i, msg := range msgs { - suite.Require().Equal(tc.msgs[i], msg) + suite.Require().ErrorIs(errDeserialize, tc.expError, tc.name) } }) } +} - // test serializing non sdk.Msg type - bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []proto.Message{&banktypes.MsgSendResponse{}}, types.EncodingProtobuf) - suite.Require().NoError(err) - suite.Require().NotEmpty(bz) - - // test deserializing unknown bytes - _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, bz, types.EncodingProtobuf) - suite.Require().Error(err) // unregistered type +func (suite *TypesTestSuite) TestUnsupportedEncodingType() { + msgs := []proto.Message{ + &banktypes.MsgSend{ + FromAddress: TestOwnerAddress, + ToAddress: TestOwnerAddress, + Amount: sdk.NewCoins(sdk.NewCoin("bananas", sdkmath.NewInt(100))), + }, + } - // test deserializing unknown bytes - msgs, err := types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, []byte("invalid"), types.EncodingProtobuf) - suite.Require().Error(err) - suite.Require().Empty(msgs) -} + bz, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, "unsupported") + suite.Require().ErrorIs(err, types.ErrInvalidCodec) + suite.Require().Nil(bz) -// unregistered bytes causes amino to panic. -// test that DeserializeCosmosTx gracefully returns an error on -// unsupported amino codec. -func (suite *TypesTestSuite) TestDeserializeAndSerializeCosmosTxWithAmino() { - cdc := codec.NewLegacyAmino() - marshaler := codec.NewAminoCodec(cdc) + data, err := types.SerializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, msgs, types.EncodingProtobuf) + suite.Require().NoError(err) - msgs, err := types.SerializeCosmosTx(marshaler, []proto.Message{&banktypes.MsgSend{}}, types.EncodingProtobuf) - suite.Require().Error(err) - suite.Require().Empty(msgs) + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, "unsupported") + suite.Require().ErrorIs(err, types.ErrInvalidCodec) - bz, err := types.DeserializeCosmosTx(marshaler, []byte{0x10, 0}, types.EncodingProtobuf) - suite.Require().Error(err) - suite.Require().Empty(bz) + // verify that protobuf encoding still works otherwise: + _, err = types.DeserializeCosmosTx(simapp.MakeTestEncodingConfig().Codec, data, types.EncodingProtobuf) + suite.Require().NoError(err) } diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index 6cf6a27688f..3df2028d9b1 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -11,6 +11,8 @@ import ( const ( // EncodingProtobuf defines the protocol buffers proto3 encoding format EncodingProtobuf = "proto3" + // EncodingProto3JSON defines the proto3 JSON encoding format + EncodingProto3JSON = "proto3json" // TxTypeSDKMultiMsg defines the multi message transaction type supported by the Cosmos SDK TxTypeSDKMultiMsg = "sdk_multi_msg" @@ -142,7 +144,7 @@ func isSupportedEncoding(encoding string) bool { // getSupportedEncoding returns a string slice of supported encoding formats func getSupportedEncoding() []string { - return []string{EncodingProtobuf} + return []string{EncodingProtobuf, EncodingProto3JSON} } // isSupportedTxType returns true if the provided transaction type is supported, otherwise false diff --git a/modules/apps/27-interchain-accounts/types/metadata_test.go b/modules/apps/27-interchain-accounts/types/metadata_test.go index c0274368e07..04ef4342e9f 100644 --- a/modules/apps/27-interchain-accounts/types/metadata_test.go +++ b/modules/apps/27-interchain-accounts/types/metadata_test.go @@ -45,7 +45,7 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { false, }, { - "unequal encoding format", + "unequal and invalid encoding format", func() { metadata.Encoding = "invalid-encoding-format" @@ -55,6 +55,17 @@ func (suite *TypesTestSuite) TestIsPreviousMetadataEqual() { }, false, }, + { + "unequal encoding format", + func() { + metadata.Encoding = types.EncodingProto3JSON + + versionBytes, err := types.ModuleCdc.MarshalJSON(&metadata) + suite.Require().NoError(err) + previousVersion = string(versionBytes) + }, + false, + }, { "unequal transaction type", func() { @@ -152,6 +163,20 @@ func (suite *TypesTestSuite) TestValidateControllerMetadata() { }, true, }, + { + "success with EncodingProto3JSON", + func() { + metadata = types.Metadata{ + Version: types.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Address: TestOwnerAddress, + Encoding: types.EncodingProto3JSON, + TxType: types.TxTypeSDKMultiMsg, + } + }, + true, + }, { "unsupported encoding format", func() { @@ -293,6 +318,20 @@ func (suite *TypesTestSuite) TestValidateHostMetadata() { }, true, }, + { + "success with EncodingProto3JSON", + func() { + metadata = types.Metadata{ + Version: types.Version, + ControllerConnectionId: ibctesting.FirstConnectionID, + HostConnectionId: ibctesting.FirstConnectionID, + Address: TestOwnerAddress, + Encoding: types.EncodingProto3JSON, + TxType: types.TxTypeSDKMultiMsg, + } + }, + true, + }, { "unsupported encoding format", func() { From 4832d6afb105b838853445a7f31ee91454de5bab Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Tue, 4 Jul 2023 02:27:54 +0800 Subject: [PATCH 17/23] imp: refactor simapp to more closely resemble the style used in cosmos-sdk (#3874) --- CHANGELOG.md | 28 +- e2e/go.mod | 31 +- e2e/go.sum | 62 ++- go.mod | 6 +- .../27-interchain-accounts/module_test.go | 8 +- .../apps/transfer/simulation/decoder_test.go | 2 +- modules/capability/capability_test.go | 2 +- modules/capability/genesis_test.go | 3 +- modules/capability/simulation/decoder_test.go | 2 +- modules/core/02-client/keeper/keeper_test.go | 2 +- .../core/02-client/simulation/decoder_test.go | 2 +- .../03-connection/simulation/decoder_test.go | 2 +- modules/core/03-connection/types/msgs_test.go | 2 +- .../04-channel/simulation/decoder_test.go | 2 +- modules/core/04-channel/types/msgs_test.go | 2 +- modules/core/05-port/keeper/keeper_test.go | 2 +- modules/core/genesis_test.go | 2 +- modules/core/simulation/decoder_test.go | 2 +- .../07-tendermint/tendermint_test.go | 2 +- testing/app.go | 2 +- testing/simapp/app.go | 407 ++++++++++-------- testing/simapp/export.go | 2 +- testing/simapp/params/doc.go | 8 +- testing/simapp/sim_bench_test.go | 59 ++- testing/simapp/sim_test.go | 149 ++++--- testing/simapp/simd/cmd/cmd_test.go | 4 +- testing/simapp/simd/cmd/root.go | 167 +++---- testing/simapp/simd/main.go | 5 +- testing/simapp/state.go | 235 ---------- testing/simapp/test_helpers.go | 122 ++---- testing/simapp/utils.go | 41 -- 31 files changed, 566 insertions(+), 799 deletions(-) delete mode 100644 testing/simapp/state.go delete mode 100644 testing/simapp/utils.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 943ee5d93ae..cc66dd2f473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#3907](https://github.com/cosmos/ibc-go/pull/3907) Re-implemented missing functions of `LegacyMsg` interface to fix transaction signing with ledger. -## [v7.1.0](https://github.com/cosmos/ibc-go/releases/tag/v7.1.0) - 2023-06-09 +## [v7.1.0](https://github.com/cosmos/ibc-go/releases/tag/v7.1.0) - 2023-06-09 ### Dependencies @@ -82,10 +82,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (core/04-channel) [\#3346](https://github.com/cosmos/ibc-go/pull/3346) Properly handle ordered channels in `UnreceivedPackets` query. * (core/04-channel) [\#3593](https://github.com/cosmos/ibc-go/pull/3593) `SendPacket` now correctly returns `ErrClientNotFound` in favour of `ErrConsensusStateNotFound`. -## [v7.0.1](https://github.com/cosmos/ibc-go/releases/tag/v7.0.1) - 2023-05-25 +## [v7.0.1](https://github.com/cosmos/ibc-go/releases/tag/v7.0.1) - 2023-05-25 ### Bug Fixes - + * [\#3346](https://github.com/cosmos/ibc-go/pull/3346) Properly handle ordered channels in `UnreceivedPackets` query. ## [v7.0.0](https://github.com/cosmos/ibc-go/releases/tag/v7.0.0) - 2023-03-17 @@ -118,7 +118,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (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. @@ -148,16 +148,16 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (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) [\#2539] (https://github.com/cosmos/ibc-go/pull/2539) Removing `GetVersions` from `ConnectionI` interface. +* (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. +* (light-clients) [\#3113](https://github.com/cosmos/ibc-go/pull/3113) Align light client module names. ### Features @@ -165,10 +165,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (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. @@ -304,7 +304,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. +* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. * [\#2944](https://github.com/cosmos/ibc-go/pull/2944) Bump Cosmos SDK to v0.46.7 and Tendermint to v0.34.24. ### State Machine Breaking @@ -381,7 +381,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes -* [\#3662](https://github.com/cosmos/ibc-go/pull/3662) Retract v4.1.2 and v4.2.1. +* [\#3662](https://github.com/cosmos/ibc-go/pull/3662) Retract v4.1.2 and v4.2.1. ## [v4.4.1](https://github.com/cosmos/ibc-go/releases/tag/v4.4.1) - 2023-05-25 @@ -438,7 +438,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. +* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. ### Improvements @@ -478,7 +478,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Dependencies -* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. +* [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. ### Improvements diff --git a/e2e/go.mod b/e2e/go.mod index 9e47c47ea71..8bfb0caff40 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -10,8 +10,8 @@ require ( github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.2.0 github.com/cosmos/interchain-accounts v0.5.1 - github.com/docker/docker v20.10.19+incompatible - github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230503171723-5e55f37618b7 + github.com/docker/docker v24.0.1+incompatible + github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230622193330-220ce33823c0 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.24.0 golang.org/x/mod v0.11.0 @@ -33,7 +33,7 @@ require ( filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect - github.com/BurntSushi/toml v1.2.1 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect @@ -72,13 +72,13 @@ require ( github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/base58 v1.0.4 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -165,7 +165,7 @@ require ( github.com/pierrec/xxHash v0.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_golang v1.15.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect @@ -175,7 +175,6 @@ require ( github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -195,16 +194,16 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.9.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.10.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.8.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/term v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect + golang.org/x/tools v0.10.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.122.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -221,7 +220,7 @@ require ( modernc.org/mathutil v1.5.0 // indirect modernc.org/memory v1.5.0 // indirect modernc.org/opt v0.1.3 // indirect - modernc.org/sqlite v1.22.1 // indirect + modernc.org/sqlite v1.23.1 // indirect modernc.org/strutil v1.1.3 // indirect modernc.org/token v1.1.0 // indirect nhooyr.io/websocket v1.8.7 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index 893a5db400d..6a265fa2137 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -211,8 +211,8 @@ github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XB github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= @@ -386,8 +386,8 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY= -github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY= +github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 h1:18HurQ6DfHeNvwIjvOmrgr44bPdtVaQAe/WWwHg9goM= +github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1/go.mod h1:XmyzkaXBy7ZvHdrTAlXAjpog8qKSAWa3ze7yqzWmgmc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= @@ -401,10 +401,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/UP4DvJwvyKYq64= -github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.1+incompatible h1:NxN81beIxDlUaVt46iUQrYHD9/W3u9EGl52r86O/IGw= +github.com/docker/docker v24.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -893,8 +893,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -955,7 +955,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -983,8 +982,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= -github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230503171723-5e55f37618b7 h1:+FRVLRfJwZNkkipuPuK+FyY/5ZEkAjAjtiWQg6qc550= -github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230503171723-5e55f37618b7/go.mod h1:/FpoaMKTF3OREchZZvg6eGfVYvk7lAwqP9q2TN+lOGs= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230622193330-220ce33823c0 h1:EmPhftNfcYilfyhv0X8a2wGdLAro19zooZoQqe9/6Ms= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230622193330-220ce33823c0/go.mod h1:CQxeTz7/TUfTbwJ3hJgHwxaZGfeJUuyIXvSQOz5gH38= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1069,8 +1068,8 @@ go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1092,8 +1091,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1196,8 +1195,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1239,8 +1238,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1333,7 +1332,6 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1341,13 +1339,13 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1359,8 +1357,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1426,8 +1424,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= +golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1732,8 +1730,8 @@ modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.22.1 h1:P2+Dhp5FR1RlVRkQ3dDfCiv3Ok8XPxqpe70IjYVA9oE= -modernc.org/sqlite v1.22.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= +modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= +modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= diff --git a/go.mod b/go.mod index e60babb9b33..c65d6b2761d 100644 --- a/go.mod +++ b/go.mod @@ -15,11 +15,10 @@ require ( github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 github.com/cosmos/ics23/go v0.10.0 github.com/golang/protobuf v1.5.3 - github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 + github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/grpc v1.56.1 @@ -90,6 +89,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.8.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect @@ -132,6 +132,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.29.1 // indirect @@ -139,7 +140,6 @@ require ( github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.16.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect diff --git a/modules/apps/27-interchain-accounts/module_test.go b/modules/apps/27-interchain-accounts/module_test.go index 7e9c6688df2..2ee638f081a 100644 --- a/modules/apps/27-interchain-accounts/module_test.go +++ b/modules/apps/27-interchain-accounts/module_test.go @@ -37,8 +37,8 @@ func (suite *InterchainAccountsTestSuite) SetupTest() { func (suite *InterchainAccountsTestSuite) TestInitModule() { // setup and basic testing chainID := "testchain" - app := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 5, simapp.MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, baseapp.SetChainID(chainID)) - appModule, ok := app.GetModuleManager().Modules[types.ModuleName].(ica.AppModule) + app := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.EmptyAppOptions{}, baseapp.SetChainID(chainID)) + appModule, ok := app.ModuleManager.Modules[types.ModuleName].(ica.AppModule) suite.Require().True(ok) header := tmproto.Header{ @@ -75,7 +75,7 @@ func (suite *InterchainAccountsTestSuite) TestInitModule() { { "both controller and host set", func() { var ok bool - appModule, ok = app.GetModuleManager().Modules[types.ModuleName].(ica.AppModule) + appModule, ok = app.ModuleManager.Modules[types.ModuleName].(ica.AppModule) suite.Require().True(ok) }, true, true, }, @@ -104,7 +104,7 @@ func (suite *InterchainAccountsTestSuite) TestInitModule() { // reset app state chainID := "testchain" - app = simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 5, simapp.MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, baseapp.SetChainID(chainID)) + app = simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.EmptyAppOptions{}, baseapp.SetChainID(chainID)) header := tmproto.Header{ ChainID: chainID, Height: 1, diff --git a/modules/apps/transfer/simulation/decoder_test.go b/modules/apps/transfer/simulation/decoder_test.go index 72dd721fac4..941d25c2f77 100644 --- a/modules/apps/transfer/simulation/decoder_test.go +++ b/modules/apps/transfer/simulation/decoder_test.go @@ -14,7 +14,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) dec := simulation.NewDecodeStore(app.TransferKeeper) trace := types.DenomTrace{ diff --git a/modules/capability/capability_test.go b/modules/capability/capability_test.go index 3ca68b237cd..54367c7373b 100644 --- a/modules/capability/capability_test.go +++ b/modules/capability/capability_test.go @@ -31,7 +31,7 @@ type CapabilityTestSuite struct { func (suite *CapabilityTestSuite) SetupTest() { checkTx := false - app := simapp.Setup(checkTx) + app := simapp.Setup(suite.T(), checkTx) cdc := app.AppCodec() // create new keeper so we can define custom scoping before init and seal diff --git a/modules/capability/genesis_test.go b/modules/capability/genesis_test.go index 9007ee63ffa..51c52901d39 100644 --- a/modules/capability/genesis_test.go +++ b/modules/capability/genesis_test.go @@ -35,8 +35,7 @@ func (suite *CapabilityTestSuite) TestGenesis() { // create new app that does not share persistent or in-memory state // and initialize app from exported genesis state above. db := dbm.NewMemDB() - encCdc := simapp.MakeTestEncodingConfig() - newApp := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 5, encCdc, simtestutil.EmptyAppOptions{}) + newApp := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, simtestutil.EmptyAppOptions{}) newKeeper := keeper.NewKeeper(suite.cdc, newApp.GetKey(types.StoreKey), newApp.GetMemKey(types.MemStoreKey)) newSk1 := newKeeper.ScopeToModule(banktypes.ModuleName) diff --git a/modules/capability/simulation/decoder_test.go b/modules/capability/simulation/decoder_test.go index 2184e71cf58..167d53dd4e4 100644 --- a/modules/capability/simulation/decoder_test.go +++ b/modules/capability/simulation/decoder_test.go @@ -14,7 +14,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) dec := simulation.NewDecodeStore(app.AppCodec()) capOwners := types.CapabilityOwners{ diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index fd67d93286c..7ba5ab4013b 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -83,7 +83,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC) suite.past = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) now2 := suite.now.Add(time.Hour) - app := simapp.Setup(isCheckTx) + app := simapp.Setup(suite.T(), isCheckTx) suite.cdc = app.AppCodec() suite.ctx = app.BaseApp.NewContext(isCheckTx, tmproto.Header{Height: height, ChainID: testClientID, Time: now2}) diff --git a/modules/core/02-client/simulation/decoder_test.go b/modules/core/02-client/simulation/decoder_test.go index 543f77f2a4f..bcad1a54da3 100644 --- a/modules/core/02-client/simulation/decoder_test.go +++ b/modules/core/02-client/simulation/decoder_test.go @@ -17,7 +17,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) clientID := "clientidone" height := types.NewHeight(0, 10) diff --git a/modules/core/03-connection/simulation/decoder_test.go b/modules/core/03-connection/simulation/decoder_test.go index a511abeee74..8cb2ae5f3ef 100644 --- a/modules/core/03-connection/simulation/decoder_test.go +++ b/modules/core/03-connection/simulation/decoder_test.go @@ -15,7 +15,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) cdc := app.AppCodec() connectionID := "connectionidone" diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index 7e1749a8e26..588875dd693 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -50,7 +50,7 @@ func (suite *MsgTestSuite) SetupTest() { suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) - app := simapp.Setup(false) + app := simapp.Setup(suite.T(), false) db := dbm.NewMemDB() dblog := log.TestingLogger() store := rootmulti.NewStore(db, dblog) diff --git a/modules/core/04-channel/simulation/decoder_test.go b/modules/core/04-channel/simulation/decoder_test.go index 1e7bba78189..19ee81f6ce1 100644 --- a/modules/core/04-channel/simulation/decoder_test.go +++ b/modules/core/04-channel/simulation/decoder_test.go @@ -16,7 +16,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) cdc := app.AppCodec() channelID := "channelidone" diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index 9a80c8e68eb..ae437a476b6 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -75,7 +75,7 @@ type TypesTestSuite struct { } func (suite *TypesTestSuite) SetupTest() { - app := simapp.Setup(false) + app := simapp.Setup(suite.T(), false) db := dbm.NewMemDB() dblog := log.TestingLogger() store := rootmulti.NewStore(db, dblog) diff --git a/modules/core/05-port/keeper/keeper_test.go b/modules/core/05-port/keeper/keeper_test.go index 013f90868d9..da61c501428 100644 --- a/modules/core/05-port/keeper/keeper_test.go +++ b/modules/core/05-port/keeper/keeper_test.go @@ -28,7 +28,7 @@ type KeeperTestSuite struct { func (suite *KeeperTestSuite) SetupTest() { isCheckTx := false - app := simapp.Setup(isCheckTx) + app := simapp.Setup(suite.T(), isCheckTx) suite.ctx = app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) suite.keeper = &app.IBCKeeper.PortKeeper diff --git a/modules/core/genesis_test.go b/modules/core/genesis_test.go index 64e60ee231c..fb1472cc507 100644 --- a/modules/core/genesis_test.go +++ b/modules/core/genesis_test.go @@ -308,7 +308,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { } for _, tc := range testCases { - app := simapp.Setup(false) + app := simapp.Setup(suite.T(), false) suite.NotPanics(func() { ibc.InitGenesis(app.BaseApp.NewContext(false, tmproto.Header{Height: 1}), *app.IBCKeeper, tc.genState) diff --git a/modules/core/simulation/decoder_test.go b/modules/core/simulation/decoder_test.go index 1c8787698e0..899eaaed271 100644 --- a/modules/core/simulation/decoder_test.go +++ b/modules/core/simulation/decoder_test.go @@ -18,7 +18,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t, false) dec := simulation.NewDecodeStore(*app.IBCKeeper) clientID := "clientidone" diff --git a/modules/light-clients/07-tendermint/tendermint_test.go b/modules/light-clients/07-tendermint/tendermint_test.go index f3c5bb10c8a..025c57deeb1 100644 --- a/modules/light-clients/07-tendermint/tendermint_test.go +++ b/modules/light-clients/07-tendermint/tendermint_test.go @@ -68,7 +68,7 @@ func (suite *TendermintTestSuite) SetupTest() { // TODO: deprecate usage in favor of testing package checkTx := false - app := simapp.Setup(checkTx) + app := simapp.Setup(suite.T(), checkTx) suite.cdc = app.AppCodec() diff --git a/testing/app.go b/testing/app.go index d6a0848c616..a67f46e2870 100644 --- a/testing/app.go +++ b/testing/app.go @@ -56,7 +56,7 @@ type TestingApp interface { func SetupTestingApp() (TestingApp, map[string]json.RawMessage) { db := dbm.NewMemDB() encCdc := simapp.MakeTestEncodingConfig() - app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 5, encCdc, simtestutil.EmptyAppOptions{}) + app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, simtestutil.EmptyAppOptions{}) return app, simapp.NewDefaultGenesisState(encCdc.Codec) } diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 00af5593018..92a3ccb0326 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -4,12 +4,9 @@ import ( "encoding/json" "fmt" "io" - "net/http" "os" "path/filepath" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" "github.com/spf13/cast" _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // this is used for serving docs @@ -19,29 +16,34 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + "github.com/cosmos/cosmos-sdk/std" + "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" + testdatapb "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - authz "github.com/cosmos/cosmos-sdk/x/authz" + "github.com/cosmos/cosmos-sdk/x/authz" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/bank" @@ -124,7 +126,7 @@ import ( ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" simappparams "github.com/cosmos/ibc-go/v7/testing/simapp/params" - "github.com/cosmos/ibc-go/v7/testing/simapp/upgrades" + upgrades "github.com/cosmos/ibc-go/v7/testing/simapp/upgrades" ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" ) @@ -205,10 +207,8 @@ type SimApp struct { *baseapp.BaseApp legacyAmino *codec.LegacyAmino appCodec codec.Codec - interfaceRegistry types.InterfaceRegistry txConfig client.TxConfig - - invCheckPeriod uint + interfaceRegistry types.InterfaceRegistry // keys to access the substores keys map[string]*storetypes.KVStoreKey @@ -224,7 +224,6 @@ type SimApp struct { MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper - GroupKeeper groupkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper @@ -236,6 +235,7 @@ type SimApp struct { EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper + GroupKeeper groupkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper // make scoped keepers public for test purposes @@ -253,12 +253,12 @@ type SimApp struct { FeeMockModule ibcmock.IBCModule // the module manager - mm *module.Manager + ModuleManager *module.Manager // simulation manager - sm *module.SimulationManager + simulationManager *module.SimulationManager - // the configurator + // module configurator configurator module.Configurator } @@ -273,39 +273,82 @@ func init() { // NewSimApp returns a reference to an initialized SimApp. func NewSimApp( - logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, - homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, - appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + loadLatest bool, + appOpts servertypes.AppOptions, + baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { + encodingConfig := makeEncodingConfig() + appCodec := encodingConfig.Codec legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry + txConfig := encodingConfig.TxConfig + + // Below we could construct and set an application specific mempool and + // ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are + // already set in the SDK's BaseApp, this shows an example of how to override + // them. + // + // Example: + // + // bApp := baseapp.NewBaseApp(...) + // nonceMempool := mempool.NewSenderNonceMempool() + // abciPropHandler := NewDefaultProposalHandler(nonceMempool, bApp) + // + // bApp.SetMempool(nonceMempool) + // bApp.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) + // bApp.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) + // + // Alternatively, you can construct BaseApp options, append those to + // baseAppOptions and pass them to NewBaseApp. + // + // Example: + // + // prepareOpt = func(app *baseapp.BaseApp) { + // abciPropHandler := baseapp.NewDefaultProposalHandler(nonceMempool, app) + // app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) + // } + // baseAppOptions = append(baseAppOptions, prepareOpt) - bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) + bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + bApp.SetTxEncoder(txConfig.TxEncoder()) keys := sdk.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, group.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, icacontrollertypes.StoreKey, icahosttypes.StoreKey, capabilitytypes.StoreKey, - authzkeeper.StoreKey, ibcfeetypes.StoreKey, consensusparamtypes.StoreKey, + govtypes.StoreKey, group.StoreKey, paramstypes.StoreKey, + upgradetypes.StoreKey, feegrant.StoreKey, + evidencetypes.StoreKey, consensusparamtypes.StoreKey, authzkeeper.StoreKey, + ibctransfertypes.StoreKey, icacontrollertypes.StoreKey, icahosttypes.StoreKey, capabilitytypes.StoreKey, + ibcfeetypes.StoreKey, ibcexported.StoreKey, ) + tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) + // NOTE: The ibcmock.MemStoreKey is just mounted for testing purposes. Actual applications should + // not include this key. memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, ibcmock.MemStoreKey) + // load state streaming if enabled + if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, logger, keys); err != nil { + logger.Error("failed to load state streaming", "err", err) + os.Exit(1) + } + app := &SimApp{ BaseApp: bApp, legacyAmino: legacyAmino, appCodec: appCodec, + txConfig: txConfig, interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, memKeys: memKeys, - txConfig: encodingConfig.TxConfig, } app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) @@ -316,6 +359,7 @@ func NewSimApp( // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) @@ -328,10 +372,11 @@ func NewSimApp( scopedICAMockKeeper := app.CapabilityKeeper.ScopeToModule(ibcmock.ModuleName + icacontrollertypes.SubModuleName) // seal capability keeper after scoping modules + // Applications that wish to enforce statically created ScopedKeepers should call `Seal` after creating + // their scoped modules in `NewApp` with `ScopeToModule` app.CapabilityKeeper.Seal() // SDK module keepers - app.AccountKeeper = authkeeper.NewAccountKeeper(appCodec, keys[authtypes.StoreKey], authtypes.ProtoBaseAccount, maccPerms, sdk.GetConfig().GetBech32AccountAddrPrefix(), authtypes.NewModuleAddress(govtypes.ModuleName).String()) app.BankKeeper = bankkeeper.NewBaseKeeper( @@ -347,11 +392,7 @@ func NewSimApp( app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - - app.MintKeeper = mintkeeper.NewKeeper( - appCodec, keys[minttypes.StoreKey], app.StakingKeeper, - app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) + app.MintKeeper = mintkeeper.NewKeeper(appCodec, keys[minttypes.StoreKey], app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) app.DistrKeeper = distrkeeper.NewKeeper(appCodec, keys[distrtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.StakingKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) @@ -359,19 +400,34 @@ func NewSimApp( appCodec, legacyAmino, keys[slashingtypes.StoreKey], app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) + app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, keys[crisistypes.StoreKey], invCheckPeriod, + app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) + // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks app.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) - app.CrisisKeeper = crisiskeeper.NewKeeper(appCodec, keys[crisistypes.StoreKey], invCheckPeriod, - app.BankKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + groupConfig := group.DefaultConfig() + /* + Example of setting group params: + groupConfig.MaxMetadataLen = 1000 + */ + app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig) - app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) + skipUpgradeHeights := map[int64]bool{} + for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { + skipUpgradeHeights[int64(h)] = true + } + homePath := cast.ToString(appOpts.Get(flags.FlagHome)) + // set the governance module account as the authority for conducting upgrades + app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) // IBC Keepers @@ -405,13 +461,6 @@ func NewSimApp( ), ) - groupConfig := group.DefaultConfig() - /* - Example of setting group params: - groupConfig.MaxMetadataLen = 1000 - */ - app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig) - // IBC Fee Module keeper app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( appCodec, keys[ibcfeetypes.StoreKey], @@ -544,7 +593,7 @@ func NewSimApp( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. - app.mm = module.NewManager( + app.ModuleManager = module.NewManager( // SDK app modules genutil.NewAppModule( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, @@ -581,13 +630,14 @@ func NewSimApp( // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) - app.mm.SetOrderBeginBlockers( + app.ModuleManager.SetOrderBeginBlockers( upgradetypes.ModuleName, capabilitytypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, stakingtypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, authz.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, ibcmock.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, ) - app.mm.SetOrderEndBlockers( + + app.ModuleManager.SetOrderEndBlockers( crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, minttypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, @@ -596,22 +646,29 @@ func NewSimApp( // NOTE: The genutils module must occur after staking so that pools are // properly initialized with tokens from genesis accounts. + // NOTE: The genutils module must also occur after auth so that it can access the params from auth. // NOTE: Capability module must occur first so that it can initialize any capabilities // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. - app.mm.SetOrderInitGenesis( + + genesisModuleOrder := []string{ capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, ibcexported.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, ibcmock.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, - ) + } + app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) + app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) + + // Uncomment if you want to set a custom migration order here. + // app.ModuleManager.SetOrderMigrations(custom order) - app.mm.RegisterInvariants(app.CrisisKeeper) + app.ModuleManager.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) + app.ModuleManager.RegisterServices(app.configurator) - autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules)) + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) reflectionSvc, err := runtimeservices.NewReflectionService() if err != nil { @@ -620,31 +677,18 @@ func NewSimApp( reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) // add test gRPC service for testing gRPC queries in isolation - testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) + testdatapb.RegisterQueryServer(app.GRPCQueryRouter(), testdatapb.QueryImpl{}) // create the simulation manager and define the order of the modules for deterministic simulations // // NOTE: this is not required apps that don't use the simulator for fuzz testing // transactions - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), - params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - ibc.NewAppModule(app.IBCKeeper), - transfer.NewAppModule(app.TransferKeeper), - ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), - ) + overrideModules := map[string]module.AppModuleSimulation{ + authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), + } + app.simulationManager = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) - app.sm.RegisterStoreDecoders() + app.simulationManager.RegisterStoreDecoders() // initialize stores app.MountKVStores(keys) @@ -654,32 +698,36 @@ func NewSimApp( // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) - anteHandler, err := NewAnteHandler( - HandlerOptions{ - HandlerOptions: ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - IBCKeeper: app.IBCKeeper, - }, - ) - if err != nil { - panic(err) - } - - app.SetAnteHandler(anteHandler) - app.SetEndBlocker(app.EndBlocker) + app.setAnteHandler(encodingConfig.TxConfig) + + // In v0.46, the SDK introduces _postHandlers_. PostHandlers are like + // antehandlers, but are run _after_ the `runMsgs` execution. They are also + // defined as a chain, and have the same signature as antehandlers. + // + // In baseapp, postHandlers are run in the same store branch as `runMsgs`, + // meaning that both `runMsgs` and `postHandler` state will be committed if + // both are successful, and both will be reverted if any of the two fails. + // + // The SDK exposes a default postHandlers chain, which comprises of only + // one decorator: the Transaction Tips decorator. However, some chains do + // not need it by default, so feel free to comment the next line if you do + // not need tips. + // To read more about tips: + // https://docs.cosmos.network/main/core/tips.html + // + // Please note that changing any of the anteHandler or postHandler chain is + // likely to be a state-machine breaking change, which needs a coordinated + // upgrade. + app.setPostHandler() app.setupUpgradeHandlers() app.setupUpgradeStoreLoaders() if loadLatest { if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(err.Error()) + logger.Error("error on loading last version", "err", err) + os.Exit(1) } } @@ -697,17 +745,53 @@ func NewSimApp( return app } +func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { + anteHandler, err := NewAnteHandler( + HandlerOptions{ + HandlerOptions: ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + FeegrantKeeper: app.FeeGrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + IBCKeeper: app.IBCKeeper, + }, + ) + if err != nil { + panic(err) + } + + app.SetAnteHandler(anteHandler) +} + +func (app *SimApp) setPostHandler() { + postHandler, err := posthandler.NewPostHandler( + posthandler.HandlerOptions{}, + ) + if err != nil { + panic(err) + } + + app.SetPostHandler(postHandler) +} + // Name returns the name of the App func (app *SimApp) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) + return app.ModuleManager.BeginBlock(ctx, req) } // EndBlocker application updates every end block func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) + return app.ModuleManager.EndBlock(ctx, req) +} + +// Configurator returns the configurator for the app +func (a *SimApp) Configurator() module.Configurator { + return a.configurator } // InitChainer application update at chain initialization @@ -716,8 +800,8 @@ func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci. if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) + app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) + return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) } // LoadHeight loads a particular height @@ -725,28 +809,6 @@ func (app *SimApp) LoadHeight(height int64) error { return app.LoadVersion(height) } -// ModuleAccountAddrs returns all the app's module account addresses. -func (app *SimApp) ModuleAccountAddrs() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range maccPerms { - // do not add the following modules to blocked addresses - // this is only used for testing - if acc == ibcmock.ModuleName { - continue - } - - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - return modAccAddrs -} - -// GetModuleManager returns the app module manager -// NOTE: used for testing purposes -func (app *SimApp) GetModuleManager() *module.Manager { - return app.mm -} - // LegacyAmino returns SimApp's amino codec. // // NOTE: This is solely to be used for testing purposes as it may be desirable @@ -768,6 +830,16 @@ func (app *SimApp) InterfaceRegistry() types.InterfaceRegistry { return app.interfaceRegistry } +// TxConfig returns SimApp's TxConfig +func (app *SimApp) TxConfig() client.TxConfig { + return app.txConfig +} + +// DefaultGenesis returns a default genesis from the registered AppModuleBasic's. +func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { + return ModuleBasics.DefaultGenesis(a.appCodec) +} + // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. @@ -797,36 +869,9 @@ func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace { return subspace } -// TestingApp functions - -// GetBaseApp implements the TestingApp interface. -func (app *SimApp) GetBaseApp() *baseapp.BaseApp { - return app.BaseApp -} - -// GetStakingKeeper implements the TestingApp interface. -func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { - return app.StakingKeeper -} - -// GetIBCKeeper implements the TestingApp interface. -func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { - return app.IBCKeeper -} - -// GetScopedIBCKeeper implements the TestingApp interface. -func (app *SimApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { - return app.ScopedIBCKeeper -} - -// GetTxConfig implements the TestingApp interface. -func (app *SimApp) GetTxConfig() client.TxConfig { - return app.txConfig -} - // SimulationManager implements the SimulationApp interface func (app *SimApp) SimulationManager() *module.SimulationManager { - return app.sm + return app.simulationManager } // RegisterAPIRoutes registers all application module routes with the provided @@ -835,18 +880,19 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon clientCtx := apiSvr.ClientCtx // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - // Register legacy and grpc-gateway routes for all modules. - ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // Register nodeservice grpc-gateway routes. + // Register node gRPC service for grpc-gateway. nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // Register grpc-gateway routes for all modules. + ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // register swagger API from root so that other applications can override easily - if apiConfig.Swagger { - RegisterSwaggerAPI(clientCtx, apiSvr.Router) + if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { + panic(err) } } @@ -869,39 +915,25 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context) { nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) } -// RegisterSwaggerAPI registers swagger route with API Server -func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { - statikFS, err := fs.New() - if err != nil { - panic(err) - } - - staticServer := http.FileServer(statikFS) - rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) -} - // GetMaccPerms returns a copy of the module account permissions +// +// NOTE: This is solely to be used for testing purposes. func GetMaccPerms() map[string][]string { dupMaccPerms := make(map[string][]string) for k, v := range maccPerms { dupMaccPerms[k] = v } + return dupMaccPerms } -// ModuleAccountAddrsLegacy returns all the app's module account addresses. -func ModuleAccountAddrsLegacy() map[string]bool { +// BlockedAddresses returns all the app's blocked account addresses. +func BlockedAddresses() map[string]bool { modAccAddrs := make(map[string]bool) for acc := range GetMaccPerms() { modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true } - return modAccAddrs -} - -func BlockedAddresses() map[string]bool { - modAccAddrs := ModuleAccountAddrsLegacy() - // allow the following addresses to receive funds delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) delete(modAccAddrs, authtypes.NewModuleAddress(ibcmock.ModuleName).String()) @@ -923,11 +955,21 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino return paramsKeeper } +func makeEncodingConfig() simappparams.EncodingConfig { + encodingConfig := simappparams.MakeTestEncodingConfig() + std.RegisterLegacyAminoCodec(encodingConfig.Amino) + std.RegisterInterfaces(encodingConfig.InterfaceRegistry) + ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) + ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) + return encodingConfig +} + +// IBC Upgrade examples // setupUpgradeHandlers sets all necessary upgrade handlers for testing purposes func (app *SimApp) setupUpgradeHandlers() { app.UpgradeKeeper.SetUpgradeHandler( upgrades.V5, - upgrades.CreateDefaultUpgradeHandler(app.mm, app.configurator), + upgrades.CreateDefaultUpgradeHandler(app.ModuleManager, app.configurator), ) // NOTE: The moduleName arg of v6.CreateUpgradeHandler refers to the auth module ScopedKeeper name to which the channel capability should be migrated from. @@ -936,7 +978,7 @@ func (app *SimApp) setupUpgradeHandlers() { app.UpgradeKeeper.SetUpgradeHandler( upgrades.V6, upgrades.CreateV6UpgradeHandler( - app.mm, + app.ModuleManager, app.configurator, app.appCodec, app.keys[capabilitytypes.ModuleName], @@ -948,7 +990,7 @@ func (app *SimApp) setupUpgradeHandlers() { app.UpgradeKeeper.SetUpgradeHandler( upgrades.V7, upgrades.CreateV7UpgradeHandler( - app.mm, + app.ModuleManager, app.configurator, app.appCodec, app.IBCKeeper.ClientKeeper, @@ -959,7 +1001,7 @@ func (app *SimApp) setupUpgradeHandlers() { app.UpgradeKeeper.SetUpgradeHandler( upgrades.V7_1, - upgrades.CreateV7LocalhostUpgradeHandler(app.mm, app.configurator, app.IBCKeeper.ClientKeeper), + upgrades.CreateV7LocalhostUpgradeHandler(app.ModuleManager, app.configurator, app.IBCKeeper.ClientKeeper), ) } @@ -982,3 +1024,30 @@ func (app *SimApp) setupUpgradeStoreLoaders() { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } } + +// IBC TestingApp functions + +// GetBaseApp implements the TestingApp interface. +func (app *SimApp) GetBaseApp() *baseapp.BaseApp { + return app.BaseApp +} + +// GetStakingKeeper implements the TestingApp interface. +func (app *SimApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { + return app.StakingKeeper +} + +// GetIBCKeeper implements the TestingApp interface. +func (app *SimApp) GetIBCKeeper() *ibckeeper.Keeper { + return app.IBCKeeper +} + +// GetScopedIBCKeeper implements the TestingApp interface. +func (app *SimApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { + return app.ScopedIBCKeeper +} + +// GetTxConfig implements the TestingApp interface. +func (app *SimApp) GetTxConfig() client.TxConfig { + return app.txConfig +} diff --git a/testing/simapp/export.go b/testing/simapp/export.go index 05f8ffb4768..2caa609bc82 100644 --- a/testing/simapp/export.go +++ b/testing/simapp/export.go @@ -29,7 +29,7 @@ func (app *SimApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.mm.ExportGenesis(ctx, app.appCodec) + genState := app.ModuleManager.ExportGenesis(ctx, app.appCodec) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err diff --git a/testing/simapp/params/doc.go b/testing/simapp/params/doc.go index bef67c83b3d..a2f3620a835 100644 --- a/testing/simapp/params/doc.go +++ b/testing/simapp/params/doc.go @@ -3,9 +3,9 @@ Package params defines the simulation parameters in the simapp. It contains the default weights used for each transaction used on the module's simulation. These weights define the chance for a transaction to be simulated at -any gived operation. +any given operation. -You can repace the default values for the weights by providing a params.json +You can replace the default values for the weights by providing a params.json file with the weights defined for each of the transaction operations: { @@ -13,7 +13,7 @@ file with the weights defined for each of the transaction operations: "op_weight_msg_delegate": 100, } -In the example above, the MsgSend has 60% chance to be simulated, while the -MsgDelegate will always be simulated. +In the example above, the `MsgSend` has 60% chance to be simulated, while the +`MsgDelegate` will always be simulated. */ package params diff --git a/testing/simapp/sim_bench_test.go b/testing/simapp/sim_bench_test.go index 51f6ba5d410..9685bbe896a 100644 --- a/testing/simapp/sim_bench_test.go +++ b/testing/simapp/sim_bench_test.go @@ -5,10 +5,14 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) @@ -17,30 +21,38 @@ import ( // /usr/local/go/bin/go test -benchmem -run=^$ github.com/cosmos/ibc-go/v7/testing/simapp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out func BenchmarkFullAppSimulation(b *testing.B) { b.ReportAllocs() - config, db, dir, logger, _, err := SetupSimulation("goleveldb-app-sim", "Simulation") + + config := simcli.NewConfigFromFlags() + + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "goleveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } + if skip { + b.Skip("skipping benchmark application simulation") + } + defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } + require.NoError(b, db.Close()) + require.NoError(b, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -61,32 +73,41 @@ func BenchmarkFullAppSimulation(b *testing.B) { func BenchmarkInvariants(b *testing.B) { b.ReportAllocs() - config, db, dir, logger, _, err := SetupSimulation("leveldb-app-invariant-bench", "Simulation") + + config := simcli.NewConfigFromFlags() + config.ChainID = SimAppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-invariant-bench", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } + if skip { + b.Skip("skipping benchmark application simulation") + } + config.AllInvariants = false defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } + require.NoError(b, db.Close()) + require.NoError(b, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt()) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) diff --git a/testing/simapp/sim_test.go b/testing/simapp/sim_test.go index 2122d46d79f..7330747ba5d 100644 --- a/testing/simapp/sim_test.go +++ b/testing/simapp/sim_test.go @@ -5,11 +5,15 @@ import ( "fmt" "math/rand" "os" + "runtime/debug" + "strings" "testing" "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -24,6 +28,7 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -42,7 +47,7 @@ const SimAppChainID = "simulation-app" // Get flags every time the simulator is run func init() { - GetSimulatorFlags() + simcli.GetSimulatorFlags() } type StoreKeysPrefixes struct { @@ -64,18 +69,25 @@ func interBlockCacheOpt() func(*baseapp.BaseApp) { } func TestFullAppSimulation(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = SimAppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { t.Skip("skipping application simulation") } require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "SimApp", app.Name()) // run randomized simulation @@ -83,10 +95,10 @@ func TestFullAppSimulation(t *testing.T) { t, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -102,18 +114,25 @@ func TestFullAppSimulation(t *testing.T) { } func TestAppImportExport(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = SimAppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { t.Skip("skipping application import/export simulation") } require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -121,10 +140,10 @@ func TestAppImportExport(t *testing.T) { t, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -145,48 +164,59 @@ func TestAppImportExport(t *testing.T) { fmt.Printf("importing genesis...\n") - _, newDB, newDir, _, _, err := SetupSimulation("leveldb-app-sim-2", "Simulation-2") + newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) require.NoError(t, err, "simulation setup failed") defer func() { - newDB.Close() + require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "SimApp", newApp.Name()) var genesisState GenesisState err = json.Unmarshal(exported.AppState, &genesisState) require.NoError(t, err) + defer func() { + if r := recover(); r != nil { + err := fmt.Sprintf("%v", r) + if !strings.Contains(err, "validator set is empty after InitGenesis") { + panic(r) + } + logger.Info("Skipping simulation as all validators have been unbonded") + logger.Info("err", err, "stacktrace", string(debug.Stack())) + } + }() + ctxA := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) ctxB := newApp.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) - newApp.mm.InitGenesis(ctxB, app.AppCodec(), genesisState) + newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) fmt.Printf("comparing stores...\n") storeKeysPrefixes := []StoreKeysPrefixes{ - {app.keys[authtypes.StoreKey], newApp.keys[authtypes.StoreKey], [][]byte{}}, + {app.GetKey(authtypes.StoreKey), newApp.GetKey(authtypes.StoreKey), [][]byte{}}, { - app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], + app.GetKey(stakingtypes.StoreKey), newApp.GetKey(stakingtypes.StoreKey), [][]byte{ stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, - stakingtypes.HistoricalInfoKey, + stakingtypes.HistoricalInfoKey, stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey, stakingtypes.ValidatorUpdatesKey, }, }, // ordering may change but it doesn't matter - {app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}}, - {app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}}, - {app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}}, - {app.keys[banktypes.StoreKey], newApp.keys[banktypes.StoreKey], [][]byte{banktypes.BalancesPrefix}}, - {app.keys[paramtypes.StoreKey], newApp.keys[paramtypes.StoreKey], [][]byte{}}, - {app.keys[govtypes.StoreKey], newApp.keys[govtypes.StoreKey], [][]byte{}}, - {app.keys[evidencetypes.StoreKey], newApp.keys[evidencetypes.StoreKey], [][]byte{}}, - {app.keys[capabilitytypes.StoreKey], newApp.keys[capabilitytypes.StoreKey], [][]byte{}}, - {app.keys[ibcexported.StoreKey], newApp.keys[ibcexported.StoreKey], [][]byte{}}, - {app.keys[ibctransfertypes.StoreKey], newApp.keys[ibctransfertypes.StoreKey], [][]byte{}}, - {app.keys[authzkeeper.StoreKey], newApp.keys[authzkeeper.StoreKey], [][]byte{}}, + {app.GetKey(slashingtypes.StoreKey), newApp.keys[slashingtypes.StoreKey], [][]byte{}}, + {app.GetKey(minttypes.StoreKey), newApp.keys[minttypes.StoreKey], [][]byte{}}, + {app.GetKey(distrtypes.StoreKey), newApp.keys[distrtypes.StoreKey], [][]byte{}}, + {app.GetKey(banktypes.StoreKey), newApp.keys[banktypes.StoreKey], [][]byte{banktypes.BalancesPrefix}}, + {app.GetKey(paramtypes.StoreKey), newApp.keys[paramtypes.StoreKey], [][]byte{}}, + {app.GetKey(govtypes.StoreKey), newApp.keys[govtypes.StoreKey], [][]byte{}}, + {app.GetKey(evidencetypes.StoreKey), newApp.keys[evidencetypes.StoreKey], [][]byte{}}, + {app.GetKey(capabilitytypes.StoreKey), newApp.keys[capabilitytypes.StoreKey], [][]byte{}}, + {app.GetKey(ibcexported.StoreKey), newApp.keys[ibcexported.StoreKey], [][]byte{}}, + {app.GetKey(ibctransfertypes.StoreKey), newApp.keys[ibctransfertypes.StoreKey], [][]byte{}}, + {app.GetKey(authzkeeper.StoreKey), newApp.keys[authzkeeper.StoreKey], [][]byte{}}, } for _, skp := range storeKeysPrefixes { @@ -197,23 +227,30 @@ func TestAppImportExport(t *testing.T) { require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) - require.Equal(t, len(failedKVAs), 0, simtestutil.GetSimulationLog(skp.A.Name(), app.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) + require.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(skp.A.Name(), app.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) } } func TestAppSimulationAfterImport(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = SimAppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation(config, "leveldb-app-sim", "Simulation", simcli.FlagVerboseValue, simcli.FlagEnabledValue) if skip { t.Skip("skipping application simulation after import") } require.NoError(t, err, "simulation setup failed") defer func() { - db.Close() + require.NoError(t, db.Close()) require.NoError(t, os.RemoveAll(dir)) }() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + app := NewSimApp(logger, db, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "SimApp", app.Name()) // Run randomized simulation @@ -221,10 +258,10 @@ func TestAppSimulationAfterImport(t *testing.T) { t, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -250,29 +287,30 @@ func TestAppSimulationAfterImport(t *testing.T) { fmt.Printf("importing genesis...\n") - _, newDB, newDir, _, _, err := SetupSimulation("leveldb-app-sim-2", "Simulation-2") + newDB, newDir, _, _, err := simtestutil.SetupSimulation(config, "leveldb-app-sim-2", "Simulation-2", simcli.FlagVerboseValue, simcli.FlagEnabledValue) require.NoError(t, err, "simulation setup failed") defer func() { - newDB.Close() + require.NoError(t, newDB.Close()) require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) + newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, appOptions, fauxMerkleModeOpt, baseapp.SetChainID(SimAppChainID)) require.Equal(t, "SimApp", newApp.Name()) newApp.InitChain(abci.RequestInitChain{ + ChainId: SimAppChainID, AppStateBytes: exported.AppState, }) _, _, err = simulation.SimulateFromSeed( t, os.Stdout, - newApp.GetBaseApp(), - AppStateFn(app.AppCodec(), app.SimulationManager()), + newApp.BaseApp, + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -282,34 +320,47 @@ func TestAppSimulationAfterImport(t *testing.T) { // TODO: Make another test for the fuzzer itself, which just has noOp txs // and doesn't depend on the application. func TestAppStateDeterminism(t *testing.T) { - if !FlagEnabledValue { + if !simcli.FlagEnabledValue { t.Skip("skipping application simulation") } - config := NewConfigFromFlags() + config := simcli.NewConfigFromFlags() config.InitialBlockHeight = 1 config.ExportParamsPath = "" config.OnOperation = false config.AllInvariants = false - config.ChainID = "simulation-app" + config.ChainID = SimAppChainID numSeeds := 3 numTimesToRunPerSeed := 5 + + // We will be overriding the random seed and just run a single simulation on the provided seed value + if config.Seed != simcli.DefaultSeedValue { + numSeeds = 1 + } + appHashList := make([]json.RawMessage, numTimesToRunPerSeed) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue for i := 0; i < numSeeds; i++ { - config.Seed = rand.Int63() + if config.Seed == simcli.DefaultSeedValue { + config.Seed = rand.Int63() + } + + fmt.Println("config.Seed: ", config.Seed) for j := 0; j < numTimesToRunPerSeed; j++ { var logger log.Logger - if FlagVerboseValue { + if simcli.FlagVerboseValue { logger = log.TestingLogger() } else { logger = log.NewNopLogger() } db := dbm.NewMemDB() - app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), simtestutil.EmptyAppOptions{}, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) + app := NewSimApp(logger, db, nil, true, appOptions, interBlockCacheOpt(), baseapp.SetChainID(SimAppChainID)) fmt.Printf( "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", @@ -320,10 +371,10 @@ func TestAppStateDeterminism(t *testing.T) { t, os.Stdout, app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) diff --git a/testing/simapp/simd/cmd/cmd_test.go b/testing/simapp/simd/cmd/cmd_test.go index 1ffb1ec7243..2a034ea25da 100644 --- a/testing/simapp/simd/cmd/cmd_test.go +++ b/testing/simapp/simd/cmd/cmd_test.go @@ -14,12 +14,12 @@ import ( ) func TestInitCmd(t *testing.T) { - rootCmd, _ := cmd.NewRootCmd() + rootCmd := cmd.NewRootCmd() rootCmd.SetArgs([]string{ "init", // Test the init cmd "simapp-test", // Moniker fmt.Sprintf("--%s=%s", cli.FlagOverwrite, "true"), // Overwrite genesis.json, in case it already exists }) - require.NoError(t, svrcmd.Execute(rootCmd, "simd", simapp.DefaultNodeHome)) + require.NoError(t, svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome)) } diff --git a/testing/simapp/simd/cmd/root.go b/testing/simapp/simd/cmd/root.go index 4afecc5f716..0e276b49f40 100644 --- a/testing/simapp/simd/cmd/root.go +++ b/testing/simapp/simd/cmd/root.go @@ -4,24 +4,22 @@ import ( "errors" "io" "os" - "path/filepath" - "github.com/spf13/cast" "github.com/spf13/cobra" + "github.com/spf13/viper" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/client/snapshot" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/snapshots" - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - "github.com/cosmos/cosmos-sdk/store" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -30,9 +28,7 @@ import ( dbm "github.com/cometbft/cometbft-db" tmcfg "github.com/cometbft/cometbft/config" - tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cometbft/cometbft/libs/log" - tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/ibc-go/v7/testing/simapp" "github.com/cosmos/ibc-go/v7/testing/simapp/params" @@ -40,8 +36,16 @@ import ( // NewRootCmd creates a new root command for simd. It is called once in the // main function. -func NewRootCmd() (*cobra.Command, params.EncodingConfig) { - encodingConfig := simapp.MakeTestEncodingConfig() +func NewRootCmd() *cobra.Command { + // we "pre"-instantiate the application for getting the injected/configured encoding configuration + tempApp := simapp.NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(simapp.DefaultNodeHome)) + encodingConfig := params.EncodingConfig{ + InterfaceRegistry: tempApp.InterfaceRegistry(), + Codec: tempApp.AppCodec(), + TxConfig: tempApp.TxConfig(), + Amino: tempApp.LegacyAmino(), + } + initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). @@ -83,7 +87,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { initRootCmd(rootCmd, encodingConfig) - return rootCmd, encodingConfig + return rootCmd } // initTendermintConfig helps to override default Tendermint Config values. @@ -134,6 +138,7 @@ func initAppConfig() (string, interface{}) { // // In simapp, we set the min gas prices to 0. srvCfg.MinGasPrices = "0stake" + // srvCfg.BaseConfig.IAVLDisableFastNode = true // disable fastnode by default customAppConfig := CustomAppConfig{ Config: *srvCfg, @@ -160,18 +165,18 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( genutilcli.InitCmd(simapp.ModuleBasics, simapp.DefaultNodeHome), - genesisCommand(encodingConfig), - tmcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), config.Cmd(), + pruning.PruningCmd(newApp), + snapshot.Cmd(newApp), ) - a := appCreator{encodingConfig} - server.AddCommands(rootCmd, simapp.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags) + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, appExport, addModuleInitFlags) - // add keybase, auxiliary RPC, query, and tx child commands + // add keybase, auxiliary RPC, query, genesis, and tx child commands rootCmd.AddCommand( rpc.StatusCommand(), + genesisCommand(encodingConfig), queryCommand(), txCommand(), keys.Commands(simapp.DefaultNodeHome), @@ -182,12 +187,22 @@ func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) } +// genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter +func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command { + cmd := genutilcli.GenesisCoreCommand(encodingConfig.TxConfig, simapp.ModuleBasics, simapp.DefaultNodeHome) + + for _, sub_cmd := range cmds { + cmd.AddCommand(sub_cmd) + } + return cmd +} + func queryCommand() *cobra.Command { cmd := &cobra.Command{ Use: "query", Aliases: []string{"q"}, Short: "Querying subcommands", - DisableFlagParsing: true, + DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } @@ -201,7 +216,6 @@ func queryCommand() *cobra.Command { ) simapp.ModuleBasics.AddQueryCommands(cmd) - cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } @@ -210,7 +224,7 @@ func txCommand() *cobra.Command { cmd := &cobra.Command{ Use: "tx", Short: "Transactions subcommands", - DisableFlagParsing: true, + DisableFlagParsing: false, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } @@ -224,112 +238,67 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), + authcmd.GetAuxToFeeCommand(), ) simapp.ModuleBasics.AddTxCommands(cmd) - cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") - - return cmd -} - -// genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter -func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command { - cmd := genutilcli.GenesisCoreCommand(encodingConfig.TxConfig, simapp.ModuleBasics, simapp.DefaultNodeHome) - for _, subCmd := range cmds { - cmd.AddCommand(subCmd) - } return cmd } -type appCreator struct { - encCfg params.EncodingConfig -} - -// newApp is an appCreator -func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { - var cache sdk.MultiStorePersistentCache - - if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { - cache = store.NewCommitKVStoreCacheManager() - } - - skipUpgradeHeights := make(map[int64]bool) - for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { - skipUpgradeHeights[int64(h)] = true - } - - pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) - if err != nil { - panic(err) - } - - homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) - chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) - if chainID == "" { - // fallback to genesis chain-id - appGenesis, err := tmtypes.GenesisDocFromFile(filepath.Join(homeDir, "config", "genesis.json")) - if err != nil { - panic(err) - } - - chainID = appGenesis.ChainID - } - - snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) - if err != nil { - panic(err) - } - snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - if err != nil { - panic(err) - } - - snapshotOptions := snapshottypes.NewSnapshotOptions( - cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), - cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), - ) +// newApp creates the application +func newApp( + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + appOpts servertypes.AppOptions, +) servertypes.Application { + baseappOptions := server.DefaultBaseappOptions(appOpts) return simapp.NewSimApp( - logger, db, traceStore, true, skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - a.encCfg, + logger, db, traceStore, true, appOpts, - baseapp.SetPruning(pruningOpts), - baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), - baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), - baseapp.SetHaltTime(cast.ToUint64(appOpts.Get(server.FlagHaltTime))), - baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), - baseapp.SetInterBlockCache(cache), - baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), - baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshot(snapshotStore, snapshotOptions), - baseapp.SetChainID(chainID), + baseappOptions..., ) } -// appExport creates a new simapp (optionally at a given height) -// and exports state. -func (a appCreator) appExport( - logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, - appOpts servertypes.AppOptions, modulesToExport []string, +// appExport creates a new simapp (optionally at a given height) and exports state. +func appExport( + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + height int64, + forZeroHeight bool, + jailAllowedAddrs []string, + appOpts servertypes.AppOptions, + modulesToExport []string, ) (servertypes.ExportedApp, error) { var simApp *simapp.SimApp + + // this check is necessary as we use the flag in x/upgrade. + // we can exit more gracefully by checking the flag here. homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home not set") } + viperAppOpts, ok := appOpts.(*viper.Viper) + if !ok { + return servertypes.ExportedApp{}, errors.New("appOpts is not viper.Viper") + } + + // overwrite the FlagInvCheckPeriod + viperAppOpts.Set(server.FlagInvCheckPeriod, 1) + appOpts = viperAppOpts + if height != -1 { - simApp = simapp.NewSimApp(logger, db, traceStore, false, map[int64]bool{}, homePath, uint(1), a.encCfg, appOpts) + simApp = simapp.NewSimApp(logger, db, traceStore, false, appOpts) if err := simApp.LoadHeight(height); err != nil { return servertypes.ExportedApp{}, err } } else { - simApp = simapp.NewSimApp(logger, db, traceStore, true, map[int64]bool{}, homePath, uint(1), a.encCfg, appOpts) + simApp = simapp.NewSimApp(logger, db, traceStore, true, appOpts) } return simApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) diff --git a/testing/simapp/simd/main.go b/testing/simapp/simd/main.go index 07b2ab96848..b431382a732 100644 --- a/testing/simapp/simd/main.go +++ b/testing/simapp/simd/main.go @@ -11,9 +11,8 @@ import ( ) func main() { - rootCmd, _ := cmd.NewRootCmd() - - if err := svrcmd.Execute(rootCmd, "simd", simapp.DefaultNodeHome); err != nil { + rootCmd := cmd.NewRootCmd() + if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { switch e := err.(type) { case server.ErrorCode: os.Exit(e.Code) diff --git a/testing/simapp/state.go b/testing/simapp/state.go deleted file mode 100644 index d7e5853d162..00000000000 --- a/testing/simapp/state.go +++ /dev/null @@ -1,235 +0,0 @@ -package simapp - -import ( - "encoding/json" - "fmt" - "io" - "math/rand" - "os" - "time" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - tmjson "github.com/cometbft/cometbft/libs/json" - tmtypes "github.com/cometbft/cometbft/types" - - simappparams "github.com/cosmos/ibc-go/v7/testing/simapp/params" -) - -// AppStateFn returns the initial application state using a genesis or the simulation parameters. -// It panics if the user provides files for both of them. -// If a file is not given for the genesis or the sim params, it creates a randomized one. -func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn { - return func(r *rand.Rand, accs []simtypes.Account, config simtypes.Config, - ) (appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time) { - if FlagGenesisTimeValue == 0 { - genesisTimestamp = simtypes.RandTimestamp(r) - } else { - genesisTimestamp = time.Unix(FlagGenesisTimeValue, 0) - } - - chainID = config.ChainID - switch { - case config.ParamsFile != "" && config.GenesisFile != "": - panic("cannot provide both a genesis file and a params file") - - case config.GenesisFile != "": - // override the default chain-id from simapp to set it later to the config - genesisDoc, accounts := AppStateFromGenesisFileFn(r, cdc, config.GenesisFile) - - if FlagGenesisTimeValue == 0 { - // use genesis timestamp if no custom timestamp is provided (i.e no random timestamp) - genesisTimestamp = genesisDoc.GenesisTime - } - - appState = genesisDoc.AppState - chainID = genesisDoc.ChainID - simAccs = accounts - - case config.ParamsFile != "": - appParams := make(simtypes.AppParams) - bz, err := os.ReadFile(config.ParamsFile) - if err != nil { - panic(err) - } - - err = json.Unmarshal(bz, &appParams) - if err != nil { - panic(err) - } - appState, simAccs = AppStateRandomizedFn(simManager, r, cdc, accs, genesisTimestamp, appParams) - - default: - appParams := make(simtypes.AppParams) - appState, simAccs = AppStateRandomizedFn(simManager, r, cdc, accs, genesisTimestamp, appParams) - } - - rawState := make(map[string]json.RawMessage) - err := json.Unmarshal(appState, &rawState) - if err != nil { - panic(err) - } - - stakingStateBz, ok := rawState[stakingtypes.ModuleName] - if !ok { - panic("staking genesis state is missing") - } - - stakingState := new(stakingtypes.GenesisState) - err = cdc.UnmarshalJSON(stakingStateBz, stakingState) - if err != nil { - panic(err) - } - // compute not bonded balance - notBondedTokens := sdkmath.ZeroInt() - for _, val := range stakingState.Validators { - if val.Status != stakingtypes.Unbonded { - continue - } - notBondedTokens = notBondedTokens.Add(val.GetTokens()) - } - notBondedCoins := sdk.NewCoin(stakingState.Params.BondDenom, notBondedTokens) - // edit bank state to make it have the not bonded pool tokens - bankStateBz, ok := rawState[banktypes.ModuleName] - // TODO(fdymylja/jonathan): should we panic in this case - if !ok { - panic("bank genesis state is missing") - } - bankState := new(banktypes.GenesisState) - err = cdc.UnmarshalJSON(bankStateBz, bankState) - if err != nil { - panic(err) - } - - bankState.Balances = append(bankState.Balances, banktypes.Balance{ - Address: authtypes.NewModuleAddress(stakingtypes.NotBondedPoolName).String(), - Coins: sdk.NewCoins(notBondedCoins), - }) - - // change appState back - rawState[stakingtypes.ModuleName] = cdc.MustMarshalJSON(stakingState) - rawState[banktypes.ModuleName] = cdc.MustMarshalJSON(bankState) - - // replace appstate - appState, err = json.Marshal(rawState) - if err != nil { - panic(err) - } - return appState, simAccs, chainID, genesisTimestamp - } -} - -// AppStateRandomizedFn creates calls each module's GenesisState generator function -// and creates the simulation params -func AppStateRandomizedFn( - simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec, - accs []simtypes.Account, genesisTimestamp time.Time, appParams simtypes.AppParams, -) (json.RawMessage, []simtypes.Account) { - numAccs := int64(len(accs)) - genesisState := NewDefaultGenesisState(cdc) - - // generate a random amount of initial stake coins and a random initial - // number of bonded accounts - var initialStake, numInitiallyBonded int64 - appParams.GetOrGenerate( - cdc, simappparams.StakePerAccount, &initialStake, r, - func(r *rand.Rand) { initialStake = r.Int63n(1e12) }, - ) - appParams.GetOrGenerate( - cdc, simappparams.InitiallyBondedValidators, &numInitiallyBonded, r, - func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, - ) - - if numInitiallyBonded > numAccs { - numInitiallyBonded = numAccs - } - - fmt.Printf( - `Selected randomly generated parameters for simulated genesis: -{ - stake_per_account: "%d", - initially_bonded_validators: "%d" -} -`, initialStake, numInitiallyBonded, - ) - - simState := &module.SimulationState{ - AppParams: appParams, - Cdc: cdc, - Rand: r, - GenState: genesisState, - Accounts: accs, - InitialStake: sdkmath.NewInt(initialStake), - NumBonded: numInitiallyBonded, - GenTimestamp: genesisTimestamp, - } - - simManager.GenerateGenesisStates(simState) - - appState, err := json.Marshal(genesisState) - if err != nil { - panic(err) - } - - return appState, accs -} - -// AppStateFromGenesisFileFn util function to generate the genesis AppState -// from a genesis.json file. -func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account) { - bytes, err := os.ReadFile(genesisFile) - if err != nil { - panic(err) - } - - var genesis tmtypes.GenesisDoc - // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc - err = tmjson.Unmarshal(bytes, &genesis) - if err != nil { - panic(err) - } - - var appState GenesisState - err = json.Unmarshal(genesis.AppState, &appState) - if err != nil { - panic(err) - } - - var authGenesis authtypes.GenesisState - if appState[authtypes.ModuleName] != nil { - cdc.MustUnmarshalJSON(appState[authtypes.ModuleName], &authGenesis) - } - - newAccs := make([]simtypes.Account, len(authGenesis.Accounts)) - for i, acc := range authGenesis.Accounts { - // Pick a random private key, since we don't know the actual key - // This should be fine as it's only used for mock Tendermint validators - // and these keys are never actually used to sign by mock Tendermint. - privkeySeed := make([]byte, 15) - if _, err := r.Read(privkeySeed); err != nil { - panic(err) - } - - privKey := secp256k1.GenPrivKeyFromSecret(privkeySeed) - - a, ok := acc.GetCachedValue().(authtypes.AccountI) - if !ok { - panic("expected account") - } - - // create simulator accounts - simAcc := simtypes.Account{PrivKey: privKey, PubKey: privKey.PubKey(), Address: a.GetAddress()} - newAccs[i] = simAcc - } - - return genesis, newAccs -} diff --git a/testing/simapp/test_helpers.go b/testing/simapp/test_helpers.go index 4915eb4c923..c9b97885422 100644 --- a/testing/simapp/test_helpers.go +++ b/testing/simapp/test_helpers.go @@ -12,15 +12,15 @@ import ( bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/server" + servertypes "github.com/cosmos/cosmos-sdk/server/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" @@ -31,39 +31,34 @@ import ( "github.com/cosmos/ibc-go/v7/testing/mock" ) -// DefaultConsensusParams defines the default Tendermint consensus params used in -// SimApp testing. -var DefaultConsensusParams = &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ - MaxBytes: 200000, - MaxGas: 2000000, - }, - Evidence: &tmproto.EvidenceParams{ - MaxAgeNumBlocks: 302400, - MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration - MaxBytes: 10000, - }, - Validator: &tmproto.ValidatorParams{ - PubKeyTypes: []string{ - tmtypes.ABCIPubKeyTypeEd25519, - }, - }, +// SetupOptions defines arguments that are passed into `Simapp` constructor. +type SetupOptions struct { + Logger log.Logger + DB *dbm.MemDB + AppOpts servertypes.AppOptions } func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { db := dbm.NewMemDB() - encCdc := MakeTestEncodingConfig() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, simtestutil.EmptyAppOptions{}) + + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = invCheckPeriod + + app := NewSimApp(log.NewNopLogger(), db, nil, true, appOptions) if withGenesis { - return app, NewDefaultGenesisState(encCdc.Codec) + return app, app.DefaultGenesis() } return app, GenesisState{} } // Setup initializes a new SimApp. A Nop logger is set in SimApp. -func Setup(isCheckTx bool) *SimApp { +func Setup(t *testing.T, isCheckTx bool) *SimApp { + t.Helper() + privVal := mock.NewPV() - pubKey, _ := privVal.GetPubKey() + pubKey, err := privVal.GetPubKey() + require.NoError(t, err) // create validator set with single validator validator := tmtypes.NewValidator(pubKey, 1) @@ -77,7 +72,7 @@ func Setup(isCheckTx bool) *SimApp { Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000000000))), } - app := SetupWithGenesisValSet(valSet, []authtypes.GenesisAccount{acc}, balance) + app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) return app } @@ -86,17 +81,21 @@ func Setup(isCheckTx bool) *SimApp { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { +func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { + t.Helper() + app, genesisState := setup(true, 5) - genesisState = genesisStateWithValSet(app, genesisState, valSet, genAccs, balances...) + genesisState, err := simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) + require.NoError(t, err) - stateBytes, _ := json.MarshalIndent(genesisState, "", " ") + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + require.NoError(t, err) // init chain will set the validator set and initialize the genesis accounts app.InitChain( abci.RequestInitChain{ Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, + ConsensusParams: simtestutil.DefaultConsensusParams, AppStateBytes: stateBytes, }, ) @@ -113,67 +112,6 @@ func SetupWithGenesisValSet(valSet *tmtypes.ValidatorSet, genAccs []authtypes.Ge return app } -func genesisStateWithValSet(app *SimApp, genesisState GenesisState, - valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance, -) GenesisState { - // set genesis accounts - authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) - genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) - - validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) - delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) - - bondAmt := sdk.DefaultPowerReduction - - for _, val := range valSet.Validators { - pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey) - pkAny, _ := codectypes.NewAnyWithValue(pk) - validator := stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(val.Address).String(), - ConsensusPubkey: pkAny, - Jailed: false, - Status: stakingtypes.Bonded, - Tokens: bondAmt, - DelegatorShares: sdkmath.LegacyOneDec(), - Description: stakingtypes.Description{}, - UnbondingHeight: int64(0), - UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec(), sdkmath.LegacyZeroDec()), - MinSelfDelegation: sdkmath.ZeroInt(), - } - validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) - - } - // set validators and delegations - stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) - genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) - - totalSupply := sdk.NewCoins() - for _, b := range balances { - // add genesis acc tokens to total supply - totalSupply = totalSupply.Add(b.Coins...) - } - - for range delegations { - // add delegated tokens to total supply - totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) - } - - // add bonded amount to bonded pool module account - balances = append(balances, banktypes.Balance{ - Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, - }) - - // update total supply - bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}, []banktypes.SendEnabled{}) - genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) - - return genesisState -} - // SetupWithGenesisAccounts initializes a new SimApp with the provided genesis // accounts and possible balances. func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { @@ -197,7 +135,7 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...ba app.InitChain( abci.RequestInitChain{ Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, + ConsensusParams: simtestutil.DefaultConsensusParams, AppStateBytes: stateBytes, }, ) diff --git a/testing/simapp/utils.go b/testing/simapp/utils.go deleted file mode 100644 index 31f4b1aa05a..00000000000 --- a/testing/simapp/utils.go +++ /dev/null @@ -1,41 +0,0 @@ -package simapp - -import ( - "os" - - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" -) - -// SetupSimulation creates the config, db (levelDB), temporary directory and logger for -// the simulation tests. If `FlagEnabledValue` is false it skips the current test. -// Returns error on an invalid db intantiation or temp dir creation. -func SetupSimulation(dirPrefix, dbName string) (simtypes.Config, dbm.DB, string, log.Logger, bool, error) { - if !FlagEnabledValue { - return simtypes.Config{}, nil, "", nil, true, nil - } - - config := NewConfigFromFlags() - config.ChainID = "simulation-app" - - var logger log.Logger - if FlagVerboseValue { - logger = log.TestingLogger() - } else { - logger = log.NewNopLogger() - } - - dir, err := os.MkdirTemp("", dirPrefix) - if err != nil { - return simtypes.Config{}, nil, "", nil, false, err - } - - db, err := dbm.NewDB(dbName, dbm.BackendType(config.DBBackend), dir) - if err != nil { - return simtypes.Config{}, nil, "", nil, false, err - } - - return config, db, dir, logger, false, nil -} From 315680c626347e3a6dc6721070b24b05730728c1 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 3 Jul 2023 21:09:09 +0200 Subject: [PATCH 18/23] improvement(api)!: remove unused `EventTypeTimeoutPacketOnClose` (#3806) --- docs/migrations/v7-to-v8.md | 1 + modules/core/04-channel/types/events.go | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/migrations/v7-to-v8.md b/docs/migrations/v7-to-v8.md index 5822db920cc..55549b91665 100644 --- a/docs/migrations/v7-to-v8.md +++ b/docs/migrations/v7-to-v8.md @@ -83,6 +83,7 @@ TODO: ## Relayers - Getter functions in `MsgChannelOpenInitResponse`, `MsgChannelOpenTryResponse`, `MsgTransferResponse`, `MsgRegisterInterchainAccountResponse` and `MsgSendTxResponse` have been removed. The fields can be accessed directly. +- `channeltypes.EventTypeTimeoutPacketOnClose` (where `channeltypes` is an import alias for `"github.com/cosmos/ibc-go/v8/modules/core/04-channel"`) has been removed, since core IBC does not emit any event with this key. - Attribute with key `counterparty_connection_id` has been removed from event with key `connectiontypes.EventTypeConnectionOpenInit` (where `connectiontypes` is an import alias for `"github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"`) and attribute with key `counterparty_channel_id` has been removed from event with key `channeltypes.EventTypeChannelOpenInit` (where `channeltypes` is an import alias for `"github.com/cosmos/ibc-go/v8/modules/core/04-channel"`) since both (counterparty connection ID and counterparty channel ID) are empty on `ConnectionOpenInit` and `ChannelOpenInit` respectively. ## IBC Light Clients diff --git a/modules/core/04-channel/types/events.go b/modules/core/04-channel/types/events.go index 3b58e1da8ae..43edb134eb2 100644 --- a/modules/core/04-channel/types/events.go +++ b/modules/core/04-channel/types/events.go @@ -15,12 +15,11 @@ const ( AttributeCounterpartyPortID = "counterparty_port_id" AttributeCounterpartyChannelID = "counterparty_channel_id" - EventTypeSendPacket = "send_packet" - EventTypeRecvPacket = "recv_packet" - EventTypeWriteAck = "write_acknowledgement" - EventTypeAcknowledgePacket = "acknowledge_packet" - EventTypeTimeoutPacket = "timeout_packet" - EventTypeTimeoutPacketOnClose = "timeout_on_close_packet" + EventTypeSendPacket = "send_packet" + EventTypeRecvPacket = "recv_packet" + EventTypeWriteAck = "write_acknowledgement" + EventTypeAcknowledgePacket = "acknowledge_packet" + EventTypeTimeoutPacket = "timeout_packet" // Deprecated: in favor of AttributeKeyDataHex AttributeKeyData = "packet_data" From d281d84023b4946ea5b22d30fdbc549c1675f5b8 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 4 Jul 2023 12:55:32 +0200 Subject: [PATCH 19/23] chore: add mergify backport task and compatibility tests for v7.3.x (#3998) --- .../release-v7.3.x/client-chain-a.json | 33 +++++++++++++++++ .../release-v7.3.x/client-chain-b.json | 33 +++++++++++++++++ .../release-v7.3.x/connection-chain-a.json | 32 ++++++++++++++++ .../release-v7.3.x/connection-chain-b.json | 32 ++++++++++++++++ .../release-v7.3.x/ica-chain-a.json | 28 ++++++++++++++ .../release-v7.3.x/ica-chain-b.json | 28 ++++++++++++++ .../release-v7.3.x/ica-gov-chain-a.json | 26 +++++++++++++ .../release-v7.3.x/ica-gov-chain-b.json | 26 +++++++++++++ .../release-v7.3.x/ica-groups-chain-a.json | 26 +++++++++++++ .../release-v7.3.x/ica-groups-chain-b.json | 26 +++++++++++++ .../incentivized-ica-chain-a.json | 27 ++++++++++++++ .../incentivized-ica-chain-b.json | 27 ++++++++++++++ .../incentivized-transfer-chain-a.json | 37 +++++++++++++++++++ .../incentivized-transfer-chain-b.json | 37 +++++++++++++++++++ .../release-v7.3.x/localhost-ica-chain-a.json | 25 +++++++++++++ .../release-v7.3.x/localhost-ica-chain-b.json | 25 +++++++++++++ .../localhost-transfer-chain-a.json | 24 ++++++++++++ .../localhost-transfer-chain-b.json | 24 ++++++++++++ .../transfer-authz-chain-a.json | 26 +++++++++++++ .../transfer-authz-chain-b.json | 26 +++++++++++++ .../release-v7.3.x/transfer-chain-a.json | 37 +++++++++++++++++++ .../release-v7.3.x/transfer-chain-b.json | 37 +++++++++++++++++++ .../unreleased/client.json | 6 +-- .../unreleased/connection.json | 6 +-- .../unreleased/ica-gov.json | 6 +-- .../unreleased/ica-groups.json | 6 +-- .../unreleased/ica.json | 6 +-- .../unreleased/incentivized-ica.json | 6 +-- .../unreleased/incentivized-transfer-1.json | 6 +-- .../unreleased/incentivized-transfer-2.json | 6 +-- .../unreleased/incentivized-transfer-3.json | 6 +-- .../unreleased/localhost-ica.json | 8 ++-- .../unreleased/localhost-transfer.json | 8 ++-- .../unreleased/transfer-1.json | 6 +-- .../unreleased/transfer-2.json | 6 +-- .../unreleased/transfer-3.json | 6 +-- .../unreleased/transfer-authz.json | 6 +-- .github/mergify.yml | 8 ++++ .../e2e-compatibility-unreleased.yaml | 1 + .github/workflows/e2e-compatibility.yaml | 2 + 40 files changed, 687 insertions(+), 60 deletions(-) create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/client-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/connection-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json create mode 100644 .github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json diff --git a/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json new file mode 100644 index 00000000000..49801524a7f --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/client-chain-a.json @@ -0,0 +1,33 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "entrypoint": [ + "TestClientTestSuite" + ], + "test": [ + "TestClientUpdateProposal_Succeeds", + "TestClient_Update_Misbehaviour" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/client-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/client-chain-b.json new file mode 100644 index 00000000000..af5c0fe51ea --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/client-chain-b.json @@ -0,0 +1,33 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestClientTestSuite" + ], + "test": [ + "TestClientUpdateProposal_Succeeds", + "TestClient_Update_Misbehaviour" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json new file mode 100644 index 00000000000..61cc60e1693 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-a.json @@ -0,0 +1,32 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "entrypoint": [ + "TestConnectionTestSuite" + ], + "test": [ + "TestMaxExpectedTimePerBlockParam" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-b.json new file mode 100644 index 00000000000..106bc6491f9 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/connection-chain-b.json @@ -0,0 +1,32 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestConnectionTestSuite" + ], + "test": [ + "TestMaxExpectedTimePerBlockParam" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json new file mode 100644 index 00000000000..42f48cb64ce --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-a.json @@ -0,0 +1,28 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulTransfer", + "TestMsgSendTx_FailedTransfer_InsufficientFunds", + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json new file mode 100644 index 00000000000..13d53354187 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-chain-b.json @@ -0,0 +1,28 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulTransfer", + "TestMsgSendTx_FailedTransfer_InsufficientFunds", + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json new file mode 100644 index 00000000000..7b3208bc8cc --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-a.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json new file mode 100644 index 00000000000..a9c94bae130 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-gov-chain-b.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsGovTestSuite" + ], + "test": [ + "TestInterchainAccountsGovIntegration" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json new file mode 100644 index 00000000000..22da2329d4e --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-a.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json new file mode 100644 index 00000000000..e2c23565073 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/ica-groups-chain-b.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestInterchainAccountsGroupsTestSuite" + ], + "test": [ + "TestInterchainAccountsGroupsIntegration" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json new file mode 100644 index 00000000000..4b38e89bfb3 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-a.json @@ -0,0 +1,27 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "entrypoint": [ + "TestIncentivizedInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulBankSend_Incentivized", + "TestMsgSendTx_FailedBankSend_Incentivized" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json new file mode 100644 index 00000000000..f5cd7814881 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-ica-chain-b.json @@ -0,0 +1,27 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestIncentivizedInterchainAccountsTestSuite" + ], + "test": [ + "TestMsgSendTx_SuccessfulBankSend_Incentivized", + "TestMsgSendTx_FailedBankSend_Incentivized" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json new file mode 100644 index 00000000000..c11a46d3a92 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-a.json @@ -0,0 +1,37 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "entrypoint": [ + "TestIncentivizedTransferTestSuite" + ], + "test": [ + "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", + "TestMsgPayPacketFee_InvalidReceiverAccount", + "TestMultiMsg_MsgPayPacketFeeSingleSender", + "TestMsgPayPacketFee_SingleSender_TimesOut", + "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", + "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json new file mode 100644 index 00000000000..390e78f1c06 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/incentivized-transfer-chain-b.json @@ -0,0 +1,37 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestIncentivizedTransferTestSuite" + ], + "test": [ + "TestMsgPayPacketFee_AsyncSingleSender_Succeeds", + "TestMsgPayPacketFee_InvalidReceiverAccount", + "TestMultiMsg_MsgPayPacketFeeSingleSender", + "TestMsgPayPacketFee_SingleSender_TimesOut", + "TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress", + "TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json new file mode 100644 index 00000000000..0c3efe471ce --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json @@ -0,0 +1,25 @@ +{ + "chain-a": [ + "v7.2.0", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "LocalhostInterchainAccountsTestSuite" + ], + "test": [ + "TestInterchainAccounts_Localhost", + "TestInterchainAccounts_ReopenChannel_Localhost" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json new file mode 100644 index 00000000000..c05ec8940a3 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json @@ -0,0 +1,25 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "release-v7.3.x" + ], + "entrypoint": [ + "LocalhostInterchainAccountsTestSuite" + ], + "test": [ + "TestInterchainAccounts_Localhost", + "TestInterchainAccounts_ReopenChannel_Localhost" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json new file mode 100644 index 00000000000..f30921cd426 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "v7.2.0", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "LocalhostTransferTestSuite" + ], + "test": [ + "TestMsgTransfer_Localhost" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json new file mode 100644 index 00000000000..b3af9ee121c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json @@ -0,0 +1,24 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "release-v7.3.x" + ], + "entrypoint": [ + "LocalhostTransferTestSuite" + ], + "test": [ + "TestMsgTransfer_Localhost" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json new file mode 100644 index 00000000000..3a67b08ef7c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-a.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "release-v7.3.x" + ], + "entrypoint": [ + "TestAuthzTransferTestSuite" + ], + "test": [ + "TestAuthz_MsgTransfer_Succeeds", + "TestAuthz_InvalidTransferAuthorizations" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json new file mode 100644 index 00000000000..d66e2ca884c --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/transfer-authz-chain-b.json @@ -0,0 +1,26 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.x" + ], + "entrypoint": [ + "TestAuthzTransferTestSuite" + ], + "test": [ + "TestAuthz_MsgTransfer_Succeeds", + "TestAuthz_InvalidTransferAuthorizations" + ], + "relayer-type": [ + "rly" + ], + "chain-binary": [ + "simd" + ], + "chain-image": [ + "ghcr.io/cosmos/ibc-go-simd" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json new file mode 100644 index 00000000000..5fe4fe6c1e2 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-a.json @@ -0,0 +1,37 @@ +{ + "chain-a": [ + "release-v7.3.x" + ], + "chain-b": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.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" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json new file mode 100644 index 00000000000..9e949980cd5 --- /dev/null +++ b/.github/compatibility-test-matrices/release-v7.3.x/transfer-chain-b.json @@ -0,0 +1,37 @@ +{ + "chain-a": [ + "v7.2.0", + "v6.2.0", + "v6.1.1", + "v5.3.1", + "v5.2.1", + "v4.4.2", + "v4.3.1", + "v4.2.2", + "v4.1.3", + "release-v7.3.x" + ], + "chain-b": [ + "release-v7.3.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" + ] +} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/unreleased/client.json b/.github/compatibility-test-matrices/unreleased/client.json index 5f142411c65..cd01aa0b133 100644 --- a/.github/compatibility-test-matrices/unreleased/client.json +++ b/.github/compatibility-test-matrices/unreleased/client.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/connection.json b/.github/compatibility-test-matrices/unreleased/connection.json index 8b31df4da85..4d1a87c06f6 100644 --- a/.github/compatibility-test-matrices/unreleased/connection.json +++ b/.github/compatibility-test-matrices/unreleased/connection.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/ica-gov.json b/.github/compatibility-test-matrices/unreleased/ica-gov.json index 433cb5dfa9a..826ebba82c2 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-gov.json +++ b/.github/compatibility-test-matrices/unreleased/ica-gov.json @@ -1,15 +1,13 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/ica-groups.json b/.github/compatibility-test-matrices/unreleased/ica-groups.json index a7ee645b00b..8512782b481 100644 --- a/.github/compatibility-test-matrices/unreleased/ica-groups.json +++ b/.github/compatibility-test-matrices/unreleased/ica-groups.json @@ -1,15 +1,13 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/ica.json b/.github/compatibility-test-matrices/unreleased/ica.json index 4b41524c62a..96861e0f7bc 100644 --- a/.github/compatibility-test-matrices/unreleased/ica.json +++ b/.github/compatibility-test-matrices/unreleased/ica.json @@ -1,15 +1,13 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json index 931a994c1cd..7a4e889e431 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-ica.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-ica.json @@ -1,15 +1,13 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x" ], diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json index 92e32b4590f..47363ba43bb 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json index 385902d06fc..5d3641f7887 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json index d8b7976f34c..d30db62ced2 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/localhost-ica.json b/.github/compatibility-test-matrices/unreleased/localhost-ica.json index 7c459a3cac8..de0c8864ef6 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-ica.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-ica.json @@ -1,11 +1,11 @@ { "chain-a": [ - "release-v7.2.x", - "release-v7.1.x" + "release-v7.3.x", + "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "release-v7.1.x" + "release-v7.3.x", + "release-v7.2.x" ], "entrypoint": [ "LocalhostInterchainAccountsTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json index 318bb5a8850..3b12ae68abb 100644 --- a/.github/compatibility-test-matrices/unreleased/localhost-transfer.json +++ b/.github/compatibility-test-matrices/unreleased/localhost-transfer.json @@ -1,11 +1,11 @@ { "chain-a": [ - "release-v7.2.x", - "release-v7.1.x" + "release-v7.3.x", + "release-v7.2.x" ], "chain-b": [ - "release-v7.2.x", - "release-v7.1.x" + "release-v7.3.x", + "release-v7.2.x" ], "entrypoint": [ "LocalhostTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-1.json b/.github/compatibility-test-matrices/unreleased/transfer-1.json index 6041ec22a01..12740199696 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-1.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-2.json b/.github/compatibility-test-matrices/unreleased/transfer-2.json index 474af2023a6..fa2f7726535 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-2.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-3.json b/.github/compatibility-test-matrices/unreleased/transfer-3.json index a22d5519e3d..0ee3e9e4515 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-3.json @@ -1,8 +1,7 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", @@ -13,9 +12,8 @@ "release-v4.1.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x", "release-v6.1.x", "release-v5.3.x", diff --git a/.github/compatibility-test-matrices/unreleased/transfer-authz.json b/.github/compatibility-test-matrices/unreleased/transfer-authz.json index bf3af1e0797..e5142e19dfa 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-authz.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-authz.json @@ -1,14 +1,12 @@ { "chain-a": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x" ], "chain-b": [ + "release-v7.3.x", "release-v7.2.x", - "release-v7.1.x", - "release-v7.0.x", "release-v6.2.x" ], "entrypoint": [ diff --git a/.github/mergify.yml b/.github/mergify.yml index a76ef5c3022..40dd7baf915 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -90,3 +90,11 @@ pull_request_rules: backport: branches: - release/v7.2.x + - name: backport patches to v7.3.x branch + conditions: + - base=main + - label=backport-to-v7.3.x + actions: + backport: + branches: + - release/v7.3.x \ No newline at end of file diff --git a/.github/workflows/e2e-compatibility-unreleased.yaml b/.github/workflows/e2e-compatibility-unreleased.yaml index c7aae3e31af..a12ff1f41f5 100644 --- a/.github/workflows/e2e-compatibility-unreleased.yaml +++ b/.github/workflows/e2e-compatibility-unreleased.yaml @@ -21,6 +21,7 @@ jobs: - release/v6.1.x - release/v6.2.x - release/v7.2.x + - release/v7.3.x steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index e90828ade14..3ad869a741a 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -16,6 +16,7 @@ on: - release/v6.1.x - release/v6.2.x - release/v7.2.x + - release/v7.3.x - main ibc-go-version: description: 'The version of ibc-go that is going to be released' @@ -57,6 +58,7 @@ jobs: - release/v6.1.x - release/v6.2.x - release/v7.2.x + - release/v7.3.x - main steps: - uses: actions/checkout@v3 From a41e3e1c9f46f845e088282acedfcf143b1df93e Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Tue, 4 Jul 2023 16:32:50 +0200 Subject: [PATCH 20/23] chore: remove redundant tests (#4007) --- .../release-v7.2.x/localhost-ica-chain-a.json | 1 - .../release-v7.2.x/localhost-ica-chain-b.json | 25 ------------------- .../localhost-transfer-chain-a.json | 1 - .../localhost-transfer-chain-b.json | 24 ------------------ .../release-v7.3.x/localhost-ica-chain-a.json | 1 - .../release-v7.3.x/localhost-ica-chain-b.json | 25 ------------------- .../localhost-transfer-chain-a.json | 1 - .../localhost-transfer-chain-b.json | 24 ------------------ .github/workflows/e2e-compatibility.yaml | 18 ------------- 9 files changed, 120 deletions(-) delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json delete mode 100644 .github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json index d15719ac570..e58f3b0f3fa 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-a.json @@ -1,6 +1,5 @@ { "chain-a": [ - "v7.2.0", "release-v7.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json deleted file mode 100644 index c492bc400e2..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-ica-chain-b.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v7.2.0", - "release-v7.2.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "rly" - ], - "chain-binary": [ - "simd" - ], - "chain-image": [ - "ghcr.io/cosmos/ibc-go-simd" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json index d39ef20862c..fba9e546bbd 100644 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-a.json @@ -1,6 +1,5 @@ { "chain-a": [ - "v7.2.0", "release-v7.2.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json deleted file mode 100644 index e8317c16106..00000000000 --- a/.github/compatibility-test-matrices/release-v7.2.x/localhost-transfer-chain-b.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "chain-a": [ - "release-v7.2.x" - ], - "chain-b": [ - "v7.2.0", - "release-v7.2.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "rly" - ], - "chain-binary": [ - "simd" - ], - "chain-image": [ - "ghcr.io/cosmos/ibc-go-simd" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json index 0c3efe471ce..3de068c0a2e 100644 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-a.json @@ -1,6 +1,5 @@ { "chain-a": [ - "v7.2.0", "release-v7.3.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json deleted file mode 100644 index c05ec8940a3..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-ica-chain-b.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v7.2.0", - "release-v7.3.x" - ], - "entrypoint": [ - "LocalhostInterchainAccountsTestSuite" - ], - "test": [ - "TestInterchainAccounts_Localhost", - "TestInterchainAccounts_ReopenChannel_Localhost" - ], - "relayer-type": [ - "rly" - ], - "chain-binary": [ - "simd" - ], - "chain-image": [ - "ghcr.io/cosmos/ibc-go-simd" - ] -} \ No newline at end of file diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json index f30921cd426..20afda0bd45 100644 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-a.json @@ -1,6 +1,5 @@ { "chain-a": [ - "v7.2.0", "release-v7.3.x" ], "chain-b": [ diff --git a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json deleted file mode 100644 index b3af9ee121c..00000000000 --- a/.github/compatibility-test-matrices/release-v7.3.x/localhost-transfer-chain-b.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "chain-a": [ - "release-v7.3.x" - ], - "chain-b": [ - "v7.2.0", - "release-v7.3.x" - ], - "entrypoint": [ - "LocalhostTransferTestSuite" - ], - "test": [ - "TestMsgTransfer_Localhost" - ], - "relayer-type": [ - "rly" - ], - "chain-binary": [ - "simd" - ], - "chain-image": [ - "ghcr.io/cosmos/ibc-go-simd" - ] -} \ No newline at end of file diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index 3ad869a741a..ff88a6bc14d 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -256,15 +256,6 @@ jobs: test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}" test-suite: "localhost-transfer-chain-a" - localhost-transfer-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: "localhost-transfer-chain-b" - localhost-ica-chain-a: needs: - build-release-images @@ -273,12 +264,3 @@ jobs: with: test-file-directory: "${{ needs.determine-test-directory.outputs.test-directory }}" test-suite: "localhost-ica-chain-a" - - localhost-ica-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: "localhost-ica-chain-b" From 5e68468281c30a67cc1a923d479faf4afe0858d0 Mon Sep 17 00:00:00 2001 From: Jim Fasarakis-Hilliard Date: Tue, 4 Jul 2023 23:49:41 +0300 Subject: [PATCH 21/23] Pass relayer-tag to e2e-test-workflow-call to override config file values. (#3982) --- .github/workflows/e2e.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index db9a9db2f58..52a98c1c859 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,7 +31,9 @@ jobs: runs-on: ubuntu-latest outputs: simd-tag: ${{ steps.get-tag.outputs.simd-tag }} + # Temporarily, see: https://github.com/cosmos/ibc-go/issues/3981 relayer: ${{ steps.get-relayer.outputs.relayer }} + relayer-tag: ${{ steps.get-relayer.outputs.relayer-tag }} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 @@ -54,8 +56,10 @@ jobs: if [ "${{ github.event_name }}" == "schedule" ] then echo "relayer=hermes" >> $GITHUB_OUTPUT + echo "relayer-tag=1.4.0" >> $GITHUB_OUTPUT else echo "relayer=rly" >> $GITHUB_OUTPUT + echo "relayer-tag=latest" >> $GITHUB_OUTPUT fi # build-e2e ensures that all test code compiles. build-e2e: @@ -101,4 +105,6 @@ jobs: chain-binary: 'simd' # on regular PRs we won't run interchain account or upgrade tests. test-exclusions: 'TestInterTxTestSuite,TestIncentivizedInterTxTestSuite,TestUpgradeTestSuite' + # Temporarily, see: https://github.com/cosmos/ibc-go/issues/3981 relayer-type: "${{ needs.determine-image-tag.outputs.relayer }}" + relayer-tag: "${{ needs.determine-image-tag.outputs.relayer-tag }}" From ecec0d023a05f8e132e85ed01750cf80ab6e56c5 Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 5 Jul 2023 10:36:23 +0200 Subject: [PATCH 22/23] remove unneeded file (#4008) Co-authored-by: Marko Baricevic --- ibc/msg/v1/msg.pb.go | 63 -------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 ibc/msg/v1/msg.pb.go diff --git a/ibc/msg/v1/msg.pb.go b/ibc/msg/v1/msg.pb.go deleted file mode 100644 index 0c47dd740ea..00000000000 --- a/ibc/msg/v1/msg.pb.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/msg/v1/msg.proto - -package ibc_msg_v1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -var E_Service = &proto.ExtensionDesc{ - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 11110000, - Name: "ibc.msg.v1.service", - Tag: "varint,11110000,opt,name=service", - Filename: "ibc/msg/v1/msg.proto", -} - -var E_Signer = &proto.ExtensionDesc{ - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: ([]string)(nil), - Field: 11110000, - Name: "ibc.msg.v1.signer", - Tag: "bytes,11110000,rep,name=signer", - Filename: "ibc/msg/v1/msg.proto", -} - -func init() { - proto.RegisterExtension(E_Service) - proto.RegisterExtension(E_Signer) -} - -func init() { proto.RegisterFile("ibc/msg/v1/msg.proto", fileDescriptor_01507a336563a2f1) } - -var fileDescriptor_01507a336563a2f1 = []byte{ - // 181 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc9, 0x4c, 0x4a, 0xd6, - 0xcf, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x04, 0x51, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x5c, - 0x99, 0x49, 0xc9, 0x7a, 0x20, 0x6e, 0x99, 0xa1, 0x94, 0x42, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, - 0x3e, 0x58, 0x26, 0xa9, 0x34, 0x4d, 0x3f, 0x25, 0xb5, 0x38, 0xb9, 0x28, 0xb3, 0xa0, 0x24, 0xbf, - 0x08, 0xa2, 0xda, 0xca, 0x86, 0x8b, 0xbd, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55, 0x48, 0x5e, - 0x0f, 0xa2, 0x5a, 0x0f, 0xa6, 0x5a, 0x2f, 0x18, 0x22, 0xe3, 0x5f, 0x50, 0x92, 0x99, 0x9f, 0x57, - 0x2c, 0xf1, 0xa1, 0x67, 0x19, 0xab, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x4c, 0x8b, 0x95, 0x15, 0x17, - 0x5b, 0x71, 0x66, 0x7a, 0x5e, 0x6a, 0x11, 0x16, 0xcd, 0xbe, 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa8, - 0x9a, 0x99, 0x35, 0x38, 0x83, 0xa0, 0x3a, 0x9c, 0x24, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, - 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, - 0x58, 0x8e, 0x21, 0x89, 0x0d, 0x6c, 0x86, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xe4, 0x40, - 0xbe, 0xe0, 0x00, 0x00, 0x00, -} From 3b4e3d30d578b7fa983901f186d83d813531f8b7 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Wed, 5 Jul 2023 18:09:44 +0800 Subject: [PATCH 23/23] imp: use storetypes instead of sdk types (#4009) * update storetypes from the sdk types library * remove unused parameters * Revert "remove unused parameters" This reverts commit fc423436c75eac124254f7f3e9c17ac03c75accf. --- .../controller/keeper/keeper.go | 6 +-- .../controller/migrations/v6/migrations.go | 2 +- .../host/keeper/keeper.go | 4 +- modules/apps/29-fee/keeper/keeper.go | 12 ++--- modules/apps/transfer/keeper/keeper.go | 4 +- modules/capability/keeper/keeper.go | 2 +- modules/core/02-client/keeper/keeper.go | 6 +-- .../migrations/v7/expected_keepers.go | 3 +- .../02-client/migrations/v7/solomachine.go | 45 ++++++++-------- modules/core/02-client/migrations/v7/store.go | 14 ++--- modules/core/03-connection/keeper/keeper.go | 2 +- modules/core/03-connection/keeper/verify.go | 3 +- .../03-connection/types/expected_keepers.go | 3 +- modules/core/04-channel/keeper/keeper.go | 18 +++---- .../core/04-channel/types/expected_keepers.go | 3 +- modules/core/exported/client.go | 25 ++++----- .../06-solomachine/client_state.go | 17 ++++--- .../06-solomachine/misbehaviour_handle.go | 5 +- .../06-solomachine/proposal_handle.go | 3 +- .../06-solomachine/solomachine_test.go | 4 +- .../light-clients/06-solomachine/update.go | 9 ++-- .../07-tendermint/client_state.go | 13 ++--- .../light-clients/07-tendermint/genesis.go | 4 +- .../migrations/expected_keepers.go | 3 +- .../07-tendermint/misbehaviour_handle.go | 5 +- .../07-tendermint/proposal_handle.go | 3 +- modules/light-clients/07-tendermint/store.go | 51 ++++++++++--------- modules/light-clients/07-tendermint/update.go | 11 ++-- .../07-tendermint/update_test.go | 4 +- .../light-clients/07-tendermint/upgrade.go | 3 +- .../09-localhost/client_state.go | 25 ++++----- testing/simapp/export.go | 3 +- 32 files changed, 167 insertions(+), 148 deletions(-) diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 2c98ce3f9b1..eee552337d8 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -83,7 +83,7 @@ func (k Keeper) GetConnectionID(ctx sdk.Context, portID, channelID string) (stri // GetAllPorts returns all ports to which the interchain accounts controller module is bound. Used in ExportGenesis func (k Keeper) GetAllPorts(ctx sdk.Context) []string { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(icatypes.PortKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.PortKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var ports []string @@ -167,7 +167,7 @@ func (k Keeper) IsActiveChannelClosed(ctx sdk.Context, connectionID, portID stri // GetAllActiveChannels returns a list of all active interchain accounts controller channels and their associated connection and port identifiers func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []genesistypes.ActiveChannel { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(icatypes.ActiveChannelKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.ActiveChannelKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var activeChannels []genesistypes.ActiveChannel @@ -218,7 +218,7 @@ func (k Keeper) GetInterchainAccountAddress(ctx sdk.Context, connectionID, portI // GetAllInterchainAccounts returns a list of all registered interchain account addresses and their associated connection and controller port identifiers func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []genesistypes.RegisteredInterchainAccount { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(icatypes.OwnerKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.OwnerKeyPrefix)) var interchainAccounts []genesistypes.RegisteredInterchainAccount for ; iterator.Valid(); iterator.Next() { diff --git a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations.go b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations.go index 0208c97eb49..094db598598 100644 --- a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations.go +++ b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations.go @@ -23,7 +23,7 @@ func MigrateICS27ChannelCapability( ) error { // construct a prefix store using the x/capability index prefix: index->capability owners prefixStore := prefix.NewStore(ctx.KVStore(capabilityStoreKey), capabilitytypes.KeyPrefixIndexCapability) - iterator := sdk.KVStorePrefixIterator(prefixStore, nil) + iterator := storetypes.KVStorePrefixIterator(prefixStore, nil) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 467d88b9792..1de40965a2f 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -156,7 +156,7 @@ func (k Keeper) GetOpenActiveChannel(ctx sdk.Context, connectionID, portID strin // GetAllActiveChannels returns a list of all active interchain accounts host channels and their associated connection and port identifiers func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []genesistypes.ActiveChannel { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(icatypes.ActiveChannelKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.ActiveChannelKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var activeChannels []genesistypes.ActiveChannel @@ -202,7 +202,7 @@ func (k Keeper) GetInterchainAccountAddress(ctx sdk.Context, connectionID, portI // GetAllInterchainAccounts returns a list of all registered interchain account addresses and their associated connection and controller port identifiers func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []genesistypes.RegisteredInterchainAccount { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(icatypes.OwnerKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(icatypes.OwnerKeyPrefix)) var interchainAccounts []genesistypes.RegisteredInterchainAccount for ; iterator.Valid(); iterator.Next() { diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index cfa353530b0..307e3a48d2e 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -130,7 +130,7 @@ func (k Keeper) IsFeeEnabled(ctx sdk.Context, portID, channelID string) bool { // GetAllFeeEnabledChannels returns a list of all ics29 enabled channels containing portID & channelID that are stored in state func (k Keeper) GetAllFeeEnabledChannels(ctx sdk.Context) []types.FeeEnabledChannel { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.FeeEnabledKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.FeeEnabledKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var enabledChArr []types.FeeEnabledChannel @@ -171,7 +171,7 @@ func (k Keeper) SetPayeeAddress(ctx sdk.Context, relayerAddr, payeeAddr, channel // GetAllPayees returns all registered payees addresses func (k Keeper) GetAllPayees(ctx sdk.Context) []types.RegisteredPayee { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.PayeeKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.PayeeKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var registeredPayees []types.RegisteredPayee @@ -216,7 +216,7 @@ func (k Keeper) GetCounterpartyPayeeAddress(ctx sdk.Context, address, channelID // GetAllCounterpartyPayees returns all registered counterparty payee addresses func (k Keeper) GetAllCounterpartyPayees(ctx sdk.Context) []types.RegisteredCounterpartyPayee { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.CounterpartyPayeeKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.CounterpartyPayeeKeyPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var registeredCounterpartyPayees []types.RegisteredCounterpartyPayee @@ -259,7 +259,7 @@ func (k Keeper) GetRelayerAddressForAsyncAck(ctx sdk.Context, packetID channelty // GetAllForwardRelayerAddresses returns all forward relayer addresses stored for async acknowledgements func (k Keeper) GetAllForwardRelayerAddresses(ctx sdk.Context) []types.ForwardRelayerAddress { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.ForwardRelayerPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.ForwardRelayerPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var forwardRelayerAddr []types.ForwardRelayerAddress @@ -326,7 +326,7 @@ func (k Keeper) GetIdentifiedPacketFeesForChannel(ctx sdk.Context, portID, chann var identifiedPacketFees []types.IdentifiedPacketFees store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, types.KeyFeesInEscrowChannelPrefix(portID, channelID)) + iterator := storetypes.KVStorePrefixIterator(store, types.KeyFeesInEscrowChannelPrefix(portID, channelID)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -347,7 +347,7 @@ func (k Keeper) GetIdentifiedPacketFeesForChannel(ctx sdk.Context, portID, chann // GetAllIdentifiedPacketFees returns a list of all IdentifiedPacketFees that are stored in state func (k Keeper) GetAllIdentifiedPacketFees(ctx sdk.Context) []types.IdentifiedPacketFees { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.FeesInEscrowPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.FeesInEscrowPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var identifiedFees []types.IdentifiedPacketFees diff --git a/modules/apps/transfer/keeper/keeper.go b/modules/apps/transfer/keeper/keeper.go index be5ccd148ed..a2cdd55e2cc 100644 --- a/modules/apps/transfer/keeper/keeper.go +++ b/modules/apps/transfer/keeper/keeper.go @@ -172,7 +172,7 @@ func (k Keeper) GetAllDenomTraces(ctx sdk.Context) types.Traces { // and performs a callback function. func (k Keeper) IterateDenomTraces(ctx sdk.Context, cb func(denomTrace types.DenomTrace) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, types.DenomTraceKey) + iterator := storetypes.KVStorePrefixIterator(store, types.DenomTraceKey) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -237,7 +237,7 @@ func (k Keeper) GetAllTotalEscrowed(ctx sdk.Context) sdk.Coins { // (i.e. not integer) is stored, will be skipped. func (k Keeper) IterateTokensInEscrow(ctx sdk.Context, prefix []byte, cb func(denomEscrow sdk.Coin) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, prefix) + iterator := storetypes.KVStorePrefixIterator(store, prefix) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/capability/keeper/keeper.go b/modules/capability/keeper/keeper.go index c5df7570b08..b44d7f843dc 100644 --- a/modules/capability/keeper/keeper.go +++ b/modules/capability/keeper/keeper.go @@ -124,7 +124,7 @@ func (k *Keeper) InitMemStore(ctx sdk.Context) { // check if memory store has not been initialized yet by checking if initialized flag is nil. if !k.IsInitialized(noGasCtx) { prefixStore := prefix.NewStore(noGasCtx.KVStore(k.storeKey), types.KeyPrefixIndexCapability) - iterator := sdk.KVStorePrefixIterator(prefixStore, nil) + iterator := storetypes.KVStorePrefixIterator(prefixStore, nil) // initialize the in-memory store for all persisted capabilities defer iterator.Close() diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index b26aa5eaf0d..779c81434d3 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -138,7 +138,7 @@ func (k Keeper) SetNextClientSequence(ctx sdk.Context, sequence uint64) { // the iterator will close and stop. func (k Keeper) IterateConsensusStates(ctx sdk.Context, cb func(clientID string, cs types.ConsensusStateWithHeight) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, host.KeyClientStorePrefix) + iterator := storetypes.KVStorePrefixIterator(store, host.KeyClientStorePrefix) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -370,7 +370,7 @@ func (k Keeper) SetUpgradedConsensusState(ctx sdk.Context, planHeight int64, bz // the iterator will close and stop. func (k Keeper) IterateClientStates(ctx sdk.Context, prefix []byte, cb func(clientID string, cs exported.ClientState) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, host.PrefixedClientStoreKey(prefix)) + iterator := storetypes.KVStorePrefixIterator(store, host.PrefixedClientStoreKey(prefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -402,7 +402,7 @@ func (k Keeper) GetAllClients(ctx sdk.Context) []exported.ClientState { // ClientStore returns isolated prefix store for each client so they can read/write in separate // namespace without being able to read/write other client's data -func (k Keeper) ClientStore(ctx sdk.Context, clientID string) sdk.KVStore { +func (k Keeper) ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore { clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, clientID)) return prefix.NewStore(ctx.KVStore(k.storeKey), clientPrefix) } diff --git a/modules/core/02-client/migrations/v7/expected_keepers.go b/modules/core/02-client/migrations/v7/expected_keepers.go index f36be5fabe2..8f03d363831 100644 --- a/modules/core/02-client/migrations/v7/expected_keepers.go +++ b/modules/core/02-client/migrations/v7/expected_keepers.go @@ -1,6 +1,7 @@ package v7 import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -10,6 +11,6 @@ import ( type ClientKeeper interface { GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool) SetClientState(ctx sdk.Context, clientID string, clientState exported.ClientState) - ClientStore(ctx sdk.Context, clientID string) sdk.KVStore + ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore CreateLocalhostClient(ctx sdk.Context) error } diff --git a/modules/core/02-client/migrations/v7/solomachine.go b/modules/core/02-client/migrations/v7/solomachine.go index c65b11eb10c..333f77e5674 100644 --- a/modules/core/02-client/migrations/v7/solomachine.go +++ b/modules/core/02-client/migrations/v7/solomachine.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -59,7 +60,7 @@ func (cs ClientState) GetLatestHeight() exported.Height { } // Status panics! -func (cs ClientState) Status(_ sdk.Context, _ sdk.KVStore, _ codec.BinaryCodec) exported.Status { +func (cs ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { panic("legacy solo machine is deprecated!") } @@ -74,56 +75,56 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { } // Initialize panics! -func (cs ClientState) Initialize(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, consState exported.ConsensusState) error { +func (cs ClientState) Initialize(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, consState exported.ConsensusState) error { panic("legacy solo machine is deprecated!") } // ExportMetadata panics! -func (cs ClientState) ExportMetadata(_ sdk.KVStore) []exported.GenesisMetadata { +func (cs ClientState) ExportMetadata(_ storetypes.KVStore) []exported.GenesisMetadata { panic("legacy solo machine is deprecated!") } // CheckForMisbehaviour panics! -func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, msg exported.ClientMessage) bool { +func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, msg exported.ClientMessage) bool { panic("legacy solo machine is deprecated!") } // UpdateStateOnMisbehaviour panics! func (cs *ClientState) UpdateStateOnMisbehaviour( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) { panic("legacy solo machine is deprecated!") } // VerifyClientMessage panics! func (cs *ClientState) VerifyClientMessage( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) error { panic("legacy solo machine is deprecated!") } // UpdateState panis! -func (cs *ClientState) UpdateState(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage) []exported.Height { +func (cs *ClientState) UpdateState(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) []exported.Height { panic("legacy solo machine is deprecated!") } // CheckHeaderAndUpdateState panics! func (cs *ClientState) CheckHeaderAndUpdateState( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) (exported.ClientState, exported.ConsensusState, error) { panic("legacy solo machine is deprecated!") } // CheckMisbehaviourAndUpdateState panics! func (cs ClientState) CheckMisbehaviourAndUpdateState( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) (exported.ClientState, error) { panic("legacy solo machine is deprecated!") } // CheckSubstituteAndUpdateState panics! func (cs ClientState) CheckSubstituteAndUpdateState( - ctx sdk.Context, _ codec.BinaryCodec, _, _ sdk.KVStore, + ctx sdk.Context, _ codec.BinaryCodec, _, _ storetypes.KVStore, _ exported.ClientState, ) error { panic("legacy solo machine is deprecated!") @@ -131,7 +132,7 @@ func (cs ClientState) CheckSubstituteAndUpdateState( // VerifyUpgradeAndUpdateState panics! func (cs ClientState) VerifyUpgradeAndUpdateState( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientState, _ exported.ConsensusState, _, _ []byte, ) error { panic("legacy solo machine is deprecated!") @@ -139,7 +140,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // VerifyClientState panics! func (cs ClientState) VerifyClientState( - store sdk.KVStore, cdc codec.BinaryCodec, + store storetypes.KVStore, cdc codec.BinaryCodec, _ exported.Height, _ exported.Prefix, _ string, _ []byte, clientState exported.ClientState, ) error { panic("legacy solo machine is deprecated!") @@ -147,7 +148,7 @@ func (cs ClientState) VerifyClientState( // VerifyClientConsensusState panics! func (cs ClientState) VerifyClientConsensusState( - sdk.KVStore, codec.BinaryCodec, + storetypes.KVStore, codec.BinaryCodec, exported.Height, string, exported.Height, exported.Prefix, []byte, exported.ConsensusState, ) error { @@ -156,7 +157,7 @@ func (cs ClientState) VerifyClientConsensusState( // VerifyConnectionState panics! func (cs ClientState) VerifyConnectionState( - sdk.KVStore, codec.BinaryCodec, exported.Height, + storetypes.KVStore, codec.BinaryCodec, exported.Height, exported.Prefix, []byte, string, exported.ConnectionI, ) error { panic("legacy solo machine is deprecated!") @@ -164,7 +165,7 @@ func (cs ClientState) VerifyConnectionState( // VerifyChannelState panics! func (cs ClientState) VerifyChannelState( - sdk.KVStore, codec.BinaryCodec, exported.Height, exported.Prefix, + storetypes.KVStore, codec.BinaryCodec, exported.Height, exported.Prefix, []byte, string, string, exported.ChannelI, ) error { panic("legacy solo machine is deprecated!") @@ -172,7 +173,7 @@ func (cs ClientState) VerifyChannelState( // VerifyPacketCommitment panics! func (cs ClientState) VerifyPacketCommitment( - sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height, + sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, []byte, ) error { @@ -181,7 +182,7 @@ func (cs ClientState) VerifyPacketCommitment( // VerifyPacketAcknowledgement panics! func (cs ClientState) VerifyPacketAcknowledgement( - sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height, + sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, []byte, ) error { @@ -190,7 +191,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( // VerifyPacketReceiptAbsence panics! func (cs ClientState) VerifyPacketReceiptAbsence( - sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height, + sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, ) error { @@ -199,7 +200,7 @@ func (cs ClientState) VerifyPacketReceiptAbsence( // VerifyNextSequenceRecv panics! func (cs ClientState) VerifyNextSequenceRecv( - sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height, + sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, ) error { @@ -208,7 +209,7 @@ func (cs ClientState) VerifyNextSequenceRecv( // GetTimestampAtHeight panics! func (cs ClientState) GetTimestampAtHeight( - sdk.Context, sdk.KVStore, codec.BinaryCodec, exported.Height, + sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, ) (uint64, error) { panic("legacy solo machine is deprecated!") } @@ -216,7 +217,7 @@ func (cs ClientState) GetTimestampAtHeight( // VerifyMembership panics! func (cs *ClientState) VerifyMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, @@ -231,7 +232,7 @@ func (cs *ClientState) VerifyMembership( // VerifyNonMembership panics! func (cs *ClientState) VerifyNonMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, diff --git a/modules/core/02-client/migrations/v7/store.go b/modules/core/02-client/migrations/v7/store.go index e8794dd9c17..cc6086e206a 100644 --- a/modules/core/02-client/migrations/v7/store.go +++ b/modules/core/02-client/migrations/v7/store.go @@ -45,7 +45,7 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar // handleSolomachineMigration iterates over the solo machine clients and migrates client state from // protobuf definition v2 to v3. All consensus states stored outside of the client state are pruned. -func handleSolomachineMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { +func handleSolomachineMigration(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { clients, err := collectClients(ctx, store, exported.Solomachine) if err != nil { return err @@ -82,7 +82,7 @@ func handleSolomachineMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.Bi // handlerTendermintMigration asserts that the tendermint client in state can be decoded properly. // This ensures the upgrading chain properly registered the tendermint client types on the chain codec. -func handleTendermintMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { +func handleTendermintMigration(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { clients, err := collectClients(ctx, store, exported.Tendermint) if err != nil { return err @@ -114,7 +114,7 @@ func handleTendermintMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.Bin } // handleLocalhostMigration removes all client and consensus states associated with the localhost client type. -func handleLocalhostMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { +func handleLocalhostMigration(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { clients, err := collectClients(ctx, store, Localhost) if err != nil { return err @@ -137,9 +137,9 @@ func handleLocalhostMigration(ctx sdk.Context, store sdk.KVStore, cdc codec.Bina // avoid state corruption as modifying state during iteration is unsafe. A special case // for tendermint clients is included as only one tendermint clientID is required for // v7 migrations. -func collectClients(ctx sdk.Context, store sdk.KVStore, clientType string) (clients []string, err error) { +func collectClients(ctx sdk.Context, store storetypes.KVStore, clientType string) (clients []string, err error) { clientPrefix := host.PrefixedClientStoreKey([]byte(clientType)) - iterator := sdk.KVStorePrefixIterator(store, clientPrefix) + iterator := storetypes.KVStorePrefixIterator(store, clientPrefix) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -163,8 +163,8 @@ func collectClients(ctx sdk.Context, store sdk.KVStore, clientType string) (clie // removeAllClientConsensusStates removes all client consensus states from the associated // client store. -func removeAllClientConsensusStates(clientStore sdk.KVStore) { - iterator := sdk.KVStorePrefixIterator(clientStore, []byte(host.KeyConsensusStatePrefix)) +func removeAllClientConsensusStates(clientStore storetypes.KVStore) { + iterator := storetypes.KVStorePrefixIterator(clientStore, []byte(host.KeyConsensusStatePrefix)) var heights []exported.Height defer iterator.Close() diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 075ae4e4465..2de788c3310 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -174,7 +174,7 @@ func (k Keeper) GetAllClientConnectionPaths(ctx sdk.Context) []types.ConnectionP // iterator will close and stop. func (k Keeper) IterateConnections(ctx sdk.Context, cb func(types.IdentifiedConnection) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyConnectionPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyConnectionPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/core/03-connection/keeper/verify.go b/modules/core/03-connection/keeper/verify.go index b02f8b82d0f..ef169878c27 100644 --- a/modules/core/03-connection/keeper/verify.go +++ b/modules/core/03-connection/keeper/verify.go @@ -5,6 +5,7 @@ import ( errorsmod "cosmossdk.io/errors" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -382,7 +383,7 @@ func (k Keeper) getBlockDelay(ctx sdk.Context, connection exported.ConnectionI) // getClientStateAndVerificationStore returns the client state and associated KVStore for the provided client identifier. // If the client type is localhost then the core IBC KVStore is returned, otherwise the client prefixed store is returned. -func (k Keeper) getClientStateAndVerificationStore(ctx sdk.Context, clientID string) (exported.ClientState, sdk.KVStore, error) { +func (k Keeper) getClientStateAndVerificationStore(ctx sdk.Context, clientID string) (exported.ClientState, storetypes.KVStore, error) { clientState, found := k.clientKeeper.GetClientState(ctx, clientID) if !found { return nil, nil, errorsmod.Wrap(clienttypes.ErrClientNotFound, clientID) diff --git a/modules/core/03-connection/types/expected_keepers.go b/modules/core/03-connection/types/expected_keepers.go index d9b8dec6599..7082595a0bf 100644 --- a/modules/core/03-connection/types/expected_keepers.go +++ b/modules/core/03-connection/types/expected_keepers.go @@ -1,6 +1,7 @@ package types import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -14,5 +15,5 @@ type ClientKeeper interface { GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, error) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error IterateClientStates(ctx sdk.Context, prefix []byte, cb func(string, exported.ClientState) bool) - ClientStore(ctx sdk.Context, clientID string) sdk.KVStore + ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore } diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index 5a02b9e0fb3..e8ee2180c58 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -261,7 +261,7 @@ func (k Keeper) IteratePacketSequence(ctx sdk.Context, iterator db.Iterator, cb // GetAllPacketSendSeqs returns all stored next send sequences. func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqSendPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqSendPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextSendSeq uint64) bool { ps := types.NewPacketSequence(portID, channelID, nextSendSeq) seqs = append(seqs, ps) @@ -273,7 +273,7 @@ func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequen // GetAllPacketRecvSeqs returns all stored next recv sequences. func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqRecvPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqRecvPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextRecvSeq uint64) bool { ps := types.NewPacketSequence(portID, channelID, nextRecvSeq) seqs = append(seqs, ps) @@ -285,7 +285,7 @@ func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequen // GetAllPacketAckSeqs returns all stored next acknowledgements sequences. func (k Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqAckPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqAckPrefix)) k.IteratePacketSequence(ctx, iterator, func(portID, channelID string, nextAckSeq uint64) bool { ps := types.NewPacketSequence(portID, channelID, nextAckSeq) seqs = append(seqs, ps) @@ -299,7 +299,7 @@ func (k Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequenc // and stop. func (k Keeper) IteratePacketCommitment(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -318,7 +318,7 @@ func (k Keeper) GetAllPacketCommitments(ctx sdk.Context) (commitments []types.Pa // true, the iterator will close and stop. func (k Keeper) IteratePacketCommitmentAtChannel(ctx sdk.Context, portID, channelID string, cb func(_, _ string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.PacketCommitmentPrefixPath(portID, channelID))) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.PacketCommitmentPrefixPath(portID, channelID))) k.iterateHashes(ctx, iterator, cb) } @@ -338,7 +338,7 @@ func (k Keeper) GetAllPacketCommitmentsAtChannel(ctx sdk.Context, portID, channe // and stop. func (k Keeper) IteratePacketReceipt(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, receipt []byte) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -357,7 +357,7 @@ func (k Keeper) GetAllPacketReceipts(ctx sdk.Context) (receipts []types.PacketSt // and stop. func (k Keeper) IteratePacketAcknowledgement(ctx sdk.Context, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -376,7 +376,7 @@ func (k Keeper) GetAllPacketAcks(ctx sdk.Context) (acks []types.PacketState) { // and stop. func (k Keeper) IterateChannels(ctx sdk.Context, cb func(types.IdentifiedChannel) bool) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyChannelEndPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyChannelEndPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { @@ -398,7 +398,7 @@ func (k Keeper) GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) return k.GetAllChannels(ctx) } store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, types.FilteredPortPrefix(portPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, types.FilteredPortPrefix(portPrefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) var filteredChannels []types.IdentifiedChannel diff --git a/modules/core/04-channel/types/expected_keepers.go b/modules/core/04-channel/types/expected_keepers.go index 342164e9393..41ceecfa25e 100644 --- a/modules/core/04-channel/types/expected_keepers.go +++ b/modules/core/04-channel/types/expected_keepers.go @@ -1,6 +1,7 @@ package types import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" @@ -13,7 +14,7 @@ type ClientKeeper interface { GetClientStatus(ctx sdk.Context, clientState exported.ClientState, clientID string) exported.Status GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool) GetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) (exported.ConsensusState, bool) - ClientStore(ctx sdk.Context, clientID string) sdk.KVStore + ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore } // ConnectionKeeper expected account IBC connection keeper diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index 1655df03141..512c620f7a2 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -4,6 +4,7 @@ import ( proto "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -51,10 +52,10 @@ type ClientState interface { Validate() error // Status must return the status of the client. Only Active clients are allowed to process packets. - Status(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec) Status + Status(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec) Status // ExportMetadata must export metadata stored within the clientStore for genesis export - ExportMetadata(clientStore sdk.KVStore) []GenesisMetadata + ExportMetadata(clientStore storetypes.KVStore) []GenesisMetadata // ZeroCustomFields zeroes out any client customizable fields in client state // Ledger enforced fields are maintained while all custom fields are zero values @@ -64,20 +65,20 @@ type ClientState interface { // GetTimestampAtHeight must return the timestamp for the consensus state associated with the provided height. GetTimestampAtHeight( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height Height, ) (uint64, error) // Initialize is called upon client creation, it allows the client to perform validation on the initial consensus state and set the // client state, consensus state and any client-specific metadata necessary for correct light client operation in the provided client store. - Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, consensusState ConsensusState) error + Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, consensusState ConsensusState) error // VerifyMembership is a generic proof verification method which verifies a proof of the existence of a value at a given CommitmentPath at the specified height. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). VerifyMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height Height, delayTimePeriod uint64, @@ -91,7 +92,7 @@ type ClientState interface { // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). VerifyNonMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height Height, delayTimePeriod uint64, @@ -104,22 +105,22 @@ type ClientState interface { // It must handle each type of ClientMessage appropriately. Calls to CheckForMisbehaviour, UpdateState, and UpdateStateOnMisbehaviour // will assume that the content of the ClientMessage has been verified and can be trusted. An error should be returned // if the ClientMessage fails to verify. - VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg ClientMessage) error + VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg ClientMessage) error // Checks for evidence of a misbehaviour in Header or Misbehaviour type. It assumes the ClientMessage // has already been verified. - CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg ClientMessage) bool + CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg ClientMessage) bool // UpdateStateOnMisbehaviour should perform appropriate state changes on a client state given that misbehaviour has been detected and verified - UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg ClientMessage) + UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg ClientMessage) // UpdateState updates and stores as necessary any associated information for an IBC client, such as the ClientState and corresponding ConsensusState. // Upon successful update, a list of consensus heights is returned. It assumes the ClientMessage has already been verified. - UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg ClientMessage) []Height + UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg ClientMessage) []Height // CheckSubstituteAndUpdateState must verify that the provided substitute may be used to update the subject client. // The light client must set the updated client and consensus states within the clientStore for the subject client. - CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, substituteClientStore sdk.KVStore, substituteClient ClientState) error + CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, substituteClientStore storetypes.KVStore, substituteClient ClientState) error // Upgrade functions // NOTE: proof heights are not included as upgrade to a new revision is expected to pass only on the last @@ -131,7 +132,7 @@ type ClientState interface { VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, newClient ClientState, newConsState ConsensusState, proofUpgradeClient, diff --git a/modules/light-clients/06-solomachine/client_state.go b/modules/light-clients/06-solomachine/client_state.go index 282c421807a..301cdfecc1b 100644 --- a/modules/light-clients/06-solomachine/client_state.go +++ b/modules/light-clients/06-solomachine/client_state.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -43,7 +44,7 @@ func (cs ClientState) GetLatestHeight() exported.Height { // GetTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the given height. func (cs ClientState) GetTimestampAtHeight( _ sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, ) (uint64, error) { @@ -54,7 +55,7 @@ func (cs ClientState) GetTimestampAtHeight( // The client may be: // - Active: if frozen sequence is 0 // - Frozen: otherwise solo machine is frozen -func (cs ClientState) Status(_ sdk.Context, _ sdk.KVStore, _ codec.BinaryCodec) exported.Status { +func (cs ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { if cs.IsFrozen { return exported.Frozen } @@ -80,7 +81,7 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { // Initialize checks that the initial consensus state is equal to the latest consensus state of the initial client and // sets the client state in the provided client store. -func (cs ClientState) Initialize(_ sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, consState exported.ConsensusState) error { +func (cs ClientState) Initialize(_ sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, consState exported.ConsensusState) error { if !reflect.DeepEqual(cs.ConsensusState, consState) { return errorsmod.Wrapf(clienttypes.ErrInvalidConsensus, "consensus state in initial client does not equal initial consensus state. expected: %s, got: %s", cs.ConsensusState, consState) @@ -92,13 +93,13 @@ func (cs ClientState) Initialize(_ sdk.Context, cdc codec.BinaryCodec, clientSto } // ExportMetadata is a no-op since solomachine does not store any metadata in client store -func (cs ClientState) ExportMetadata(_ sdk.KVStore) []exported.GenesisMetadata { +func (cs ClientState) ExportMetadata(_ storetypes.KVStore) []exported.GenesisMetadata { return nil } // VerifyUpgradeAndUpdateState returns an error since solomachine client does not support upgrades func (cs ClientState) VerifyUpgradeAndUpdateState( - _ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, + _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientState, _ exported.ConsensusState, _, _ []byte, ) error { return errorsmod.Wrap(clienttypes.ErrInvalidUpgradeClient, "cannot upgrade solomachine client") @@ -108,7 +109,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). func (cs *ClientState) VerifyMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, _ exported.Height, delayTimePeriod uint64, @@ -159,7 +160,7 @@ func (cs *ClientState) VerifyMembership( // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). func (cs *ClientState) VerifyNonMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, _ exported.Height, delayTimePeriod uint64, @@ -242,7 +243,7 @@ func produceVerificationArgs( } // sets the client state to the store -func setClientState(store sdk.KVStore, cdc codec.BinaryCodec, clientState exported.ClientState) { +func setClientState(store storetypes.KVStore, cdc codec.BinaryCodec, clientState exported.ClientState) { bz := clienttypes.MustMarshalClientState(cdc, clientState) store.Set(host.ClientStateKey(), bz) } diff --git a/modules/light-clients/06-solomachine/misbehaviour_handle.go b/modules/light-clients/06-solomachine/misbehaviour_handle.go index 0d1d2a3a618..4fe350ca973 100644 --- a/modules/light-clients/06-solomachine/misbehaviour_handle.go +++ b/modules/light-clients/06-solomachine/misbehaviour_handle.go @@ -4,6 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" @@ -11,7 +12,7 @@ import ( ) // CheckForMisbehaviour returns true for type Misbehaviour (passed VerifyClientMessage check), otherwise returns false -func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, clientMsg exported.ClientMessage) bool { +func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, clientMsg exported.ClientMessage) bool { if _, ok := clientMsg.(*Misbehaviour); ok { return true } @@ -19,7 +20,7 @@ func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ return false } -func (cs ClientState) verifyMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, misbehaviour *Misbehaviour) error { +func (cs ClientState) verifyMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, misbehaviour *Misbehaviour) error { // NOTE: a check that the misbehaviour message data are not equal is done by // misbehaviour.ValidateBasic which is called by the 02-client keeper. // verify first signature diff --git a/modules/light-clients/06-solomachine/proposal_handle.go b/modules/light-clients/06-solomachine/proposal_handle.go index 4ad6071cba0..7920274ad39 100644 --- a/modules/light-clients/06-solomachine/proposal_handle.go +++ b/modules/light-clients/06-solomachine/proposal_handle.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -21,7 +22,7 @@ import ( // the new public key. func (cs ClientState) CheckSubstituteAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, - _ sdk.KVStore, substituteClient exported.ClientState, + _ storetypes.KVStore, substituteClient exported.ClientState, ) error { substituteClientState, ok := substituteClient.(*ClientState) if !ok { diff --git a/modules/light-clients/06-solomachine/solomachine_test.go b/modules/light-clients/06-solomachine/solomachine_test.go index b4b37b54857..3084c820049 100644 --- a/modules/light-clients/06-solomachine/solomachine_test.go +++ b/modules/light-clients/06-solomachine/solomachine_test.go @@ -10,8 +10,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -36,7 +36,7 @@ type SoloMachineTestSuite struct { chainA *ibctesting.TestChain chainB *ibctesting.TestChain - store sdk.KVStore + store storetypes.KVStore } func (suite *SoloMachineTestSuite) SetupTest() { diff --git a/modules/light-clients/06-solomachine/update.go b/modules/light-clients/06-solomachine/update.go index c08a3de3fb3..1e5a78fbe01 100644 --- a/modules/light-clients/06-solomachine/update.go +++ b/modules/light-clients/06-solomachine/update.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -15,7 +16,7 @@ import ( // VerifyClientMessage introspects the provided ClientMessage and checks its validity // A Solomachine Header is considered valid if the currently registered public key has signed over the new public key with the correct sequence // A Solomachine Misbehaviour is considered valid if duplicate signatures of the current public key are found on two different messages at a given sequence -func (cs ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) error { +func (cs ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) error { switch msg := clientMsg.(type) { case *Header: return cs.verifyHeader(ctx, cdc, clientStore, msg) @@ -26,7 +27,7 @@ func (cs ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec } } -func (cs ClientState) verifyHeader(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, header *Header) error { +func (cs ClientState) verifyHeader(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, header *Header) error { // assert update timestamp is not less than current consensus state timestamp if header.Timestamp < cs.ConsensusState.Timestamp { return errorsmod.Wrapf( @@ -78,7 +79,7 @@ func (cs ClientState) verifyHeader(ctx sdk.Context, cdc codec.BinaryCodec, clien // UpdateState updates the consensus state to the new public key and an incremented sequence. // A list containing the updated consensus height is returned. -func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) []exported.Height { +func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) []exported.Height { smHeader, ok := clientMsg.(*Header) if !ok { panic(fmt.Errorf("unsupported ClientMessage: %T", clientMsg)) @@ -101,7 +102,7 @@ func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, client // UpdateStateOnMisbehaviour updates state upon misbehaviour. This method should only be called on misbehaviour // as it does not perform any misbehaviour checks. -func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, _ exported.ClientMessage) { +func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, _ exported.ClientMessage) { cs.IsFrozen = true setClientState(clientStore, cdc, &cs) diff --git a/modules/light-clients/07-tendermint/client_state.go b/modules/light-clients/07-tendermint/client_state.go index 722e2676415..72ed5f0d3e3 100644 --- a/modules/light-clients/07-tendermint/client_state.go +++ b/modules/light-clients/07-tendermint/client_state.go @@ -9,6 +9,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cometbft/cometbft/light" @@ -60,7 +61,7 @@ func (cs ClientState) GetLatestHeight() exported.Height { // GetTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the given height. func (cs ClientState) GetTimestampAtHeight( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, ) (uint64, error) { @@ -82,7 +83,7 @@ func (cs ClientState) GetTimestampAtHeight( // has higher precedence. func (cs ClientState) Status( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, ) exported.Status { if !cs.FrozenHeight.IsZero() { @@ -188,7 +189,7 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { // Initialize checks that the initial consensus state is an 07-tendermint consensus state and // sets the client state, consensus state and associated metadata in the provided client store. -func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, consState exported.ConsensusState) error { +func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, consState exported.ConsensusState) error { consensusState, ok := consState.(*ConsensusState) if !ok { return errorsmod.Wrapf(clienttypes.ErrInvalidConsensus, "invalid initial consensus state. expected type: %T, got: %T", @@ -207,7 +208,7 @@ func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientS // If a zero proof height is passed in, it will fail to retrieve the associated consensus state. func (cs ClientState) VerifyMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, @@ -250,7 +251,7 @@ func (cs ClientState) VerifyMembership( // If a zero proof height is passed in, it will fail to retrieve the associated consensus state. func (cs ClientState) VerifyNonMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, @@ -289,7 +290,7 @@ func (cs ClientState) VerifyNonMembership( // verifyDelayPeriodPassed will ensure that at least delayTimePeriod amount of time and delayBlockPeriod number of blocks have passed // since consensus state was submitted before allowing verification to continue. -func verifyDelayPeriodPassed(ctx sdk.Context, store sdk.KVStore, proofHeight exported.Height, delayTimePeriod, delayBlockPeriod uint64) error { +func verifyDelayPeriodPassed(ctx sdk.Context, store storetypes.KVStore, proofHeight exported.Height, delayTimePeriod, delayBlockPeriod uint64) error { if delayTimePeriod != 0 { // check that executing chain's timestamp has passed consensusState's processed time + delay time period processedTime, ok := GetProcessedTime(store, proofHeight) diff --git a/modules/light-clients/07-tendermint/genesis.go b/modules/light-clients/07-tendermint/genesis.go index f9c0e6c99a8..d163559bd7b 100644 --- a/modules/light-clients/07-tendermint/genesis.go +++ b/modules/light-clients/07-tendermint/genesis.go @@ -1,7 +1,7 @@ package tendermint import ( - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" @@ -9,7 +9,7 @@ import ( // ExportMetadata exports all the consensus metadata in the client store so they can be included in clients genesis // and imported by a ClientKeeper -func (cs ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { +func (cs ClientState) ExportMetadata(store storetypes.KVStore) []exported.GenesisMetadata { gm := make([]exported.GenesisMetadata, 0) IterateConsensusMetadata(store, func(key, val []byte) bool { gm = append(gm, clienttypes.NewGenesisMetadata(key, val)) diff --git a/modules/light-clients/07-tendermint/migrations/expected_keepers.go b/modules/light-clients/07-tendermint/migrations/expected_keepers.go index b655b187a27..acada379b96 100644 --- a/modules/light-clients/07-tendermint/migrations/expected_keepers.go +++ b/modules/light-clients/07-tendermint/migrations/expected_keepers.go @@ -1,6 +1,7 @@ package migrations import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cometbft/cometbft/libs/log" @@ -12,6 +13,6 @@ import ( type ClientKeeper interface { GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool) IterateClientStates(ctx sdk.Context, prefix []byte, cb func(string, exported.ClientState) bool) - ClientStore(ctx sdk.Context, clientID string) sdk.KVStore + ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore Logger(ctx sdk.Context) log.Logger } diff --git a/modules/light-clients/07-tendermint/misbehaviour_handle.go b/modules/light-clients/07-tendermint/misbehaviour_handle.go index edc000dd0d5..aaac72ada13 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_handle.go +++ b/modules/light-clients/07-tendermint/misbehaviour_handle.go @@ -8,6 +8,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" tmtypes "github.com/cometbft/cometbft/types" @@ -18,7 +19,7 @@ import ( // CheckForMisbehaviour detects duplicate height misbehaviour and BFT time violation misbehaviour // in a submitted Header message and verifies the correctness of a submitted Misbehaviour ClientMessage -func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, msg exported.ClientMessage) bool { +func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, msg exported.ClientMessage) bool { switch msg := msg.(type) { case *Header: tmHeader := msg @@ -89,7 +90,7 @@ func (cs ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCode // Similarly, consensusState2 is the trusted consensus state that corresponds // to misbehaviour.Header2 // Misbehaviour sets frozen height to {0, 1} since it is only used as a boolean value (zero or non-zero). -func (cs *ClientState) verifyMisbehaviour(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec, misbehaviour *Misbehaviour) error { +func (cs *ClientState) verifyMisbehaviour(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, misbehaviour *Misbehaviour) error { // Regardless of the type of misbehaviour, ensure that both headers are valid and would have been accepted by light-client // Retrieve trusted consensus states for each Header in misbehaviour diff --git a/modules/light-clients/07-tendermint/proposal_handle.go b/modules/light-clients/07-tendermint/proposal_handle.go index 8205ef07893..b96a925adf7 100644 --- a/modules/light-clients/07-tendermint/proposal_handle.go +++ b/modules/light-clients/07-tendermint/proposal_handle.go @@ -7,6 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -27,7 +28,7 @@ import ( // the FrozenHeight to the zero Height. func (cs ClientState) CheckSubstituteAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, - substituteClientStore sdk.KVStore, substituteClient exported.ClientState, + substituteClientStore storetypes.KVStore, substituteClient exported.ClientState, ) error { substituteClientState, ok := substituteClient.(*ClientState) if !ok { diff --git a/modules/light-clients/07-tendermint/store.go b/modules/light-clients/07-tendermint/store.go index 8f992bc5183..d3cf600c651 100644 --- a/modules/light-clients/07-tendermint/store.go +++ b/modules/light-clients/07-tendermint/store.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -43,14 +44,14 @@ var ( ) // setClientState stores the client state -func setClientState(clientStore sdk.KVStore, cdc codec.BinaryCodec, clientState *ClientState) { +func setClientState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, clientState *ClientState) { key := host.ClientStateKey() val := clienttypes.MustMarshalClientState(cdc, clientState) clientStore.Set(key, val) } // setConsensusState stores the consensus state at the given height. -func setConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, consensusState *ConsensusState, height exported.Height) { +func setConsensusState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, consensusState *ConsensusState, height exported.Height) { key := host.ConsensusStateKey(height) val := clienttypes.MustMarshalConsensusState(cdc, consensusState) clientStore.Set(key, val) @@ -58,7 +59,7 @@ func setConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, consensus // GetConsensusState retrieves the consensus state from the client prefixed store. // If the ConsensusState does not exist in state for the provided height a nil value and false boolean flag is returned -func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { +func GetConsensusState(store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { bz := store.Get(host.ConsensusStateKey(height)) if len(bz) == 0 { return nil, false @@ -69,15 +70,15 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported } // deleteConsensusState deletes the consensus state at the given height -func deleteConsensusState(clientStore sdk.KVStore, height exported.Height) { +func deleteConsensusState(clientStore storetypes.KVStore, height exported.Height) { key := host.ConsensusStateKey(height) clientStore.Delete(key) } // IterateConsensusMetadata iterates through the prefix store and applies the callback. // If the cb returns true, then iterator will close and stop. -func IterateConsensusMetadata(store sdk.KVStore, cb func(key, val []byte) bool) { - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyConsensusStatePrefix)) +func IterateConsensusMetadata(store storetypes.KVStore, cb func(key, val []byte) bool) { + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyConsensusStatePrefix)) // iterate over processed time and processed height defer iterator.Close() @@ -100,7 +101,7 @@ func IterateConsensusMetadata(store sdk.KVStore, cb func(key, val []byte) bool) } // iterate over iteration keys - iter := sdk.KVStorePrefixIterator(store, []byte(KeyIterateConsensusStatePrefix)) + iter := storetypes.KVStorePrefixIterator(store, []byte(KeyIterateConsensusStatePrefix)) defer iter.Close() for ; iter.Valid(); iter.Next() { @@ -118,7 +119,7 @@ func ProcessedTimeKey(height exported.Height) []byte { // SetProcessedTime stores the time at which a header was processed and the corresponding consensus state was created. // This is useful when validating whether a packet has reached the time specified delay period in the tendermint client's // verification functions -func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs uint64) { +func SetProcessedTime(clientStore storetypes.KVStore, height exported.Height, timeNs uint64) { key := ProcessedTimeKey(height) val := sdk.Uint64ToBigEndian(timeNs) clientStore.Set(key, val) @@ -126,7 +127,7 @@ func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs ui // GetProcessedTime gets the time (in nanoseconds) at which this chain received and processed a tendermint header. // This is used to validate that a received packet has passed the time delay period. -func GetProcessedTime(clientStore sdk.KVStore, height exported.Height) (uint64, bool) { +func GetProcessedTime(clientStore storetypes.KVStore, height exported.Height) (uint64, bool) { key := ProcessedTimeKey(height) bz := clientStore.Get(key) if len(bz) == 0 { @@ -136,7 +137,7 @@ func GetProcessedTime(clientStore sdk.KVStore, height exported.Height) (uint64, } // deleteProcessedTime deletes the processedTime for a given height -func deleteProcessedTime(clientStore sdk.KVStore, height exported.Height) { +func deleteProcessedTime(clientStore storetypes.KVStore, height exported.Height) { key := ProcessedTimeKey(height) clientStore.Delete(key) } @@ -149,7 +150,7 @@ func ProcessedHeightKey(height exported.Height) []byte { // SetProcessedHeight stores the height at which a header was processed and the corresponding consensus state was created. // This is useful when validating whether a packet has reached the specified block delay period in the tendermint client's // verification functions -func SetProcessedHeight(clientStore sdk.KVStore, consHeight, processedHeight exported.Height) { +func SetProcessedHeight(clientStore storetypes.KVStore, consHeight, processedHeight exported.Height) { key := ProcessedHeightKey(consHeight) val := []byte(processedHeight.String()) clientStore.Set(key, val) @@ -157,7 +158,7 @@ func SetProcessedHeight(clientStore sdk.KVStore, consHeight, processedHeight exp // GetProcessedHeight gets the height at which this chain received and processed a tendermint header. // This is used to validate that a received packet has passed the block delay period. -func GetProcessedHeight(clientStore sdk.KVStore, height exported.Height) (exported.Height, bool) { +func GetProcessedHeight(clientStore storetypes.KVStore, height exported.Height) (exported.Height, bool) { key := ProcessedHeightKey(height) bz := clientStore.Get(key) if len(bz) == 0 { @@ -171,7 +172,7 @@ func GetProcessedHeight(clientStore sdk.KVStore, height exported.Height) (export } // deleteProcessedHeight deletes the processedHeight for a given height -func deleteProcessedHeight(clientStore sdk.KVStore, height exported.Height) { +func deleteProcessedHeight(clientStore storetypes.KVStore, height exported.Height) { key := ProcessedHeightKey(height) clientStore.Delete(key) } @@ -184,7 +185,7 @@ func IterationKey(height exported.Height) []byte { } // SetIterationKey stores the consensus state key under a key that is more efficient for ordered iteration -func SetIterationKey(clientStore sdk.KVStore, height exported.Height) { +func SetIterationKey(clientStore storetypes.KVStore, height exported.Height) { key := IterationKey(height) val := host.ConsensusStateKey(height) clientStore.Set(key, val) @@ -192,13 +193,13 @@ func SetIterationKey(clientStore sdk.KVStore, height exported.Height) { // GetIterationKey returns the consensus state key stored under the efficient iteration key. // NOTE: This function is currently only used for testing purposes -func GetIterationKey(clientStore sdk.KVStore, height exported.Height) []byte { +func GetIterationKey(clientStore storetypes.KVStore, height exported.Height) []byte { key := IterationKey(height) return clientStore.Get(key) } // deleteIterationKey deletes the iteration key for a given height -func deleteIterationKey(clientStore sdk.KVStore, height exported.Height) { +func deleteIterationKey(clientStore storetypes.KVStore, height exported.Height) { key := IterationKey(height) clientStore.Delete(key) } @@ -215,8 +216,8 @@ func GetHeightFromIterationKey(iterKey []byte) exported.Height { // IterateConsensusStateAscending iterates through the consensus states in ascending order. It calls the provided // callback on each height, until stop=true is returned. -func IterateConsensusStateAscending(clientStore sdk.KVStore, cb func(height exported.Height) (stop bool)) { - iterator := sdk.KVStorePrefixIterator(clientStore, []byte(KeyIterateConsensusStatePrefix)) +func IterateConsensusStateAscending(clientStore storetypes.KVStore, cb func(height exported.Height) (stop bool)) { + iterator := storetypes.KVStorePrefixIterator(clientStore, []byte(KeyIterateConsensusStatePrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -232,7 +233,7 @@ func IterateConsensusStateAscending(clientStore sdk.KVStore, cb func(height expo // The Iterator returns a storetypes.Iterator which iterates from start (inclusive) to end (exclusive). // If the starting height exists in store, we need to call iterator.Next() to get the next consenus state. // Otherwise, the iterator is already at the next consensus state so we can call iterator.Value() immediately. -func GetNextConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { +func GetNextConsensusState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { iterateStore := prefix.NewStore(clientStore, []byte(KeyIterateConsensusStatePrefix)) iterator := iterateStore.Iterator(bigEndianHeightBytes(height), nil) defer iterator.Close() @@ -257,7 +258,7 @@ func GetNextConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, heigh // GetPreviousConsensusState returns the highest consensus state that is lower than the given height. // The Iterator returns a storetypes.Iterator which iterates from the end (exclusive) to start (inclusive). // Thus to get previous consensus state we call iterator.Value() immediately. -func GetPreviousConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { +func GetPreviousConsensusState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, bool) { iterateStore := prefix.NewStore(clientStore, []byte(KeyIterateConsensusStatePrefix)) iterator := iterateStore.ReverseIterator(nil, bigEndianHeightBytes(height)) defer iterator.Close() @@ -275,7 +276,7 @@ func GetPreviousConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, h // client store. If a consensus state is expired, it is deleted and its metadata // is deleted. The number of consensus states pruned is returned. func PruneAllExpiredConsensusStates( - ctx sdk.Context, clientStore sdk.KVStore, + ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, clientState *ClientState, ) int { var heights []exported.Height @@ -304,7 +305,7 @@ func PruneAllExpiredConsensusStates( } // Helper function for GetNextConsensusState and GetPreviousConsensusState -func getTmConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, key []byte) (*ConsensusState, bool) { +func getTmConsensusState(clientStore storetypes.KVStore, cdc codec.BinaryCodec, key []byte) (*ConsensusState, bool) { bz := clientStore.Get(key) if len(bz) == 0 { return nil, false @@ -333,13 +334,13 @@ func bigEndianHeightBytes(height exported.Height) []byte { // as this is internal tendermint light client logic. // client state and consensus state will be set by client keeper // set iteration key to provide ability for efficient ordered iteration of consensus states. -func setConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, height exported.Height) { +func setConsensusMetadata(ctx sdk.Context, clientStore storetypes.KVStore, height exported.Height) { setConsensusMetadataWithValues(clientStore, height, clienttypes.GetSelfHeight(ctx), uint64(ctx.BlockTime().UnixNano())) } // setConsensusMetadataWithValues sets the consensus metadata with the provided values func setConsensusMetadataWithValues( - clientStore sdk.KVStore, height, + clientStore storetypes.KVStore, height, processedHeight exported.Height, processedTime uint64, ) { @@ -349,7 +350,7 @@ func setConsensusMetadataWithValues( } // deleteConsensusMetadata deletes the metadata stored for a particular consensus state. -func deleteConsensusMetadata(clientStore sdk.KVStore, height exported.Height) { +func deleteConsensusMetadata(clientStore storetypes.KVStore, height exported.Height) { deleteProcessedTime(clientStore, height) deleteProcessedHeight(clientStore, height) deleteIterationKey(clientStore, height) diff --git a/modules/light-clients/07-tendermint/update.go b/modules/light-clients/07-tendermint/update.go index a82ea3acfcf..c2df71ab39d 100644 --- a/modules/light-clients/07-tendermint/update.go +++ b/modules/light-clients/07-tendermint/update.go @@ -7,6 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cometbft/cometbft/light" @@ -20,7 +21,7 @@ import ( // VerifyClientMessage checks if the clientMessage is of type Header or Misbehaviour and verifies the message func (cs *ClientState) VerifyClientMessage( - ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, + ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage, ) error { switch msg := clientMsg.(type) { @@ -42,7 +43,7 @@ func (cs *ClientState) VerifyClientMessage( // - header timestamp is past the trusting period in relation to the consensus state // - header timestamp is less than or equal to the consensus state timestamp func (cs *ClientState) verifyHeader( - ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec, + ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, header *Header, ) error { currentTimestamp := ctx.BlockTime() @@ -130,7 +131,7 @@ func (cs *ClientState) verifyHeader( // UpdateState must only be used to update within a single revision, thus header revision number and trusted height's revision // number must be the same. To update to a new revision, use a separate upgrade path // UpdateState will prune the oldest consensus state if it is expired. -func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) []exported.Height { +func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) []exported.Height { header, ok := clientMsg.(*Header) if !ok { panic(fmt.Errorf("expected type %T, got %T", &Header{}, clientMsg)) @@ -166,7 +167,7 @@ func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, client // pruneOldestConsensusState will retrieve the earliest consensus state for this clientID and check if it is expired. If it is, // that consensus state will be pruned from store along with all associated metadata. This will prevent the client store from // becoming bloated with expired consensus states that can no longer be used for updates and packet verification. -func (cs ClientState) pruneOldestConsensusState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore) { +func (cs ClientState) pruneOldestConsensusState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore) { // Check the earliest consensus state to see if it is expired, if so then set the prune height // so that we can delete consensus state and all associated metadata. var ( @@ -198,7 +199,7 @@ func (cs ClientState) pruneOldestConsensusState(ctx sdk.Context, cdc codec.Binar // UpdateStateOnMisbehaviour updates state upon misbehaviour, freezing the ClientState. This method should only be called when misbehaviour is detected // as it does not perform any misbehaviour checks. -func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, _ exported.ClientMessage) { +func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, _ exported.ClientMessage) { cs.FrozenHeight = FrozenHeight clientStore.Set(host.ClientStateKey(), clienttypes.MustMarshalClientState(cdc, &cs)) diff --git a/modules/light-clients/07-tendermint/update_test.go b/modules/light-clients/07-tendermint/update_test.go index dc7e68629c1..96b2e75dc61 100644 --- a/modules/light-clients/07-tendermint/update_test.go +++ b/modules/light-clients/07-tendermint/update_test.go @@ -3,7 +3,7 @@ package tendermint_test import ( "time" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" tmtypes "github.com/cometbft/cometbft/types" @@ -308,7 +308,7 @@ func (suite *TendermintTestSuite) TestUpdateState() { var ( path *ibctesting.Path clientMessage exported.ClientMessage - clientStore sdk.KVStore + clientStore storetypes.KVStore consensusHeights []exported.Height pruneHeight clienttypes.Height prevClientState exported.ClientState diff --git a/modules/light-clients/07-tendermint/upgrade.go b/modules/light-clients/07-tendermint/upgrade.go index a8f18c5df9a..bd91ac438d8 100644 --- a/modules/light-clients/07-tendermint/upgrade.go +++ b/modules/light-clients/07-tendermint/upgrade.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" @@ -27,7 +28,7 @@ import ( // - any Tendermint chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, // and ProofSpecs do not match parameters set by committed client func (cs ClientState) VerifyUpgradeAndUpdateState( - ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, + ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, upgradedClient exported.ClientState, upgradedConsState exported.ConsensusState, proofUpgradeClient, proofUpgradeConsState []byte, ) error { diff --git a/modules/light-clients/09-localhost/client_state.go b/modules/light-clients/09-localhost/client_state.go index a28ff2a942f..89013ffb2cb 100644 --- a/modules/light-clients/09-localhost/client_state.go +++ b/modules/light-clients/09-localhost/client_state.go @@ -6,6 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -35,7 +36,7 @@ func (cs ClientState) GetLatestHeight() exported.Height { } // Status always returns Active. The 09-localhost status cannot be changed. -func (cs ClientState) Status(_ sdk.Context, _ sdk.KVStore, _ codec.BinaryCodec) exported.Status { +func (cs ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { return exported.Active } @@ -54,7 +55,7 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { } // Initialize ensures that initial consensus state for localhost is nil. -func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, consState exported.ConsensusState) error { +func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, consState exported.ConsensusState) error { if consState != nil { return errorsmod.Wrap(clienttypes.ErrInvalidConsensus, "initial consensus state for localhost must be nil.") } @@ -70,7 +71,7 @@ func (cs ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientS // GetTimestampAtHeight returns the current block time retrieved from the application context. The localhost client does not store consensus states and thus // cannot provide a timestamp for the provided height. -func (cs ClientState) GetTimestampAtHeight(ctx sdk.Context, _ sdk.KVStore, _ codec.BinaryCodec, _ exported.Height) (uint64, error) { +func (cs ClientState) GetTimestampAtHeight(ctx sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec, _ exported.Height) (uint64, error) { return uint64(ctx.BlockTime().UnixNano()), nil } @@ -79,7 +80,7 @@ func (cs ClientState) GetTimestampAtHeight(ctx sdk.Context, _ sdk.KVStore, _ cod // The caller must provide the full IBC store. func (cs ClientState) VerifyMembership( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, _ codec.BinaryCodec, _ exported.Height, _ uint64, @@ -120,7 +121,7 @@ func (cs ClientState) VerifyMembership( // The caller must provide the full IBC store. func (cs ClientState) VerifyNonMembership( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, _ codec.BinaryCodec, _ exported.Height, _ uint64, @@ -151,22 +152,22 @@ func (cs ClientState) VerifyNonMembership( } // VerifyClientMessage is unsupported by the 09-localhost client type and returns an error. -func (cs ClientState) VerifyClientMessage(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage) error { +func (cs ClientState) VerifyClientMessage(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) error { return errorsmod.Wrap(clienttypes.ErrUpdateClientFailed, "client message verification is unsupported by the localhost client") } // CheckForMisbehaviour is unsupported by the 09-localhost client type and performs a no-op, returning false. -func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage) bool { +func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) bool { return false } // UpdateStateOnMisbehaviour is unsupported by the 09-localhost client type and performs a no-op. -func (cs ClientState) UpdateStateOnMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, _ exported.ClientMessage) { +func (cs ClientState) UpdateStateOnMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) { } // UpdateState updates and stores as necessary any associated information for an IBC client, such as the ClientState and corresponding ConsensusState. // Upon successful update, a list of consensus heights is returned. It assumes the ClientMessage has already been verified. -func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, _ exported.ClientMessage) []exported.Height { +func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, _ exported.ClientMessage) []exported.Height { height := clienttypes.GetSelfHeight(ctx) cs.LatestHeight = height @@ -176,13 +177,13 @@ func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, client } // ExportMetadata is a no-op for the 09-localhost client. -func (cs ClientState) ExportMetadata(_ sdk.KVStore) []exported.GenesisMetadata { +func (cs ClientState) ExportMetadata(_ storetypes.KVStore) []exported.GenesisMetadata { return nil } // CheckSubstituteAndUpdateState returns an error. The localhost cannot be modified by // proposals. -func (cs ClientState) CheckSubstituteAndUpdateState(_ sdk.Context, _ codec.BinaryCodec, _, _ sdk.KVStore, _ exported.ClientState) error { +func (cs ClientState) CheckSubstituteAndUpdateState(_ sdk.Context, _ codec.BinaryCodec, _, _ storetypes.KVStore, _ exported.ClientState) error { return errorsmod.Wrap(clienttypes.ErrUpdateClientFailed, "cannot update localhost client with a proposal") } @@ -190,7 +191,7 @@ func (cs ClientState) CheckSubstituteAndUpdateState(_ sdk.Context, _ codec.Binar func (cs ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryCodec, - _ sdk.KVStore, + _ storetypes.KVStore, _ exported.ClientState, _ exported.ConsensusState, _, diff --git a/testing/simapp/export.go b/testing/simapp/export.go index 2caa609bc82..4d6489f63d4 100644 --- a/testing/simapp/export.go +++ b/testing/simapp/export.go @@ -5,6 +5,7 @@ import ( "log" servertypes "github.com/cosmos/cosmos-sdk/server/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" @@ -159,7 +160,7 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.keys[stakingtypes.StoreKey]) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) for ; iter.Valid(); iter.Next() {