diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7cc53feb5a5..8f76a660095 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -40,3 +40,7 @@ # CODEOWNERS for docs /docs/ @colin-axner @AdityaSripal @crodriguezvega @charleenfei @damiannolan @chatton @DimitrisJim @srdtrk + +# CODEOWNERS for callbacks middleware + +/modules/apps/callbacks/ @colin-axner @AdityaSripal @damiannolan @srdtrk diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 18484388b1f..cf6c0168249 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -43,7 +43,7 @@ write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. -- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). +- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/build/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`) or specification (`x//spec/`). - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). diff --git a/.github/compatibility-test-matrices/main/client-chain-a.json b/.github/compatibility-test-matrices/main/client-chain-a.json index 013909a76b0..0eaf6878d19 100644 --- a/.github/compatibility-test-matrices/main/client-chain-a.json +++ b/.github/compatibility-test-matrices/main/client-chain-a.json @@ -10,16 +10,14 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "entrypoint": [ "TestClientTestSuite" ], "test": [ "TestClientUpdateProposal_Succeeds", + "TestClient_Update_Misbehaviour", "TestAllowedClientsParam" ], "relayer-type": [ diff --git a/.github/compatibility-test-matrices/main/client-chain-b.json b/.github/compatibility-test-matrices/main/client-chain-b.json index 1042bec4085..f7bf9a92c10 100644 --- a/.github/compatibility-test-matrices/main/client-chain-b.json +++ b/.github/compatibility-test-matrices/main/client-chain-b.json @@ -7,10 +7,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "chain-b": [ "main" @@ -20,7 +17,7 @@ ], "test": [ "TestClientUpdateProposal_Succeeds", - "TestAllowedClientsParam" + "TestClient_Update_Misbehaviour" ], "relayer-type": [ "rly" diff --git a/.github/compatibility-test-matrices/main/connection-chain-a.json b/.github/compatibility-test-matrices/main/connection-chain-a.json index b58deb6f0d5..4f0f460b99c 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-a.json +++ b/.github/compatibility-test-matrices/main/connection-chain-a.json @@ -10,10 +10,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "entrypoint": [ "TestConnectionTestSuite" diff --git a/.github/compatibility-test-matrices/main/connection-chain-b.json b/.github/compatibility-test-matrices/main/connection-chain-b.json index cbf603ad648..c061cce6e5c 100644 --- a/.github/compatibility-test-matrices/main/connection-chain-b.json +++ b/.github/compatibility-test-matrices/main/connection-chain-b.json @@ -7,10 +7,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/ica-chain-a.json b/.github/compatibility-test-matrices/main/ica-chain-a.json index 22aafb9324b..065fd5db03b 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-a.json +++ b/.github/compatibility-test-matrices/main/ica-chain-a.json @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam" ], "relayer-type": [ "rly" diff --git a/.github/compatibility-test-matrices/main/ica-chain-b.json b/.github/compatibility-test-matrices/main/ica-chain-b.json index da650ca6a6d..a7bf577ff1e 100644 --- a/.github/compatibility-test-matrices/main/ica-chain-b.json +++ b/.github/compatibility-test-matrices/main/ica-chain-b.json @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestHostEnabledParam" ], "relayer-type": [ "rly" 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 aff52b15cb2..469654f664a 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-a.json @@ -10,10 +10,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json index 73b1c428d92..7dae65428b3 100644 --- a/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/incentivized-transfer-chain-b.json @@ -7,10 +7,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "chain-b": [ "main" diff --git a/.github/compatibility-test-matrices/main/transfer-chain-a.json b/.github/compatibility-test-matrices/main/transfer-chain-a.json index 9608048bc0a..d36acfe4f7f 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-a.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-a.json @@ -10,10 +10,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "entrypoint": [ "TestTransferTestSuite" diff --git a/.github/compatibility-test-matrices/main/transfer-chain-b.json b/.github/compatibility-test-matrices/main/transfer-chain-b.json index 315ec9ba417..eb3a4295f44 100644 --- a/.github/compatibility-test-matrices/main/transfer-chain-b.json +++ b/.github/compatibility-test-matrices/main/transfer-chain-b.json @@ -7,10 +7,7 @@ "v5.3.1", "v5.2.1", "v5.0.1", - "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3" + "v4.4.2" ], "chain-b": [ "main" @@ -22,9 +19,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 deleted file mode 100644 index 049100b375a..00000000000 --- a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.1.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-v4.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" - ] -} \ 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 deleted file mode 100644 index 0bdedfcc85e..00000000000 --- a/.github/compatibility-test-matrices/release-v4.1.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.1.x" - ], - "chain-b": [ - "release-v4.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" - ] -} \ 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 deleted file mode 100644 index 34026e7c227..00000000000 --- a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.1.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-v4.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" - ] -} \ 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 deleted file mode 100644 index 1915cd0a1fa..00000000000 --- a/.github/compatibility-test-matrices/release-v4.1.x/transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.1.x" - ], - "chain-b": [ - "release-v4.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" - ] -} \ 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 deleted file mode 100644 index ff71c9a09bd..00000000000 --- a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.2.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-v4.2.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-v4.2.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json deleted file mode 100644 index 7ca1a125ec5..00000000000 --- a/.github/compatibility-test-matrices/release-v4.2.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.2.x" - ], - "chain-b": [ - "release-v4.2.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-v4.2.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json deleted file mode 100644 index e255ec380a5..00000000000 --- a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.2.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-v4.2.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-v4.2.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json deleted file mode 100644 index bfbe772cb14..00000000000 --- a/.github/compatibility-test-matrices/release-v4.2.x/transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.2.x" - ], - "chain-b": [ - "release-v4.2.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-v4.3.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json deleted file mode 100644 index 8c3eff54202..00000000000 --- a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.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-v4.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-v4.3.x/incentivized-transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json deleted file mode 100644 index 8b2e1092ca6..00000000000 --- a/.github/compatibility-test-matrices/release-v4.3.x/incentivized-transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.3.x" - ], - "chain-b": [ - "release-v4.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-v4.3.x/transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json deleted file mode 100644 index 295f21d9549..00000000000 --- a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-a.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "chain-a": [ - "release-v4.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-v4.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-v4.3.x/transfer-chain-b.json b/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json deleted file mode 100644 index f4c37592cf4..00000000000 --- a/.github/compatibility-test-matrices/release-v4.3.x/transfer-chain-b.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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-v4.3.x" - ], - "chain-b": [ - "release-v4.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-v4.4.x/incentivized-transfer-chain-a.json b/.github/compatibility-test-matrices/release-v4.4.x/incentivized-transfer-chain-a.json index 9866b401ac3..7023c3be72a 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v4.4.x" ], "entrypoint": [ 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 8f24fc1dc9e..63c86603f93 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v4.4.x" ], "chain-b": [ 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 f27fecf1b1d..d083610285a 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v4.4.x" ], "entrypoint": [ 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 cb732e20691..31c89827311 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v4.4.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 248027986ce..8bd2d068c56 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.2.x" ], "entrypoint": [ 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 9595653457e..285c5c46fef 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.2.x" ], "chain-b": [ 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 3ccde696de9..1f00b96ae3e 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.2.x" ], "entrypoint": [ 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 f4db7c06505..c81c1309eca 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.2.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 dc4004b3085..92534a79fae 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.3.x" ], "entrypoint": [ 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 b537bb718d9..4b0f7d5f08c 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.3.x" ], "chain-b": [ 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 4b9f6af7500..2b8cbb67159 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.3.x" ], "entrypoint": [ 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 98962c778e0..56d15ce0327 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v5.3.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 2f5ce2f51da..2960e74a99a 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "entrypoint": [ @@ -19,7 +16,8 @@ ], "test": [ "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" ], "relayer-type": [ "rly" 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 659212b3cf8..e88cb988ee2 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "chain-b": [ 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 f465fa3cf58..72d0db5145b 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "entrypoint": [ 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 e95aa652fce..ef85146f8e2 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "chain-b": [ 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 799883e45d4..d9c38616e2c 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam" ], "relayer-type": [ "rly" 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 f1f18f7ae71..8d90f271099 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestHostEnabledParam" ], "relayer-type": [ "rly" 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 e0ad49bf25b..202225c01e0 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "entrypoint": [ 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 33b22fa10b4..fc1147ddf6f 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "chain-b": [ 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 51a817ac49e..0498b79e1e1 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "entrypoint": [ 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 2eb2eafe4ba..46300adc540 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.1.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 0e6b2e7e087..ae3573f78f4 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "entrypoint": [ @@ -19,7 +16,8 @@ ], "test": [ "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" ], "relayer-type": [ "rly" 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 014e2152fa0..9ec92721208 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "chain-b": [ 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 7fd80f5333f..097b1ffb12d 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "entrypoint": [ 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 d289a85ffc6..2b364e92d88 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "chain-b": [ 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 7ed9089e323..37d7ef0d112 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam" ], "relayer-type": [ "rly" 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 21b17c19f1b..684306e8683 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestHostEnabledParam" ], "relayer-type": [ "rly" 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 b930e9561a3..4ecb08495c0 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "entrypoint": [ 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 7a8fb57f7f9..7a9c24f5fef 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "chain-b": [ 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 4395b829822..4c72776965f 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "entrypoint": [ 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 2ee45e2e3ad..2f027deee9d 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v6.2.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 69e13955205..e332f3c82f5 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "entrypoint": [ @@ -19,7 +16,8 @@ ], "test": [ "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" ], "relayer-type": [ "rly" 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 8f1288b1fb8..01590b1db7f 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "chain-b": [ 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 8edfa6164cc..6a9b0366210 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "entrypoint": [ 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 69205acc2d6..f63e9c9fdcb 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "chain-b": [ 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 bd0159aeffb..d357bc57963 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam" ], "relayer-type": [ "rly" 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 045b12ee4f1..ef2fab8e5d3 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestHostEnabledParam" ], "relayer-type": [ "rly" 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 78748381095..ed4a53dce77 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "entrypoint": [ 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 c7f98b0fede..5a898abe9f9 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "chain-b": [ 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 ef50d8a6678..ebab359db0e 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "entrypoint": [ 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 adf3bf80813..4aac962af4a 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.2.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" 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 index 49801524a7f..5152a84a183 100644 --- 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "entrypoint": [ @@ -19,7 +16,8 @@ ], "test": [ "TestClientUpdateProposal_Succeeds", - "TestClient_Update_Misbehaviour" + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" ], "relayer-type": [ "rly" 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 index af5c0fe51ea..1dd81660cc6 100644 --- 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "chain-b": [ 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 index 61cc60e1693..06f5d9fd064 100644 --- 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "entrypoint": [ 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 index 106bc6491f9..594fd11a88d 100644 --- 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "chain-b": [ 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 index 42f48cb64ce..af674a386c8 100644 --- 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam" ], "relayer-type": [ "rly" 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 index 13d53354187..b1f9eb841fb 100644 --- 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 @@ -14,7 +14,8 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestHostEnabledParam" ], "relayer-type": [ "rly" 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 index c11a46d3a92..b2e544d1bf6 100644 --- 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "entrypoint": [ 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 index 390e78f1c06..80874e8149b 100644 --- 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "chain-b": [ 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 index 5fe4fe6c1e2..8d36d65f938 100644 --- 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 @@ -9,9 +9,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "entrypoint": [ 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 index 9e949980cd5..001ffffec1e 100644 --- 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 @@ -6,9 +6,6 @@ "v5.3.1", "v5.2.1", "v4.4.2", - "v4.3.1", - "v4.2.2", - "v4.1.3", "release-v7.3.x" ], "chain-b": [ @@ -21,9 +18,7 @@ "TestMsgTransfer_Succeeds_Nonincentivized", "TestMsgTransfer_Fails_InvalidAddress", "TestMsgTransfer_Timeout_Nonincentivized", - "TestMsgTransfer_WithMemo", - "TestSendEnabledParam", - "TestReceiveEnabledParam" + "TestMsgTransfer_WithMemo" ], "relayer-type": [ "rly" diff --git a/.github/compatibility-test-matrices/unreleased/client.json b/.github/compatibility-test-matrices/unreleased/client.json index cd01aa0b133..b0a6412a8c5 100644 --- a/.github/compatibility-test-matrices/unreleased/client.json +++ b/.github/compatibility-test-matrices/unreleased/client.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,16 +15,15 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestClientTestSuite" ], "test": [ - "TestClientUpdateProposal_Succeeds" + "TestClientUpdateProposal_Succeeds", + "TestClient_Update_Misbehaviour", + "TestAllowedClientsParam" ], "relayer-type": [ "rly" diff --git a/.github/compatibility-test-matrices/unreleased/connection.json b/.github/compatibility-test-matrices/unreleased/connection.json index 4d1a87c06f6..c595c7c1f6d 100644 --- a/.github/compatibility-test-matrices/unreleased/connection.json +++ b/.github/compatibility-test-matrices/unreleased/connection.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestConnectionTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/ica.json b/.github/compatibility-test-matrices/unreleased/ica.json index 96861e0f7bc..0c59df65a89 100644 --- a/.github/compatibility-test-matrices/unreleased/ica.json +++ b/.github/compatibility-test-matrices/unreleased/ica.json @@ -17,7 +17,9 @@ "test": [ "TestMsgSendTx_SuccessfulTransfer", "TestMsgSendTx_FailedTransfer_InsufficientFunds", - "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA" + "TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA", + "TestControllerEnabledParam", + "TestHostEnabledParam" ], "relayer-type": [ "rly" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json index 47363ba43bb..1e1579a9def 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-1.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json index 5d3641f7887..b17a9f4f634 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-2.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json index d30db62ced2..cf4d6085fbf 100644 --- a/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/incentivized-transfer-3.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestIncentivizedTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-1.json b/.github/compatibility-test-matrices/unreleased/transfer-1.json index 12740199696..602c4805a07 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-1.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-1.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-2.json b/.github/compatibility-test-matrices/unreleased/transfer-2.json index fa2f7726535..c6f47077b04 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-2.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-2.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestTransferTestSuite" diff --git a/.github/compatibility-test-matrices/unreleased/transfer-3.json b/.github/compatibility-test-matrices/unreleased/transfer-3.json index 0ee3e9e4515..a2cc9586658 100644 --- a/.github/compatibility-test-matrices/unreleased/transfer-3.json +++ b/.github/compatibility-test-matrices/unreleased/transfer-3.json @@ -6,10 +6,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "chain-b": [ "release-v7.3.x", @@ -18,10 +15,7 @@ "release-v6.1.x", "release-v5.3.x", "release-v5.2.x", - "release-v4.4.x", - "release-v4.3.x", - "release-v4.2.x", - "release-v4.1.x" + "release-v4.4.x" ], "entrypoint": [ "TestTransferTestSuite" diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 96e3c4a1d61..7a5496efee1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -22,3 +22,20 @@ updates: labels: - dependencies + - package-ecosystem: gomod + directory: "/modules/apps/callbacks" + schedule: + interval: daily + open-pull-requests-limit: 10 + labels: + - dependencies + + - package-ecosystem: gomod + directory: "/modules/light-clients/08-wasm" + schedule: + interval: daily + open-pull-requests-limit: 10 + labels: + - dependencies + + diff --git a/.github/mergify.yml b/.github/mergify.yml index b735929efaa..8a09ba4e469 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -26,30 +26,14 @@ pull_request_rules: backport: branches: - capability/release/v1.0.x - - name: backport patches to v4.1.x branch + - name: backport patches to v0.1.x callbacks ibc-go v7.3.x branch conditions: - base=main - - label=backport-to-v4.1.x + - label=backport-callbacks-to-v0.1.x+ibc-go-v7.3.x actions: backport: branches: - - release/v4.1.x - - name: backport patches to v4.2.x branch - conditions: - - base=main - - label=backport-to-v4.2.x - actions: - backport: - branches: - - release/v4.2.x - - name: backport patches to v4.3.x branch - conditions: - - base=main - - label=backport-to-v4.3.x - actions: - backport: - branches: - - release/v4.3.x + - callbacks/release/v0.1.x+ibc-go-v7.3.x - name: backport patches to v4.4.x branch conditions: - base=main @@ -105,4 +89,4 @@ pull_request_rules: actions: backport: branches: - - release/v7.3.x \ No newline at end of file + - release/v7.3.x diff --git a/.github/workflows/build-callbacks-simd-image-from-tag.yml b/.github/workflows/build-callbacks-simd-image-from-tag.yml new file mode 100644 index 00000000000..2d1bb4bdfdb --- /dev/null +++ b/.github/workflows/build-callbacks-simd-image-from-tag.yml @@ -0,0 +1,35 @@ +name: Build Callbacks Simd Image +on: + workflow_dispatch: + inputs: + tag: + description: 'The tag of the image to build' + required: true + type: string + +env: + REGISTRY: ghcr.io + ORG: cosmos + IMAGE_NAME: ibc-go-callbacks-simd + GIT_TAG: "${{ inputs.tag }}" + +jobs: + build-image-at-tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: "${{ env.GIT_TAG }}" + fetch-depth: 0 + - name: Log in to the Container registry + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build image + run: | + # remove any `/` characters from the docker tag and replace them with a - + docker_tag="$(echo $GIT_TAG | sed 's/\//-/')" + docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" -f modules/apps/callbacks/Dockerfile + docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" diff --git a/.github/workflows/callbacks.yml b/.github/workflows/callbacks.yml new file mode 100644 index 00000000000..55d2a4698f2 --- /dev/null +++ b/.github/workflows/callbacks.yml @@ -0,0 +1,50 @@ +name: Callbacks Module +# This workflow runs when a PR is opened that targets code that is part of the callbacks module. +on: + pull_request: + paths: + - '.github/workflows/callbacks.yml' + - 'modules/apps/callbacks/**' +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - uses: actions/checkout@v3 + - uses: golangci/golangci-lint-action@v3.7.0 + with: + version: v1.54.2 + args: --timeout 5m + working-directory: modules/apps/callbacks + + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-arch: ['amd64', 'arm', 'arm64'] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Build callbacks-module + run: | + cd modules/apps/callbacks + GOARCH=${{ matrix.go-arch }} go build ./... + + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + - name: Go Test + run: | + cd modules/apps/callbacks + go test -v -mod=readonly ./... diff --git a/.github/workflows/capability.yml b/.github/workflows/capability.yml index c4f1d18a733..d0c17e33716 100644 --- a/.github/workflows/capability.yml +++ b/.github/workflows/capability.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Build capability-module run: | cd modules/capability @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Go Test run: | cd modules/capability diff --git a/.github/workflows/e2e-compatibility-unreleased.yaml b/.github/workflows/e2e-compatibility-unreleased.yaml index a12ff1f41f5..5c4e4b25a2c 100644 --- a/.github/workflows/e2e-compatibility-unreleased.yaml +++ b/.github/workflows/e2e-compatibility-unreleased.yaml @@ -12,9 +12,6 @@ jobs: strategy: matrix: release-branch: - - release/v4.1.x - - release/v4.2.x - - release/v4.3.x - release/v4.4.x - release/v5.2.x - release/v5.3.x diff --git a/.github/workflows/e2e-compatibility-workflow-call.yaml b/.github/workflows/e2e-compatibility-workflow-call.yaml index cf1b173c286..098e85b2ce3 100644 --- a/.github/workflows/e2e-compatibility-workflow-call.yaml +++ b/.github/workflows/e2e-compatibility-workflow-call.yaml @@ -43,7 +43,7 @@ jobs: repository: cosmos/ibc-go - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Run e2e Test run: | cd e2e diff --git a/.github/workflows/e2e-compatibility.yaml b/.github/workflows/e2e-compatibility.yaml index ff88a6bc14d..77e16e95ea1 100644 --- a/.github/workflows/e2e-compatibility.yaml +++ b/.github/workflows/e2e-compatibility.yaml @@ -7,9 +7,6 @@ on: required: true type: choice options: - - release/v4.1.x - - release/v4.2.x - - release/v4.3.x - release/v4.4.x - release/v5.2.x - release/v5.3.x @@ -49,9 +46,6 @@ jobs: strategy: matrix: release-branch: - - release/v4.1.x - - release/v4.2.x - - release/v4.3.x - release/v4.4.x - release/v5.2.x - release/v5.3.x diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index dc409a8d1c1..b1d9051fd43 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - id: set-matrix run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT env: @@ -46,7 +46,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Run e2e Test run: | cd e2e diff --git a/.github/workflows/e2e-manual-simd.yaml b/.github/workflows/e2e-manual-simd.yaml index b36a5dbebc3..d899e47859f 100644 --- a/.github/workflows/e2e-manual-simd.yaml +++ b/.github/workflows/e2e-manual-simd.yaml @@ -41,9 +41,6 @@ on: - v5.2.1 - v5.3.1 - v4.4.2 - - v4.3.1 - - v4.2.2 - - v4.1.3 chain-a-tag-override: description: 'Specify an arbitrary tag for chain A' required: false @@ -61,9 +58,6 @@ on: - v5.2.1 - v5.3.1 - v4.4.2 - - v4.3.1 - - v4.2.2 - - v4.1.3 chain-b-tag-override: description: 'Specify an arbitrary tag for chain B' required: false diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index ccf1cb935ad..c62e1a2a0dd 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -138,7 +138,7 @@ jobs: repository: cosmos/ibc-go - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - id: set-matrix run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT env: @@ -172,7 +172,7 @@ jobs: repository: cosmos/ibc-go - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Run e2e Test id: e2e_test run: | diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 498c5c1bc22..f478e72dd92 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -11,8 +11,8 @@ jobs: with: chain-image: ghcr.io/cosmos/ibc-go-simd chain-binary: simd - chain-a-tag: v4.3.0 - chain-b-tag: v4.3.0 + chain-a-tag: v4.4.1 + chain-b-tag: v4.4.1 chain-upgrade-tag: v5.1.0 upgrade-plan-name: "normal upgrade" test-entry-point: "TestUpgradeTestSuite" diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index cad178677db..f983fc3f0e8 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -8,7 +8,7 @@ name: Tests / E2E on: # This schedule is used solely for hermes and is set to run every night. schedule: - - cron: "0 0 * * *" + - cron: '0 0 * * *' workflow_dispatch: pull_request: types: @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - id: get-tag run: | if [ -z "${{ github.event.pull_request.number }}" ] @@ -69,7 +69,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Build e2e run: | cd e2e @@ -106,5 +106,5 @@ jobs: # 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 }}" + relayer-type: '${{ needs.determine-image-tag.outputs.relayer }}' + relayer-tag: '${{ needs.determine-image-tag.outputs.relayer-tag }}' diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index df8f5e1d14a..63b4a2fe323 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -17,10 +17,10 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: - version: v1.53.1 + version: v1.54.2 args: --timeout 5m diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 53ed8fc9eb3..cba1eb9cda5 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.25.0 + - uses: bufbuild/buf-setup-action@v1.26.1 - uses: bufbuild/buf-push-action@v1 with: input: "proto" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94234d3dc3b..b9ecdf51345 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Release uses: goreleaser/goreleaser-action@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ecb7b4c515..ffe1da98ecd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Display go version run: go version - name: install tparse @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: @@ -105,7 +105,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | diff --git a/.github/workflows/wasm-client.yml b/.github/workflows/wasm-client.yml index b7d33c7c4a4..77f17b96b2a 100644 --- a/.github/workflows/wasm-client.yml +++ b/.github/workflows/wasm-client.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - uses: actions/checkout@v3 - uses: golangci/golangci-lint-action@v3.6.0 with: @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' # Install cross compiler for ARM64. Export CC env variable. - name: Install compiler for arm64. run: | @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.21' - name: Go Test run: | cd modules/light-clients/08-wasm diff --git a/.golangci.yml b/.golangci.yml index 71e76f042a9..5550ee25e24 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,12 +1,10 @@ run: tests: true - # # timeout for analysis, e.g. 30s, 5m, default is 1m - timeout: 5m + timeout: 10m linters: disable-all: true enable: - - dogsled - exportloopref - errcheck - gci @@ -21,32 +19,26 @@ linters: - nakedret - staticcheck - thelper + - typecheck - stylecheck - revive - typecheck + - tenv - unconvert + # Prefer unparam over revive's unused param. It is more thorough in its checking. + - unparam - unused - misspell issues: exclude-rules: - - text: 'unused-parameter' + - text: 'differs only by capitalization to method' linters: - revive - - text: 'SA1019:' - linters: - - staticcheck - text: 'Use of weak random number generator' linters: - gosec - - text: 'ST1003:' - linters: - - stylecheck - # FIXME: Disabled until golangci-lint updates stylecheck with this fix: - # https://github.com/dominikh/go-tools/issues/389 - - text: 'ST1016:' - linters: - - stylecheck + max-issues-per-linter: 10000 max-same-issues: 10000 @@ -62,17 +54,60 @@ linters-settings: - prefix(github.com/cometbft/cometbft) - prefix(github.com/cosmos/ibc-go) custom-order: true - dogsled: - max-blank-identifiers: 3 - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - nolintlint: - allow-unused: false - allow-leading-space: true - require-explanation: false - require-specific: false revive: + enable-all-rules: true + # Do NOT whine about the following, full explanation found in: + # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#description-of-available-rules rules: + - name: use-any + disabled: true - name: if-return disabled: true + - name: max-public-structs + disabled: true + - name: cognitive-complexity + disabled: true + - name: argument-limit + disabled: true + - name: cyclomatic + disabled: true + - name: file-header + disabled: true + - name: function-length + disabled: true + - name: function-result-limit + disabled: true + - name: line-length-limit + disabled: true + - name: flag-parameter + disabled: true + - name: add-constant + disabled: true + - name: empty-lines + disabled: true + - name: banned-characters + disabled: true + - name: deep-exit + disabled: true + - name: confusing-results + disabled: true + - name: unused-parameter + disabled: true + - name: modifies-value-receiver + disabled: true + - name: early-return + disabled: true + - name: confusing-naming + disabled: true + - name: defer + disabled: true + # Disabled in favour of unparam. + - name: unused-parameter + disabled: true + - name: unhandled-error + disabled: false + arguments: + - 'fmt.Printf' + - 'fmt.Print' + - 'fmt.Println' + - 'myFunction' diff --git a/Dockerfile b/Dockerfile index 54223a8d8c5..36727fa2c57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine3.18 as builder +FROM golang:1.21-alpine3.18 as builder ARG IBC_GO_VERSION RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make; diff --git a/Makefile b/Makefile index 95a4e929c76..334c889f02a 100644 --- a/Makefile +++ b/Makefile @@ -321,7 +321,7 @@ docs-lint-changed: ### Protobuf ### ############################################################################### -protoVer=0.13.2 +protoVer=0.14.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/RELEASES.md b/RELEASES.md index 94091889a2b..4fb6955e7b7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -67,9 +67,6 @@ Only the following major release series have a stable release status: |Release|End of Life Date| |-------|----------------| -|`v4.1.x`|August 12, 2023| -|`v4.2.x`|August 12, 2023| -|`v4.3.x`|August 12, 2023| |`v4.4.x`|October 31, 2023| |`v5.2.x`|September 28, 2023| |`v5.3.x`|October 31, 2023| @@ -106,9 +103,6 @@ Versions of Golang, Cosmos SDK and Tendermint used by ibc-go in the currently ac | Go | ibc-go | Cosmos SDK | Tendermint/CometBFT | |----|--------|------------|---------------------| -| 1.18 | v4.1.3 | v0.45.10 | v0.34.22 | -| 1.18 | v4.2.2 | v0.45.10 | v0.34.22 | -| 1.18 | v4.3.1 | v0.45.12 | v0.34.24 | | 1.19 | v4.4.1 | v0.45.15 | v0.34.27 | | 1.19 | v4.4.2 | v0.45.15 | v0.34.27 | | 1.18 | v5.2.1 | v0.46.7 | v0.34.24 | diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e44b62b4592..594c0d0a39e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -234,6 +234,11 @@ module.exports = { directory: false, path: "/ibc/proto-docs.html", }, + { + title: "Capability Module", + directory: false, + path: "/ibc/capability-module.html", + }, { title: "Roadmap", directory: false, @@ -533,6 +538,43 @@ module.exports = { }, ], }, + { + title: "Callbacks Middleware", + directory: true, + path: "/middleware", + children: [ + { + title: "Overview", + directory: false, + path: "/middleware/callbacks/overview.html", + }, + { + title: "Integration", + directory: false, + path: "/middleware/callbacks/integration.html", + }, + { + title: "Interfaces", + directory: false, + path: "/middleware/callbacks/interfaces.html", + }, + { + title: "Events", + directory: false, + path: "/middleware/callbacks/events.html", + }, + { + title: "End Users", + directory: false, + path: "/middleware/callbacks/end-users.html", + }, + { + title: "Gas Management", + directory: false, + path: "/middleware/callbacks/gas.html", + }, + ], + }, ], }, { @@ -584,6 +626,11 @@ module.exports = { directory: false, path: "/migrations/v7-to-v7_1.html", }, + { + title: "IBC-Go v7.2 to v7.3", + directory: false, + path: "/migrations/v7_2-to-v7_3.html", + }, ], }, { diff --git a/docs/apps/transfer/metrics.md b/docs/apps/transfer/metrics.md index 7d83b08eb13..3d2bb4bd82f 100644 --- a/docs/apps/transfer/metrics.md +++ b/docs/apps/transfer/metrics.md @@ -4,7 +4,7 @@ order: 6 # Metrics -The IBC transfer application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/09-telemetry.md). +The IBC transfer application module exposes the following set of [metrics](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/advanced/09-telemetry.md). | Metric | Description | Unit | Type | |:--------------------------------|:------------------------------------------------------------------------------------------|:----------------|:--------| diff --git a/docs/apps/transfer/params.md b/docs/apps/transfer/params.md index ac91c693146..7768277dd5d 100644 --- a/docs/apps/transfer/params.md +++ b/docs/apps/transfer/params.md @@ -75,8 +75,8 @@ To change the parameter values, you must make a governance proposal that execute // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the transfer parameters to update. // diff --git a/docs/assets/callbacks-mw/callbackflow.svg b/docs/assets/callbacks-mw/callbackflow.svg new file mode 100644 index 00000000000..2323889b7c9 --- /dev/null +++ b/docs/assets/callbacks-mw/callbackflow.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/callbacks-mw/ics4-callbackflow.svg b/docs/assets/callbacks-mw/ics4-callbackflow.svg new file mode 100644 index 00000000000..032a83f7662 --- /dev/null +++ b/docs/assets/callbacks-mw/ics4-callbackflow.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/dev/project-structure.md b/docs/dev/project-structure.md index 7e5e68d70cd..bb8e697d904 100644 --- a/docs/dev/project-structure.md +++ b/docs/dev/project-structure.md @@ -1,6 +1,6 @@ # Project structure -If you're not familiar with the overall module structure from the SDK modules, please check this [document](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md) as prerequisite reading. +If you're not familiar with the overall module structure from the SDK modules, please check this [document](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/build/building-modules/11-structure.md) as prerequisite reading. Every Interchain Standard (ICS) has been developed in its own package. The development team separated the IBC TAO (Transport, Authentication, Ordering) ICS specifications from the IBC application level specification. The following sections describe the architecture of the most relevant directories that comprise this repository. diff --git a/docs/ibc/apps.md b/docs/ibc/apps.md index 0d80d412337..7a8f07954bd 100644 --- a/docs/ibc/apps.md +++ b/docs/ibc/apps.md @@ -488,4 +488,4 @@ callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/ibc_ ## Next {hide} -Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/01-intro.md) {hide} +Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/build/building-modules/01-intro.md) {hide} diff --git a/docs/ibc/apps/apps.md b/docs/ibc/apps/apps.md index 86a53e6f94b..9cf9169c9b7 100644 --- a/docs/ibc/apps/apps.md +++ b/docs/ibc/apps/apps.md @@ -48,4 +48,4 @@ callbacks](https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/ibc_ ## Next {hide} -Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/01-intro.md) {hide} +Learn about [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/build/building-modules/01-intro.md) {hide} diff --git a/docs/ibc/apps/ibcmodule.md b/docs/ibc/apps/ibcmodule.md index 510fd5bcf31..ec68681ced6 100644 --- a/docs/ibc/apps/ibcmodule.md +++ b/docs/ibc/apps/ibcmodule.md @@ -347,3 +347,26 @@ func (im IBCModule) OnTimeoutPacket( // do custom timeout logic } ``` + +### Optional interfaces + +The following interface are optional and MAY be implemented by an IBCModule. + +#### PacketDataUnmarshaler + +The `PacketDataUnmarshaler` interface is defined as follows: + +```go +// PacketDataUnmarshaler defines an optional interface which allows a middleware to +// request the packet data to be unmarshaled by the base application. +type PacketDataUnmarshaler interface { + // UnmarshalPacketData unmarshals the packet data into a concrete type + UnmarshalPacketData([]byte) (interface{}, error) +} +``` + +The implementation of `UnmarshalPacketData` should unmarshal the bytes into the packet data type defined for an IBC stack. +The base application of an IBC stack should unmarshal the bytes into its packet data type, while a middleware may simply defer the call to the underlying application. + +This interface allows middlewares to unmarshal a packet data in order to make use of interfaces the packet data type implements. +For example, the callbacks middleware makes use of this function to access packet data types which implement the `PacketData` and `PacketDataProvider` interfaces. diff --git a/docs/ibc/apps/packets_acks.md b/docs/ibc/apps/packets_acks.md index 1d5061cf03f..fda814324f9 100644 --- a/docs/ibc/apps/packets_acks.md +++ b/docs/ibc/apps/packets_acks.md @@ -68,6 +68,55 @@ packetData := DecodePacketData(packet.Data) // handle received custom packet data ``` + +### Optional interfaces + +The following interfaces are optional and MAY be implemented by a custom packet type. +They allow middlewares such as callbacks to access information stored within the packet data. + +#### PacketData interface + +The `PacketData` interface is defined as follows: + +```go +// PacketData defines an optional interface which an application's packet data structure may implement. +type PacketData interface { + // GetPacketSender returns the sender address of the packet data. + // If the packet sender is unknown or undefined, an empty string should be returned. + GetPacketSender(sourcePortID string) string +} +``` + +The implementation of `GetPacketSender` should return the sender of the packet data. +If the packet sender is unknown or undefined, an empty string should be returned. + +This interface is intended to give IBC middlewares access to the packet sender of a packet data type. + +#### PacketDataProvider interface + +The `PacketDataProvider` interface is defined as follows: + +```go +// PacketDataProvider defines an optional interfaces for retrieving custom packet data stored on behalf of another application. +// An existing problem in the IBC middleware design is the inability for a middleware to define its own packet data type and insert packet sender provided information. +// A short term solution was introduced into several application's packet data to utilize a memo field to carry this information on behalf of another application. +// This interfaces standardizes that behaviour. Upon realization of the ability for middleware's to define their own packet data types, this interface will be deprecated and removed with time. +type PacketDataProvider interface { + // GetCustomPacketData returns the packet data held on behalf of another application. + // The name the information is stored under should be provided as the key. + // If no custom packet data exists for the key, nil should be returned. + GetCustomPacketData(key string) interface{} +} +``` + +The implementation of `GetCustomPacketData` should return packet data held on behalf of another application (if present and supported). +If this functionality is not supported, it should return nil. Otherwise it should return the packet data associated with the provided key. + +This interface gives IBC applications access to the packet data information embedded into the base packet data type. +Within transfer and interchain accounts, the embedded packet data is stored within the Memo field. + +Once all IBC applications within an IBC stack are capable of creating/maintaining their own packet data type's, this interface function will be deprecated and removed. + ## Acknowledgements Modules may commit an acknowledgement upon receiving and processing a packet in the case of synchronous packet processing. diff --git a/modules/capability/README.md b/docs/ibc/capability-module.md similarity index 87% rename from modules/capability/README.md rename to docs/ibc/capability-module.md index 723d8749ee1..6bdef612ea4 100644 --- a/modules/capability/README.md +++ b/docs/ibc/capability-module.md @@ -1,14 +1,12 @@ ---- -sidebar_position: 1 ---- + # Capability Module ## Overview -`modules/capability` is an implementation of a Cosmos SDK module, per [ADR 003](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-003-dynamic-capability-store.md), -that allows for provisioning, tracking, and authenticating multi-owner capabilities -at runtime. +`modules/capability` is an implementation of a Cosmos SDK module, per [ADR 003](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-003-dynamic-capability-store.md), that allows for provisioning, tracking, and authenticating multi-owner capabilities at runtime. The keeper maintains two states: persistent and ephemeral in-memory. The persistent store maintains a globally unique auto-incrementing index and a mapping from @@ -43,7 +41,7 @@ type App struct { func NewApp(...) *App { // ... - app.capabilityKeeper = capability.NewKeeper(codec, persistentStoreKey, memStoreKey) + app.capabilityKeeper = capabilitykeeper.NewKeeper(codec, persistentStoreKey, memStoreKey) } ``` @@ -110,20 +108,20 @@ not own. ### Stores -* MemStore -* KeyStore +- MemStore +- KeyStore ## State -### In persisted KV store +### Persisted KV store 1. Global unique capability index 2. Capability owners Indexes: -* Unique index: `[]byte("index") -> []byte(currentGlobalIndex)` -* Capability Index: `[]byte("capability_index") | []byte(index) -> ProtocolBuffer(CapabilityOwners)` +- Unique index: `[]byte("index") -> []byte(currentGlobalIndex)` +- Capability Index: `[]byte("capability_index") | []byte(index) -> ProtocolBuffer(CapabilityOwners)` ### In-memory KV store @@ -133,6 +131,6 @@ Indexes: Indexes: -* Initialized flag: `[]byte("mem_initialized")` -* RevCapabilityKey: `[]byte(moduleName + "/rev/" + capabilityName) -> []byte(index)` -* FwdCapabilityKey: `[]byte(moduleName + "/fwd/" + capabilityPointerAddress) -> []byte(capabilityName)` +- Initialized flag: `[]byte("mem_initialized")` +- RevCapabilityKey: `[]byte(moduleName + "/rev/" + capabilityName) -> []byte(index)` +- FwdCapabilityKey: `[]byte(moduleName + "/fwd/" + capabilityPointerAddress) -> []byte(capabilityName)` diff --git a/docs/ibc/integration.md b/docs/ibc/integration.md index 9c709d96826..ec8a78765f9 100644 --- a/docs/ibc/integration.md +++ b/docs/ibc/integration.md @@ -157,7 +157,7 @@ func NewApp(...args) *App { ### Module Managers -In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/14-simulator.md). +In order to use IBC, we need to add the new modules to the module `Manager` and to the `SimulationManager` in case your application supports [simulations](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/build/building-modules/14-simulator.md). ```go // app.go diff --git a/docs/ibc/light-clients/setup.md b/docs/ibc/light-clients/setup.md index be4e74a5334..e8e18bd0467 100644 --- a/docs/ibc/light-clients/setup.md +++ b/docs/ibc/light-clients/setup.md @@ -115,7 +115,7 @@ where `proposal.json` contains: "messages": [ { "@type": "/ibc.core.client.v1.MsgUpdateParams", - "authority": "cosmos1...", // The gov module account address + "signer": "cosmos1...", // The gov module account address "params": { "allowed_clients": ["06-solomachine", "07-tendermint", "0x-new-client"] } diff --git a/docs/ibc/light-clients/wasm/audits/Ethan Frey - Wasm Client Review.pdf b/docs/ibc/light-clients/wasm/audits/Ethan Frey - Wasm Client Review.pdf new file mode 100644 index 00000000000..12300a49b3f Binary files /dev/null and b/docs/ibc/light-clients/wasm/audits/Ethan Frey - Wasm Client Review.pdf differ diff --git a/docs/ibc/light-clients/wasm/audits/Halborn audit report.pdf b/docs/ibc/light-clients/wasm/audits/Halborn audit report.pdf new file mode 100644 index 00000000000..df97d6f4a07 Binary files /dev/null and b/docs/ibc/light-clients/wasm/audits/Halborn audit report.pdf differ diff --git a/docs/ibc/overview.md b/docs/ibc/overview.md index 1b1b5213a36..68c6d31ed8e 100644 --- a/docs/ibc/overview.md +++ b/docs/ibc/overview.md @@ -136,7 +136,7 @@ Proofs are passed from core IBC to light-clients as bytes. It is up to light cli [ICS-24 Host State Machine Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). - The proof format that all implementations must be able to produce and verify is defined in [ICS-23 Proofs](https://github.com/cosmos/ics23) implementation. -### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/10-ocap.md) +### [Capabilities](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/advanced/10-ocap.md) IBC is intended to work in execution environments where modules do not necessarily trust each other. Thus, IBC must authenticate module actions on ports and channels so that only modules with the diff --git a/docs/ibc/relayer.md b/docs/ibc/relayer.md index d8fdd6a2164..7da4e73bf92 100644 --- a/docs/ibc/relayer.md +++ b/docs/ibc/relayer.md @@ -7,7 +7,7 @@ order: 6 ## Pre-requisites Readings - [IBC Overview](./overview.md) {prereq} -- [Events](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/core/08-events.md) {prereq} +- [Events](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/advanced/08-events.md) {prereq} ## Events diff --git a/docs/middleware/callbacks/end-users.md b/docs/middleware/callbacks/end-users.md new file mode 100644 index 00000000000..63c1831845f --- /dev/null +++ b/docs/middleware/callbacks/end-users.md @@ -0,0 +1,93 @@ + + +# Usage + +This section explains how to use the callbacks middleware from the perspective of an IBC Actor. Callbacks middleware provides two types of callbacks: + +- Source callbacks: + - `SendPacket` callback + - `OnAcknowledgementPacket` callback + - `OnTimeoutPacket` callback +- Destination callbacks: + - `ReceivePacket` callback + +For a given channel, the source callbacks are supported if the source chain has the callbacks middleware wired up in the channel's IBC stack. Similarly, the destination callbacks are supported if the destination chain has the callbacks middleware wired up in the channel's IBC stack. + +::: tip +Callbacks are always executed after the packet has been processed by the underlying IBC module. +::: + +::: warning +If the underlying application module is doing an asynchronous acknowledgement on packet receive (for example, if the [packet forward middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware) is in the stack, and is being used by this packet), then the callbacks middleware will execute the `ReceivePacket` callback after the acknowledgement has been received. +::: + +## Source Callbacks + +Source callbacks are natively supported in the following ibc modules (if they are wrapped by the callbacks middleware): + +- `transfer` +- `icacontroller` + +To have your source callbacks be processed by the callbacks middleware, you must set the memo in the application's packet data to the following format: + +```jsonc +{ + "src_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + } +} +``` + +## Destination Callbacks + +Destination callbacks are natively only supported in the transfer module. Note that wrapping icahost is not supported. This is because icahost should be able to execute an arbitrary transaction anyway, and can call contracts or modules directly. + +To have your destination callbacks processed by the callbacks middleware, you must set the memo in the application's packet data to the following format: + +```jsonc +{ + "dest_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + } +} +``` + +Note that a packet can have both a source and destination callback. + +```jsonc +{ + "src_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + }, + "dest_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + } +} +``` + +# User Defined Gas Limit + +User defined gas limit was added for the following reasons: + +- To prevent callbacks from blocking packet lifecycle. +- To prevent relayers from being able to DOS the callback execution by sending a packet with a low amount of gas. + +::: tip +There is a chain wide parameter that sets the maximum gas limit that a user can set for a callback. This is to prevent a user from setting a gas limit that is too high for relayers. If the `"gas_limit"` is not set in the packet memo, then the maximum gas limit is used. +::: + +These goals are achieved by creating a minimum gas amount required for callback execution. If the relayer provides at least the minimum gas limit for the callback execution, then the packet lifecycle will not be blocked if the callback runs out of gas during execution, and the callback cannot be retried. If the relayer does not provided the minimum amount of gas and the callback executions runs out of gas, the entire tx is reverted and it may be executed again. + +::: tip +`SendPacket` callback is always reverted if the callback execution fails or returns an error for any reason. This is so that the packet is not sent if the callback execution fails. +::: diff --git a/docs/middleware/callbacks/events.md b/docs/middleware/callbacks/events.md new file mode 100644 index 00000000000..cd8d68f28b2 --- /dev/null +++ b/docs/middleware/callbacks/events.md @@ -0,0 +1,36 @@ + + +# Events + +An overview of all events related to the callbacks middleware. There are two types of events, `"ibc_src_callback"` and `"ibc_dest_callback"`. + +## Shared Attributes + +Both of these event types share the following attributes: + +| **Attribute Key** | **Attribute Values** | **Optional** | +|:-------------------------:|:---------------------------------------------------------------------------------------:|:------------------:| +| module | "ibccallbacks" | | +| callback_type | **One of**: "send_packet", "acknowledgement_packet", "timeout_packet", "receive_packet" | | +| callback_address | string | | +| callback_exec_gas_limit | string (parsed from uint64) | | +| callback_commit_gas_limit | string (parsed from uint64) | | +| packet_sequence | string (parsed from uint64) | | +| callback_result | **One of**: "success", "failure" | | +| callback_error | string (parsed from callback err) | Yes, if err != nil | + +## `ibc_src_callback` Attributes + +| **Attribute Key** | **Attribute Values** | +|:------------------:|:------------------------:| +| packet_src_port | string (sourcePortID) | +| packet_src_channel | string (sourceChannelID) | + +## `ibc_dest_callback` Attributes + +| **Attribute Key** | **Attribute Values** | +|:-------------------:|:------------------------:| +| packet_dest_port | string (destPortID) | +| packet_dest_channel | string (destChannelID) | diff --git a/docs/middleware/callbacks/gas.md b/docs/middleware/callbacks/gas.md new file mode 100644 index 00000000000..c36aeaa330d --- /dev/null +++ b/docs/middleware/callbacks/gas.md @@ -0,0 +1,74 @@ + + +# Gas Management + +## Overview + +Executing arbitrary code on a chain can be arbitrarily expensive. In general, a callback may consume infinite gas (think of a callback that loops forever). This is problematic for a few reasons: + +- It can block the packet lifecycle. +- It can be used to consume all of the relayer's funds and gas. +- A relayer can DOS the callback execution by sending a packet with a low amount of gas. + +To prevent these, the callbacks middleware introduces two gas limits: a chain wide gas limit (`maxCallbackGas`) and a user defined gas limit. + +### Chain Wide Gas Limit + +Since the callbacks middleware does not have a keeper, it does not use a governance parameter to set the chain wide gas limit. Instead, the chain wide gas limit is passed in as a parameter to the callbacks middleware during initialization. + +```go +// app.go + +maxCallbackGas := uint64(1_000_000) + +var transferStack porttypes.IBCModule +transferStack = transfer.NewIBCModule(app.TransferKeeper) +transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) +transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) +// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the transfer keeper +app.TransferKeeper.WithICS4Wrapper(transferStack.(porttypes.ICS4Wrapper)) + +// Add transfer stack to IBC Router +ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) +``` + +### User Defined Gas Limit + +The user defined gas limit is set by the IBC Actor during packet creation. The user defined gas limit is set in the packet memo. If the user defined gas limit is not set or if the user defined gas limit is greater than the chain wide gas limit, then the chain wide gas limit is used as the user defined gas limit. + +```jsonc +{ + "src_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + }, + "dest_callback": { + "address": "callbackAddressString", + // optional + "gas_limit": "userDefinedGasLimitString", + } +} +``` + +## Gas Limit Enforcement + +During a callback execution, there are three types of gas limits that are enforced: + +- User defined gas limit +- Chain wide gas limit +- Context gas limit (amount of gas that the relayer has left for this execution) + +Chain wide gas limit is used as a maximum to the user defined gas limit as explained in the [previous section](#user-deifined-gas-limit). It may also be used as a default value if no user gas limit is provided. Therefore, we can ignore the chain wide gas limit for the rest of this section and work with the minimum of the chain wide gas limit and user defined gas limit. This minimum is called the commit gas limit. + +The gas limit enforcement is done by executing the callback inside a cached context with a new gas meter. The gas meter is initialized with the minimum of the commit gas limit and the context gas limit. This minimum is called the execution gas limit. We say that retries are allowed if `context gas limit < commit gas limit`. Otherwise, we say that retries are not allowed. + +If the callback execution fails due to an out of gas error, then the middleware checks if retries are allowed. If retries are not allowed, then it recovers from the out of gas error, consumes execution gas limit from the original context, and continues with the packet life cycle. If retries are allowed, then it panics with an out of gas error to revert the entire tx. The packet can then be submitted again with a higher gas limit. The out of gas panic descriptor is shown below. + +```go +fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", callbackType, callbackData.CommitGasLimit)} +``` + +If the callback execution does not fail due to an out of gas error then the callbacks middleware does not block the packet life cycle regardless of whether retries are allowed or not. diff --git a/docs/middleware/callbacks/integration.md b/docs/middleware/callbacks/integration.md new file mode 100644 index 00000000000..ddd1f68360f --- /dev/null +++ b/docs/middleware/callbacks/integration.md @@ -0,0 +1,92 @@ + + +# Integration + +Learn how to integrate the callbacks middleware with IBC applications. The following document is intended for developers building on top of the Cosmos SDK and only applies for Cosmos SDK chains. {synopsis} + +The callbacks middleware is a minimal and stateless implementation of the IBC middleware interface. It does not have a keeper, nor does it store any state. It simply routes IBC middleware messages to the appropriate callback function, which is implemented by the secondary application. Therefore, it doesn't need to be registered as a module, nor does it need to be added to the module manager. It only needs to be added to the IBC application stack. + +## Pre-requisite Readings + +* [IBC middleware development](../../ibc/middleware/develop.md) {prereq} +* [IBC middleware integration](../../ibc/middleware/integration.md) {prereq} + +The callbacks middleware, as the name suggests, plays the role of an IBC middleware and as such must be configured by chain developers to route and handle IBC messages correctly. +For Cosmos SDK chains this setup is done via the `app/app.go` file, where modules are constructed and configured in order to bootstrap the blockchain application. + +## Configuring an application stack with the callbacks middleware + +As mentioned in [IBC middleware development](../../ibc/middleware/develop.md) an application stack may be composed of many or no middlewares that nest a base application. +These layers form the complete set of application logic that enable developers to build composable and flexible IBC application stacks. +For example, an application stack may just be a single base application like `transfer`, however, the same application stack composed with `29-fee` and `callbacks` will nest the `transfer` base application twice by wrapping it with the Fee Middleware module and then callbacks middleware. + +The callbacks middleware also **requires** a secondary application that will receive the callbacks to implement the [`ContractKeeper`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/callbacks/types/expected_keepers.go#L11-L83). Since the wasm module does not yet support the callbacks middleware, we will use the `mockContractKeeper` module in the examples below. You should replace this with a module that implements `ContractKeeper`. + +### Transfer + +See below for an example of how to create an application stack using `transfer`, `29-fee`, and `callbacks`. Feel free to omit the `29-fee` middleware if you do not want to use it. +The following `transferStack` is configured in `app/app.go` and added to the IBC `Router`. +The in-line comments describe the execution flow of packets between the application stack and IBC core. + +```go +// Create Transfer Stack +// SendPacket, since it is originating from the application to core IBC: +// transferKeeper.SendPacket -> callbacks.SendPacket -> fee.SendPacket -> channel.SendPacket + +// RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way +// channel.RecvPacket -> callbacks.OnRecvPacket -> fee.OnRecvPacket -> transfer.OnRecvPacket + +// transfer stack contains (from top to bottom): +// - IBC Callbacks Middleware +// - IBC Fee Middleware +// - Transfer + +// create IBC module from bottom to top of stack +var transferStack porttypes.IBCModule +transferStack = transfer.NewIBCModule(app.TransferKeeper) +transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) +// maxCallbackGas is a hard-coded value that is passed to the callbacks middleware +transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) +// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the transfer keeper +app.TransferKeeper.WithICS4Wrapper(transferStack.(porttypes.ICS4Wrapper)) + +// Add transfer stack to IBC Router +ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) +``` + +::: warning +The usage of `WithICS4Wrapper` after `transferStack`'s configuration is critical! It allows the callbacks middleware to do `SendPacket` callbacks and asynchronous `ReceivePacket` callbacks. You must do this regardless of whether you are using the `29-fee` middleware or not. +::: + +### Interchain Accounts Controller + +```go +// Create Interchain Accounts Stack +// SendPacket, since it is originating from the application to core IBC: +// icaControllerKeeper.SendTx -> callbacks.SendPacket -> fee.SendPacket -> channel.SendPacket + +var icaControllerStack porttypes.IBCModule +icaControllerStack = icacontroller.NewIBCMiddleware(nil, app.ICAControllerKeeper) +icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) +// maxCallbackGas is a hard-coded value that is passed to the callbacks middleware +icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) +// Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper +app.ICAControllerKeeper.WithICS4Wrapper(icaControllerStack.(porttypes.ICS4Wrapper)) + +// RecvPacket, message that originates from core IBC and goes down to app, the flow is: +// channel.RecvPacket -> callbacks.OnRecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket + +var icaHostStack porttypes.IBCModule +icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper) +icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) + +// Add ICA host and controller to IBC router ibcRouter. +AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). +AddRoute(icahosttypes.SubModuleName, icaHostStack). +``` + +::: warning +The usage of `WithICS4Wrapper` here is also critical! +::: diff --git a/docs/middleware/callbacks/interfaces.md b/docs/middleware/callbacks/interfaces.md new file mode 100644 index 00000000000..afed23d0a4e --- /dev/null +++ b/docs/middleware/callbacks/interfaces.md @@ -0,0 +1,148 @@ + + +# Interfaces + +The callbacks middleware requires certain interfaces to be implemented by the underlying IBC applications and the secondary application. If you're simply wiring up the callbacks middleware to an existing IBC application stack and a secondary application such as `icacontroller` and `x/wasm`, you can skip this section. + +## Interfaces for developing the Underlying IBC Application + +### `PacketDataUnmarshaler` + +```go +// PacketDataUnmarshaler defines an optional interface which allows a middleware to +// request the packet data to be unmarshaled by the base application. +type PacketDataUnmarshaler interface { + // UnmarshalPacketData unmarshals the packet data into a concrete type + UnmarshalPacketData([]byte) (interface{}, error) +} +``` + +The callbacks middleware **requires** the underlying ibc application to implement the [`PacketDataUnmarshaler`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/core/05-port/types/module.go#L142-L147) interface so that it can unmarshal the packet data bytes into the appropriate packet data type. This allows usage of interface functions implemented by the packet data type. The packet data type is expected to implement the `PacketDataProvider` interface (see section below), which is used to parse the callback data that is currently stored in the packet memo field for `transfer` and `ica` packets as a JSON string. See its implementation in the [`transfer`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/transfer/ibc_module.go#L303-L313) and [`icacontroller`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L258-L268) modules for reference. + +If the underlying application is a middleware itself, then it can implement this interface by simply passing the function call to its underlying application. See its implementation in the [`fee middleware`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/29-fee/ibc_middleware.go#L368-L378) for reference. + +### `PacketDataProvider` + +```go +// PacketDataProvider defines an optional interfaces for retrieving custom packet data stored on behalf of another application. +// An existing problem in the IBC middleware design is the inability for a middleware to define its own packet data type and insert packet sender provided information. +// A short term solution was introduced into several application's packet data to utilize a memo field to carry this information on behalf of another application. +// This interfaces standardizes that behaviour. Upon realization of the ability for middleware's to define their own packet data types, this interface will be deprecated and removed with time. +type PacketDataProvider interface { + // GetCustomPacketData returns the packet data held on behalf of another application. + // The name the information is stored under should be provided as the key. + // If no custom packet data exists for the key, nil should be returned. + GetCustomPacketData(key string) interface{} +} +``` + +The callbacks middleware also **requires** the underlying ibc application's packet data type to implement the [`PacketDataProvider`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/core/exported/packet.go#L43-L52) interface. This interface is used to retrieve the callback data from the packet data (using the memo field in the case of `transfer` and `ica`). For example, see its implementation in the [`transfer`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/transfer/types/packet.go#L85-L105) module. + +Since middlewares do not have packet types, they do not need to implement this interface. + +### `PacketData` + +```go +// PacketData defines an optional interface which an application's packet data structure may implement. +type PacketData interface { + // GetPacketSender returns the sender address of the packet data. + // If the packet sender is unknown or undefined, an empty string should be returned. + GetPacketSender(sourcePortID string) string +} +``` + +[`PacketData`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/core/exported/packet.go#L36-L41) is an optional interface that can be implemented by the underlying ibc application's packet data type. It is used to retrieve the packet sender address from the packet data. The callbacks middleware uses this interface to retrieve the packet sender address and pass it to the callback function during a source callback. If this interface is not implemented, then the callbacks middleware passes and empty string as the sender address. For example, see its implementation in the [`transfer`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/transfer/types/packet.go#L74-L83) and [`ica`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/27-interchain-accounts/types/packet.go#L78-L92) module. + +This interface was added so that secondary applications can retrieve the packet sender address to perform custom authorization logic if needed. + +Since middlewares do not have packet types, they do not need to implement this interface. + +## Interfaces for developing the Secondary Application + +### `ContractKeeper` + +The callbacks middleware requires the secondary application to implement the [`ContractKeeper`](https://github.com/cosmos/ibc-go/blob/v7.3.0/modules/apps/callbacks/types/expected_keepers.go#L11-L83) interface. The contract keeper will be invoked at each step of the packet lifecycle. When a packet is sent, if callback information is provided, the contract keeper will be invoked via the `IBCSendPacketCallback`. This allows the contract keeper to prevent packet sends when callback information is provided, for example if the sender is unauthroized to perform callbacks on the given information. If the packet send is successful, the contract keeper on the destination (if present) will be invoked when a packet has been received and the acknowledgement is written, this will occur via `IBCReceivePacketCallback`. At the end of the packet lifecycle, when processing acknowledgements or timeouts, the source contract keeper will be invoked either via `IBCOnAcknowledgementPacket` or `IBCOnTimeoutPacket`. Once a packet has been sent, each step of the packet lifecycle can be processed given that a relayer sets the gas limit to be more than or equal to the required `CommitGasLimit`. State changes performed in the callback will only be committed upon successful execution. + +```go +// ContractKeeper defines the entry points exposed to the VM module which invokes a smart contract +type ContractKeeper interface { + // IBCSendPacketCallback is called in the source chain when a PacketSend is executed. The + // packetSenderAddress is determined by the underlying module, and may be empty if the sender is + // unknown or undefined. The contract is expected to handle the callback within the user defined + // gas limit, and handle any errors, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, and the error will be propagated to the underlying IBC + // application, resulting in a packet send failure. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCSendPacketCallback( + cachedCtx sdk.Context, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + packetData []byte, + contractAddress, + packetSenderAddress string, + ) error + // IBCOnAcknowledgementPacketCallback is called in the source chain when a packet acknowledgement + // is received. The packetSenderAddress is determined by the underlying module, and may be empty if + // the sender is unknown or undefined. The contract is expected to handle the callback within the + // user defined gas limit, and handle any errors, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCOnAcknowledgementPacketCallback( + cachedCtx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, + ) error + // IBCOnTimeoutPacketCallback is called in the source chain when a packet is not received before + // the timeout height. The packetSenderAddress is determined by the underlying module, and may be + // empty if the sender is unknown or undefined. The contract is expected to handle the callback + // within the user defined gas limit, and handle any error, out of gas, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCOnTimeoutPacketCallback( + cachedCtx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, + ) error + // IBCReceivePacketCallback is called in the destination chain when a packet acknowledgement is written. + // The contract is expected to handle the callback within the user defined gas limit, and handle any errors, + // out of gas, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + IBCReceivePacketCallback( + cachedCtx sdk.Context, + packet ibcexported.PacketI, + ack ibcexported.Acknowledgement, + contractAddress string, + ) error +} +``` + +These are the callback entry points exposed to the secondary application. The secondary application is expected to execute its custom logic within these entry points. The callbacks middleware will handle the execution of these callbacks and revert the state if needed. + +:::tip +Note that the source callback entry points are provided with the `packetSenderAddress` and MAY choose to use this to perform validation on the origin of a given packet. It is recommended to perform the same validation on all source chain callbacks (SendPacket, AcknowledgePacket, TimeoutPacket). This defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. +::: diff --git a/docs/middleware/callbacks/overview.md b/docs/middleware/callbacks/overview.md new file mode 100644 index 00000000000..9a10b53388a --- /dev/null +++ b/docs/middleware/callbacks/overview.md @@ -0,0 +1,48 @@ + + +# Overview + +Learn about what the Callbacks Middleware is, and how to build custom modules that utilize the Callbacks Middleware functionality {synopsis} + +## What is the Callbacks Middleware? + +IBC was designed with callbacks between core IBC and IBC applications. IBC apps would send a packet to core IBC, and receive a callback on every step of that packet's lifecycle. This allows IBC applications to be built on top of core IBC, and to be able to execute custom logic on packet lifecycle events (e.g. unescrow tokens for ICS-20). + +This setup worked well for off-chain users interacting with IBC applications. However, we are now seeing the desire for secondary applications (e.g. smart contracts, modules) to call into IBC apps as part of their state machine logic and then do some actions on packet lifecycle events. + +The Callbacks Middleware allows for this functionality by allowing the packets of the underlying IBC applications to register callbacks to secondary applications for lifecycle events. These callbacks are then executed by the Callbacks Middleware when the corresponding packet lifecycle event occurs. + +After much discussion, the design was expanded to [an ADR](../../architecture/adr-008-app-caller-cbs/adr-008-app-caller-cbs.md), and the Callbacks Middleware is an implementation of that ADR. + +## Concepts + +Callbacks Middleware was built with smart contracts in mind, but can be used by any secondary application that wants to allow IBC packets to call into it. Think of the Callbacks Middleware as a bridge between core IBC and a secondary application. + +We have the following definitions: + +- `Underlying IBC application`: The IBC application that is wrapped by the Callbacks Middleware. This is the IBC application that is actually sending and receiving packet lifecycle events from core IBC. For example, the transfer module, or the ICA controller submodule. +- `IBC Actor`: IBC Actor is an on-chain or off-chain entity that can initiate a packet on the underlying IBC application. For example, a smart contract, an off-chain user, or a module that sends a transfer packet are all IBC Actors. +- `Secondary application`: The application that is being called into by the Callbacks Middleware for packet lifecycle events. This is the application that is receiving the callback directly from the Callbacks Middleware module. For example, the `x/wasm` module. +- `Callback Actor`: The on-chain smart contract or module that is registered to receive callbacks from the secondary application. For example, a Wasm smart contract (gatekeeped by the `x/wasm` module). Note that the Callback Actor is not necessarily the same as the IBC Actor. For example, an off-chain user can initiate a packet on the underlying IBC application, but the Callback Actor could be a smart contract. The secondary application may want to check that the IBC Actor is allowed to call into the Callback Actor, for example, by checking that the IBC Actor is the same as the Callback Actor. +- `Callback Address`: Address of the Callback Actor. This is the address that the secondary application will call into when a packet lifecycle event occurs. For example, the address of the Wasm smart contract. +- `Maximum gas limit`: The maximum amount of gas that the Callbacks Middleware will allow the secondary application to use when it executes its custom logic. +- `User defined gas limit`: The amount of gas that the IBC Actor wants to allow the secondary application to use when it executes its custom logic. This is the gas limit that the IBC Actor specifies when it sends a packet to the underlying IBC application. This cannot be greater than the maximum gas limit. + +Think of the secondary application as a bridge between the Callbacks Middleware and the Callback Actor. The secondary application is responsible for executing the custom logic of the Callback Actor when a packet lifecycle event occurs. The secondary application is also responsible for checking that the IBC Actor is allowed to call into the Callback Actor. + +Note that it is possible that the IBC Actor, Secondary Application, and Callback Actor are all the same entity. In which case, the Callback Address should be the secondary application's module address. + +The following diagram shows how a typical `RecvPacket`, `AcknowledgementPacket`, and `TimeoutPacket` execution flow would look like: +![callbacks-middleware](../../assets/callbacks-mw/callbackflow.svg) + +And the following diagram shows how a typical `SendPacket` and `WriteAcknowledgement` execution flow would look like: +![callbacks-middleware](../../assets/callbacks-mw/ics4-callbackflow.svg) + +## Known Limitations + +- Callbacks are always executed after the underlying IBC application has executed its logic. +- Maximum gas limit is hardcoded manually during wiring. It requires a coordinated upgrade to change the maximum gas limit. +- The receive packet callback does not pass the relayer address to the secondary application. This is so that we can use the same callback for both synchronous and asynchronous acknowledgements. +- The receive packet callback does not pass IBC Actor's address, this is because the IBC Actor lives in the counterparty chain and cannot be trusted. diff --git a/docs/middleware/ics29-fee/fee-distribution.md b/docs/middleware/ics29-fee/fee-distribution.md index b23873a6e2d..d1be7e2ff8a 100644 --- a/docs/middleware/ics29-fee/fee-distribution.md +++ b/docs/middleware/ics29-fee/fee-distribution.md @@ -50,7 +50,7 @@ type MsgRegisterCounterpartyPayee struct { > > - `PortId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators). > - `ChannelId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)). -> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/basics/03-accounts.md#addresses)). +> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/beginner/03-accounts.md#addresses)). > - `CounterpartyPayee` is empty. See below for an example CLI command: @@ -95,8 +95,8 @@ type MsgRegisterPayee struct { > > - `PortId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators). > - `ChannelId` is invalid (see [24-host naming requirements](https://github.com/cosmos/ibc/blob/master/spec/core/ics-024-host-requirements/README.md#paths-identifiers-separators)). -> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/basics/03-accounts.md#addresses)). -> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/basics/03-accounts.md#addresses)). +> - `Relayer` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/beginner/03-accounts.md#addresses)). +> - `Payee` is an invalid address (see [Cosmos SDK Addresses](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/develop/beginner/03-accounts.md#addresses)). See below for an example CLI command: diff --git a/docs/migrations/v7_2-to-v7_3.md b/docs/migrations/v7_2-to-v7_3.md new file mode 100644 index 00000000000..3017e2bca76 --- /dev/null +++ b/docs/migrations/v7_2-to-v7_3.md @@ -0,0 +1,43 @@ +# Migrating from v7.2 to v7.3 + +This guide provides instructions for migrating to version `v7.3.0` of ibc-go. + +There are four sections based on the four potential user groups of this document: + +- [Migrating from v7.2 to v7.3](#migrating-from-v72-to-v73) + - [Chains](#chains) + - [IBC Apps](#ibc-apps) + - [Relayers](#relayers) + - [IBC Light Clients](#ibc-light-clients) + +**Note:** ibc-go supports golang semantic versioning and therefore all imports must be updated on major version releases. + +## Chains + +- No relevant changes were made in this release. + +## IBC Apps + +A set of interfaces have been added that IBC applications may optionally implement. Developers interested in integrating their applications with the [callbacks middleware](../middleware/callbacks/overview.md) should implement these interfaces so that the callbacks middleware can retrieve the desired callback addresses on the source and destination chains and execute actions on packet lifecycle events. The interfaces are [`PacketDataUnmarshaler`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/core/05-port/types/module.go#L142-L147), [`PacketDataProvider`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/core/exported/packet.go#L43-L52) and [`PacketData`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/core/exported/packet.go#L36-L41). + +Sample implementations are available for reference. For `transfer`: + +- [`PacketDataUnmarshaler`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/transfer/ibc_module.go#L303-L313), +- [`PacketDataProvider`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/transfer/types/packet.go#L85-L105) +- and [`PacketData`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/transfer/types/packet.go#L74-L83). + +For `27-interchain-accounts`: + +- [`PacketDataUnmarshaler`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/27-interchain-accounts/controller/ibc_middleware.go#L258-L268), +- [`PacketDataProvider`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/27-interchain-accounts/types/packet.go#L94-L114) +- and [`PacketData`](https://github.com/cosmos/ibc-go/blob/v7.3.0-rc1/modules/apps/27-interchain-accounts/types/packet.go#L78-L92). + +## Relayers + +- No relevant changes were made in this release. + +## IBC Light Clients + +### 06-solomachine + +Solo machines are now expected to sign data on a path that 1) does not include a connection prefix (e.g `ibc`) and 2) does not escape any characters. See PR [#4429](https://github.com/cosmos/ibc-go/pull/4429) for more details. We recommend __NOT__ using the solo machine light client of versions lower than v7.3.0. diff --git a/docs/requirements/localhost-requirements.md b/docs/requirements/localhost-requirements.md index 2508d87fece..656f60f11ae 100644 --- a/docs/requirements/localhost-requirements.md +++ b/docs/requirements/localhost-requirements.md @@ -46,19 +46,19 @@ Polymer plans to leverage the localhost client with multiple connections as part | ID | Description | Verification | Status | Release | | -- | ----------- | ------------ | ------ | ------- | -| 1.01 | The localhost client shall have a client ID of the string `09-localhost`. | [Localhost client is created with client ID `09-localhost`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/02-client/keeper/keeper.go#L60). | `Implemented` | | -| 1.02 | The localhost client shall have a sentinel connection ID of the string `connection-localhost`. | [Creation of sentinel connection with ID `connection-localhost`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/keeper/keeper.go#L200). | `Implemented` | | -| 1.03 | Only 1 localhost connection is required | Localhost connection handshakes are forbidden in [Init](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/types/msgs.go#L47) and [Try](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/types/msgs.go#L110). | `Implemented` | | -| 1.04 | When the localhost client is initialised the consensus state must be `nil`. | [Error is returned if consensus state is not `nil`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/light-clients/09-localhost/client_state.go#L57). | `Implemented` | | -| 1.05 | The localhost client can be added to a chain through an upgrade. | [Automatic migration handler configured in core IBC module to set the localhost `ClientState` and sentinel `ConnectionEnd` in state.](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/module.go#L132-L145). | `Implemented` | | -| 1.06 | A chain can enable the localhost client by initialising the client in the genesis state. | [`InitGenesis` handler in 02-client](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/02-client/genesis.go#L52) and [`InitGenesis` handler in 03-connection](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/genesis.go#L23). | `Implemented` | | +| 1.01 | The localhost client shall have a client ID of the string `09-localhost`. | [Localhost client is created with client ID `09-localhost`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/02-client/keeper/keeper.go#L60). | `Verified` | v7.1.0 | +| 1.02 | The localhost client shall have a sentinel connection ID of the string `connection-localhost`. | [Creation of sentinel connection with ID `connection-localhost`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/keeper/keeper.go#L200). | `Verified` | v7.1.0 | +| 1.03 | Only 1 localhost connection is required | Localhost connection handshakes are forbidden in [Init](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/types/msgs.go#L47) and [Try](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/types/msgs.go#L110). | `Verified` | v7.1.0 | +| 1.04 | When the localhost client is initialised the consensus state must be `nil`. | [Error is returned if consensus state is not `nil`](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/light-clients/09-localhost/client_state.go#L57). | `Verified` | v7.1.0 | +| 1.05 | The localhost client can be added to a chain through an upgrade. | [Automatic migration handler configured in core IBC module to set the localhost `ClientState` and sentinel `ConnectionEnd` in state.](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/module.go#L132-L145). | `Verified` | v7.1.0 | +| 1.06 | A chain can enable the localhost client by initialising the client in the genesis state. | [`InitGenesis` handler in 02-client](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/02-client/genesis.go#L52) and [`InitGenesis` handler in 03-connection](https://github.com/cosmos/ibc-go/blob/release/v7.1.x/modules/core/03-connection/genesis.go#L23). | `Verified` | v7.1.0 | ### 2 - Operation | ID | Description | Verification | Status | Release | | -- | ----------- | ------------ | ------ | ------- | -| 2.01 | A user of the localhost client can send IBC messages to an application on the same chain. | [e2e test with transfer](https://github.com/cosmos/ibc-go/blob/main/e2e/tests/transfer/localhost_test.go#L32). | `Implemented`| | -| 2.02 | A user can use the localhost client through the existing IBC application module interfaces. | [e2e test with transfer](https://github.com/cosmos/ibc-go/blob/main/e2e/tests/transfer/localhost_test.go#L32). | `Implemented` | | +| 2.01 | A user of the localhost client can send IBC messages to an application on the same chain. | [e2e test with transfer](https://github.com/cosmos/ibc-go/blob/main/e2e/tests/transfer/localhost_test.go#L32). | `Verified`| v7.1.0 | +| 2.02 | A user can use the localhost client through the existing IBC application module interfaces. | [e2e test with transfer](https://github.com/cosmos/ibc-go/blob/main/e2e/tests/transfer/localhost_test.go#L32). | `Verified` | v7.1.0 | # External interface requirements @@ -66,4 +66,4 @@ Polymer plans to leverage the localhost client with multiple connections as part | ID | Description | Verification | Status | Release | | -- | ----------- | ------------ | ------ | ------- | -| 3.01 | Existing CLI interfaces used with IBC application modules shall be useable with the localhost client. | Manual test | `Implemented` | | +| 3.01 | Existing CLI interfaces used with IBC application modules shall be useable with the localhost client. | Manual test | `Verified` | v7.1.0 | diff --git a/e2e/dockerutil/dockerutil.go b/e2e/dockerutil/dockerutil.go index 4d75f685f5e..bd5a561323d 100644 --- a/e2e/dockerutil/dockerutil.go +++ b/e2e/dockerutil/dockerutil.go @@ -16,7 +16,7 @@ import ( const testLabel = "ibc-test" // GetTestContainers returns all docker containers that have been created by interchain test. -func GetTestContainers(t *testing.T, ctx context.Context, dc *dockerclient.Client) ([]dockertypes.Container, error) { +func GetTestContainers(ctx context.Context, t *testing.T, dc *dockerclient.Client) ([]dockertypes.Container, error) { t.Helper() testContainers, err := dc.ContainerList(ctx, dockertypes.ContainerListOptions{ diff --git a/e2e/go.mod b/e2e/go.mod index 223d7b5dcf4..7cd52adf08f 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -1,19 +1,19 @@ module github.com/cosmos/ibc-go/e2e -go 1.20 +go 1.21 require ( cosmossdk.io/errors v1.0.0 - cosmossdk.io/math v1.0.1 + cosmossdk.io/math v1.1.2 github.com/cometbft/cometbft v0.37.2 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cosmos/cosmos-sdk v0.47.5 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 v24.0.1+incompatible - github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230622193330-220ce33823c0 + github.com/docker/docker v24.0.5+incompatible + github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230817191535-cc35cd35adbc github.com/stretchr/testify v1.8.4 - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.25.0 golang.org/x/mod v0.12.0 google.golang.org/grpc v1.57.0 gopkg.in/yaml.v2 v2.4.0 @@ -25,11 +25,35 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/api v0.3.1 // indirect - cosmossdk.io/core v0.6.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect + github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/confio/ics23/go v0.9.0 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/rakyll/statik v0.1.7 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.126.0 // indirect + google.golang.org/appengine v1.6.7 // indirect +) + +require ( + cosmossdk.io/api v0.3.1 // indirect + cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.2.1 // indirect 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 @@ -43,11 +67,9 @@ require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/StirlingMarketingGroup/go-namecase v1.0.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/avast/retry-go/v4 v4.3.4 // indirect - github.com/aws/aws-sdk-go v1.44.213 // indirect + github.com/avast/retry-go/v4 v4.5.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.2.0 // indirect @@ -55,9 +77,10 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect - github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect @@ -67,15 +90,14 @@ require ( github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.5.0 // indirect + github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect 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/crypto/blake256 v1.0.1 // 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/decred/dcrd/dcrec/secp256k1/v4 v4.2.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 @@ -88,38 +110,33 @@ require ( github.com/ethereum/go-ethereum v1.11.2 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect github.com/go-stack/stack v1.8.1 // indirect + github.com/gobwas/ws v1.1.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/glog v1.1.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.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/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -128,16 +145,17 @@ require ( github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ipfs/go-cid v0.3.2 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/ipfs/go-cid v0.4.1 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.26.2 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/libp2p/go-libp2p v0.27.8 // indirect + github.com/linxGnu/grocksdb v1.8.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -147,35 +165,34 @@ require ( github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.8.0 // indirect - github.com/multiformats/go-multibase v0.1.1 // indirect + github.com/multiformats/go-multiaddr v0.9.0 // indirect + github.com/multiformats/go-multibase v0.2.0 // indirect github.com/multiformats/go-multicodec v0.8.1 // indirect github.com/multiformats/go-multihash v0.2.1 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect 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.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 - github.com/rakyll/statik v0.1.7 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect @@ -188,27 +205,21 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect + github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tyler-smith/go-bip32 v1.0.0 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect 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.11.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.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.126.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect @@ -220,15 +231,15 @@ require ( lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect modernc.org/ccgo/v3 v3.16.13 // indirect - modernc.org/libc v1.22.5 // indirect + modernc.org/libc v1.24.1 // indirect modernc.org/mathutil v1.5.0 // indirect - modernc.org/memory v1.5.0 // indirect + modernc.org/memory v1.6.0 // indirect modernc.org/opt v0.1.3 // indirect - modernc.org/sqlite v1.23.1 // indirect + modernc.org/sqlite v1.25.0 // indirect modernc.org/strutil v1.1.3 // indirect modernc.org/token v1.1.0 // indirect nhooyr.io/websocket v1.8.7 // indirect - pgregory.net/rapid v0.5.5 // indirect + pgregory.net/rapid v1.0.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/e2e/go.sum b/e2e/go.sum index 017a47d25cb..5c2c1209af5 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -189,16 +189,16 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.6.0 h1:V2zyaMVFN6hJSVENYx2XE9CMhzqwJPMjzSQpj0MyXAU= -cosmossdk.io/core v0.6.0/go.mod h1:YSFzBcKOf/U24e/sa6WFaYSrlZl5zgNvnWwjfFyPniw= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -209,6 +209,7 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= 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/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -230,18 +231,20 @@ github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StirlingMarketingGroup/go-namecase v1.0.0 h1:2CzaNtCzc4iNHirR+5ru9OzGg8rQp860gqLBFqRI02Y= github.com/StirlingMarketingGroup/go-namecase v1.0.0/go.mod h1:ZsoSKcafcAzuBx+sndbxHu/RjDcDTrEdT4UvhniHfio= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -257,14 +260,15 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/avast/retry-go/v4 v4.3.4 h1:pHLkL7jvCvP317I8Ge+Km2Yhntv3SdkJm7uekkqbKhM= -github.com/avast/retry-go/v4 v4.3.4/go.mod h1:rv+Nla6Vk3/ilU0H51VHddWHiwimzX66yZ0JT6T+UvE= +github.com/avast/retry-go/v4 v4.5.0 h1:QoRAZZ90cj5oni2Lsgl2GW8mNTnUCnmpx/iKpwVisHg= +github.com/avast/retry-go/v4 v4.5.0/go.mod h1:7hLEXp0oku2Nir2xBAsg0PTphp9z71bN5Aq1fboC3+I= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.213 h1:WahquyWs7cQdz0vpDVWyWETEemgSoORx0PbWL9oz2WA= -github.com/aws/aws-sdk-go v1.44.213/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= +github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -279,9 +283,13 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -321,8 +329,13 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= @@ -333,6 +346,7 @@ github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3Hf github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -343,8 +357,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -368,11 +382,10 @@ github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFg github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.5.0 h1:44w3girt9OM0yPPoqGDO7u8+XEk6uG49PhnEn+8+nHY= -github.com/creachadair/taskgroup v0.5.0/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= +github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -381,16 +394,18 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= +github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= github.com/decred/base58 v1.0.4/go.mod h1:jJswKPEdvpFpvf7dsDvFZyLT22xZ9lWqEByX38oGd9E= github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU= 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/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= 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/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= @@ -404,8 +419,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= 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/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= +github.com/docker/docker v24.0.5+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= @@ -438,18 +453,25 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -458,6 +480,7 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -466,29 +489,35 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.1.0 h1:7RFti/xnNkMJnrK7D1yQ/iCIB5OrrY/54/H930kIbHA= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -559,12 +588,14 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -582,7 +613,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20221203041831-ce31453925ec h1:fR20TYVVwhK4O7r7y+McjRYyaTH6/vjwJOajE+XhlzM= +github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b h1:Qcx5LM0fSiks9uCyFZwDBUasd3lxd1RM0GYpL+Li5o4= +github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -622,8 +654,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= @@ -656,8 +688,9 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -690,9 +723,10 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= -github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= +github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= +github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -708,6 +742,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -721,8 +756,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= @@ -733,21 +768,24 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-libp2p v0.26.2 h1:eHEoW/696FP7/6DxOvcrKfTD6Bi0DExxiMSZUJxswA0= -github.com/libp2p/go-libp2p v0.26.2/go.mod h1:x75BN32YbwuY0Awm2Uix4d4KOz+/4piInkp4Wr3yOo8= +github.com/libp2p/go-libp2p v0.27.8 h1:IX5x/4yKwyPQeVS2AXHZ3J4YATM9oHBGH1gBc23jBAI= +github.com/libp2p/go-libp2p v0.27.8/go.mod h1:eCFFtd0s5i/EVKR7+5Ki8bM7qwkNW3TPTTSSW9sz8NE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= +github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -768,6 +806,7 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -795,13 +834,16 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -810,10 +852,10 @@ github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aG github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.8.0 h1:aqjksEcqK+iD/Foe1RRFsGZh8+XFiGo7FgUCZlpv3LU= -github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= -github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI= -github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8= +github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= +github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= +github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= +github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.8.1 h1:ycepHwavHafh3grIbR1jIXnKCsFm0fqsfEOsJ8NtKE8= github.com/multiformats/go-multicodec v0.8.1/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= @@ -834,6 +876,7 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -842,16 +885,19 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -861,6 +907,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -869,16 +916,19 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= +github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -894,38 +944,37 @@ 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.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= -github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= 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= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= +github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -934,13 +983,15 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -950,12 +1001,14 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 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 +1036,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-20230622193330-220ce33823c0 h1:EmPhftNfcYilfyhv0X8a2wGdLAro19zooZoQqe9/6Ms= -github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230622193330-220ce33823c0/go.mod h1:CQxeTz7/TUfTbwJ3hJgHwxaZGfeJUuyIXvSQOz5gH38= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230817191535-cc35cd35adbc h1:MY4Hum/AHECAuwK0zNGxfrCCL0oHZuzhgKk12vAiPL0= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230817191535-cc35cd35adbc/go.mod h1:XyOxl/ka+ZxzhLiPfmo7U2ckfLvHiA9fnTtC8NWOlEk= 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= @@ -1003,8 +1056,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -1015,8 +1066,10 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip32 v1.0.0 h1:sDR9juArbUgX+bO/iblgZnMPeWY1KZMUC2AFUJdv5KE= @@ -1028,6 +1081,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1064,18 +1118,21 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -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/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= 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.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 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= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20170613210332-850760c427c5/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1092,8 +1149,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.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= 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= @@ -1105,8 +1162,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1196,8 +1253,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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= 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= @@ -1294,6 +1351,7 @@ golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1316,6 +1374,7 @@ golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1339,14 +1398,15 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= 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= @@ -1358,13 +1418,14 @@ 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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1384,6 +1445,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1425,8 +1487,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.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= 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= @@ -1678,6 +1740,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1707,6 +1770,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1726,28 +1790,32 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= -modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= -modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v1.24.1 h1:uvJSeCKL/AgzBo2yYIPPTy82v21KgGnizcGYfBHaNuM= +modernc.org/libc v1.24.1/go.mod h1:FmfO1RLrU3MHJfyi9eYYmZBfi/R+tqZ6+hQ3yQQUkak= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/memory v1.6.0 h1:i6mzavxrE9a30whzMfwf7XWVODx2r5OYXvU46cirX7o= +modernc.org/memory v1.6.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.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= -modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= +modernc.org/sqlite v1.25.0 h1:AFweiwPNd/b3BoKnBOfFm+Y260guGMF+0UFk0savqeA= +modernc.org/sqlite v1.25.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU= 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= +modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4= +pgregory.net/rapid v1.0.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go index 3e4cb2163aa..7812180443a 100644 --- a/e2e/relayer/relayer.go +++ b/e2e/relayer/relayer.go @@ -17,8 +17,8 @@ const ( hermesRelayerRepository = "ghcr.io/informalsystems/hermes" hermesRelayerUser = "1000:1000" - rlyRelayerRepository = "damiannolan/rly" //"ghcr.io/cosmos/relayer" - rlyRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" + rlyRelayerRepository = "ghcr.io/cosmos/relayer" + rlyRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" ) // Config holds configuration values for the relayer used in the tests. @@ -33,11 +33,12 @@ type Config struct { // New returns an implementation of ibc.Relayer depending on the provided RelayerType. func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { + t.Helper() switch cfg.Type { case Rly: - return newCosmosRelayer(t, cfg.Tag, logger, dockerClient, network) + return newCosmosRelayer(t, cfg.Tag, logger, dockerClient, network, cfg.Image) case Hermes: - return newHermesRelayer(t, cfg.Tag, logger, dockerClient, network) + return newHermesRelayer(t, cfg.Tag, logger, dockerClient, network, cfg.Image) default: panic(fmt.Sprintf("unknown relayer specified: %s", cfg.Type)) } @@ -45,8 +46,14 @@ func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclien // newCosmosRelayer returns an instance of the go relayer. // Options are used to allow for relayer version selection and specifying the default processing option. -func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { - customImageOption := relayer.CustomDockerImage(rlyRelayerRepository, tag, rlyRelayerUser) +func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network, relayerImage string) ibc.Relayer { + t.Helper() + + if relayerImage == "" { + relayerImage = rlyRelayerRepository + } + + customImageOption := relayer.CustomDockerImage(relayerImage, tag, rlyRelayerUser) relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) @@ -57,8 +64,14 @@ func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient } // newHermesRelayer returns an instance of the hermes relayer. -func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { - customImageOption := relayer.CustomDockerImage(hermesRelayerRepository, tag, hermesRelayerUser) +func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network, relayerImage string) ibc.Relayer { + t.Helper() + + if relayerImage == "" { + relayerImage = hermesRelayerRepository + } + + customImageOption := relayer.CustomDockerImage(relayerImage, tag, hermesRelayerUser) relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.Hermes, logger, customImageOption) return relayerFactory.Build( @@ -66,19 +79,19 @@ func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient ) } -// RelayerMap is a mapping from test names to a relayer set for that test. -type RelayerMap map[string]map[ibc.Wallet]bool +// Map is a mapping from test names to a relayer set for that test. +type Map map[string]map[ibc.Wallet]bool // AddRelayer adds the given relayer to the relayer set for the given test name. -func (r RelayerMap) AddRelayer(testName string, relayer ibc.Wallet) { +func (r Map) AddRelayer(testName string, ibcrelayer ibc.Wallet) { if _, ok := r[testName]; !ok { r[testName] = make(map[ibc.Wallet]bool) } - r[testName][relayer] = true + r[testName][ibcrelayer] = true } // containsRelayer returns true if the given relayer is in the relayer set for the given test name. -func (r RelayerMap) ContainsRelayer(testName string, wallet ibc.Wallet) bool { +func (r Map) ContainsRelayer(testName string, wallet ibc.Wallet) bool { if relayerSet, ok := r[testName]; ok { return relayerSet[wallet] } diff --git a/e2e/sample.config.yaml b/e2e/sample.config.yaml index 30da46744a0..8bf1e064fad 100644 --- a/e2e/sample.config.yaml +++ b/e2e/sample.config.yaml @@ -22,7 +22,7 @@ chains: relayer: type: rly # override with RELAYER_TYPE - image: damiannolan/rly + image: ghcr.io/cosmos/relayer # override with RELAYER_IMAGE tag: latest # override with RELAYER_TAG cometbft: diff --git a/e2e/tests/core/02-client/client_test.go b/e2e/tests/core/02-client/client_test.go index 1aebb18691a..c48f4311a11 100644 --- a/e2e/tests/core/02-client/client_test.go +++ b/e2e/tests/core/02-client/client_test.go @@ -3,11 +3,22 @@ package client import ( "context" "fmt" + "slices" "sort" "strings" "testing" "time" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + testifysuite "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "github.com/cometbft/cometbft/crypto/tmhash" tmjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/privval" @@ -15,16 +26,7 @@ import ( tmprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" tmtypes "github.com/cometbft/cometbft/types" tmversion "github.com/cometbft/cometbft/version" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/cosmos/ibc-go/e2e/dockerutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -40,7 +42,7 @@ const ( ) func TestClientTestSuite(t *testing.T) { - suite.Run(t, new(ClientTestSuite)) + testifysuite.Run(t, new(ClientTestSuite)) } type ClientTestSuite struct { @@ -79,7 +81,7 @@ func (s *ClientTestSuite) TestClientUpdateProposal_Succeeds() { subjectClientID string substituteClientID string // set the trusting period to a value which will still be valid upon client creation, but invalid before the first update - badTrustingPeriod = time.Duration(time.Second * 10) + badTrustingPeriod = time.Second * 10 ) t.Run("create substitute client with correct trusting period", func(t *testing.T) { @@ -268,7 +270,12 @@ func (s *ClientTestSuite) TestAllowedClientsParam() { t.Run("ensure allowed clients are set to the default", func(t *testing.T) { allowedClients := s.QueryAllowedClients(ctx, chainA) - s.Require().Equal(clienttypes.DefaultAllowedClients, allowedClients) + + defaultAllowedClients := clienttypes.DefaultAllowedClients + if !testvalues.LocalhostClientFeatureReleases.IsSupported(chainAVersion) { + defaultAllowedClients = slices.DeleteFunc(defaultAllowedClients, func(s string) bool { return s == ibcexported.Localhost }) + } + s.Require().Equal(defaultAllowedClients, allowedClients) }) allowedClient := ibcexported.Solomachine @@ -307,7 +314,7 @@ func (s *ClientTestSuite) TestAllowedClientsParam() { // extractChainPrivateKeys returns a slice of tmtypes.PrivValidator which hold the private keys for all validator // nodes for a given chain. func (s *ClientTestSuite) extractChainPrivateKeys(ctx context.Context, chain *cosmos.CosmosChain) []tmtypes.PrivValidator { - testContainers, err := dockerutil.GetTestContainers(s.T(), ctx, s.DockerClient) + testContainers, err := dockerutil.GetTestContainers(ctx, s.T(), s.DockerClient) s.Require().NoError(err) var filePvs []privval.FilePVKey diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index 991b44d6d1d..151e7b27e9d 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -8,11 +8,12 @@ import ( "testing" "time" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -22,7 +23,7 @@ import ( ) func TestConnectionTestSuite(t *testing.T) { - suite.Run(t, new(ConnectionTestSuite)) + testifysuite.Run(t, new(ConnectionTestSuite)) } type ConnectionTestSuite struct { @@ -47,10 +48,11 @@ func (s *ConnectionTestSuite) QueryMaxExpectedTimePerBlockParam(ctx context.Cont // removing additional strings that are used for amino delay := strings.ReplaceAll(res.Param.Value, "\"", "") - time, err := strconv.ParseUint(delay, 10, 64) + // convert to uint64 + uinttime, err := strconv.ParseUint(delay, 10, 64) s.Require().NoError(err) - return time + return uinttime } // TestMaxExpectedTimePerBlockParam tests changing the MaxExpectedTimePerBlock param using a governance proposal @@ -128,7 +130,7 @@ func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { s.Require().NoError(err) expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) + s.Require().Equal(expected, actualBalance.Int64()) }) t.Run("stop relayer", func(t *testing.T) { diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index c31e1b63880..74b503c586a 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -1,19 +1,21 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" "time" + "github.com/cosmos/gogoproto/proto" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/gogoproto/proto" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -24,7 +26,7 @@ import ( ) func TestInterchainAccountsTestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsTestSuite)) } type InterchainAccountsTestSuite struct { @@ -82,7 +84,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { // fund the host account so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -128,7 +130,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) }) } @@ -177,7 +179,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF t.Run("verify empty host wallet", func(t *testing.T) { hostAccountBalance, err := chainB.GetBalance(ctx, hostAccount, chainB.Config().Denom) s.Require().NoError(err) - s.Require().Zero(hostAccountBalance) + s.Require().Zero(hostAccountBalance.Int64()) }) t.Run("broadcast MsgSendTx", func(t *testing.T) { @@ -217,7 +219,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF s.Require().NoError(err) expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) }) } @@ -279,7 +281,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop // fund the host account account so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -339,7 +341,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop s.Require().NoError(err) expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) // re-register interchain account to reopen the channel now that it has been closed due to timeout @@ -399,6 +401,6 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) } diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 2daa2be095d..353286e3ca1 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -1,19 +1,21 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" "time" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -23,7 +25,7 @@ import ( ) func TestInterchainAccountsGovTestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsGovTestSuite)) + testifysuite.Run(t, new(InterchainAccountsGovTestSuite)) } type InterchainAccountsGovTestSuite struct { @@ -76,7 +78,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() // fund the host account, so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAccAddr, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -111,7 +113,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) }) } diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index de24999cddb..b2b15788bd1 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -1,18 +1,21 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" "time" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - grouptypes "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/gogoproto/proto" interchaintest "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + grouptypes "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -53,7 +56,7 @@ const ( ) func TestInterchainAccountsGroupsTestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsGroupsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsGroupsTestSuite)) } type InterchainAccountsGroupsTestSuite struct { @@ -147,7 +150,7 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat t.Run("fund interchain account wallet", func(t *testing.T) { err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAccAddr, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -198,12 +201,12 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) balance, err = chainB.GetBalance(ctx, interchainAccAddr, chainB.Config().Denom) s.Require().NoError(err) expected = testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) } diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 2d3dc532e0a..ea9ab20ee37 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -1,17 +1,20 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" "time" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/gogoproto/proto" interchaintest "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -22,7 +25,7 @@ import ( ) func TestIncentivizedInterchainAccountsTestSuite(t *testing.T) { - suite.Run(t, new(IncentivizedInterchainAccountsTestSuite)) + testifysuite.Run(t, new(IncentivizedInterchainAccountsTestSuite)) } type IncentivizedInterchainAccountsTestSuite struct { @@ -98,7 +101,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe // fund the interchain account so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAcc, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -186,7 +189,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) t.Run("timeout fee is refunded", func(t *testing.T) { @@ -355,7 +358,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I s.Require().NoError(err) expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance, "tokens should not have been sent as interchain account was not funded") + s.Require().Equal(expected, balance.Int64(), "tokens should not have been sent as interchain account was not funded") }) t.Run("timeout fee is refunded", func(t *testing.T) { diff --git a/e2e/tests/interchain_accounts/intertx_incentivized_test.go b/e2e/tests/interchain_accounts/intertx_incentivized_test.go index 08cd59ca9d8..55e47f7c0ba 100644 --- a/e2e/tests/interchain_accounts/intertx_incentivized_test.go +++ b/e2e/tests/interchain_accounts/intertx_incentivized_test.go @@ -1,16 +1,19 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/ibc-go/e2e/testvalues" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" @@ -18,7 +21,7 @@ import ( ) func TestIncentivizedInterTxTestSuite(t *testing.T) { - suite.Run(t, new(IncentivizedInterTxTestSuite)) + testifysuite.Run(t, new(IncentivizedInterTxTestSuite)) } type IncentivizedInterTxTestSuite struct { @@ -91,7 +94,7 @@ func (s *IncentivizedInterTxTestSuite) TestMsgSubmitTx_SuccessfulBankSend_Incent // fund the interchain account so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAcc, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) diff --git a/e2e/tests/interchain_accounts/intertx_test.go b/e2e/tests/interchain_accounts/intertx_test.go index 13c03083e59..e9c7b8cb343 100644 --- a/e2e/tests/interchain_accounts/intertx_test.go +++ b/e2e/tests/interchain_accounts/intertx_test.go @@ -1,29 +1,30 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" + intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + "github.com/cosmos/ibc-go/e2e/semverutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" - - "github.com/cosmos/ibc-go/e2e/semverutil" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) func TestInterTxTestSuite(t *testing.T) { - suite.Run(t, new(InterTxTestSuite)) + testifysuite.Run(t, new(InterTxTestSuite)) } type InterTxTestSuite struct { @@ -89,7 +90,7 @@ func (s *InterTxTestSuite) TestMsgSubmitTx_SuccessfulTransfer() { // fund the host account account so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index 7a0b1181893..efffe6b0976 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -1,13 +1,23 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" "time" + "github.com/cosmos/gogoproto/proto" + "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/gogoproto/proto" + + "github.com/cosmos/ibc-go/e2e/testsuite" + "github.com/cosmos/ibc-go/e2e/testvalues" controllertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -15,17 +25,10 @@ import ( "github.com/cosmos/ibc-go/v7/modules/core/exported" localhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost" ibctesting "github.com/cosmos/ibc-go/v7/testing" - "github.com/stretchr/testify/suite" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testvalues" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" ) func TestInterchainAccountsLocalhostTestSuite(t *testing.T) { - suite.Run(t, new(LocalhostInterchainAccountsTestSuite)) + testifysuite.Run(t, new(LocalhostInterchainAccountsTestSuite)) } type LocalhostInterchainAccountsTestSuite struct { @@ -121,7 +124,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( walletAmount := ibc.WalletAmount{ Address: interchainAccAddress, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainADenom, } @@ -182,7 +185,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost( s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) } @@ -276,7 +279,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan walletAmount := ibc.WalletAmount{ Address: interchainAccAddress, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainADenom, } @@ -407,7 +410,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan s.Require().NoError(err) expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) t.Run("send packet localhost interchain accounts", func(t *testing.T) { @@ -466,6 +469,6 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan s.Require().NoError(err) expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance) + s.Require().Equal(expected, balance.Int64()) }) } diff --git a/e2e/tests/interchain_accounts/params_test.go b/e2e/tests/interchain_accounts/params_test.go index efc9283a6c2..41c621bc1ab 100644 --- a/e2e/tests/interchain_accounts/params_test.go +++ b/e2e/tests/interchain_accounts/params_test.go @@ -1,13 +1,14 @@ -package interchain_accounts +package interchainaccounts import ( "context" "testing" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + testifysuite "github.com/stretchr/testify/suite" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -18,7 +19,7 @@ import ( ) func TestInterchainAccountsParamsTestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsParamsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsParamsTestSuite)) } type InterchainAccountsParamsTestSuite struct { @@ -70,8 +71,8 @@ func (s *InterchainAccountsParamsTestSuite) TestControllerEnabledParam() { s.Require().NotNil(authority) msg := controllertypes.MsgUpdateParams{ - Authority: authority.String(), - Params: controllertypes.NewParams(false), + Signer: authority.String(), + Params: controllertypes.NewParams(false), } s.ExecuteGovProposalV1(ctx, &msg, chainA, controllerAccount, 1) } else { @@ -127,8 +128,8 @@ func (s *InterchainAccountsParamsTestSuite) TestHostEnabledParam() { s.Require().NotNil(authority) msg := hosttypes.MsgUpdateParams{ - Authority: authority.String(), - Params: hosttypes.NewParams(false, []string{hosttypes.AllowAllHostMsgs}), + Signer: authority.String(), + Params: hosttypes.NewParams(false, []string{hosttypes.AllowAllHostMsgs}), } s.ExecuteGovProposalV1(ctx, &msg, chainB, chainBUser, 1) } else { diff --git a/e2e/tests/transfer/authz_test.go b/e2e/tests/transfer/authz_test.go index bfd3d9a6fd2..2da8942fae6 100644 --- a/e2e/tests/transfer/authz_test.go +++ b/e2e/tests/transfer/authz_test.go @@ -4,14 +4,16 @@ import ( "context" "testing" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + testifysuite "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -20,7 +22,7 @@ import ( ) func TestAuthzTransferTestSuite(t *testing.T) { - suite.Run(t, new(AuthzTransferTestSuite)) + testifysuite.Run(t, new(AuthzTransferTestSuite)) } type AuthzTransferTestSuite struct { @@ -51,6 +53,7 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() { // createMsgGrantFn initializes a TransferAuthorization and broadcasts a MsgGrant message. createMsgGrantFn := func(t *testing.T) { + t.Helper() transferAuth := transfertypes.TransferAuthorization{ Allocations: []transfertypes.Allocation{ { @@ -82,7 +85,9 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() { // verifyGrantFn returns a test function which asserts chainA has a grant authorization // with the given spend limit. verifyGrantFn := func(expectedLimit int64) func(t *testing.T) { + t.Helper() return func(t *testing.T) { + t.Helper() grantAuths, err := suite.QueryGranterGrants(ctx, chainA, granterAddress) suite.Require().NoError(err) @@ -133,7 +138,7 @@ func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() { chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) actualBalance, err := chainB.GetBalance(ctx, receiverWalletAddress, chainBIBCToken.IBCDenom()) suite.Require().NoError(err) - suite.Require().Equal(testvalues.IBCTransferAmount, actualBalance) + suite.Require().Equal(testvalues.IBCTransferAmount, actualBalance.Int64()) }) t.Run("granter grant spend limit reduced", verifyGrantFn(testvalues.StartingTokenAmount-testvalues.IBCTransferAmount)) @@ -269,7 +274,7 @@ func (suite *AuthzTransferTestSuite) TestAuthz_InvalidTransferAuthorizations() { chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) actualBalance, err := chainB.GetBalance(ctx, receiverWalletAddress, chainBIBCToken.IBCDenom()) suite.Require().NoError(err) - suite.Require().Equal(int64(0), actualBalance) + suite.Require().Equal(int64(0), actualBalance.Int64()) }) t.Run("granter grant spend limit unchanged", func(t *testing.T) { diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index a94867084ea..f95aa3ca260 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -5,23 +5,24 @@ import ( "testing" "time" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + testifysuite "github.com/stretchr/testify/suite" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) func TestTransferTestSuite(t *testing.T) { - suite.Run(t, new(TransferTestSuite)) + testifysuite.Run(t, new(TransferTestSuite)) } type TransferTestSuite struct { @@ -93,7 +94,7 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { s.Require().NoError(err) expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) + s.Require().Equal(expected, actualBalance.Int64()) }) t.Run("non-native IBC token transfer from chainB to chainA, receiver is source of tokens", func(t *testing.T) { @@ -105,7 +106,7 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { actualBalance, err := chainB.GetBalance(ctx, chainBAddress, chainBIBCToken.IBCDenom()) s.Require().NoError(err) - s.Require().Equal(int64(0), actualBalance) + s.Require().Equal(sdkmath.ZeroInt(), actualBalance) if testvalues.TotalEscrowFeatureReleases.IsSupported(chainBVersion) { actualTotalEscrow, err := s.QueryTotalEscrowForDenom(ctx, chainB, chainBIBCToken.IBCDenom()) @@ -193,7 +194,7 @@ func (s *TransferTestSuite) TestMsgTransfer_Timeout_Nonincentivized() { chainBWalletAmount := ibc.WalletAmount{ Address: chainBWallet.FormattedAddress(), // destination address Denom: chainA.Config().Denom, - Amount: testvalues.IBCTransferAmount, + Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), } t.Run("IBC transfer packet timesout", func(t *testing.T) { @@ -346,7 +347,7 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() { s.Require().NoError(err) expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) + s.Require().Equal(expected, actualBalance.Int64()) }) t.Run("stop relayer", func(t *testing.T) { @@ -465,7 +466,7 @@ func (s *TransferTestSuite) TestMsgTransfer_WithMemo() { s.Require().NoError(err) if testvalues.MemoFeatureReleases.IsSupported(chainBVersion) { - s.Require().Equal(testvalues.IBCTransferAmount, actualBalance) + s.Require().Equal(testvalues.IBCTransferAmount, actualBalance.Int64()) } else { s.Require().Equal(int64(0), actualBalance) } diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 108bca5d3e7..ad9fd571a5f 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -5,10 +5,13 @@ import ( "testing" "time" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/e2e/testvalues" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" @@ -21,7 +24,7 @@ type IncentivizedTransferTestSuite struct { } func TestIncentivizedTransferTestSuite(t *testing.T) { - suite.Run(t, new(IncentivizedTransferTestSuite)) + testifysuite.Run(t, new(IncentivizedTransferTestSuite)) } func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Succeeds() { @@ -68,7 +71,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su walletAmount := ibc.WalletAmount{ Address: chainAWallet.FormattedAddress(), // destination address Denom: chainADenom, - Amount: testvalues.IBCTransferAmount, + Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), } t.Run("send IBC transfer", func(t *testing.T) { @@ -81,7 +84,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - walletAmount.Amount + expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() s.Require().Equal(expected, actualBalance) }) @@ -92,11 +95,11 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su s.Require().Empty(packets) }) - packetId := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) + packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) t.Run("should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) s.AssertTxSuccess(payPacketFeeTxResp) }) @@ -116,7 +119,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - walletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64() + expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() - testFee.Total().AmountOf(chainADenom).Int64() s.Require().Equal(expected, actualBalance) }) }) @@ -136,7 +139,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su s.Require().NoError(err) // once the relayer has relayed the packets, the timeout fee should be refunded. - expected := testvalues.StartingTokenAmount - walletAmount.Amount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() + expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() s.Require().Equal(expected, actualBalance) }) } @@ -205,11 +208,11 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_InvalidReceiverAccou s.Require().Empty(packets) }) - packetId := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, 1) + packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, 1) packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) t.Run("should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) s.AssertTxSuccess(payPacketFeeTxResp) }) @@ -402,7 +405,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_SingleSender_TimesOu chainBWalletAmount := ibc.WalletAmount{ Address: chainBWallet.FormattedAddress(), // destination address Denom: chainA.Config().Denom, - Amount: testvalues.IBCTransferAmount, + Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), } t.Run("Send IBC transfer", func(t *testing.T) { @@ -416,12 +419,12 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_SingleSender_TimesOu actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() s.Require().Equal(expected, actualBalance) }) t.Run("pay packet fee", func(t *testing.T) { - packetId := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) + packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) t.Run("no incentivized packets", func(t *testing.T) { @@ -431,7 +434,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_SingleSender_TimesOu }) t.Run("should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) s.AssertTxSuccess(payPacketFeeTxResp) }) @@ -451,7 +454,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_SingleSender_TimesOu actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64() + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - testFee.Total().AmountOf(chainADenom).Int64() s.Require().Equal(expected, actualBalance) }) }) @@ -499,7 +502,7 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou chainBWalletAmount := ibc.WalletAmount{ Address: chainAWallet.FormattedAddress(), // destination address Denom: chainADenom, - Amount: testvalues.IBCTransferAmount, + Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), } t.Run("send IBC transfer", func(t *testing.T) { @@ -513,7 +516,7 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() s.Require().Equal(expected, actualBalance) }) @@ -524,11 +527,11 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou s.Require().Empty(packets) }) - packetId := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) + packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) t.Run("should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) s.AssertTxSuccess(payPacketFeeTxResp) }) @@ -549,7 +552,7 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount - testFee.Total().AmountOf(chainADenom).Int64() + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - testFee.Total().AmountOf(chainADenom).Int64() s.Require().Equal(expected, actualBalance) }) @@ -569,7 +572,7 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou s.Require().NoError(err) // once the relayer has relayed the packets, the timeout and recv fee should be refunded. - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount - testFee.AckFee.AmountOf(chainADenom).Int64() + expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - testFee.AckFee.AmountOf(chainADenom).Int64() s.Require().Equal(expected, actualBalance) }) }) @@ -617,7 +620,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders walletAmount1 := ibc.WalletAmount{ Address: chainAWallet1.FormattedAddress(), // destination address Denom: chainADenom, - Amount: testvalues.IBCTransferAmount, + Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), } t.Run("send IBC transfer", func(t *testing.T) { @@ -630,7 +633,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet1) s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - walletAmount1.Amount + expected := testvalues.StartingTokenAmount - walletAmount1.Amount.Int64() s.Require().Equal(expected, actualBalance) }) @@ -641,16 +644,16 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders s.Require().Empty(packets) }) - packetId := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) + packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, chainATx.Packet.Sequence) packetFee1 := feetypes.NewPacketFee(testFee, chainAWallet1.FormattedAddress(), nil) packetFee2 := feetypes.NewPacketFee(testFee, chainAWallet2.FormattedAddress(), nil) t.Run("paying packetFee1 should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet1, packetId, packetFee1) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet1, packetID, packetFee1) s.AssertTxSuccess(payPacketFeeTxResp) }) t.Run("paying packetFee2 should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet2, packetId, packetFee2) + payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet2, packetID, packetFee2) s.AssertTxSuccess(payPacketFeeTxResp) }) @@ -675,7 +678,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders actualBalance1, err := s.GetChainANativeBalance(ctx, chainAWallet1) s.Require().NoError(err) - expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount - testFee.Total().AmountOf(chainADenom).Int64() + expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount.Int64() - testFee.Total().AmountOf(chainADenom).Int64() s.Require().Equal(expected1, actualBalance1) }) @@ -703,7 +706,7 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders s.Require().NoError(err) // once the relayer has relayed the packets, the timeout fee should be refunded. - expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() + expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount.Int64() - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() s.Require().Equal(expected1, actualBalance1) actualBalance2, err := s.GetChainANativeBalance(ctx, chainAWallet2) diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go index efca34f1fd4..9772d5614b5 100644 --- a/e2e/tests/transfer/localhost_test.go +++ b/e2e/tests/transfer/localhost_test.go @@ -4,22 +4,21 @@ import ( "context" "testing" - "github.com/stretchr/testify/suite" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + testifysuite "github.com/stretchr/testify/suite" + "github.com/cosmos/ibc-go/e2e/testsuite" + "github.com/cosmos/ibc-go/e2e/testvalues" 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" "github.com/cosmos/ibc-go/v7/modules/core/exported" localhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost" ibctesting "github.com/cosmos/ibc-go/v7/testing" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testvalues" ) func TestTransferLocalhostTestSuite(t *testing.T) { - suite.Run(t, new(LocalhostTransferTestSuite)) + testifysuite.Run(t, new(LocalhostTransferTestSuite)) } type LocalhostTransferTestSuite struct { @@ -158,6 +157,6 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() { s.Require().NoError(err) expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) + s.Require().Equal(expected, actualBalance.Int64()) }) } diff --git a/e2e/tests/upgrades/genesis_test.go b/e2e/tests/upgrades/genesis_test.go new file mode 100644 index 00000000000..49aa4887bb3 --- /dev/null +++ b/e2e/tests/upgrades/genesis_test.go @@ -0,0 +1,165 @@ +package upgrades + +import ( + "context" + "strings" + "testing" + "time" + + cosmos "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/stretchr/testify/suite" + "go.uber.org/zap" + + "github.com/cosmos/ibc-go/e2e/testsuite" + "github.com/cosmos/ibc-go/e2e/testvalues" +) + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +type GenesisTestSuite struct { + testsuite.E2ETestSuite +} + +func (s *GenesisTestSuite) TestIBCGenesis() { + t := s.T() + + configFileOverrides := make(map[string]any) + appTomlOverrides := make(test.Toml) + + appTomlOverrides["halt-height"] = haltHeight + configFileOverrides["config/app.toml"] = appTomlOverrides + chainOpts := func(options *testsuite.ChainOptions) { + options.ChainAConfig.ConfigFileOverrides = configFileOverrides + } + + // create chains with specified chain configuration options + chainA, chainB := s.GetChains(chainOpts) + + ctx := context.Background() + relayer, channelA := s.SetupChainsRelayerAndChannel(ctx) + var ( + chainADenom = chainA.Config().Denom + chainBIBCToken = testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) // IBC token sent to chainB + + ) + + chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) + chainAAddress := chainAWallet.FormattedAddress() + + chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) + chainBAddress := chainBWallet.FormattedAddress() + + s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") + + t.Run("native IBC token transfer from chainA to chainB, sender is source of tokens", func(t *testing.T) { + transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferAmount(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "") + s.AssertTxSuccess(transferTxResp) + }) + + t.Run("tokens are escrowed", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount + s.Require().Equal(expected, actualBalance) + }) + + t.Run("start relayer", func(t *testing.T) { + s.StartRelayer(relayer) + }) + + t.Run("packets are relayed", func(t *testing.T) { + s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) + + actualBalance, err := chainB.GetBalance(ctx, chainBAddress, chainBIBCToken.IBCDenom()) + s.Require().NoError(err) + + expected := testvalues.IBCTransferAmount + s.Require().Equal(expected, actualBalance.Int64()) + }) + + s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") + + t.Run("Halt chain and export genesis", func(t *testing.T) { + s.HaltChainAndExportGenesis(ctx, chainA, relayer, int64(haltHeight)) + }) + + t.Run("native IBC token transfer from chainA to chainB, sender is source of tokens", func(t *testing.T) { + transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferAmount(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "") + s.AssertTxSuccess(transferTxResp) + }) + + t.Run("tokens are escrowed", func(t *testing.T) { + actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) + s.Require().NoError(err) + + expected := testvalues.StartingTokenAmount - 2*testvalues.IBCTransferAmount + s.Require().Equal(expected, actualBalance) + }) + + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") +} + +func (s *GenesisTestSuite) HaltChainAndExportGenesis(ctx context.Context, chain *cosmos.CosmosChain, relayer ibc.Relayer, haltHeight int64) { + timeoutCtx, timeoutCtxCancel := context.WithTimeout(ctx, time.Minute*2) + defer timeoutCtxCancel() + + err := test.WaitForBlocks(timeoutCtx, int(haltHeight), chain) + s.Require().Error(err, "chain did not halt at halt height") + + err = chain.StopAllNodes(ctx) + s.Require().NoError(err, "error stopping node(s)") + + state, err := chain.ExportState(ctx, int64(haltHeight)) + s.Require().NoError(err) + + // state exports currently read from stdout which include log entries, this discards the log entry by the server module + // this may need to be updated if log entries are inserted in between exporting of state and the server module logging + // see issue: https://github.com/strangelove-ventures/interchaintest/issues/721 + str := strings.SplitAfter(state, "server") + state = str[1] + + appTomlOverrides := make(test.Toml) + + appTomlOverrides["halt-height"] = 0 + + for _, node := range chain.Nodes() { + err := node.OverwriteGenesisFile(ctx, []byte(state)) + s.Require().NoError(err) + } + + for _, node := range chain.Nodes() { + err := test.ModifyTomlConfigFile( + ctx, + zap.NewExample(), + node.DockerClient, + node.TestName, + node.VolumeName, + "config/app.toml", + appTomlOverrides, + ) + s.Require().NoError(err) + } + + err = chain.StartAllNodes(ctx) + s.Require().NoError(err) + + // we are reinitializing the clients because we need to update the hostGRPCAddress after + // the upgrade and subsequent restarting of nodes + s.InitGRPCClients(chain) + + timeoutCtx, timeoutCtxCancel = context.WithTimeout(ctx, time.Minute*2) + defer timeoutCtxCancel() + + err = test.WaitForBlocks(timeoutCtx, int(blocksAfterUpgrade), chain) + s.Require().NoError(err, "chain did not produce blocks after halt") + + height, err := chain.Height(ctx) + s.Require().NoError(err, "error fetching height after halt") + + s.Require().Greater(int64(height), haltHeight, "height did not increment after halt") +} diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 4f83f0933b9..dde4af68987 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -6,19 +6,20 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/cosmos/gogoproto/proto" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" interchaintest "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/e2e/semverutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" controllertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" @@ -42,7 +43,7 @@ func TestUpgradeTestSuite(t *testing.T) { t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv) } - suite.Run(t, new(UpgradeTestSuite)) + testifysuite.Run(t, new(UpgradeTestSuite)) } type UpgradeTestSuite struct { @@ -211,7 +212,7 @@ func (s *UpgradeTestSuite) TestChainUpgrade() { t.Run("send funds to test wallet", func(t *testing.T) { err := chain.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: userWalletAddr, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chain.Config().Denom, }) s.Require().NoError(err) @@ -235,7 +236,7 @@ func (s *UpgradeTestSuite) TestChainUpgrade() { t.Run("send funds to test wallet", func(t *testing.T) { err := chain.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: userWalletAddr, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chain.Config().Denom, }) s.Require().NoError(err) @@ -297,7 +298,7 @@ func (s *UpgradeTestSuite) TestV5ToV6ChainUpgrade() { // fund the host account, so it has some $$ to send err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, - Amount: testvalues.StartingTokenAmount, + Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), Denom: chainB.Config().Denom, }) s.Require().NoError(err) @@ -678,18 +679,6 @@ func (s *UpgradeTestSuite) RegisterInterchainAccount(ctx context.Context, chain s.AssertTxSuccess(txResp) } -// getICAVersion returns the version which should be used in the MsgRegisterAccount broadcast from the -// controller chain. -func getICAVersion(chainAVersion, chainBVersion string) string { - chainBIsGreaterThanOrEqualToChainA := semverutil.GTE(chainBVersion, chainAVersion) - if chainBIsGreaterThanOrEqualToChainA { - // allow version to be specified by the controller chain - return "" - } - // explicitly set the version string because the host chain might not yet support incentivized channels. - return icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) -} - // ClientState queries the current ClientState by clientID func (s *UpgradeTestSuite) ClientState(ctx context.Context, chain ibc.Chain, clientID string) (*clienttypes.QueryClientStateResponse, error) { queryClient := s.GetChainGRCPClients(chain).ClientQueryClient diff --git a/e2e/testsuite/codec.go b/e2e/testsuite/codec.go index 42a91712dd9..255d11e0e6b 100644 --- a/e2e/testsuite/codec.go +++ b/e2e/testsuite/codec.go @@ -4,6 +4,8 @@ import ( "encoding/hex" "fmt" + intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + "github.com/cosmos/cosmos-sdk/codec" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,7 +18,6 @@ import ( grouptypes "github.com/cosmos/cosmos-sdk/x/group" proposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go index 1f83d76265c..7e1b406ec29 100644 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ b/e2e/testsuite/diagnostics/diagnostics.go @@ -50,7 +50,7 @@ func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, chain return } - testContainers, err := dockerutil.GetTestContainers(t, ctx, dc) + testContainers, err := dockerutil.GetTestContainers(ctx, t, dc) if err != nil { t.Logf("failed listing containers test cleanup: %s", err) return diff --git a/e2e/testsuite/events.go b/e2e/testsuite/events.go index c02c21c993d..cd0fd104706 100644 --- a/e2e/testsuite/events.go +++ b/e2e/testsuite/events.go @@ -1,8 +1,9 @@ package testsuite import ( - abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" + + abci "github.com/cometbft/cometbft/abci/types" ) // ABCIToSDKEvents converts a list of ABCI events to Cosmos SDK events. diff --git a/e2e/testsuite/grpc_query.go b/e2e/testsuite/grpc_query.go index b968bbb6197..760cc13261a 100644 --- a/e2e/testsuite/grpc_query.go +++ b/e2e/testsuite/grpc_query.go @@ -6,6 +6,12 @@ import ( "sort" "time" + intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -14,11 +20,6 @@ import ( govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" grouptypes "github.com/cosmos/cosmos-sdk/x/group" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" controllertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" hosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" @@ -216,13 +217,13 @@ func (s *E2ETestSuite) QueryInterchainAccountLegacy(ctx context.Context, chain i func (s *E2ETestSuite) QueryIncentivizedPacketsForChannel( ctx context.Context, chain *cosmos.CosmosChain, - portId, - channelId string, + portID, + channelID string, ) ([]*feetypes.IdentifiedPacketFees, error) { queryClient := s.GetChainGRCPClients(chain).FeeQueryClient res, err := queryClient.IncentivizedPacketsForChannel(ctx, &feetypes.QueryIncentivizedPacketsForChannelRequest{ - PortId: portId, - ChannelId: channelId, + PortId: portID, + ChannelId: channelID, }) if err != nil { return nil, err @@ -278,13 +279,13 @@ func (s *E2ETestSuite) GetBlockHeaderByHeight(ctx context.Context, chain ibc.Cha return nil, err } - // Clean up when v6 is not supported, see: https://github.com/cosmos/ibc-go/issues/3540 - // versions newer than 0.47 SDK use the SdkBlock field while versions older - // than 0.47 SDK, which do not have the SdkBlock field, use the Block field. + // Clean up when v4 is not supported, see: https://github.com/cosmos/ibc-go/issues/3540 + // versions newer than 0.46 SDK use the SdkBlock field while versions older + // than 0.46 SDK, which do not have the SdkBlock field, use the Block field. if res.SdkBlock != nil { return &res.SdkBlock.Header, nil } - return &res.Block.Header, nil + return &res.Block.Header, nil // needed for v4 (uses SDK v0.45) } // GetValidatorSetByHeight returns the validators of the given chain at the specified height. The returned validators diff --git a/e2e/testsuite/testconfig.go b/e2e/testsuite/testconfig.go index 861ad797a2f..56f9332ad33 100644 --- a/e2e/testsuite/testconfig.go +++ b/e2e/testsuite/testconfig.go @@ -7,8 +7,10 @@ import ( "path" "strings" - tmjson "github.com/cometbft/cometbft/libs/json" - tmtypes "github.com/cometbft/cometbft/types" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + interchaintestutil "github.com/strangelove-ventures/interchaintest/v7/testutil" + "gopkg.in/yaml.v2" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -16,9 +18,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - interchaintestutil "github.com/strangelove-ventures/interchaintest/v7/testutil" - "gopkg.in/yaml.v2" + + tmjson "github.com/cometbft/cometbft/libs/json" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/ibc-go/e2e/relayer" "github.com/cosmos/ibc-go/e2e/testvalues" @@ -35,6 +37,9 @@ const ( ChainBTagEnv = "CHAIN_B_TAG" // RelayerTagEnv specifies the relayer version. Defaults to "main" RelayerTagEnv = "RELAYER_TAG" + // RelayerImageEnv specifies the image that the relayer will use. If left unspecified, it will default + // to values set for hermesRelayerRepository or rlyRelayerRepository. + RelayerImageEnv = "RELAYER_IMAGE" // RelayerTypeEnv specifies the type of relayer that should be used. RelayerTypeEnv = "RELAYER_TYPE" // ChainBinaryEnv binary is the binary that will be used for both chains. @@ -204,6 +209,10 @@ func applyEnvironmentVariableOverrides(fromFile TestConfig) TestConfig { fromFile.RelayerConfig.Type = envTc.RelayerConfig.Type } + if os.Getenv(RelayerImageEnv) != "" { + fromFile.RelayerConfig.Image = envTc.RelayerConfig.Image + } + if os.Getenv(ChainUpgradePlanEnv) != "" { fromFile.UpgradeConfig.PlanName = envTc.UpgradeConfig.PlanName } diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 9bddf7908ed..b158d002977 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -11,7 +11,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" test "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "go.uber.org/zap" "go.uber.org/zap/zaptest" @@ -32,11 +32,11 @@ const ( // E2ETestSuite has methods and functionality which can be shared among all test suites. type E2ETestSuite struct { - suite.Suite + testifysuite.Suite grpcClients map[string]GRPCClients paths map[string]pathPair - relayers relayer.RelayerMap + relayers relayer.Map logger *zap.Logger DockerClient *dockerclient.Client network string @@ -73,7 +73,7 @@ func (s *E2ETestSuite) GetRelayerUsers(ctx context.Context, chainOpts ...ChainOp chainBRelayerUser := cosmos.NewWallet(ChainBRelayerName, chainBAccountBytes, "", chainB.Config()) if s.relayers == nil { - s.relayers = make(relayer.RelayerMap) + s.relayers = make(relayer.Map) } s.relayers.AddRelayer(s.T().Name(), chainARelayerUser) s.relayers.AddRelayer(s.T().Name(), chainBRelayerUser) @@ -176,29 +176,29 @@ func (s *E2ETestSuite) GetPathName(idx int64) string { } // generatePath generates the path name using the test suites name -func (s *E2ETestSuite) generatePath(ctx context.Context, relayer ibc.Relayer) string { +func (s *E2ETestSuite) generatePath(ctx context.Context, ibcrelayer ibc.Relayer) string { chainA, chainB := s.GetChains() chainAID := chainA.Config().ChainID chainBID := chainB.Config().ChainID pathName := s.generatePathName() - err := relayer.GeneratePath(ctx, s.GetRelayerExecReporter(), chainAID, chainBID, pathName) + err := ibcrelayer.GeneratePath(ctx, s.GetRelayerExecReporter(), chainAID, chainBID, pathName) s.Require().NoError(err) return pathName } // SetupClients creates clients on chainA and chainB using the provided create client options -func (s *E2ETestSuite) SetupClients(ctx context.Context, relayer ibc.Relayer, opts ibc.CreateClientOptions) { - pathName := s.generatePath(ctx, relayer) - err := relayer.CreateClients(ctx, s.GetRelayerExecReporter(), pathName, opts) +func (s *E2ETestSuite) SetupClients(ctx context.Context, ibcrelayer ibc.Relayer, opts ibc.CreateClientOptions) { + pathName := s.generatePath(ctx, ibcrelayer) + err := ibcrelayer.CreateClients(ctx, s.GetRelayerExecReporter(), pathName, opts) s.Require().NoError(err) } // UpdateClients updates clients on chainA and chainB -func (s *E2ETestSuite) UpdateClients(ctx context.Context, relayer ibc.Relayer, pathName string) { - err := relayer.UpdateClients(ctx, s.GetRelayerExecReporter(), pathName) +func (s *E2ETestSuite) UpdateClients(ctx context.Context, ibcrelayer ibc.Relayer, pathName string) { + err := ibcrelayer.UpdateClients(ctx, s.GetRelayerExecReporter(), pathName) s.Require().NoError(err) } @@ -226,25 +226,25 @@ func (s *E2ETestSuite) GetChains(chainOpts ...ChainOptionConfiguration) (*cosmos return path.chainA, path.chainB } -// GetRelayerWallets returns the relayer wallets associated with the chains. -func (s *E2ETestSuite) GetRelayerWallets(relayer ibc.Relayer) (ibc.Wallet, ibc.Wallet, error) { +// GetRelayerWallets returns the ibcrelayer wallets associated with the chains. +func (s *E2ETestSuite) GetRelayerWallets(ibcrelayer ibc.Relayer) (ibc.Wallet, ibc.Wallet, error) { chainA, chainB := s.GetChains() - chainARelayerWallet, ok := relayer.GetWallet(chainA.Config().ChainID) + chainARelayerWallet, ok := ibcrelayer.GetWallet(chainA.Config().ChainID) if !ok { return nil, nil, fmt.Errorf("unable to find chain A relayer wallet") } - chainBRelayerWallet, ok := relayer.GetWallet(chainB.Config().ChainID) + chainBRelayerWallet, ok := ibcrelayer.GetWallet(chainB.Config().ChainID) if !ok { return nil, nil, fmt.Errorf("unable to find chain B relayer wallet") } return chainARelayerWallet, chainBRelayerWallet, nil } -// RecoverRelayerWallets adds the corresponding relayer address to the keychain of the chain. +// RecoverRelayerWallets adds the corresponding ibcrelayer address to the keychain of the chain. // This is useful if commands executed on the chains expect the relayer information to present in the keychain. -func (s *E2ETestSuite) RecoverRelayerWallets(ctx context.Context, relayer ibc.Relayer) error { - chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(relayer) +func (s *E2ETestSuite) RecoverRelayerWallets(ctx context.Context, ibcrelayer ibc.Relayer) error { + chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(ibcrelayer) if err != nil { return err } @@ -260,18 +260,18 @@ func (s *E2ETestSuite) RecoverRelayerWallets(ctx context.Context, relayer ibc.Re return nil } -// StartRelayer starts the given relayer. -func (s *E2ETestSuite) StartRelayer(relayer ibc.Relayer) { +// StartRelayer starts the given ibcrelayer. +func (s *E2ETestSuite) StartRelayer(ibcrelayer ibc.Relayer) { if s.startRelayerFn == nil { panic("cannot start relayer before it is created!") } - s.startRelayerFn(relayer) + s.startRelayerFn(ibcrelayer) } -// StopRelayer stops the given relayer. -func (s *E2ETestSuite) StopRelayer(ctx context.Context, relayer ibc.Relayer) { - err := relayer.StopRelayer(ctx, s.GetRelayerExecReporter()) +// StopRelayer stops the given ibcrelayer. +func (s *E2ETestSuite) StopRelayer(ctx context.Context, ibcrelayer ibc.Relayer) { + err := ibcrelayer.StopRelayer(ctx, s.GetRelayerExecReporter()) s.Require().NoError(err) } @@ -350,7 +350,7 @@ func (s *E2ETestSuite) GetRelayerExecReporter() *testreporter.RelayerExecReporte } // TransferChannelOptions configures both of the chains to have non-incentivized transfer channels. -func (s *E2ETestSuite) TransferChannelOptions() func(options *ibc.CreateChannelOptions) { +func (*E2ETestSuite) TransferChannelOptions() func(options *ibc.CreateChannelOptions) { return func(opts *ibc.CreateChannelOptions) { opts.Version = transfertypes.Version opts.SourcePortName = transfertypes.PortID @@ -363,7 +363,7 @@ func (s *E2ETestSuite) TransferChannelOptions() func(options *ibc.CreateChannelO func (s *E2ETestSuite) GetTimeoutHeight(ctx context.Context, chain *cosmos.CosmosChain) clienttypes.Height { height, err := chain.Height(ctx) s.Require().NoError(err) - return clienttypes.NewHeight(clienttypes.ParseChainID(chain.Config().ChainID), uint64(height)+1000) + return clienttypes.NewHeight(clienttypes.ParseChainID(chain.Config().ChainID), height+1000) } // GetNativeChainBalance returns the balance of a specific user on a chain using the native denom. @@ -372,7 +372,7 @@ func GetNativeChainBalance(ctx context.Context, chain ibc.Chain, user ibc.Wallet if err != nil { return -1, err } - return bal, nil + return bal.Int64(), nil } // GetIBCToken returns the denomination of the full token denom sent to the receiving channel diff --git a/e2e/testsuite/tx.go b/e2e/testsuite/tx.go index 3c64ee124b2..1e1c498cd4e 100644 --- a/e2e/testsuite/tx.go +++ b/e2e/testsuite/tx.go @@ -7,7 +7,12 @@ import ( "strings" "time" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" + errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" @@ -15,9 +20,6 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/cosmos/ibc-go/e2e/testsuite/sanitize" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go index 03a7a207386..24913b0c8b0 100644 --- a/e2e/testvalues/values.go +++ b/e2e/testvalues/values.go @@ -4,9 +4,11 @@ import ( "fmt" "time" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/cosmos/ibc-go/e2e/semverutil" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" @@ -72,7 +74,7 @@ var SimdNewGenesisCommandsFeatureReleases = semverutil.FeatureReleases{ MajorVersion: "v8", } -// TransferSelfParamsFeatureReleases represents the releases the transfer module started managing its own params. +// SelfParamsFeatureReleases represents the releases the transfer module started managing its own params. var SelfParamsFeatureReleases = semverutil.FeatureReleases{ MajorVersion: "v8", } @@ -99,3 +101,10 @@ var TotalEscrowFeatureReleases = semverutil.FeatureReleases{ var IbcErrorsFeatureReleases = semverutil.FeatureReleases{ MajorVersion: "v8.0", } + +// LocalhostClientFeatureReleases represents the releases the localhost client was released in. +var LocalhostClientFeatureReleases = semverutil.FeatureReleases{ + MinorVersions: []string{ + "v7.1", + }, +} diff --git a/go.mod b/go.mod index b1203270eb3..f75bc3d57eb 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,16 @@ -go 1.20 +go 1.21 module github.com/cosmos/ibc-go/v7 require ( cosmossdk.io/api v0.3.1 cosmossdk.io/errors v1.0.0 - cosmossdk.io/math v1.0.1 + cosmossdk.io/math v1.1.2 github.com/armon/go-metrics v0.4.1 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0 @@ -34,8 +34,8 @@ require ( cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.2.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -52,6 +52,9 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect @@ -72,10 +75,10 @@ require ( github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -111,7 +114,8 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.16.3 // indirect - github.com/leodido/go-urn v1.2.1 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect @@ -136,8 +140,9 @@ require ( 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/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -146,20 +151,19 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.12.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index fef41faaacd..063d22cbebb 100644 --- a/go.sum +++ b/go.sum @@ -191,14 +191,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -209,6 +209,7 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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= @@ -218,7 +219,9 @@ github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8 github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -226,8 +229,8 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -261,8 +264,11 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -300,8 +306,13 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= @@ -312,6 +323,7 @@ github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3Hf github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -322,8 +334,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -348,14 +360,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/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= @@ -370,7 +382,9 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/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= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -397,18 +411,25 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -433,6 +454,7 @@ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/j github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -442,10 +464,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -522,12 +544,14 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -651,6 +675,7 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -666,6 +691,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -687,9 +713,11 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -748,6 +776,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -764,6 +793,7 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -772,14 +802,19 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -789,6 +824,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -803,6 +839,9 @@ github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6 github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -849,17 +888,18 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -874,6 +914,7 @@ 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= @@ -931,8 +972,8 @@ github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= @@ -1006,8 +1047,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1034,7 +1075,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1239,8 +1281,8 @@ 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.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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= @@ -1257,8 +1299,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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= @@ -1326,6 +1368,7 @@ 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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= @@ -1576,6 +1619,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1603,6 +1647,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go.work.example b/go.work.example index 655938729b8..ba6153f3524 100644 --- a/go.work.example +++ b/go.work.example @@ -3,5 +3,6 @@ go 1.20 use ( ./ ./modules/capability + ./modules/apps/callbacks ./e2e ) diff --git a/modules/apps/27-interchain-accounts/controller/client/cli/tx.go b/modules/apps/27-interchain-accounts/controller/client/cli/tx.go index 232d22b07c9..fe287dee6ec 100644 --- a/modules/apps/27-interchain-accounts/controller/client/cli/tx.go +++ b/modules/apps/27-interchain-accounts/controller/client/cli/tx.go @@ -80,7 +80,6 @@ appropriate relative timeoutTimestamp must be provided with flag {relative-packe var icaMsgData icatypes.InterchainAccountPacketData msgContentOrFileName := args[1] if err := cdc.UnmarshalJSON([]byte(msgContentOrFileName), &icaMsgData); err != nil { - // check for file path if JSON input is not provided contents, err := os.ReadFile(msgContentOrFileName) if err != nil { diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go index 1338b3f252f..5bfc6ca16c9 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware.go @@ -17,7 +17,10 @@ import ( ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) -var _ porttypes.Middleware = (*IBCMiddleware)(nil) +var ( + _ porttypes.Middleware = (*IBCMiddleware)(nil) + _ porttypes.PacketDataUnmarshaler = (*IBCMiddleware)(nil) +) // IBCMiddleware implements the ICS26 callbacks for the fee middleware given the // ICA controller keeper and the underlying application. @@ -76,7 +79,7 @@ func (im IBCMiddleware) OnChanOpenInit( } // OnChanOpenTry implements the IBCMiddleware interface -func (im IBCMiddleware) OnChanOpenTry( +func (IBCMiddleware) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -124,7 +127,7 @@ func (im IBCMiddleware) OnChanOpenAck( } // OnChanOpenConfirm implements the IBCMiddleware interface -func (im IBCMiddleware) OnChanOpenConfirm( +func (IBCMiddleware) OnChanOpenConfirm( ctx sdk.Context, portID, channelID string, @@ -133,7 +136,7 @@ func (im IBCMiddleware) OnChanOpenConfirm( } // OnChanCloseInit implements the IBCMiddleware interface -func (im IBCMiddleware) OnChanCloseInit( +func (IBCMiddleware) OnChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -165,7 +168,7 @@ func (im IBCMiddleware) OnChanCloseConfirm( } // OnRecvPacket implements the IBCMiddleware interface -func (im IBCMiddleware) OnRecvPacket( +func (IBCMiddleware) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress, @@ -227,7 +230,7 @@ func (im IBCMiddleware) OnTimeoutPacket( } // SendPacket implements the ICS4 Wrapper interface -func (im IBCMiddleware) SendPacket( +func (IBCMiddleware) SendPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, @@ -240,7 +243,7 @@ func (im IBCMiddleware) SendPacket( } // WriteAcknowledgement implements the ICS4 Wrapper interface -func (im IBCMiddleware) WriteAcknowledgement( +func (IBCMiddleware) WriteAcknowledgement( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, @@ -253,3 +256,15 @@ func (im IBCMiddleware) WriteAcknowledgement( func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { return im.keeper.GetAppVersion(ctx, portID, channelID) } + +// UnmarshalPacketData attempts to unmarshal the provided packet data bytes +// into an InterchainAccountPacketData. This function implements the optional +// PacketDataUnmarshaler interface required for ADR 008 support. +func (IBCMiddleware) UnmarshalPacketData(bz []byte) (interface{}, error) { + var data icatypes.InterchainAccountPacketData + err := data.UnmarshalJSON(bz) + if err != nil { + return nil, err + } + return data, nil +} diff --git a/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go index cf049e3ae50..f7478786046 100644 --- a/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go +++ b/modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,9 +13,9 @@ import ( controllerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - fee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" 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" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) @@ -38,7 +38,7 @@ var ( ) type InterchainAccountsTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -49,7 +49,7 @@ type InterchainAccountsTestSuite struct { } func TestICATestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsTestSuite)) } func (suite *InterchainAccountsTestSuite) SetupTest() { @@ -836,7 +836,7 @@ func (suite *InterchainAccountsTestSuite) TestGetAppVersion() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - controllerStack := cbs.(fee.IBCMiddleware) + controllerStack := cbs.(porttypes.ICS4Wrapper) appVersion, found := controllerStack.GetAppVersion(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) suite.Require().True(found) suite.Require().Equal(path.EndpointA.ChannelConfig.Version, appVersion) @@ -918,3 +918,26 @@ func (suite *InterchainAccountsTestSuite) TestClosedChannelReopensWithMsgServer( err = path.EndpointB.ChanOpenConfirm() suite.Require().NoError(err) } + +func (suite *InterchainAccountsTestSuite) TestPacketDataUnmarshalerInterface() { + path := NewICAPath(suite.chainA, suite.chainB) + suite.coordinator.SetupConnections(path) + err := SetupICAPath(path, TestOwnerAddress) + suite.Require().NoError(err) + + expPacketData := icatypes.InterchainAccountPacketData{ + Type: icatypes.EXECUTE_TX, + Data: []byte("data"), + Memo: "", + } + + packetData, err := controller.IBCMiddleware{}.UnmarshalPacketData(expPacketData.GetBytes()) + suite.Require().NoError(err) + suite.Require().Equal(expPacketData, packetData) + + // test invalid packet data + invalidPacketData := []byte("invalid packet data") + packetData, err = controller.IBCMiddleware{}.UnmarshalPacketData(invalidPacketData) + suite.Require().Error(err) + suite.Require().Nil(packetData) +} diff --git a/modules/apps/27-interchain-accounts/controller/keeper/export_test.go b/modules/apps/27-interchain-accounts/controller/keeper/export_test.go new file mode 100644 index 00000000000..3600380f0a8 --- /dev/null +++ b/modules/apps/27-interchain-accounts/controller/keeper/export_test.go @@ -0,0 +1,12 @@ +package keeper + +/* + This file is to allow for unexported functions and fields to be accessible to the testing package. +*/ + +import porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + +// GetICS4Wrapper is a getter for the keeper's ICS4Wrapper. +func (k *Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { + return k.ics4Wrapper +} diff --git a/modules/apps/27-interchain-accounts/controller/keeper/handshake.go b/modules/apps/27-interchain-accounts/controller/keeper/handshake.go index 8084c8e5d66..3fff058df99 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/handshake.go @@ -129,7 +129,7 @@ func (k Keeper) OnChanOpenAck( } // OnChanCloseConfirm removes the active channel stored in state -func (k Keeper) OnChanCloseConfirm( +func (Keeper) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go index 20d83a01ab8..7a7b3533e5f 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper.go @@ -66,8 +66,15 @@ func NewKeeper( } } +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after +// the keepers creation to set the middleware which is above this module +// in the IBC application stack. +func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + k.ics4Wrapper = wrapper +} + // Logger returns the application logger, scoped to the associated module -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s-%s", exported.ModuleName, icatypes.ModuleName)) } diff --git a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go index c89122d1d39..b46ba39e2f2 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -11,6 +11,7 @@ import ( "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" genesistypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/genesis/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) @@ -33,7 +34,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -103,7 +104,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestGetAllPorts() { @@ -292,3 +293,20 @@ func (suite *KeeperTestSuite) TestGetAuthority() { expectedAuth := authtypes.NewModuleAddress(govtypes.ModuleName).String() suite.Require().Equal(expectedAuth, authority) } + +func (suite *KeeperTestSuite) TestWithICS4Wrapper() { + suite.SetupTest() + + // test if the ics4 wrapper is the channel keeper initially + ics4Wrapper := suite.chainA.GetSimApp().ICAControllerKeeper.GetICS4Wrapper() + + _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + suite.Require().False(isChannelKeeper) + + // set the ics4 wrapper to the channel keeper + suite.chainA.GetSimApp().ICAControllerKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) + ics4Wrapper = suite.chainA.GetSimApp().ICAControllerKeeper.GetICS4Wrapper() + + _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) + suite.Require().True(isChannelKeeper) +} diff --git a/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go b/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go index df22e40b34b..30608f8355a 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/msg_server.go @@ -75,8 +75,8 @@ func (s msgServer) SendTx(goCtx context.Context, msg *types.MsgSendTx) (*types.M // UpdateParams defines an rpc handler method for MsgUpdateParams. Updates the ica/controller submodule's parameters. func (k Keeper) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { - if k.GetAuthority() != msg.Authority { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } ctx := sdk.UnwrapSDKContext(goCtx) 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 08d3fd4ce5c..3d0d7d84c42 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 @@ -204,34 +204,34 @@ func (suite *KeeperTestSuite) TestSubmitTx() { // TestUpdateParams tests UpdateParams rpc handler func (suite *KeeperTestSuite) TestUpdateParams() { - validAuthority := suite.chainA.GetSimApp().TransferKeeper.GetAuthority() + signer := suite.chainA.GetSimApp().TransferKeeper.GetAuthority() testCases := []struct { name string msg *types.MsgUpdateParams expPass bool }{ { - "success: valid authority and default params", - types.NewMsgUpdateParams(validAuthority, types.NewParams(!types.DefaultControllerEnabled)), + "success: valid signer and default params", + types.NewMsgUpdateParams(signer, types.NewParams(!types.DefaultControllerEnabled)), true, }, { - "failure: malformed authority address", + "failure: malformed signer address", types.NewMsgUpdateParams(ibctesting.InvalidID, types.DefaultParams()), false, }, { - "failure: empty authority address", + "failure: empty signer address", types.NewMsgUpdateParams("", types.DefaultParams()), false, }, { - "failure: whitespace authority address", + "failure: whitespace signer address", types.NewMsgUpdateParams(" ", types.DefaultParams()), false, }, { - "failure: unauthorized authority address", + "failure: unauthorized signer address", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), false, }, diff --git a/modules/apps/27-interchain-accounts/controller/keeper/relay.go b/modules/apps/27-interchain-accounts/controller/keeper/relay.go index 412d2cb2f0c..651af21966d 100644 --- a/modules/apps/27-interchain-accounts/controller/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/controller/keeper/relay.go @@ -55,6 +55,6 @@ func (k Keeper) sendTx(ctx sdk.Context, connectionID, portID string, icaPacketDa // OnTimeoutPacket removes the active channel associated with the provided packet, the underlying channel end is closed // due to the semantics of ORDERED channels -func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) error { +func (Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) error { return nil } diff --git a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go index c079459c0aa..5c6ce64e154 100644 --- a/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go +++ b/modules/apps/27-interchain-accounts/controller/migrations/v6/migrations_test.go @@ -3,7 +3,7 @@ package v6_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +18,7 @@ import ( ) type MigrationsTestSuite struct { - suite.Suite + testifysuite.Suite chainA *ibctesting.TestChain chainB *ibctesting.TestChain @@ -58,7 +58,7 @@ func (suite *MigrationsTestSuite) SetupPath() error { return suite.path.EndpointB.ChanOpenConfirm() } -func (suite *MigrationsTestSuite) RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) error { +func (*MigrationsTestSuite) RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) error { portID, err := icatypes.NewControllerPortID(owner) if err != nil { return err @@ -81,7 +81,7 @@ func (suite *MigrationsTestSuite) RegisterInterchainAccount(endpoint *ibctesting } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(MigrationsTestSuite)) + testifysuite.Run(t, new(MigrationsTestSuite)) } func (suite *MigrationsTestSuite) TestMigrateICS27ChannelCapability() { diff --git a/modules/apps/27-interchain-accounts/controller/types/msgs.go b/modules/apps/27-interchain-accounts/controller/types/msgs.go index 729d098f3fa..cfd397b9c1a 100644 --- a/modules/apps/27-interchain-accounts/controller/types/msgs.go +++ b/modules/apps/27-interchain-accounts/controller/types/msgs.go @@ -92,16 +92,16 @@ func (msg MsgSendTx) GetSigners() []sdk.AccAddress { } // NewMsgUpdateParams creates a new MsgUpdateParams instance -func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { +func NewMsgUpdateParams(signer string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ - Authority: authority, - Params: params, + Signer: signer, + Params: params, } } // ValidateBasic implements sdk.Msg func (msg MsgUpdateParams) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Authority) + _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } @@ -111,7 +111,7 @@ func (msg MsgUpdateParams) ValidateBasic() error { // GetSigners implements sdk.Msg func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { panic(err) } 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 d2347dc3c41..48bce860db1 100644 --- a/modules/apps/27-interchain-accounts/controller/types/msgs_test.go +++ b/modules/apps/27-interchain-accounts/controller/types/msgs_test.go @@ -203,9 +203,9 @@ func TestMsgUpdateParamsValidateBasic(t *testing.T) { msg *types.MsgUpdateParams expPass bool }{ - {"success: valid authority and valid params", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), true}, - {"failure: invalid authority with valid params", types.NewMsgUpdateParams("invalidAddress", types.DefaultParams()), false}, - {"failure: empty authority with valid params", types.NewMsgUpdateParams("", types.DefaultParams()), false}, + {"success: valid signer and valid params", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), true}, + {"failure: invalid signer with valid params", types.NewMsgUpdateParams("invalidAddress", types.DefaultParams()), false}, + {"failure: empty signer with valid params", types.NewMsgUpdateParams("", types.DefaultParams()), false}, } for i, tc := range testCases { @@ -231,8 +231,8 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { for _, tc := range testCases { msg := types.MsgUpdateParams{ - Authority: tc.address.String(), - Params: types.DefaultParams(), + Signer: tc.address.String(), + Params: types.DefaultParams(), } if tc.expPass { require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) diff --git a/modules/apps/27-interchain-accounts/controller/types/tx.pb.go b/modules/apps/27-interchain-accounts/controller/types/tx.pb.go index 37e1ba86816..93a15cb34cf 100644 --- a/modules/apps/27-interchain-accounts/controller/types/tx.pb.go +++ b/modules/apps/27-interchain-accounts/controller/types/tx.pb.go @@ -192,8 +192,8 @@ var xxx_messageInfo_MsgSendTxResponse proto.InternalMessageInfo // MsgUpdateParams defines the payload for Msg/UpdateParams type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // params defines the 27-interchain-accounts/controller parameters to update. // // NOTE: All parameters must be supplied. @@ -284,47 +284,47 @@ func init() { } var fileDescriptor_7def041328c84a30 = []byte{ - // 628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0x48, 0x29, 0x76, 0x40, 0xd1, 0x0d, 0x09, 0x65, 0x83, 0x85, 0x54, 0x0f, 0x48, 0xc2, - 0x4e, 0x5a, 0x35, 0x24, 0x35, 0x1e, 0x04, 0x3c, 0x34, 0xa6, 0x49, 0xb3, 0x62, 0x42, 0xbc, 0x34, - 0xd3, 0xd9, 0xc9, 0x76, 0x64, 0x77, 0x66, 0xdd, 0x99, 0x5d, 0xe1, 0x66, 0xf4, 0x62, 0x3c, 0x18, - 0xbf, 0x80, 0x09, 0x1f, 0x81, 0x6f, 0x21, 0x47, 0x8e, 0x9e, 0x8c, 0x81, 0x03, 0x37, 0x3f, 0x83, - 0xd9, 0xbf, 0xad, 0x82, 0x04, 0x0b, 0xb7, 0xbe, 0xf7, 0xfa, 0xfb, 0xbd, 0xdf, 0xef, 0xcd, 0xdb, - 0x07, 0x1f, 0xb3, 0x1e, 0x41, 0xd8, 0xf3, 0x1c, 0x46, 0xb0, 0x62, 0x82, 0x4b, 0xc4, 0xb8, 0xa2, - 0x3e, 0xe9, 0x63, 0xc6, 0xbb, 0x98, 0x10, 0x11, 0x70, 0x25, 0x11, 0x11, 0x5c, 0xf9, 0xc2, 0x71, - 0xa8, 0x8f, 0xc2, 0x3a, 0x52, 0x3b, 0x86, 0xe7, 0x0b, 0x25, 0xb4, 0x06, 0xeb, 0x11, 0x63, 0x18, - 0x6c, 0x9c, 0x01, 0x36, 0x06, 0x60, 0x23, 0xac, 0xeb, 0x33, 0xb6, 0xb0, 0x45, 0x0c, 0x47, 0xd1, - 0xaf, 0x84, 0x49, 0x7f, 0x78, 0x21, 0x19, 0x61, 0x1d, 0x79, 0x98, 0x6c, 0x53, 0x95, 0xa2, 0xd6, - 0x47, 0x10, 0x3f, 0xa4, 0x26, 0x21, 0x99, 0x25, 0x42, 0xba, 0x42, 0x22, 0x57, 0xda, 0x51, 0xdd, - 0x95, 0x76, 0x52, 0xa8, 0x7d, 0x00, 0x70, 0xbe, 0x2d, 0x6d, 0x93, 0xda, 0x4c, 0x2a, 0xea, 0xb7, - 0x72, 0xea, 0xa7, 0x09, 0xb3, 0x36, 0x03, 0xc7, 0xc5, 0x5b, 0x4e, 0xfd, 0x0a, 0x58, 0x04, 0x4b, - 0x65, 0x33, 0x09, 0xb4, 0xbb, 0xf0, 0x06, 0x11, 0x9c, 0x53, 0x12, 0x29, 0xea, 0x32, 0xab, 0x72, - 0x2d, 0xae, 0x4e, 0x0d, 0x92, 0x2d, 0x4b, 0xab, 0xc0, 0x89, 0x90, 0xfa, 0x92, 0x09, 0x5e, 0x19, - 0x8b, 0xcb, 0x59, 0xd8, 0xbc, 0xf9, 0x71, 0x6f, 0xa1, 0xf0, 0xfe, 0x64, 0x7f, 0x39, 0xa1, 0xab, - 0x59, 0xf0, 0xde, 0x79, 0x22, 0x4c, 0x2a, 0x3d, 0xc1, 0x25, 0xd5, 0xee, 0x40, 0x48, 0xfa, 0x98, - 0x73, 0xea, 0x44, 0x3d, 0x13, 0x45, 0xe5, 0x34, 0xd3, 0xb2, 0xb4, 0x59, 0x38, 0xe1, 0x09, 0x5f, - 0x0d, 0xf4, 0x94, 0xa2, 0xb0, 0x65, 0x35, 0x8b, 0x51, 0xbf, 0xda, 0x2f, 0x00, 0xcb, 0x6d, 0x69, - 0xbf, 0xa0, 0xdc, 0xda, 0xdc, 0xb9, 0x8c, 0xb1, 0x6d, 0x38, 0x99, 0x3c, 0x51, 0xd7, 0xc2, 0x0a, - 0xc7, 0xe6, 0x26, 0x1b, 0x1b, 0xc6, 0x85, 0x16, 0x25, 0xac, 0x1b, 0xa7, 0xfc, 0x75, 0x62, 0xb2, - 0x0d, 0xac, 0xf0, 0x5a, 0xf1, 0xe0, 0xc7, 0x42, 0xc1, 0x84, 0x5e, 0x9e, 0xd1, 0xee, 0xc3, 0x5b, - 0x3e, 0x75, 0xb0, 0x62, 0x21, 0xed, 0x2a, 0xe6, 0x52, 0x11, 0xa8, 0x4a, 0x71, 0x11, 0x2c, 0x15, - 0xcd, 0xe9, 0x2c, 0xbf, 0x99, 0xa4, 0x4f, 0x8d, 0xf5, 0x11, 0xbc, 0x9d, 0xfb, 0xcd, 0x67, 0xa8, - 0xc3, 0xeb, 0x92, 0xbe, 0x09, 0x28, 0x27, 0x34, 0xb6, 0x5e, 0x34, 0xf3, 0x38, 0x9d, 0xd3, 0x57, - 0x00, 0xa7, 0xdb, 0xd2, 0x7e, 0xe9, 0x59, 0x58, 0xd1, 0x0e, 0xf6, 0xb1, 0x2b, 0xb5, 0x79, 0x58, - 0xc6, 0x81, 0xea, 0x0b, 0x9f, 0xa9, 0xdd, 0x6c, 0xf0, 0x79, 0x42, 0xdb, 0x82, 0x25, 0x2f, 0xfe, - 0x5f, 0x3c, 0xae, 0xc9, 0x46, 0xd3, 0xf8, 0xff, 0x8f, 0xc6, 0x48, 0x3a, 0xa5, 0x13, 0x48, 0xf9, - 0x9a, 0x5a, 0x66, 0x69, 0xd0, 0xad, 0x36, 0x07, 0x67, 0xff, 0x92, 0x97, 0x99, 0x6b, 0x7c, 0x2a, - 0xc2, 0xb1, 0xb6, 0xb4, 0xb5, 0x6f, 0x00, 0xce, 0xfd, 0x7b, 0xa7, 0x3b, 0xa3, 0xc8, 0x3b, 0x6f, - 0x41, 0xf5, 0xad, 0xab, 0x66, 0xcc, 0x9f, 0xeb, 0x33, 0x80, 0xa5, 0x74, 0x63, 0x9f, 0x8c, 0xd8, - 0x24, 0x81, 0xeb, 0xcf, 0x2e, 0x05, 0xcf, 0x05, 0xed, 0x01, 0x38, 0xf5, 0xc7, 0x6a, 0xac, 0x8f, - 0xc8, 0x3b, 0x4c, 0xa2, 0x3f, 0xbf, 0x02, 0x92, 0x4c, 0xa2, 0x3e, 0xfe, 0xee, 0x64, 0x7f, 0x19, - 0xac, 0xbd, 0x3e, 0x38, 0xaa, 0x82, 0xc3, 0xa3, 0x2a, 0xf8, 0x79, 0x54, 0x05, 0x5f, 0x8e, 0xab, - 0x85, 0xc3, 0xe3, 0x6a, 0xe1, 0xfb, 0x71, 0xb5, 0xf0, 0xaa, 0x63, 0x33, 0xd5, 0x0f, 0x7a, 0x06, - 0x11, 0x2e, 0x4a, 0x2f, 0x23, 0xeb, 0x91, 0x15, 0x5b, 0xa0, 0x70, 0x15, 0xb9, 0xc2, 0x0a, 0x1c, - 0x2a, 0xa3, 0x9b, 0x2b, 0x51, 0x63, 0x75, 0x65, 0xa0, 0x63, 0xe5, 0xac, 0x73, 0xab, 0x76, 0x3d, - 0x2a, 0x7b, 0xa5, 0xf8, 0x9c, 0x3e, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xf7, 0xce, 0xb5, - 0x6b, 0x06, 0x00, 0x00, + // 626 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xee, 0xfc, 0x58, 0xca, 0x8f, 0x01, 0x45, 0x37, 0x44, 0xca, 0x46, 0x17, 0x52, 0x3d, 0x20, + 0x09, 0x3b, 0x69, 0xd5, 0x90, 0xd4, 0x78, 0x10, 0xf0, 0xd0, 0x98, 0x26, 0xcd, 0x8a, 0x09, 0xf1, + 0xd2, 0x4c, 0x67, 0x27, 0xc3, 0xc8, 0xee, 0xcc, 0xba, 0x33, 0x5d, 0xf1, 0x66, 0xf4, 0x62, 0x3c, + 0x18, 0x0f, 0x7e, 0x00, 0x3e, 0x02, 0xdf, 0x42, 0x8e, 0x1c, 0x3d, 0x19, 0x03, 0x07, 0x6e, 0x7e, + 0x06, 0xb3, 0x7f, 0xba, 0x45, 0x41, 0x82, 0x85, 0x5b, 0xdf, 0xf7, 0xed, 0xf3, 0xbc, 0xcf, 0xf3, + 0xce, 0xbb, 0x2f, 0x7c, 0xc8, 0xbb, 0x04, 0xe1, 0x30, 0xf4, 0x39, 0xc1, 0x9a, 0x4b, 0xa1, 0x10, + 0x17, 0x9a, 0x46, 0x64, 0x13, 0x73, 0xd1, 0xc1, 0x84, 0xc8, 0x9e, 0xd0, 0x0a, 0x11, 0x29, 0x74, + 0x24, 0x7d, 0x9f, 0x46, 0x28, 0xae, 0x21, 0xbd, 0xed, 0x84, 0x91, 0xd4, 0xd2, 0xac, 0xf3, 0x2e, + 0x71, 0x8e, 0x83, 0x9d, 0x53, 0xc0, 0xce, 0x00, 0xec, 0xc4, 0x35, 0x6b, 0x9a, 0x49, 0x26, 0x53, + 0x38, 0x4a, 0x7e, 0x65, 0x4c, 0xd6, 0xfd, 0x73, 0xc9, 0x88, 0x6b, 0x28, 0xc4, 0x64, 0x8b, 0xea, + 0x1c, 0xb5, 0x3a, 0x84, 0xf8, 0x63, 0x6a, 0x32, 0x92, 0x19, 0x22, 0x55, 0x20, 0x15, 0x0a, 0x14, + 0x4b, 0xea, 0x81, 0x62, 0x59, 0xa1, 0xfa, 0x1e, 0xc0, 0x9b, 0x2d, 0xc5, 0x5c, 0xca, 0xb8, 0xd2, + 0x34, 0x6a, 0x16, 0xd4, 0x8f, 0x33, 0x66, 0x73, 0x1a, 0x8e, 0xca, 0xd7, 0x82, 0x46, 0x15, 0x30, + 0x0f, 0x16, 0xc6, 0xdd, 0x2c, 0x30, 0x6f, 0xc3, 0x2b, 0x44, 0x0a, 0x41, 0x49, 0xa2, 0xa8, 0xc3, + 0xbd, 0xca, 0x7f, 0x69, 0x75, 0x72, 0x90, 0x6c, 0x7a, 0x66, 0x05, 0x8e, 0xc5, 0x34, 0x52, 0x5c, + 0x8a, 0xca, 0x48, 0x5a, 0xee, 0x87, 0x8d, 0xab, 0x1f, 0x76, 0xe6, 0x4a, 0xef, 0x8e, 0x76, 0x17, + 0x33, 0xba, 0xaa, 0x07, 0xef, 0x9c, 0x25, 0xc2, 0xa5, 0x2a, 0x94, 0x42, 0x51, 0xf3, 0x16, 0x84, + 0x64, 0x13, 0x0b, 0x41, 0xfd, 0xa4, 0x67, 0xa6, 0x68, 0x3c, 0xcf, 0x34, 0x3d, 0x73, 0x06, 0x8e, + 0x85, 0x32, 0xd2, 0x03, 0x3d, 0xe5, 0x24, 0x6c, 0x7a, 0x0d, 0x23, 0xe9, 0x57, 0xfd, 0x09, 0xe0, + 0x78, 0x4b, 0xb1, 0x67, 0x54, 0x78, 0xeb, 0xdb, 0x17, 0x31, 0xb6, 0x05, 0x27, 0xb2, 0x27, 0xea, + 0x78, 0x58, 0xe3, 0xd4, 0xdc, 0x44, 0x7d, 0xcd, 0x39, 0xd7, 0xa2, 0xc4, 0x35, 0xe7, 0x84, 0xbf, + 0x76, 0x4a, 0xb6, 0x86, 0x35, 0x5e, 0x31, 0xf6, 0xbe, 0xcf, 0x95, 0x5c, 0x18, 0x16, 0x19, 0xf3, + 0x2e, 0xbc, 0x16, 0x51, 0x1f, 0x6b, 0x1e, 0xd3, 0x8e, 0xe6, 0x01, 0x95, 0x3d, 0x5d, 0x31, 0xe6, + 0xc1, 0x82, 0xe1, 0x4e, 0xf5, 0xf3, 0xeb, 0x59, 0xfa, 0xc4, 0x58, 0x1f, 0xc0, 0xeb, 0x85, 0xdf, + 0x62, 0x86, 0x16, 0xfc, 0x5f, 0xd1, 0x57, 0x3d, 0x2a, 0x08, 0x4d, 0xad, 0x1b, 0x6e, 0x11, 0xe7, + 0x73, 0xfa, 0x02, 0xe0, 0x54, 0x4b, 0xb1, 0xe7, 0xa1, 0x87, 0x35, 0x6d, 0xe3, 0x08, 0x07, 0xca, + 0xbc, 0x01, 0xcb, 0x8a, 0xb3, 0xc1, 0xb8, 0xf2, 0xc8, 0xdc, 0x80, 0xe5, 0x30, 0xfd, 0x47, 0x3a, + 0xa8, 0x89, 0x7a, 0xc3, 0xf9, 0xf7, 0xcf, 0xc5, 0xc9, 0x7a, 0xe4, 0xde, 0x73, 0xbe, 0xc6, 0x54, + 0xdf, 0x4c, 0xde, 0xaa, 0x3a, 0x0b, 0x67, 0xfe, 0x50, 0xd5, 0xf7, 0x54, 0xff, 0x68, 0xc0, 0x91, + 0x96, 0x62, 0xe6, 0x57, 0x00, 0x67, 0xff, 0xbe, 0xca, 0xed, 0x61, 0xb4, 0x9d, 0xb5, 0x97, 0xd6, + 0xc6, 0x65, 0x33, 0x16, 0xaf, 0xf4, 0x09, 0xc0, 0x72, 0xbe, 0xa8, 0x8f, 0x86, 0x6c, 0x92, 0xc1, + 0xad, 0x27, 0x17, 0x82, 0x17, 0x82, 0x76, 0x00, 0x9c, 0xfc, 0x6d, 0x23, 0x56, 0x87, 0xe4, 0x3d, + 0x4e, 0x62, 0x3d, 0xbd, 0x04, 0x92, 0xbe, 0x44, 0x6b, 0xf4, 0xed, 0xd1, 0xee, 0x22, 0x58, 0x79, + 0xb9, 0x77, 0x60, 0x83, 0xfd, 0x03, 0x1b, 0xfc, 0x38, 0xb0, 0xc1, 0xe7, 0x43, 0xbb, 0xb4, 0x7f, + 0x68, 0x97, 0xbe, 0x1d, 0xda, 0xa5, 0x17, 0x6d, 0xc6, 0xf5, 0x66, 0xaf, 0xeb, 0x10, 0x19, 0xa0, + 0xfc, 0x20, 0xf2, 0x2e, 0x59, 0x62, 0x12, 0xc5, 0xcb, 0x28, 0x90, 0x5e, 0xcf, 0xa7, 0x2a, 0x39, + 0xb5, 0x0a, 0xd5, 0x97, 0x97, 0x06, 0x3a, 0x96, 0x4e, 0xbb, 0xb2, 0xfa, 0x4d, 0x48, 0x55, 0xb7, + 0x9c, 0x5e, 0xd1, 0x7b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, 0x2d, 0x99, 0xbd, 0x62, 0x06, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -676,10 +676,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- dAtA[i] = 0xa } @@ -798,7 +798,7 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = l - l = len(m.Authority) + l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1348,7 +1348,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1376,7 +1376,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/modules/apps/27-interchain-accounts/genesis/types/genesis_test.go b/modules/apps/27-interchain-accounts/genesis/types/genesis_test.go index a83bdec50b4..0f258eb6216 100644 --- a/modules/apps/27-interchain-accounts/genesis/types/genesis_test.go +++ b/modules/apps/27-interchain-accounts/genesis/types/genesis_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" controllertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" genesistypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/genesis/types" @@ -21,11 +21,11 @@ var ( ) type GenesisTypesTestSuite struct { - suite.Suite + testifysuite.Suite } func TestGenesisTypesTestSuite(t *testing.T) { - suite.Run(t, new(GenesisTypesTestSuite)) + testifysuite.Run(t, new(GenesisTypesTestSuite)) } func (suite *GenesisTypesTestSuite) TestValidateGenesisState() { diff --git a/modules/apps/27-interchain-accounts/host/ibc_module.go b/modules/apps/27-interchain-accounts/host/ibc_module.go index 012130c2efc..6efd8c47cb8 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module.go @@ -29,7 +29,7 @@ func NewIBCModule(k keeper.Keeper) IBCModule { } // OnChanOpenInit implements the IBCModule interface -func (im IBCModule) OnChanOpenInit( +func (IBCModule) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, @@ -61,7 +61,7 @@ func (im IBCModule) OnChanOpenTry( } // OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenAck( +func (IBCModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, @@ -85,7 +85,7 @@ func (im IBCModule) OnChanOpenConfirm( } // OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( +func (IBCModule) OnChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -132,7 +132,7 @@ func (im IBCModule) OnRecvPacket( } // OnAcknowledgementPacket implements the IBCModule interface -func (im IBCModule) OnAcknowledgementPacket( +func (IBCModule) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, @@ -142,7 +142,7 @@ func (im IBCModule) OnAcknowledgementPacket( } // OnTimeoutPacket implements the IBCModule interface -func (im IBCModule) OnTimeoutPacket( +func (IBCModule) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, 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 35687bbdc1b..05f9c7d520f 100644 --- a/modules/apps/27-interchain-accounts/host/ibc_module_test.go +++ b/modules/apps/27-interchain-accounts/host/ibc_module_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/cosmos/gogoproto/proto" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" @@ -42,7 +42,7 @@ var ( ) type InterchainAccountsTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -52,7 +52,7 @@ type InterchainAccountsTestSuite struct { } func TestICATestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsTestSuite)) } func (suite *InterchainAccountsTestSuite) SetupTest() { diff --git a/modules/apps/27-interchain-accounts/host/keeper/export_test.go b/modules/apps/27-interchain-accounts/host/keeper/export_test.go index 03c13e894d5..100e5203076 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/export_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/export_test.go @@ -1,15 +1,21 @@ package keeper /* - This file is to allow for unexported functions to be accessible to the testing package. + This file is to allow for unexported functions and fields 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" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ) +// GetICS4Wrapper is a getter for the keeper's ICS4Wrapper. +func (k *Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { + return k.ics4Wrapper +} + // 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/handshake.go b/modules/apps/27-interchain-accounts/host/keeper/handshake.go index f565ad65a7d..7b4f2254235 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/host/keeper/handshake.go @@ -123,7 +123,7 @@ func (k Keeper) OnChanOpenConfirm( } // OnChanCloseConfirm removes the active channel stored in state -func (k Keeper) OnChanCloseConfirm( +func (Keeper) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, diff --git a/modules/apps/27-interchain-accounts/host/keeper/keeper.go b/modules/apps/27-interchain-accounts/host/keeper/keeper.go index 40698005c46..bad9fc67692 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper.go @@ -74,8 +74,15 @@ func NewKeeper( } } +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after +// the keepers creation to set the middleware which is above this module +// in the IBC application stack. +func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + k.ics4Wrapper = wrapper +} + // Logger returns the application logger, scoped to the associated module -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s-%s", exported.ModuleName, icatypes.ModuleName)) } 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 b8b91e83df8..cb03e1371e3 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/keeper_test.go @@ -4,11 +4,13 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" genesistypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/genesis/types" "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" + ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" + channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" 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" @@ -41,7 +43,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -122,7 +124,7 @@ func RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string) erro } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestGetInterchainAccountAddress() { @@ -301,3 +303,24 @@ func (suite *KeeperTestSuite) TestUnsetParams() { suite.chainA.GetSimApp().ICAHostKeeper.GetParams(ctx) }) } + +func (suite *KeeperTestSuite) TestWithICS4Wrapper() { + suite.SetupTest() + + // test if the ics4 wrapper is the fee keeper initially + ics4Wrapper := suite.chainA.GetSimApp().ICAHostKeeper.GetICS4Wrapper() + + _, isFeeKeeper := ics4Wrapper.(ibcfeekeeper.Keeper) + suite.Require().True(isFeeKeeper) + _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + suite.Require().False(isChannelKeeper) + + // set the ics4 wrapper to the channel keeper + suite.chainA.GetSimApp().ICAHostKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) + ics4Wrapper = suite.chainA.GetSimApp().ICAHostKeeper.GetICS4Wrapper() + + _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) + suite.Require().True(isChannelKeeper) + _, isFeeKeeper = ics4Wrapper.(ibcfeekeeper.Keeper) + suite.Require().False(isFeeKeeper) +} diff --git a/modules/apps/27-interchain-accounts/host/keeper/msg_server.go b/modules/apps/27-interchain-accounts/host/keeper/msg_server.go index e9bebdf7193..809a10e1cf5 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/msg_server.go +++ b/modules/apps/27-interchain-accounts/host/keeper/msg_server.go @@ -25,8 +25,8 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer { // UpdateParams updates the host submodule's params. func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { - if m.authority != msg.Authority { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", m.authority, msg.Authority) + if m.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", m.GetAuthority(), msg.Signer) } ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/modules/apps/27-interchain-accounts/host/keeper/msg_server_test.go b/modules/apps/27-interchain-accounts/host/keeper/msg_server_test.go index ab9cce28a97..15ccf0c5e07 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/msg_server_test.go +++ b/modules/apps/27-interchain-accounts/host/keeper/msg_server_test.go @@ -17,8 +17,8 @@ func (suite *KeeperTestSuite) TestUpdateParams() { true, }, { - "invalid authority address", - types.NewMsgUpdateParams("authority", types.DefaultParams()), + "invalid signer address", + types.NewMsgUpdateParams("signer", types.DefaultParams()), false, }, } diff --git a/modules/apps/27-interchain-accounts/host/keeper/relay.go b/modules/apps/27-interchain-accounts/host/keeper/relay.go index 74dd7c6f832..a91a89a185d 100644 --- a/modules/apps/27-interchain-accounts/host/keeper/relay.go +++ b/modules/apps/27-interchain-accounts/host/keeper/relay.go @@ -18,8 +18,8 @@ import ( // If the transaction is successfully executed, the transaction response bytes will be returned. func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byte, error) { var data icatypes.InterchainAccountPacketData - - if err := icatypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { + err := data.UnmarshalJSON(packet.GetData()) + if err != nil { // UnmarshalJSON errors are indeterminate and therefore are not wrapped and included in failed acks return nil, errorsmod.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain account packet data") } diff --git a/modules/apps/27-interchain-accounts/host/types/msgs.go b/modules/apps/27-interchain-accounts/host/types/msgs.go index 0c851060c44..0fe46895841 100644 --- a/modules/apps/27-interchain-accounts/host/types/msgs.go +++ b/modules/apps/27-interchain-accounts/host/types/msgs.go @@ -11,16 +11,16 @@ import ( var _ sdk.Msg = (*MsgUpdateParams)(nil) // NewMsgUpdateParams creates a new MsgUpdateParams instance -func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { +func NewMsgUpdateParams(signer string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ - Authority: authority, - Params: params, + Signer: signer, + Params: params, } } // ValidateBasic implements sdk.Msg func (msg MsgUpdateParams) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Authority) + _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } @@ -30,7 +30,7 @@ func (msg MsgUpdateParams) ValidateBasic() error { // GetSigners implements sdk.Msg func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { panic(err) } diff --git a/modules/apps/27-interchain-accounts/host/types/msgs_test.go b/modules/apps/27-interchain-accounts/host/types/msgs_test.go index 2cfda22f526..db0da5d0c66 100644 --- a/modules/apps/27-interchain-accounts/host/types/msgs_test.go +++ b/modules/apps/27-interchain-accounts/host/types/msgs_test.go @@ -18,18 +18,18 @@ func TestMsgUpdateParamsValidateBasic(t *testing.T) { expPass bool }{ { - "success: valid authority address", + "success: valid signer address", types.NewMsgUpdateParams(sdk.AccAddress(ibctesting.TestAccAddress).String(), types.DefaultParams()), true, }, { - "failure: invalid authority address", - types.NewMsgUpdateParams("authority", types.DefaultParams()), + "failure: invalid signer address", + types.NewMsgUpdateParams("signer", types.DefaultParams()), false, }, { "failure: invalid allowed message", - types.NewMsgUpdateParams("authority", types.Params{ + types.NewMsgUpdateParams("signer", types.Params{ AllowMessages: []string{""}, }), false, diff --git a/modules/apps/27-interchain-accounts/host/types/tx.pb.go b/modules/apps/27-interchain-accounts/host/types/tx.pb.go index 48fdff5812a..781b7d20926 100644 --- a/modules/apps/27-interchain-accounts/host/types/tx.pb.go +++ b/modules/apps/27-interchain-accounts/host/types/tx.pb.go @@ -31,8 +31,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgUpdateParams defines the payload for Msg/UpdateParams type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // params defines the 27-interchain-accounts/host parameters to update. // // NOTE: All parameters must be supplied. @@ -119,7 +119,7 @@ func init() { } var fileDescriptor_fa437afde7f1e7ae = []byte{ - // 355 bytes of a gzipped FileDescriptorProto + // 352 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xcd, 0x4c, 0x4a, 0xd6, 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0x8b, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, @@ -127,22 +127,21 @@ var fileDescriptor_fa437afde7f1e7ae = []byte{ 0xc9, 0x17, 0xd2, 0xc9, 0x4c, 0x4a, 0xd6, 0x43, 0xd6, 0xa6, 0x87, 0x45, 0x9b, 0x1e, 0x48, 0x9b, 0x5e, 0x99, 0xa1, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0xa3, 0x3e, 0x88, 0x05, 0x31, 0x43, 0x4a, 0x3c, 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x58, 0x3f, 0xb7, 0x38, 0x1d, 0x64, 0x76, 0x6e, 0x71, - 0x3a, 0x54, 0xc2, 0x9c, 0x24, 0x37, 0x81, 0x2d, 0x01, 0x6b, 0x54, 0x9a, 0xce, 0xc8, 0xc5, 0xef, - 0x5b, 0x9c, 0x1e, 0x5a, 0x90, 0x92, 0x58, 0x92, 0x1a, 0x90, 0x58, 0x94, 0x98, 0x5b, 0x2c, 0x24, - 0xc3, 0xc5, 0x99, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x52, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, - 0xc1, 0x19, 0x84, 0x10, 0x10, 0x0a, 0xe2, 0x62, 0x2b, 0x00, 0xab, 0x93, 0x60, 0x52, 0x60, 0xd4, - 0xe0, 0x36, 0x32, 0xd1, 0x23, 0xc5, 0x63, 0x7a, 0x10, 0x3b, 0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, - 0x08, 0x82, 0x9a, 0x64, 0x25, 0xd4, 0xb1, 0x40, 0x9e, 0xa1, 0xe9, 0xf9, 0x06, 0x2d, 0x84, 0x3d, - 0x4a, 0x92, 0x5c, 0xe2, 0x68, 0x0e, 0x0b, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x35, 0x5a, - 0xcc, 0xc8, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0x34, 0x85, 0x91, 0x8b, 0x07, 0xc5, 0xe5, 0xb6, 0xa4, - 0xb9, 0x05, 0xcd, 0x7c, 0x29, 0x57, 0x8a, 0xb4, 0xc3, 0x9c, 0x27, 0xc5, 0xda, 0xf0, 0x7c, 0x83, - 0x16, 0xa3, 0x53, 0xca, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, - 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x79, 0xa5, - 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x63, 0x34, 0x33, 0x29, 0x59, - 0x37, 0x3d, 0x5f, 0xbf, 0xcc, 0x5c, 0x3f, 0x37, 0x3f, 0xa5, 0x34, 0x27, 0xb5, 0x18, 0x14, 0x9b, - 0xc5, 0xfa, 0x46, 0xe6, 0xba, 0x08, 0x17, 0xe8, 0xa2, 0x46, 0x64, 0x49, 0x65, 0x41, 0x6a, 0x71, - 0x12, 0x1b, 0x38, 0x1e, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x32, 0xfd, 0x69, 0x96, - 0x02, 0x00, 0x00, + 0x3a, 0x54, 0xc2, 0x9c, 0x24, 0x37, 0x81, 0x2d, 0x01, 0x6b, 0x54, 0xea, 0x63, 0xe4, 0xe2, 0xf7, + 0x2d, 0x4e, 0x0f, 0x2d, 0x48, 0x49, 0x2c, 0x49, 0x0d, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x16, 0x12, + 0xe3, 0x62, 0x2b, 0xce, 0x4c, 0xcf, 0x4b, 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, + 0xf2, 0x84, 0x82, 0xb8, 0xd8, 0x0a, 0xc0, 0x2a, 0x24, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x4c, + 0xf4, 0x48, 0xf1, 0x92, 0x1e, 0xc4, 0x74, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x26, + 0x59, 0xf1, 0x77, 0x2c, 0x90, 0x67, 0x68, 0x7a, 0xbe, 0x41, 0x0b, 0x6a, 0x89, 0x92, 0x24, 0x97, + 0x38, 0x9a, 0x7b, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x8d, 0x16, 0x33, 0x72, 0x31, + 0xfb, 0x16, 0xa7, 0x0b, 0x4d, 0x61, 0xe4, 0xe2, 0x41, 0x71, 0xb0, 0x2d, 0x69, 0x0e, 0x41, 0x33, + 0x5f, 0xca, 0x95, 0x22, 0xed, 0x30, 0xe7, 0x49, 0xb1, 0x36, 0x3c, 0xdf, 0xa0, 0xc5, 0xe8, 0x94, + 0x72, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x5e, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xd0, 0x88, 0xcc, 0x4c, 0x4a, 0xd6, 0x4d, 0xcf, 0xd7, + 0x2f, 0x33, 0xd7, 0xcf, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0x2d, 0x06, 0x45, 0x62, 0xb1, 0xbe, 0x91, + 0xb9, 0x2e, 0xc2, 0x05, 0xba, 0xa8, 0xf1, 0x57, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x8e, + 0x3e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x47, 0xd5, 0x82, 0x8d, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -257,10 +256,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- dAtA[i] = 0xa } @@ -307,7 +306,7 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = l - l = len(m.Authority) + l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -362,7 +361,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -390,7 +389,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/modules/apps/27-interchain-accounts/module.go b/modules/apps/27-interchain-accounts/module.go index 31e58cfbcb8..1dceea8aa15 100644 --- a/modules/apps/27-interchain-accounts/module.go +++ b/modules/apps/27-interchain-accounts/module.go @@ -203,11 +203,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -219,11 +219,11 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // WeightedOperations is unimplemented. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { return nil } // RegisterStoreDecoder registers a decoder for interchain accounts module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { sdr[types.StoreKey] = simulation.NewDecodeStore() } diff --git a/modules/apps/27-interchain-accounts/module_test.go b/modules/apps/27-interchain-accounts/module_test.go index 2ee638f081a..da6e3136622 100644 --- a/modules/apps/27-interchain-accounts/module_test.go +++ b/modules/apps/27-interchain-accounts/module_test.go @@ -3,7 +3,7 @@ package ica_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/baseapp" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -21,13 +21,13 @@ import ( ) type InterchainAccountsTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator } func TestICATestSuite(t *testing.T) { - suite.Run(t, new(InterchainAccountsTestSuite)) + testifysuite.Run(t, new(InterchainAccountsTestSuite)) } func (suite *InterchainAccountsTestSuite) SetupTest() { diff --git a/modules/apps/27-interchain-accounts/types/account.go b/modules/apps/27-interchain-accounts/types/account.go index 5fc1466e52d..03431d3e63a 100644 --- a/modules/apps/27-interchain-accounts/types/account.go +++ b/modules/apps/27-interchain-accounts/types/account.go @@ -77,12 +77,12 @@ func NewInterchainAccount(ba *authtypes.BaseAccount, accountOwner string) *Inter } // SetPubKey implements the authtypes.AccountI interface -func (ia InterchainAccount) SetPubKey(pubKey crypto.PubKey) error { +func (InterchainAccount) SetPubKey(pubkey crypto.PubKey) error { return errorsmod.Wrap(ErrUnsupported, "cannot set public key for interchain account") } // SetSequence implements the authtypes.AccountI interface -func (ia InterchainAccount) SetSequence(seq uint64) error { +func (InterchainAccount) SetSequence(seq uint64) error { return errorsmod.Wrap(ErrUnsupported, "cannot set sequence number for interchain account") } diff --git a/modules/apps/27-interchain-accounts/types/account_test.go b/modules/apps/27-interchain-accounts/types/account_test.go index 50eadc8aad3..69ba9dfcdfe 100644 --- a/modules/apps/27-interchain-accounts/types/account_test.go +++ b/modules/apps/27-interchain-accounts/types/account_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +24,7 @@ var ( ) type TypesTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -40,7 +40,7 @@ func (suite *TypesTestSuite) SetupTest() { } func TestTypesTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) + testifysuite.Run(t, new(TypesTestSuite)) } func (suite *TypesTestSuite) TestGenerateAddress() { diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index 3df2028d9b1..d8167e0ab59 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-go/v7/internal/collections" connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" ) @@ -133,13 +134,7 @@ func ValidateHostMetadata(ctx sdk.Context, channelKeeper ChannelKeeper, connecti // isSupportedEncoding returns true if the provided encoding is supported, otherwise false func isSupportedEncoding(encoding string) bool { - for _, enc := range getSupportedEncoding() { - if enc == encoding { - return true - } - } - - return false + return collections.Contains(encoding, getSupportedEncoding()) } // getSupportedEncoding returns a string slice of supported encoding formats @@ -149,13 +144,7 @@ func getSupportedEncoding() []string { // isSupportedTxType returns true if the provided transaction type is supported, otherwise false func isSupportedTxType(txType string) bool { - for _, t := range getSupportedTxTypes() { - if t == txType { - return true - } - } - - return false + return collections.Contains(txType, getSupportedTxTypes()) } // getSupportedTxTypes returns a string slice of supported transaction types diff --git a/modules/apps/27-interchain-accounts/types/packet.go b/modules/apps/27-interchain-accounts/types/packet.go index 213497f6ac6..f4e0efc9958 100644 --- a/modules/apps/27-interchain-accounts/types/packet.go +++ b/modules/apps/27-interchain-accounts/types/packet.go @@ -1,12 +1,21 @@ package types import ( + "encoding/json" + "strings" "time" errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var ( + _ ibcexported.PacketData = (*InterchainAccountPacketData)(nil) + _ ibcexported.PacketDataProvider = (*InterchainAccountPacketData)(nil) ) // MaxMemoCharLength defines the maximum length for the InterchainAccountPacketData memo field @@ -48,6 +57,11 @@ func (iapd InterchainAccountPacketData) GetBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&iapd)) } +// UnmarshalJSON unmarshals raw JSON bytes into an InterchainAccountPacketData. +func (iapd *InterchainAccountPacketData) UnmarshalJSON(bz []byte) error { + return ModuleCdc.UnmarshalJSON(bz, iapd) +} + // GetBytes returns the JSON marshalled interchain account CosmosTx. func (ct CosmosTx) GetBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&ct)) @@ -64,3 +78,41 @@ func (ct CosmosTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { return nil } + +// GetPacketSender returns the sender address of the interchain accounts packet data. +// It is obtained from the source port ID by cutting off the ControllerPortPrefix. +// If the source port ID does not have the ControllerPortPrefix, then an empty string is returned. +// +// NOTE: +// - The sender address is set by the packet sender and may not have been validated a signature +// check if the packet sender isn't the interchain accounts module. +// - The sender address must only be used by modules on the sending chain. +func (InterchainAccountPacketData) GetPacketSender(sourcePortID string) string { + icaOwner, found := strings.CutPrefix(sourcePortID, ControllerPortPrefix) + if !found { + return "" + } + return icaOwner +} + +// GetCustomPacketData interprets the memo field of the packet data as a JSON object +// and returns the value associated with the given key. +// If the key is missing or the memo is not properly formatted, then nil is returned. +func (iapd InterchainAccountPacketData) GetCustomPacketData(key string) interface{} { + if len(iapd.Memo) == 0 { + return nil + } + + jsonObject := make(map[string]interface{}) + err := json.Unmarshal([]byte(iapd.Memo), &jsonObject) + if err != nil { + return nil + } + + memoData, found := jsonObject[key] + if !found { + return nil + } + + return memoData +} diff --git a/modules/apps/27-interchain-accounts/types/packet_test.go b/modules/apps/27-interchain-accounts/types/packet_test.go index 329e5a837f4..6708ff2adaf 100644 --- a/modules/apps/27-interchain-accounts/types/packet_test.go +++ b/modules/apps/27-interchain-accounts/types/packet_test.go @@ -1,7 +1,10 @@ package types_test import ( + "fmt" + "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" ) var largeMemo = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum" @@ -82,3 +85,119 @@ func (suite *TypesTestSuite) TestValidateBasic() { }) } } + +func (suite *TypesTestSuite) TestGetPacketSender() { + testCases := []struct { + name string + srcPortID string + expSender string + }{ + { + "success: port id has prefix", + types.ControllerPortPrefix + ibctesting.TestAccAddress, + ibctesting.TestAccAddress, + }, + { + "failure: missing prefix", + ibctesting.TestAccAddress, + "", + }, + { + "failure: empty port id", + "", + "", + }, + } + + for _, tc := range testCases { + packetData := types.InterchainAccountPacketData{} + suite.Require().Equal(tc.expSender, packetData.GetPacketSender(tc.srcPortID)) + } +} + +func (suite *TypesTestSuite) TestPacketDataProvider() { + expCallbackAddr := ibctesting.TestAccAddress + + testCases := []struct { + name string + packetData types.InterchainAccountPacketData + expCustomData interface{} + }{ + { + "success: src_callback key in memo", + types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, expCallbackAddr), + }, + map[string]interface{}{ + "address": expCallbackAddr, + }, + }, + { + "success: src_callback key in memo with additional fields", + types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "200000"}}`, expCallbackAddr), + }, + map[string]interface{}{ + "address": expCallbackAddr, + "gas_limit": "200000", + }, + }, + { + "success: src_callback has string valu", + types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: `{"src_callback": "string"}`, + }, + "string", + }, + { + "failure: empty memo", + types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: "", + }, + nil, + }, + { + "failure: non-json memo", + types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: "invalid", + }, + nil, + }, + } + + for _, tc := range testCases { + customData := tc.packetData.GetCustomPacketData("src_callback") + suite.Require().Equal(tc.expCustomData, customData) + } +} + +func (suite *TypesTestSuite) TestPacketDataUnmarshalerInterface() { + expPacketData := types.InterchainAccountPacketData{ + Type: types.EXECUTE_TX, + Data: []byte("data"), + Memo: "some memo", + } + + var packetData types.InterchainAccountPacketData + err := packetData.UnmarshalJSON(expPacketData.GetBytes()) + suite.Require().NoError(err) + suite.Require().Equal(expPacketData, packetData) + + // test invalid packet data + invalidPacketDataBytes := []byte("invalid packet data") + + var invalidPacketData types.InterchainAccountPacketData + err = packetData.UnmarshalJSON(invalidPacketDataBytes) + suite.Require().Error(err) + suite.Require().Equal(types.InterchainAccountPacketData{}, invalidPacketData) +} diff --git a/modules/apps/29-fee/fee_test.go b/modules/apps/29-fee/fee_test.go index 0505a186132..390bfd4e571 100644 --- a/modules/apps/29-fee/fee_test.go +++ b/modules/apps/29-fee/fee_test.go @@ -3,7 +3,7 @@ package fee_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -13,7 +13,7 @@ import ( ) type FeeTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -48,7 +48,7 @@ func (suite *FeeTestSuite) SetupTest() { } func TestIBCFeeTestSuite(t *testing.T) { - suite.Run(t, new(FeeTestSuite)) + testifysuite.Run(t, new(FeeTestSuite)) } func (suite *FeeTestSuite) CreateMockPacket() channeltypes.Packet { diff --git a/modules/apps/29-fee/ibc_middleware.go b/modules/apps/29-fee/ibc_middleware.go index 5b260ad7be9..62d73a27f27 100644 --- a/modules/apps/29-fee/ibc_middleware.go +++ b/modules/apps/29-fee/ibc_middleware.go @@ -16,7 +16,10 @@ import ( "github.com/cosmos/ibc-go/v7/modules/core/exported" ) -var _ porttypes.Middleware = (*IBCMiddleware)(nil) +var ( + _ porttypes.Middleware = (*IBCMiddleware)(nil) + _ porttypes.PacketDataUnmarshaler = (*IBCMiddleware)(nil) +) // IBCMiddleware implements the ICS26 callbacks for the fee middleware given the // fee keeper and the underlying application. @@ -53,13 +56,15 @@ func (im IBCMiddleware) OnChanOpenInit( AppVersion: "", } } else { - if err := types.ModuleCdc.UnmarshalJSON([]byte(version), &versionMetadata); err != nil { + metadata, err := types.MetadataFromVersion(version) + if err != nil { // Since it is valid for fee version to not be specified, the above middleware version may be for a middleware // lower down in the stack. Thus, if it is not a fee version we pass the entire version string onto the underlying // application. return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, version) } + versionMetadata = metadata } if versionMetadata.FeeVersion != types.Version { @@ -96,8 +101,8 @@ func (im IBCMiddleware) OnChanOpenTry( counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error) { - var versionMetadata types.Metadata - if err := types.ModuleCdc.UnmarshalJSON([]byte(counterpartyVersion), &versionMetadata); err != nil { + versionMetadata, err := types.MetadataFromVersion(counterpartyVersion) + if err != nil { // Since it is valid for fee version to not be specified, the above middleware version may be for a middleware // lower down in the stack. Thus, if it is not a fee version we pass the entire version string onto the underlying // application. @@ -136,8 +141,8 @@ func (im IBCMiddleware) OnChanOpenAck( // If handshake was initialized with fee enabled it must complete with fee enabled. // If handshake was initialized with fee disabled it must complete with fee disabled. if im.keeper.IsFeeEnabled(ctx, portID, channelID) { - var versionMetadata types.Metadata - if err := types.ModuleCdc.UnmarshalJSON([]byte(counterpartyVersion), &versionMetadata); err != nil { + versionMetadata, err := types.MetadataFromVersion(counterpartyVersion) + if err != nil { return errorsmod.Wrapf(err, "failed to unmarshal ICS29 counterparty version metadata: %s", counterpartyVersion) } @@ -348,3 +353,15 @@ func (im IBCMiddleware) WriteAcknowledgement( func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { return im.keeper.GetAppVersion(ctx, portID, channelID) } + +// UnmarshalPacketData attempts to use the underlying app to unmarshal the packet data. +// If the underlying app does not support the PacketDataUnmarshaler interface, an error is returned. +// This function implements the optional PacketDataUnmarshaler interface required for ADR 008 support. +func (im IBCMiddleware) UnmarshalPacketData(bz []byte) (interface{}, error) { + unmarshaler, ok := im.app.(porttypes.PacketDataUnmarshaler) + if !ok { + return nil, errorsmod.Wrapf(types.ErrUnsupportedAction, "underlying app does not implement %T", (*porttypes.PacketDataUnmarshaler)(nil)) + } + + return unmarshaler.UnmarshalPacketData(bz) +} diff --git a/modules/apps/29-fee/ibc_middleware_test.go b/modules/apps/29-fee/ibc_middleware_test.go index ee1d0ed228a..48fbf673ea1 100644 --- a/modules/apps/29-fee/ibc_middleware_test.go +++ b/modules/apps/29-fee/ibc_middleware_test.go @@ -3,15 +3,18 @@ package fee_test import ( "fmt" + errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - fee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" + ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" + feekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" 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" "github.com/cosmos/ibc-go/v7/modules/core/exported" ibctesting "github.com/cosmos/ibc-go/v7/testing" @@ -1066,8 +1069,7 @@ func (suite *FeeTestSuite) TestGetAppVersion() { cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) suite.Require().True(ok) - feeModule := cbs.(fee.IBCMiddleware) - + feeModule := cbs.(porttypes.ICS4Wrapper) appVersion, found := feeModule.GetAppVersion(suite.chainA.GetContext(), portID, channelID) if tc.expFound { @@ -1080,3 +1082,27 @@ func (suite *FeeTestSuite) TestGetAppVersion() { }) } } + +func (suite *FeeTestSuite) TestPacketDataUnmarshalerInterface() { + module, _, err := suite.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.MockFeePort) + suite.Require().NoError(err) + + cbs, ok := suite.chainA.App.GetIBCKeeper().Router.GetRoute(module) + suite.Require().True(ok) + + feeModule, ok := cbs.(porttypes.PacketDataUnmarshaler) + suite.Require().True(ok) + + packetData, err := feeModule.UnmarshalPacketData(ibcmock.MockPacketData) + suite.Require().NoError(err) + suite.Require().Equal(ibcmock.MockPacketData, packetData) +} + +func (suite *FeeTestSuite) TestPacketDataUnmarshalerInterfaceError() { + // test the case when the underlying application cannot be casted to a PacketDataUnmarshaler + mockFeeMiddleware := ibcfee.NewIBCMiddleware(nil, feekeeper.Keeper{}) + + _, err := mockFeeMiddleware.UnmarshalPacketData(ibcmock.MockPacketData) + expError := errorsmod.Wrapf(types.ErrUnsupportedAction, "underlying app does not implement %T", (*porttypes.PacketDataUnmarshaler)(nil)) + suite.Require().ErrorIs(err, expError) +} diff --git a/modules/apps/29-fee/keeper/export_test.go b/modules/apps/29-fee/keeper/export_test.go new file mode 100644 index 00000000000..3600380f0a8 --- /dev/null +++ b/modules/apps/29-fee/keeper/export_test.go @@ -0,0 +1,12 @@ +package keeper + +/* + This file is to allow for unexported functions and fields to be accessible to the testing package. +*/ + +import porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + +// GetICS4Wrapper is a getter for the keeper's ICS4Wrapper. +func (k *Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { + return k.ics4Wrapper +} diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index 307e3a48d2e..fd810553d8b 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -50,8 +50,15 @@ func NewKeeper( } } +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after +// the keepers creation to set the middleware which is above this module +// in the IBC application stack. +func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + k.ics4Wrapper = wrapper +} + // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+ibcexported.ModuleName+"-"+types.ModuleName) } diff --git a/modules/apps/29-fee/keeper/keeper_test.go b/modules/apps/29-fee/keeper/keeper_test.go index f2265afe695..9cf73d3ffba 100644 --- a/modules/apps/29-fee/keeper/keeper_test.go +++ b/modules/apps/29-fee/keeper/keeper_test.go @@ -4,13 +4,15 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" + channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" @@ -24,7 +26,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -60,7 +62,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } // helper function @@ -297,3 +299,24 @@ func (suite *KeeperTestSuite) TestGetAllCounterpartyPayees() { suite.Require().Len(counterpartyPayeeAddr, len(expectedCounterpartyPayee)) suite.Require().Equal(counterpartyPayeeAddr, expectedCounterpartyPayee) } + +func (suite *KeeperTestSuite) TestWithICS4Wrapper() { + suite.SetupTest() + + // test if the ics4 wrapper is the channel keeper initially + ics4Wrapper := suite.chainA.GetSimApp().IBCFeeKeeper.GetICS4Wrapper() + + _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + suite.Require().True(isChannelKeeper) + _, isFeeKeeper := ics4Wrapper.(keeper.Keeper) + suite.Require().False(isFeeKeeper) + + // set the ics4 wrapper to itself (don't do this in production) + suite.chainA.GetSimApp().IBCFeeKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCFeeKeeper) + ics4Wrapper = suite.chainA.GetSimApp().IBCFeeKeeper.GetICS4Wrapper() + + _, isFeeKeeper = ics4Wrapper.(keeper.Keeper) + suite.Require().True(isFeeKeeper) + _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) + suite.Require().False(isChannelKeeper) +} diff --git a/modules/apps/29-fee/keeper/relay.go b/modules/apps/29-fee/keeper/relay.go index a5328703d7c..c5d928b3483 100644 --- a/modules/apps/29-fee/keeper/relay.go +++ b/modules/apps/29-fee/keeper/relay.go @@ -66,8 +66,8 @@ func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string return version, true } - var metadata types.Metadata - if err := types.ModuleCdc.UnmarshalJSON([]byte(version), &metadata); err != nil { + metadata, err := types.MetadataFromVersion(version) + if err != nil { panic(fmt.Errorf("unable to unmarshal metadata for fee enabled channel: %w", err)) } diff --git a/modules/apps/29-fee/module.go b/modules/apps/29-fee/module.go index e2981cd97f6..95818469cfb 100644 --- a/modules/apps/29-fee/module.go +++ b/modules/apps/29-fee/module.go @@ -120,11 +120,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -135,10 +135,10 @@ func (AppModule) GenerateGenesisState(_ *module.SimulationState) { } // RegisterStoreDecoder registers a decoder for 29-fee module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { +func (AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the 29-fee module operations with their respective weights. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/modules/apps/29-fee/types/errors.go b/modules/apps/29-fee/types/errors.go index 26167c71016..22dd35000a2 100644 --- a/modules/apps/29-fee/types/errors.go +++ b/modules/apps/29-fee/types/errors.go @@ -16,4 +16,5 @@ var ( ErrFeeNotEnabled = errorsmod.Register(ModuleName, 9, "fee module is not enabled for this channel. If this error occurs after channel setup, fee module may not be enabled") ErrRelayerNotFoundForAsyncAck = errorsmod.Register(ModuleName, 10, "relayer address must be stored for async WriteAcknowledgement") ErrFeeModuleLocked = errorsmod.Register(ModuleName, 11, "the fee module is currently locked, a severe bug has been detected") + ErrUnsupportedAction = errorsmod.Register(ModuleName, 12, "unsupported action") ) diff --git a/modules/apps/29-fee/types/fee.pb.go b/modules/apps/29-fee/types/fee.pb.go index 6568d3f9310..c678c1c867f 100644 --- a/modules/apps/29-fee/types/fee.pb.go +++ b/modules/apps/29-fee/types/fee.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" types1 "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" @@ -265,37 +266,38 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/fee.proto", fileDescriptor_cb3319f1af2a53e5) } var fileDescriptor_cb3319f1af2a53e5 = []byte{ - // 467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x41, 0x8b, 0x13, 0x31, - 0x14, 0xc7, 0x9b, 0x56, 0x76, 0xb7, 0x29, 0x7a, 0x18, 0x16, 0x5c, 0x8b, 0xce, 0xae, 0x03, 0x42, - 0x2f, 0x4d, 0x6c, 0x55, 0xc4, 0x9b, 0x56, 0x28, 0xf4, 0xa4, 0xf4, 0x22, 0x78, 0x59, 0x32, 0xc9, - 0x9b, 0x6e, 0xe8, 0x74, 0x32, 0x4c, 0xd2, 0xc2, 0xde, 0xfd, 0x00, 0x7e, 0x07, 0x6f, 0x7e, 0x0b, - 0x6f, 0x7b, 0xdc, 0xa3, 0x27, 0x95, 0xf6, 0x8b, 0xc8, 0xcb, 0xc4, 0x61, 0x51, 0xf6, 0x22, 0x3d, - 0xcd, 0x7b, 0x6f, 0xde, 0x7b, 0xbf, 0x7f, 0xf2, 0xf2, 0xe8, 0x63, 0x9d, 0x4a, 0x2e, 0xca, 0x32, - 0xd7, 0x52, 0x38, 0x6d, 0x0a, 0xcb, 0x33, 0x00, 0xbe, 0x19, 0xe1, 0x87, 0x95, 0x95, 0x71, 0x26, - 0xba, 0xaf, 0x53, 0xc9, 0x6e, 0xa6, 0x30, 0xfc, 0xb7, 0x19, 0xf5, 0x63, 0x69, 0xec, 0xca, 0x58, - 0x9e, 0x0a, 0x8b, 0x25, 0x29, 0x38, 0x31, 0xe2, 0xd2, 0xe8, 0xa2, 0x2e, 0xec, 0x1f, 0x2f, 0xcc, - 0xc2, 0x78, 0x93, 0xa3, 0x15, 0xa2, 0x9e, 0x28, 0x4d, 0x05, 0x5c, 0x5e, 0x88, 0xa2, 0x80, 0x1c, - 0x69, 0xc1, 0xac, 0x53, 0x92, 0x6f, 0x6d, 0xda, 0x99, 0x02, 0x44, 0x19, 0x3d, 0xaa, 0x40, 0x6e, - 0xce, 0x33, 0x80, 0x13, 0x72, 0xd6, 0x19, 0xf4, 0xc6, 0x0f, 0x58, 0xcd, 0x64, 0xc8, 0x64, 0x81, - 0xc9, 0xde, 0x1a, 0x5d, 0x4c, 0x9e, 0x5e, 0xfd, 0x38, 0x6d, 0x7d, 0xfd, 0x79, 0x3a, 0x58, 0x68, - 0x77, 0xb1, 0x4e, 0x99, 0x34, 0x2b, 0x1e, 0x04, 0xd6, 0x9f, 0xa1, 0x55, 0x4b, 0xee, 0x2e, 0x4b, - 0xb0, 0xbe, 0xc0, 0xce, 0x0f, 0xb1, 0x39, 0x72, 0x14, 0x3d, 0x14, 0x72, 0xe9, 0x31, 0xed, 0xfd, - 0x63, 0x0e, 0x84, 0x5c, 0x22, 0x25, 0xa7, 0x3d, 0xa7, 0x57, 0x60, 0xd6, 0xce, 0x93, 0x3a, 0xfb, - 0x27, 0xd1, 0xd0, 0x7f, 0x0a, 0x90, 0x7c, 0x22, 0xb4, 0xfb, 0x5e, 0xc8, 0x25, 0xa0, 0x17, 0x3d, - 0xa7, 0x9d, 0xfa, 0x12, 0xc9, 0xa0, 0x37, 0x7e, 0xc8, 0x6e, 0x99, 0x28, 0x9b, 0x02, 0x4c, 0xee, - 0x20, 0x76, 0x8e, 0xe9, 0xd1, 0x13, 0x7a, 0xaf, 0x82, 0x6c, 0x5d, 0xa8, 0x73, 0xa1, 0x54, 0x05, - 0xd6, 0x9e, 0xb4, 0xcf, 0xc8, 0xa0, 0x3b, 0xbf, 0x5b, 0x47, 0xdf, 0xd4, 0xc1, 0xa8, 0x8f, 0x63, - 0xca, 0xc5, 0x25, 0x54, 0xd6, 0x9f, 0xaa, 0x3b, 0x6f, 0xfc, 0xe4, 0x03, 0xa5, 0x8d, 0x0a, 0x1b, - 0xcd, 0x68, 0xaf, 0xf4, 0x1e, 0xde, 0x80, 0x0d, 0x33, 0x4d, 0x6e, 0x95, 0xd3, 0x54, 0x06, 0x51, - 0xb4, 0x6c, 0x5a, 0x25, 0x5f, 0x08, 0x3d, 0x9e, 0x29, 0x28, 0x9c, 0xce, 0x34, 0xa8, 0x1b, 0x8c, - 0xd7, 0xb4, 0x1b, 0x18, 0x5a, 0x85, 0x03, 0x3f, 0xf2, 0x04, 0x7c, 0x73, 0xec, 0xcf, 0x43, 0x6b, - 0xba, 0xcf, 0x54, 0x68, 0x7e, 0x54, 0x06, 0xff, 0x6f, 0x95, 0xed, 0xff, 0x57, 0x39, 0x79, 0x77, - 0xb5, 0x8d, 0xc9, 0xf5, 0x36, 0x26, 0xbf, 0xb6, 0x31, 0xf9, 0xbc, 0x8b, 0x5b, 0xd7, 0xbb, 0xb8, - 0xf5, 0x7d, 0x17, 0xb7, 0x3e, 0xbe, 0xf8, 0x77, 0xaa, 0x3a, 0x95, 0xc3, 0x85, 0xe1, 0x9b, 0x97, - 0x7c, 0x65, 0xd4, 0x3a, 0x07, 0x8b, 0x8b, 0x69, 0xf9, 0xf8, 0xd5, 0x10, 0x77, 0xd2, 0x0f, 0x3a, - 0x3d, 0xf0, 0x1b, 0xf2, 0xec, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xec, 0x7b, 0x52, 0xb8, - 0x03, 0x00, 0x00, + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0x04, 0xb5, 0xcd, 0x45, 0x30, 0x98, 0x4a, 0x2d, 0x11, 0xb8, 0xc5, 0x12, 0x52, + 0x84, 0x94, 0x3b, 0x12, 0x40, 0x08, 0x26, 0x08, 0x52, 0xa4, 0x4c, 0xa0, 0x2c, 0x48, 0x2c, 0xd5, + 0xf9, 0xee, 0xd9, 0x3d, 0xc5, 0xf6, 0x59, 0x3e, 0x27, 0x52, 0x57, 0x3e, 0x01, 0x2b, 0x33, 0x1b, + 0x13, 0x5f, 0x81, 0xad, 0x63, 0x47, 0x26, 0x40, 0xc9, 0xc0, 0xd7, 0x40, 0xef, 0x7c, 0x58, 0x55, + 0x51, 0x17, 0x94, 0xc9, 0xf7, 0xee, 0xee, 0xfd, 0x7f, 0x7f, 0xbf, 0x77, 0x8f, 0xdc, 0x57, 0x91, + 0x60, 0xbc, 0x28, 0x52, 0x25, 0x78, 0xa5, 0x74, 0x6e, 0x58, 0x0c, 0xc0, 0x56, 0x23, 0xfc, 0xd0, + 0xa2, 0xd4, 0x95, 0xf6, 0x0f, 0x54, 0x24, 0xe8, 0xe5, 0x2b, 0x14, 0xcf, 0x56, 0xa3, 0x7e, 0x20, + 0xb4, 0xc9, 0xb4, 0x61, 0x11, 0x37, 0x98, 0x12, 0x41, 0xc5, 0x47, 0x4c, 0x68, 0x95, 0xd7, 0x89, + 0xfd, 0xfd, 0x44, 0x27, 0xda, 0x2e, 0x19, 0xae, 0xdc, 0xae, 0x25, 0x0a, 0x5d, 0x02, 0x13, 0xa7, + 0x3c, 0xcf, 0x21, 0x45, 0x9a, 0x5b, 0xba, 0x2b, 0x07, 0x4e, 0x38, 0x33, 0x09, 0x1e, 0x66, 0x26, + 0xa9, 0x0f, 0xc2, 0x6f, 0x6d, 0xd2, 0x99, 0x02, 0xf8, 0x31, 0xd9, 0x2b, 0x41, 0xac, 0x4e, 0x62, + 0x80, 0x43, 0xef, 0xb8, 0x33, 0xe8, 0x8d, 0xef, 0xd0, 0x3a, 0x87, 0xa2, 0x19, 0xea, 0xcc, 0xd0, + 0xd7, 0x5a, 0xe5, 0x93, 0x47, 0xe7, 0x3f, 0x8e, 0x5a, 0x5f, 0x7e, 0x1e, 0x0d, 0x12, 0x55, 0x9d, + 0x2e, 0x23, 0x2a, 0x74, 0xc6, 0x1c, 0xa0, 0xfe, 0x0c, 0x8d, 0x5c, 0xb0, 0xea, 0xac, 0x00, 0x63, + 0x13, 0xcc, 0x7c, 0x17, 0xc5, 0x91, 0x23, 0xc9, 0x2e, 0x17, 0x0b, 0x8b, 0x69, 0x6f, 0x1f, 0xb3, + 0xc3, 0xc5, 0x02, 0x29, 0x29, 0xe9, 0x55, 0x2a, 0x03, 0xbd, 0xac, 0x2c, 0xa9, 0xb3, 0x7d, 0x12, + 0x71, 0xfa, 0x53, 0x80, 0xf0, 0x93, 0x47, 0xba, 0x6f, 0xb9, 0x58, 0x00, 0x46, 0xfe, 0x13, 0xd2, + 0xa9, 0x8b, 0xe8, 0x0d, 0x7a, 0xe3, 0xbb, 0xf4, 0x9a, 0x56, 0xd3, 0x29, 0xc0, 0xe4, 0x06, 0x62, + 0xe7, 0x78, 0xdd, 0x7f, 0x40, 0x6e, 0x95, 0x10, 0x2f, 0x73, 0x79, 0xc2, 0xa5, 0x2c, 0xc1, 0x98, + 0xc3, 0xf6, 0xb1, 0x37, 0xe8, 0xce, 0x6f, 0xd6, 0xbb, 0xaf, 0xea, 0x4d, 0xbf, 0x8f, 0x6d, 0x4a, + 0xf9, 0x19, 0x94, 0xc6, 0xfe, 0x55, 0x77, 0xde, 0xc4, 0x2f, 0x6e, 0x7f, 0xf8, 0xfd, 0xf5, 0xe1, + 0x15, 0x95, 0xf0, 0x1d, 0x21, 0x8d, 0x35, 0xe3, 0xcf, 0x48, 0xaf, 0xb0, 0x11, 0x96, 0xc5, 0xb8, + 0x46, 0x87, 0xd7, 0x7a, 0x6c, 0x32, 0x9d, 0x53, 0x52, 0x34, 0x52, 0xe1, 0x67, 0x8f, 0xec, 0xcf, + 0x24, 0xe4, 0x95, 0x8a, 0x15, 0xc8, 0x4b, 0x8c, 0x97, 0xa4, 0xeb, 0x18, 0x4a, 0xba, 0x2a, 0xdc, + 0xb3, 0x04, 0x7c, 0xa1, 0xf4, 0xef, 0xb3, 0x6c, 0xd4, 0x67, 0xd2, 0x89, 0xef, 0x15, 0x2e, 0xbe, + 0xea, 0xb2, 0xfd, 0xff, 0x2e, 0x27, 0x6f, 0xce, 0xd7, 0x81, 0x77, 0xb1, 0x0e, 0xbc, 0x5f, 0xeb, + 0xc0, 0xfb, 0xb8, 0x09, 0x5a, 0x17, 0x9b, 0xa0, 0xf5, 0x7d, 0x13, 0xb4, 0xde, 0x3f, 0xfd, 0xb7, + 0xd5, 0x2a, 0x12, 0xc3, 0x44, 0xb3, 0xd5, 0x33, 0x96, 0x69, 0xb9, 0x4c, 0xc1, 0xe0, 0x18, 0x1b, + 0x36, 0x7e, 0x3e, 0xc4, 0x09, 0xb6, 0xdd, 0x8f, 0x76, 0xec, 0xd8, 0x3c, 0xfe, 0x13, 0x00, 0x00, + 0xff, 0xff, 0xb0, 0x8c, 0x0d, 0x3d, 0xe6, 0x03, 0x00, 0x00, } func (m *Fee) Marshal() (dAtA []byte, err error) { diff --git a/modules/apps/29-fee/types/msgs.go b/modules/apps/29-fee/types/msgs.go index 9063a4101a6..56c5869d765 100644 --- a/modules/apps/29-fee/types/msgs.go +++ b/modules/apps/29-fee/types/msgs.go @@ -163,12 +163,12 @@ func (msg MsgPayPacketFee) GetSigners() []sdk.AccAddress { } // Type implements legacytx.LegacyMsg -func (msg MsgPayPacketFee) Type() string { +func (MsgPayPacketFee) Type() string { return TypeMsgPayPacketFee } // Route implements legacytx.LegacyMsg -func (msg MsgPayPacketFee) Route() string { +func (MsgPayPacketFee) Route() string { return RouterKey } @@ -205,12 +205,12 @@ func (msg MsgPayPacketFeeAsync) GetSigners() []sdk.AccAddress { } // Type implements legacytx.LegacyMsg -func (msg MsgPayPacketFeeAsync) Type() string { +func (MsgPayPacketFeeAsync) Type() string { return TypeMsgPayPacketFeeAsync } // Route implements legacytx.LegacyMsg -func (msg MsgPayPacketFeeAsync) Route() string { +func (MsgPayPacketFeeAsync) Route() string { return RouterKey } diff --git a/modules/apps/29-fee/types/tx.pb.go b/modules/apps/29-fee/types/tx.pb.go index 6c517752734..356f00e7491 100644 --- a/modules/apps/29-fee/types/tx.pb.go +++ b/modules/apps/29-fee/types/tx.pb.go @@ -373,49 +373,48 @@ func init() { func init() { proto.RegisterFile("ibc/applications/fee/v1/tx.proto", fileDescriptor_05c93128649f1b96) } var fileDescriptor_05c93128649f1b96 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcf, 0x4e, 0xdb, 0x4e, - 0x10, 0x8e, 0x09, 0xff, 0x32, 0xf0, 0xfb, 0x01, 0x2b, 0xd4, 0x18, 0x0b, 0x0c, 0x44, 0xa8, 0xa2, - 0x48, 0xb1, 0x9b, 0xb4, 0xa8, 0x2a, 0x52, 0xa5, 0x16, 0x24, 0x2a, 0x0e, 0xa8, 0x51, 0x8e, 0xbd, - 0x20, 0x67, 0x3d, 0x31, 0x6e, 0x13, 0xaf, 0xe5, 0x75, 0xa2, 0xfa, 0x56, 0xf5, 0xd4, 0x43, 0x0f, - 0xed, 0x1b, 0xf4, 0x11, 0xe8, 0x3b, 0xf4, 0xc0, 0x91, 0x63, 0x4f, 0xa8, 0x82, 0x03, 0x6f, 0xd0, - 0x73, 0xb5, 0xf6, 0xda, 0x35, 0xa1, 0x41, 0x69, 0xa5, 0xde, 0x3c, 0x3b, 0xdf, 0x7e, 0x33, 0xdf, - 0xe7, 0xd9, 0x81, 0x35, 0xb7, 0x45, 0x4d, 0xcb, 0xf7, 0x3b, 0x2e, 0xb5, 0x42, 0x97, 0x79, 0xdc, - 0x6c, 0x23, 0x9a, 0xfd, 0x9a, 0x19, 0xbe, 0x31, 0xfc, 0x80, 0x85, 0x8c, 0x94, 0xdd, 0x16, 0x35, - 0xf2, 0x08, 0xa3, 0x8d, 0x68, 0xf4, 0x6b, 0xda, 0xa2, 0xc3, 0x1c, 0x16, 0x63, 0x4c, 0xf1, 0x95, - 0xc0, 0xb5, 0xf5, 0x61, 0x84, 0xe2, 0x56, 0x0e, 0x42, 0x59, 0x80, 0x26, 0x3d, 0xb6, 0x3c, 0x0f, - 0x3b, 0x22, 0x2d, 0x3f, 0x25, 0xa4, 0x4c, 0x19, 0xef, 0x32, 0x6e, 0x76, 0xb9, 0x23, 0x92, 0x5d, - 0xee, 0x24, 0x89, 0xca, 0x07, 0x05, 0xe6, 0x0f, 0xb9, 0xd3, 0x44, 0xc7, 0xe5, 0x21, 0x06, 0x0d, - 0x2b, 0x42, 0x24, 0x65, 0x98, 0xf2, 0x59, 0x10, 0x1e, 0xb9, 0xb6, 0xaa, 0xac, 0x29, 0x9b, 0xa5, - 0xe6, 0xa4, 0x08, 0x0f, 0x6c, 0xb2, 0x02, 0x20, 0x79, 0x45, 0x6e, 0x2c, 0xce, 0x95, 0xe4, 0xc9, - 0x81, 0x4d, 0x54, 0x98, 0x0a, 0xb0, 0x63, 0x45, 0x18, 0xa8, 0xc5, 0x38, 0x97, 0x86, 0x64, 0x11, - 0x26, 0x7c, 0x41, 0xad, 0x8e, 0xc7, 0xe7, 0x49, 0xb0, 0x33, 0xff, 0xfe, 0xf3, 0x6a, 0xe1, 0xdd, - 0xd5, 0xc9, 0x56, 0x8a, 0xab, 0x68, 0xa0, 0x0e, 0x76, 0xd3, 0x44, 0xee, 0x33, 0x8f, 0x63, 0xe5, - 0x8b, 0x02, 0xcb, 0xb9, 0xe4, 0x1e, 0xeb, 0x79, 0x21, 0x06, 0xbe, 0x15, 0x84, 0xd1, 0xbf, 0x6a, - 0xbb, 0x0a, 0x84, 0xe6, 0xca, 0x1c, 0xe5, 0x35, 0x2c, 0xd0, 0xc1, 0x06, 0x7e, 0xa3, 0xe7, 0x2e, - 0x6c, 0xdc, 0xd6, 0x72, 0xa6, 0xed, 0x5c, 0x81, 0xb9, 0x43, 0xee, 0x34, 0xac, 0xa8, 0x61, 0xd1, - 0xd7, 0x18, 0xee, 0x23, 0x92, 0x87, 0x50, 0x6c, 0x23, 0xc6, 0x52, 0x66, 0xea, 0xcb, 0xc6, 0x90, - 0xb1, 0x31, 0xf6, 0x11, 0x77, 0xc7, 0x4f, 0xcf, 0x57, 0x0b, 0x4d, 0x01, 0x27, 0x1b, 0xf0, 0x3f, - 0x67, 0xbd, 0x80, 0xe2, 0x51, 0xea, 0x45, 0xa2, 0x77, 0x36, 0x39, 0x6d, 0x24, 0x8e, 0x6c, 0xc1, - 0x82, 0x44, 0xe5, 0x8c, 0x49, 0xc4, 0xcf, 0x25, 0x89, 0xbd, 0xcc, 0x9e, 0x3b, 0x30, 0xc9, 0x5d, - 0xc7, 0xc3, 0x40, 0x0a, 0x97, 0x11, 0xd1, 0x60, 0x5a, 0xca, 0xe4, 0xea, 0xc4, 0x5a, 0x71, 0xb3, - 0xd4, 0xcc, 0xe2, 0x9d, 0xb9, 0xd4, 0x09, 0x09, 0xae, 0x2c, 0x41, 0x79, 0x40, 0x5f, 0xa6, 0xfd, - 0xab, 0x02, 0x8b, 0x03, 0xb9, 0x67, 0x3c, 0xf2, 0x28, 0x79, 0x0a, 0x25, 0x3f, 0x3e, 0x49, 0xff, - 0xe8, 0x4c, 0x7d, 0x25, 0xb6, 0x41, 0xcc, 0xba, 0x91, 0x0e, 0x78, 0xbf, 0x66, 0x24, 0xf7, 0x0e, - 0x6c, 0xe9, 0xc3, 0xb4, 0x2f, 0x63, 0xf2, 0x1c, 0x40, 0x32, 0x08, 0x27, 0xc7, 0x62, 0x8a, 0xca, - 0x50, 0x27, 0xb3, 0xf2, 0x92, 0x47, 0x56, 0xdf, 0x47, 0xdc, 0x59, 0x4f, 0xf5, 0xa8, 0xbf, 0xf8, - 0x8c, 0x00, 0xdb, 0x3d, 0xcf, 0xb6, 0x6c, 0x3b, 0x40, 0xce, 0x2b, 0x7a, 0x3c, 0x9d, 0x37, 0x54, - 0xa4, 0x32, 0xeb, 0x3f, 0x8a, 0x50, 0x3c, 0xe4, 0x0e, 0xe9, 0xc2, 0x7f, 0xd7, 0x5f, 0xdb, 0xbd, - 0xa1, 0x0d, 0x0d, 0x3e, 0x05, 0xad, 0x36, 0x32, 0x34, 0x2d, 0x4b, 0x3e, 0x29, 0xb0, 0x34, 0xfc, - 0xc9, 0x6c, 0x8f, 0x42, 0x78, 0xe3, 0x9a, 0xf6, 0xe4, 0xaf, 0xae, 0x65, 0x3d, 0xbd, 0x82, 0xd9, - 0x6b, 0x93, 0xbe, 0x79, 0x1b, 0x5d, 0x1e, 0xa9, 0xdd, 0x1f, 0x15, 0x99, 0xd5, 0x8a, 0x60, 0xe1, - 0xe6, 0x64, 0x55, 0x47, 0xa5, 0x89, 0xe1, 0xda, 0xf6, 0x1f, 0xc1, 0xd3, 0xd2, 0xda, 0xc4, 0xdb, - 0xab, 0x93, 0x2d, 0x65, 0xf7, 0xc5, 0xe9, 0x85, 0xae, 0x9c, 0x5d, 0xe8, 0xca, 0xf7, 0x0b, 0x5d, - 0xf9, 0x78, 0xa9, 0x17, 0xce, 0x2e, 0xf5, 0xc2, 0xb7, 0x4b, 0xbd, 0xf0, 0x72, 0xdb, 0x71, 0xc3, - 0xe3, 0x5e, 0xcb, 0xa0, 0xac, 0x6b, 0xca, 0x05, 0xed, 0xb6, 0x68, 0xd5, 0x61, 0x66, 0xff, 0x91, - 0xd9, 0x65, 0x76, 0xaf, 0x83, 0x5c, 0xec, 0x7e, 0x6e, 0xd6, 0x1f, 0x57, 0xc5, 0xda, 0x0f, 0x23, - 0x1f, 0x79, 0x6b, 0x32, 0x5e, 0xdd, 0x0f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x07, 0x0e, 0x63, - 0x53, 0x6c, 0x06, 0x00, 0x00, + // 649 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0x8d, 0x9b, 0x7e, 0x65, 0x5a, 0x68, 0xbb, 0x54, 0x24, 0xb5, 0x5a, 0xb7, 0x58, 0x15, 0x2a, + 0x95, 0x62, 0x93, 0x40, 0x85, 0xa8, 0x84, 0x04, 0xad, 0x54, 0xd4, 0x43, 0x45, 0x94, 0x23, 0x97, + 0xca, 0xd9, 0x4c, 0x5d, 0x43, 0xec, 0xb5, 0xbc, 0x4e, 0x84, 0x6f, 0x88, 0x13, 0x07, 0x0e, 0xf0, + 0x0f, 0xf8, 0x09, 0xe5, 0xc2, 0x6f, 0xe8, 0xb1, 0x47, 0x4e, 0x15, 0x6a, 0x0f, 0xfd, 0x07, 0x9c, + 0xd1, 0xda, 0x6b, 0xcb, 0x4d, 0x48, 0x15, 0x90, 0xb8, 0x65, 0xf6, 0xbd, 0x7d, 0x33, 0xef, 0x65, + 0xbc, 0xb0, 0xe6, 0xb4, 0xa8, 0x69, 0xf9, 0x7e, 0xc7, 0xa1, 0x56, 0xe8, 0x30, 0x8f, 0x9b, 0x47, + 0x88, 0x66, 0xaf, 0x66, 0x86, 0xef, 0x0c, 0x3f, 0x60, 0x21, 0x23, 0x65, 0xa7, 0x45, 0x8d, 0x3c, + 0xc3, 0x38, 0x42, 0x34, 0x7a, 0x35, 0x75, 0xd1, 0x66, 0x36, 0x8b, 0x39, 0xa6, 0xf8, 0x95, 0xd0, + 0xd5, 0x7b, 0xc3, 0x04, 0xc5, 0xad, 0x1c, 0x85, 0xb2, 0x00, 0x4d, 0x7a, 0x6c, 0x79, 0x1e, 0x76, + 0x04, 0x2c, 0x7f, 0x4a, 0x4a, 0x99, 0x32, 0xee, 0x32, 0x6e, 0xba, 0xdc, 0x16, 0xa0, 0xcb, 0xed, + 0x04, 0xd0, 0x3f, 0x29, 0x30, 0x7f, 0xc0, 0xed, 0x26, 0xda, 0x0e, 0x0f, 0x31, 0x68, 0x58, 0x11, + 0x22, 0x29, 0xc3, 0x94, 0xcf, 0x82, 0xf0, 0xd0, 0x69, 0x57, 0x94, 0x35, 0x65, 0xa3, 0xd4, 0x9c, + 0x14, 0xe5, 0x7e, 0x9b, 0xac, 0x00, 0x48, 0x5d, 0x81, 0x8d, 0xc5, 0x58, 0x49, 0x9e, 0xec, 0xb7, + 0x49, 0x05, 0xa6, 0x02, 0xec, 0x58, 0x11, 0x06, 0x95, 0x62, 0x8c, 0xa5, 0x25, 0x59, 0x84, 0x09, + 0x5f, 0x48, 0x57, 0xc6, 0xe3, 0xf3, 0xa4, 0xd8, 0x9e, 0xff, 0xf8, 0x75, 0xb5, 0xf0, 0xe1, 0xea, + 0x64, 0x33, 0xe5, 0xe9, 0x2a, 0x54, 0xfa, 0xa7, 0x69, 0x22, 0xf7, 0x99, 0xc7, 0x51, 0xff, 0xa6, + 0xc0, 0x72, 0x0e, 0xdc, 0x65, 0x5d, 0x2f, 0xc4, 0xc0, 0xb7, 0x82, 0x30, 0xfa, 0x5f, 0x63, 0x57, + 0x81, 0xd0, 0x5c, 0x9b, 0xc3, 0xbc, 0x87, 0x05, 0xda, 0x3f, 0xc0, 0x1f, 0xfc, 0xdc, 0x87, 0xf5, + 0x9b, 0x46, 0xce, 0xbc, 0x9d, 0x2b, 0x30, 0x77, 0xc0, 0xed, 0x86, 0x15, 0x35, 0x2c, 0xfa, 0x16, + 0xc3, 0x3d, 0x44, 0xf2, 0x18, 0x8a, 0x47, 0x88, 0xb1, 0x95, 0x99, 0xfa, 0xb2, 0x31, 0x64, 0x6d, + 0x8c, 0x3d, 0xc4, 0x9d, 0xf1, 0xd3, 0xf3, 0xd5, 0x42, 0x53, 0xd0, 0xc9, 0x3a, 0xdc, 0xe6, 0xac, + 0x1b, 0x50, 0x3c, 0x4c, 0xb3, 0x48, 0xfc, 0xce, 0x26, 0xa7, 0x8d, 0x24, 0x91, 0x4d, 0x58, 0x90, + 0xac, 0x5c, 0x30, 0x89, 0xf9, 0xb9, 0x04, 0xd8, 0xcd, 0xe2, 0xb9, 0x0b, 0x93, 0xdc, 0xb1, 0x3d, + 0x0c, 0xa4, 0x71, 0x59, 0x11, 0x15, 0xa6, 0xa5, 0x4d, 0x5e, 0x99, 0x58, 0x2b, 0x6e, 0x94, 0x9a, + 0x59, 0xbd, 0x3d, 0x97, 0x26, 0x21, 0xc9, 0xfa, 0x12, 0x94, 0xfb, 0xfc, 0x65, 0xde, 0xbf, 0x2b, + 0xb0, 0xd8, 0x87, 0xbd, 0xe0, 0x91, 0x47, 0xc9, 0x73, 0x28, 0xf9, 0xf1, 0x49, 0xfa, 0x8f, 0xce, + 0xd4, 0x57, 0xe2, 0x18, 0xc4, 0xae, 0x1b, 0xe9, 0x82, 0xf7, 0x6a, 0x46, 0x72, 0x6f, 0xbf, 0x2d, + 0x73, 0x98, 0xf6, 0x65, 0x4d, 0x5e, 0x02, 0x48, 0x05, 0x91, 0xe4, 0x58, 0x2c, 0xa1, 0x0f, 0x4d, + 0x32, 0x6b, 0x2f, 0x75, 0x64, 0xf7, 0x3d, 0xc4, 0xed, 0x3b, 0xa9, 0x9f, 0x9c, 0x9e, 0xae, 0xc5, + 0xfb, 0x38, 0x30, 0x77, 0x6a, 0xac, 0xfe, 0xab, 0x08, 0xc5, 0x03, 0x6e, 0x13, 0x17, 0x6e, 0x5d, + 0xff, 0xbe, 0x1e, 0x0c, 0x1d, 0xa1, 0x7f, 0xf9, 0xd5, 0xda, 0xc8, 0xd4, 0xb4, 0x2d, 0xf9, 0xa2, + 0xc0, 0xd2, 0xf0, 0x8f, 0x64, 0x6b, 0x14, 0xc1, 0x81, 0x6b, 0xea, 0xb3, 0x7f, 0xba, 0x96, 0xcd, + 0xf4, 0x06, 0x66, 0xaf, 0xed, 0xf6, 0xc6, 0x4d, 0x72, 0x79, 0xa6, 0xfa, 0x70, 0x54, 0x66, 0xd6, + 0x2b, 0x82, 0x85, 0xc1, 0x5d, 0xaa, 0x8e, 0x2a, 0x13, 0xd3, 0xd5, 0xad, 0xbf, 0xa2, 0xa7, 0xad, + 0xd5, 0x89, 0xf7, 0x57, 0x27, 0x9b, 0xca, 0xce, 0xab, 0xd3, 0x0b, 0x4d, 0x39, 0xbb, 0xd0, 0x94, + 0x9f, 0x17, 0x9a, 0xf2, 0xf9, 0x52, 0x2b, 0x9c, 0x5d, 0x6a, 0x85, 0x1f, 0x97, 0x5a, 0xe1, 0xf5, + 0x96, 0xed, 0x84, 0xc7, 0xdd, 0x96, 0x41, 0x99, 0x6b, 0xca, 0x27, 0xd9, 0x69, 0xd1, 0xaa, 0xcd, + 0xcc, 0xde, 0x13, 0xd3, 0x65, 0xed, 0x6e, 0x07, 0xb9, 0x78, 0xed, 0xb9, 0x59, 0x7f, 0x5a, 0x15, + 0x0f, 0x7d, 0x18, 0xf9, 0xc8, 0x5b, 0x93, 0xf1, 0x63, 0xfd, 0xe8, 0x77, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x35, 0x34, 0x60, 0x80, 0x5e, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/callbacks/Dockerfile b/modules/apps/callbacks/Dockerfile new file mode 100644 index 00000000000..d81cee1389e --- /dev/null +++ b/modules/apps/callbacks/Dockerfile @@ -0,0 +1,28 @@ +FROM golang:1.21-alpine3.18 as builder + +RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make; + +ENV GOPATH="" +ENV GOMODULE="on" + +# Copy relevant files before go mod download. Replace directives to local paths break if local +# files are not copied before go mod download. +ADD internal internal +ADD testing testing +ADD modules modules +ADD LICENSE LICENSE + +COPY go.mod . +COPY go.sum . + +WORKDIR modules/apps/callbacks + +RUN go mod download + +RUN GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false go build -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version= -X github.com/cosmos/cosmos-sdk/version.Commit= -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger," -w -s' -trimpath -o /go/build/ ./... + +FROM alpine:3.18 + +COPY --from=builder /go/build/simd /bin/simd + +ENTRYPOINT ["simd"] diff --git a/modules/apps/callbacks/callbacks_test.go b/modules/apps/callbacks/callbacks_test.go new file mode 100644 index 00000000000..ab52fa157ec --- /dev/null +++ b/modules/apps/callbacks/callbacks_test.go @@ -0,0 +1,316 @@ +package ibccallbacks_test + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + + sdkmath "cosmossdk.io/math" + + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + + simapp "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" + feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" + ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" +) + +const maxCallbackGas = uint64(1000000) + +func init() { + ibctesting.DefaultTestingAppInit = SetupTestingApp +} + +// SetupTestingApp provides the duplicated simapp which is specific to the callbacks module on chain creation. +func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage) { + db := dbm.NewMemDB() + encCdc := simapp.MakeTestEncodingConfig() + app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, simtestutil.EmptyAppOptions{}) + return app, simapp.NewDefaultGenesisState(encCdc.Codec) +} + +// GetSimApp returns the duplicated SimApp from within the callbacks directory. +// This must be used instead of chain.GetSimApp() for tests within this directory. +func GetSimApp(chain *ibctesting.TestChain) *simapp.SimApp { + app, ok := chain.App.(*simapp.SimApp) + if !ok { + panic("chain is not a simapp.SimApp") + } + return app +} + +// CallbacksTestSuite defines the needed instances and methods to test callbacks +type CallbacksTestSuite struct { + suite.Suite + + coordinator *ibctesting.Coordinator + + chainA *ibctesting.TestChain + chainB *ibctesting.TestChain + + path *ibctesting.Path +} + +// setupChains sets up a coordinator with 2 test chains. +func (s *CallbacksTestSuite) setupChains() { + s.coordinator = ibctesting.NewCoordinator(s.T(), 2) + s.chainA = s.coordinator.GetChain(ibctesting.GetChainID(1)) + s.chainB = s.coordinator.GetChain(ibctesting.GetChainID(2)) + s.path = ibctesting.NewPath(s.chainA, s.chainB) +} + +// SetupTransferTest sets up a transfer channel between chainA and chainB +func (s *CallbacksTestSuite) SetupTransferTest() { + s.setupChains() + + s.path.EndpointA.ChannelConfig.PortID = ibctesting.TransferPort + s.path.EndpointB.ChannelConfig.PortID = ibctesting.TransferPort + s.path.EndpointA.ChannelConfig.Version = transfertypes.Version + s.path.EndpointB.ChannelConfig.Version = transfertypes.Version + + s.coordinator.Setup(s.path) +} + +// SetupFeeTransferTest sets up a fee middleware enabled transfer channel between chainA and chainB +func (s *CallbacksTestSuite) SetupFeeTransferTest() { + s.setupChains() + + feeTransferVersion := string(feetypes.ModuleCdc.MustMarshalJSON(&feetypes.Metadata{FeeVersion: feetypes.Version, AppVersion: transfertypes.Version})) + s.path.EndpointA.ChannelConfig.Version = feeTransferVersion + s.path.EndpointB.ChannelConfig.Version = feeTransferVersion + s.path.EndpointA.ChannelConfig.PortID = transfertypes.PortID + s.path.EndpointB.ChannelConfig.PortID = transfertypes.PortID + + s.coordinator.Setup(s.path) +} + +func (s *CallbacksTestSuite) SetupMockFeeTest() { + s.setupChains() + + mockFeeVersion := string(feetypes.ModuleCdc.MustMarshalJSON(&feetypes.Metadata{FeeVersion: feetypes.Version, AppVersion: ibcmock.Version})) + s.path.EndpointA.ChannelConfig.Version = mockFeeVersion + s.path.EndpointB.ChannelConfig.Version = mockFeeVersion + s.path.EndpointA.ChannelConfig.PortID = ibctesting.MockFeePort + s.path.EndpointB.ChannelConfig.PortID = ibctesting.MockFeePort +} + +// SetupICATest sets up an interchain accounts channel between chainA (controller) and chainB (host). +// It funds and returns the interchain account address owned by chainA's SenderAccount. +func (s *CallbacksTestSuite) SetupICATest() string { + s.setupChains() + s.coordinator.SetupConnections(s.path) + + icaOwner := s.chainA.SenderAccount.GetAddress().String() + // ICAVersion defines a interchain accounts version string + icaVersion := icatypes.NewDefaultMetadataString(s.path.EndpointA.ConnectionID, s.path.EndpointB.ConnectionID) + icaControllerPortID, err := icatypes.NewControllerPortID(icaOwner) + s.Require().NoError(err) + + s.path.SetChannelOrdered() + s.path.EndpointA.ChannelConfig.PortID = icaControllerPortID + s.path.EndpointB.ChannelConfig.PortID = icatypes.HostPortID + s.path.EndpointA.ChannelConfig.Version = icaVersion + s.path.EndpointB.ChannelConfig.Version = icaVersion + + s.RegisterInterchainAccount(icaOwner) + // open chan init must be skipped. So we cannot use .CreateChannels() + err = s.path.EndpointB.ChanOpenTry() + s.Require().NoError(err) + err = s.path.EndpointA.ChanOpenAck() + s.Require().NoError(err) + err = s.path.EndpointB.ChanOpenConfirm() + s.Require().NoError(err) + + interchainAccountAddr, found := GetSimApp(s.chainB).ICAHostKeeper.GetInterchainAccountAddress(s.chainB.GetContext(), s.path.EndpointA.ConnectionID, s.path.EndpointA.ChannelConfig.PortID) + s.Require().True(found) + + // fund the interchain account on chainB + msgBankSend := &banktypes.MsgSend{ + FromAddress: s.chainB.SenderAccount.GetAddress().String(), + ToAddress: interchainAccountAddr, + Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000))), + } + res, err := s.chainB.SendMsgs(msgBankSend) + s.Require().NotEmpty(res) + s.Require().NoError(err) + + return interchainAccountAddr +} + +// RegisterInterchainAccount submits a MsgRegisterInterchainAccount and updates the controller endpoint with the +// channel created. +func (s *CallbacksTestSuite) RegisterInterchainAccount(owner string) { + msgRegister := icacontrollertypes.NewMsgRegisterInterchainAccount(s.path.EndpointA.ConnectionID, owner, s.path.EndpointA.ChannelConfig.Version) + + res, err := s.chainA.SendMsgs(msgRegister) + s.Require().NotEmpty(res) + s.Require().NoError(err) + + channelID, err := ibctesting.ParseChannelIDFromEvents(res.Events) + s.Require().NoError(err) + + s.path.EndpointA.ChannelID = channelID +} + +// AssertHasExecutedExpectedCallback checks the stateful entries and counters based on callbacktype. +// It assumes that the source chain is chainA and the destination chain is chainB. +func (s *CallbacksTestSuite) AssertHasExecutedExpectedCallback(callbackType types.CallbackType, expSuccess bool) { + var expStatefulEntries uint8 + if expSuccess { + // if the callback is expected to be successful, + // we expect at least one state entry + expStatefulEntries = 1 + } + + sourceStatefulCounter := GetSimApp(s.chainA).MockContractKeeper.GetStateEntryCounter(s.chainA.GetContext()) + destStatefulCounter := GetSimApp(s.chainB).MockContractKeeper.GetStateEntryCounter(s.chainB.GetContext()) + + switch callbackType { + case "none": + s.Require().Equal(uint8(0), sourceStatefulCounter) + s.Require().Equal(uint8(0), destStatefulCounter) + + case types.CallbackTypeSendPacket: + s.Require().Equal(expStatefulEntries, sourceStatefulCounter, "unexpected stateful entry amount for source send packet callback") + s.Require().Equal(uint8(0), destStatefulCounter) + + case types.CallbackTypeAcknowledgementPacket, types.CallbackTypeTimeoutPacket: + expStatefulEntries *= 2 // expect OnAcknowledgement/OnTimeout to be successful as well as the initial SendPacket + s.Require().Equal(expStatefulEntries, sourceStatefulCounter, "unexpected stateful entry amount for source acknowledgement/timeout callbacks") + s.Require().Equal(uint8(0), destStatefulCounter) + + case types.CallbackTypeReceivePacket: + s.Require().Equal(uint8(0), sourceStatefulCounter) + s.Require().Equal(expStatefulEntries, destStatefulCounter) + + default: + s.FailNow(fmt.Sprintf("invalid callback type %s", callbackType)) + } + + s.AssertCallbackCounters(callbackType) +} + +func (s *CallbacksTestSuite) AssertCallbackCounters(callbackType types.CallbackType) { + sourceCounters := GetSimApp(s.chainA).MockContractKeeper.Counters + destCounters := GetSimApp(s.chainB).MockContractKeeper.Counters + + switch callbackType { + case "none": + s.Require().Len(sourceCounters, 0) + s.Require().Len(destCounters, 0) + + case types.CallbackTypeSendPacket: + s.Require().Len(sourceCounters, 1) + s.Require().Equal(1, sourceCounters[types.CallbackTypeSendPacket]) + + case types.CallbackTypeAcknowledgementPacket: + s.Require().Len(sourceCounters, 2) + s.Require().Equal(1, sourceCounters[types.CallbackTypeSendPacket]) + s.Require().Equal(1, sourceCounters[types.CallbackTypeAcknowledgementPacket]) + + s.Require().Len(destCounters, 0) + + case types.CallbackTypeReceivePacket: + s.Require().Len(sourceCounters, 0) + s.Require().Len(destCounters, 1) + s.Require().Equal(1, destCounters[types.CallbackTypeReceivePacket]) + + case types.CallbackTypeTimeoutPacket: + s.Require().Len(sourceCounters, 2) + s.Require().Equal(1, sourceCounters[types.CallbackTypeSendPacket]) + s.Require().Equal(1, sourceCounters[types.CallbackTypeTimeoutPacket]) + + s.Require().Len(destCounters, 0) + + default: + s.FailNow(fmt.Sprintf("invalid callback type %s", callbackType)) + } +} + +func TestIBCCallbacksTestSuite(t *testing.T) { + suite.Run(t, new(CallbacksTestSuite)) +} + +// AssertHasExecutedExpectedCallbackWithFee checks if only the expected type of callback has been executed +// and that the expected ics-29 fee has been paid. +func (s *CallbacksTestSuite) AssertHasExecutedExpectedCallbackWithFee( + callbackType types.CallbackType, isSuccessful bool, isTimeout bool, + originalSenderBalance sdk.Coins, fee feetypes.Fee, +) { + // Recall that: + // - the source chain is chainA + // - forward relayer is chainB.SenderAccount + // - reverse relayer is chainA.SenderAccount + // - The counterparty payee of the forward relayer in chainA is chainB.SenderAccount (as a chainA account) + + // We only check if the fee is paid if the callback is successful. + if !isTimeout && isSuccessful { + // check forward relay balance + s.Require().Equal( + fee.RecvFee, + sdk.NewCoins(GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainB.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)), + ) + + s.Require().Equal( + fee.AckFee.Add(fee.TimeoutFee...), // ack fee paid, timeout fee refunded + sdk.NewCoins( + GetSimApp(s.chainA).BankKeeper.GetBalance( + s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), + ibctesting.TestCoin.Denom), + ).Sub(originalSenderBalance[0]), + ) + } else if isSuccessful { + // forward relay balance should be 0 + s.Require().Equal( + sdk.NewCoin(ibctesting.TestCoin.Denom, sdkmath.ZeroInt()), + GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainB.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom), + ) + + // all fees should be returned as sender is the reverse relayer + s.Require().Equal( + fee.Total(), + sdk.NewCoins( + GetSimApp(s.chainA).BankKeeper.GetBalance( + s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), + ibctesting.TestCoin.Denom), + ).Sub(originalSenderBalance[0]), + ) + } + s.AssertHasExecutedExpectedCallback(callbackType, isSuccessful) +} + +// GetExpectedEvent returns the expected event for a callback. +func GetExpectedEvent( + packetDataUnmarshaler porttypes.PacketDataUnmarshaler, remainingGas uint64, data []byte, srcPortID, + eventPortID, eventChannelID string, seq uint64, callbackType types.CallbackType, expError error, +) (abci.Event, bool) { + var ( + callbackData types.CallbackData + err error + ) + if callbackType == types.CallbackTypeReceivePacket { + callbackData, err = types.GetDestCallbackData(packetDataUnmarshaler, data, srcPortID, remainingGas, maxCallbackGas) + } else { + callbackData, err = types.GetSourceCallbackData(packetDataUnmarshaler, data, srcPortID, remainingGas, maxCallbackGas) + } + if err != nil { + return abci.Event{}, false + } + + newCtx := sdk.Context{}.WithEventManager(sdk.NewEventManager()) + types.EmitCallbackEvent(newCtx, eventPortID, eventChannelID, seq, callbackType, callbackData, expError) + return newCtx.EventManager().Events().ToABCIEvents()[0], true +} diff --git a/modules/apps/callbacks/export_test.go b/modules/apps/callbacks/export_test.go new file mode 100644 index 00000000000..653d5ccddcc --- /dev/null +++ b/modules/apps/callbacks/export_test.go @@ -0,0 +1,25 @@ +package ibccallbacks + +/* + This file is to allow for unexported functions and fields to be accessible to the testing package. +*/ + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" +) + +// ProcessCallback is a wrapper around processCallback to allow the function to be directly called in tests. +func (im IBCMiddleware) ProcessCallback( + ctx sdk.Context, callbackType types.CallbackType, + callbackData types.CallbackData, callbackExecutor func(sdk.Context) error, +) error { + return im.processCallback(ctx, callbackType, callbackData, callbackExecutor) +} + +// GetICS4Wrapper is a getter for the IBCMiddleware's ICS4Wrapper. +func (im *IBCMiddleware) GetICS4Wrapper() porttypes.ICS4Wrapper { + return im.ics4Wrapper +} diff --git a/modules/apps/callbacks/fee_transfer_test.go b/modules/apps/callbacks/fee_transfer_test.go new file mode 100644 index 00000000000..cb73830e4d8 --- /dev/null +++ b/modules/apps/callbacks/fee_transfer_test.go @@ -0,0 +1,222 @@ +package ibccallbacks_test + +import ( + "fmt" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" +) + +var ( + defaultRecvFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdkmath.NewInt(100)}} + defaultAckFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdkmath.NewInt(200)}} + defaultTimeoutFee = sdk.Coins{sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdkmath.NewInt(300)}} +) + +func (s *CallbacksTestSuite) TestIncentivizedTransferCallbacks() { + testCases := []struct { + name string + transferMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: transfer with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeReceivePacket, + true, + }, + { + "success: dest callback with other json fields", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}, "something_else": {}}`, simapp.SuccessContract), + types.CallbackTypeReceivePacket, + true, + }, + { + "success: dest callback with malformed json", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}, malformed}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: dest callback with missing address", + `{"dest_callback": {"address": ""}}`, + "none", + true, + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with other json fields", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, "something_else": {}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with malformed json", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, malformed}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: source callback with missing address", + `{"src_callback": {"address": ""}}`, + "none", + true, + }, + { + "failure: dest callback with low gas (panic)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeReceivePacket, + false, + }, + { + "failure: dest callback with low gas (error)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeReceivePacket, + false, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + s.SetupFeeTransferTest() + + fee := feetypes.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + + s.ExecutePayPacketFeeMsg(fee) + preRelaySenderBalance := sdk.NewCoins(GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)) + s.ExecuteTransfer(tc.transferMemo) + // we manually subtract the transfer amount from the preRelaySenderBalance because ExecuteTransfer + // also relays the packet, which will trigger the fee payments. + preRelaySenderBalance = preRelaySenderBalance.Sub(ibctesting.TestCoin) + + // after incentivizing the packets + s.AssertHasExecutedExpectedCallbackWithFee(tc.expCallback, tc.expSuccess, false, preRelaySenderBalance, fee) + }) + } +} + +func (s *CallbacksTestSuite) TestIncentivizedTransferTimeoutCallbacks() { + testCases := []struct { + name string + transferMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: transfer with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + "none", + true, // timeouts don't reach destination chain execution + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeTimeoutPacket, + true, + }, + { + "success: dest callback with low gas (panic)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogPanicContract), + "none", // timeouts don't reach destination chain execution + false, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "success: dest callback with low gas (error)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogErrorContract), + "none", // timeouts don't reach destination chain execution + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + s.SetupFeeTransferTest() + + fee := feetypes.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) + + s.ExecutePayPacketFeeMsg(fee) + preRelaySenderBalance := sdk.NewCoins(GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), ibctesting.TestCoin.Denom)) + s.ExecuteTransferTimeout(tc.transferMemo) + + // after incentivizing the packets + s.AssertHasExecutedExpectedCallbackWithFee(tc.expCallback, tc.expSuccess, true, preRelaySenderBalance, fee) + }) + } +} + +func (s *CallbacksTestSuite) ExecutePayPacketFeeMsg(fee feetypes.Fee) { + msg := feetypes.NewMsgPayPacketFee( + fee, s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID, + s.chainA.SenderAccount.GetAddress().String(), nil, + ) + + // fetch the account balance before fees are escrowed and assert the difference below + preEscrowBalance := GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) + + res, err := s.chainA.SendMsgs(msg) + s.Require().NoError(err) + s.Require().NotNil(res) + + postEscrowBalance := GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), s.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) + s.Require().Equal(postEscrowBalance.AddAmount(fee.Total().AmountOf(sdk.DefaultBondDenom)), preEscrowBalance) + + // register counterparty address on chainB + // relayerAddress is address of sender account on chainB, but we will use it on chainA + // to differentiate from the chainA.SenderAccount for checking successful relay payouts + relayerAddress := s.chainB.SenderAccount.GetAddress() + + msgRegister := feetypes.NewMsgRegisterCounterpartyPayee( + s.path.EndpointB.ChannelConfig.PortID, s.path.EndpointB.ChannelID, + s.chainB.SenderAccount.GetAddress().String(), relayerAddress.String(), + ) + _, err = s.chainB.SendMsgs(msgRegister) + s.Require().NoError(err) // message committed +} diff --git a/modules/apps/callbacks/go.mod b/modules/apps/callbacks/go.mod new file mode 100644 index 00000000000..2116969b48e --- /dev/null +++ b/modules/apps/callbacks/go.mod @@ -0,0 +1,180 @@ +module github.com/cosmos/ibc-go/modules/apps/callbacks + +go 1.21 + +replace github.com/cosmos/ibc-go/v7 => ../../../ + +replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + +require ( + cosmossdk.io/api v0.3.1 + cosmossdk.io/errors v1.0.0 + cosmossdk.io/math v1.1.2 + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.8.0 + github.com/cosmos/cosmos-sdk v0.47.5 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 + github.com/cosmos/ibc-go/v7 v7.2.0 + 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 +) + +require ( + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/storage v1.30.1 // indirect + cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect + filippo.io/edwards25519 v1.0.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.1 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/confio/ics23/go v0.9.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/creachadair/taskgroup v0.4.2 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/davecgh/go-spew v1.1.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/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/go-kit/kit v0.12.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.1.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.11.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/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/improbable-eng/grpc-web v0.15.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.16.3 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/lib/pq v1.10.7 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect + github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // 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_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/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.30.0 // indirect + github.com/sasha-s/go-deadlock v0.3.1 // indirect + 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/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 + github.com/tidwall/btree v1.6.0 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect + github.com/zondax/hid v0.9.1 // indirect + github.com/zondax/ledger-go v0.14.1 // indirect + go.etcd.io/bbolt v1.3.7 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.126.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/grpc v1.57.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 + nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v0.5.5 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/modules/apps/callbacks/go.sum b/modules/apps/callbacks/go.sum new file mode 100644 index 00000000000..b5e2e1063d6 --- /dev/null +++ b/modules/apps/callbacks/go.sum @@ -0,0 +1,1667 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= +cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +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= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= +github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= +github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= +github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= +github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= +github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= +github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= +github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 h1:BvSKnPFKxL+TTSLxGKwJN4x0ndCZj0yfXhSvmsQztSA= +github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1/go.mod h1:A+CxAQdn2j6ihDTbClpEEBdHthWgAUAcHbRAQPY8sl4= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= +github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= +github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= +github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +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/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= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +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/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= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= +github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= +github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +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_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= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= +github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +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= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +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/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= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= +github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= +github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +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/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= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +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.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +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= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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-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= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +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= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +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= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +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.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= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/modules/apps/callbacks/ibc_middleware.go b/modules/apps/callbacks/ibc_middleware.go new file mode 100644 index 00000000000..be61c50d751 --- /dev/null +++ b/modules/apps/callbacks/ibc_middleware.go @@ -0,0 +1,363 @@ +package ibccallbacks + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/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" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var ( + _ porttypes.Middleware = (*IBCMiddleware)(nil) + _ porttypes.PacketDataUnmarshaler = (*IBCMiddleware)(nil) +) + +// IBCMiddleware implements the ICS26 callbacks for the ibc-callbacks middleware given +// the underlying application. +type IBCMiddleware struct { + app types.CallbacksCompatibleModule + ics4Wrapper porttypes.ICS4Wrapper + + contractKeeper types.ContractKeeper + + // maxCallbackGas defines the maximum amount of gas that a callback actor can ask the + // relayer to pay for. If a callback fails due to insufficient gas, the entire tx + // is reverted if the relayer hadn't provided the minimum(userDefinedGas, maxCallbackGas). + // If the actor hasn't defined a gas limit, then it is assumed to be the maxCallbackGas. + maxCallbackGas uint64 +} + +// NewIBCMiddleware creates a new IBCMiddlware given the keeper and underlying application. +// The underlying application must implement the required callback interfaces. +func NewIBCMiddleware( + app porttypes.IBCModule, ics4Wrapper porttypes.ICS4Wrapper, + contractKeeper types.ContractKeeper, maxCallbackGas uint64, +) IBCMiddleware { + packetDataUnmarshalerApp, ok := app.(types.CallbacksCompatibleModule) + if !ok { + panic(fmt.Errorf("underlying application does not implement %T", (*types.CallbacksCompatibleModule)(nil))) + } + + if ics4Wrapper == nil { + panic(fmt.Errorf("ICS4Wrapper cannot be nil")) + } + + if contractKeeper == nil { + panic(fmt.Errorf("contract keeper cannot be nil")) + } + + if maxCallbackGas == 0 { + panic(fmt.Errorf("maxCallbackGas cannot be zero")) + } + + return IBCMiddleware{ + app: packetDataUnmarshalerApp, + ics4Wrapper: ics4Wrapper, + contractKeeper: contractKeeper, + maxCallbackGas: maxCallbackGas, + } +} + +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after the +// middleware's creation to set the middleware which is above this module in +// the IBC application stack. +func (im *IBCMiddleware) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + im.ics4Wrapper = wrapper +} + +// SendPacket implements source callbacks for sending packets. +// It defers to the underlying application and then calls the contract callback. +// If the contract callback returns an error, panics, or runs out of gas, then +// the packet send is rejected. +func (im IBCMiddleware) SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + data []byte, +) (uint64, error) { + seq, err := im.ics4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + if err != nil { + return 0, err + } + + callbackData, err := types.GetSourceCallbackData(im.app, data, sourcePort, ctx.GasMeter().GasRemaining(), im.maxCallbackGas) + // SendPacket is not blocked if the packet does not opt-in to callbacks + if err != nil { + return seq, nil + } + + callbackExecutor := func(cachedCtx sdk.Context) error { + return im.contractKeeper.IBCSendPacketCallback( + cachedCtx, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data, callbackData.CallbackAddress, callbackData.SenderAddress, + ) + } + + err = im.processCallback(ctx, types.CallbackTypeSendPacket, callbackData, callbackExecutor) + // contract keeper is allowed to reject the packet send. + if err != nil { + return 0, err + } + + types.EmitCallbackEvent(ctx, sourcePort, sourceChannel, seq, types.CallbackTypeSendPacket, callbackData, nil) + return seq, nil +} + +// OnAcknowledgementPacket implements source callbacks for acknowledgement packets. +// It defers to the underlying application and then calls the contract callback. +// If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are +// reverted via a panic. +func (im IBCMiddleware) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, +) error { + // we first call the underlying app to handle the acknowledgement + err := im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) + if err != nil { + return err + } + + callbackData, err := types.GetSourceCallbackData( + im.app, packet.GetData(), packet.GetSourcePort(), ctx.GasMeter().GasRemaining(), im.maxCallbackGas, + ) + // OnAcknowledgementPacket is not blocked if the packet does not opt-in to callbacks + if err != nil { + return nil + } + + callbackExecutor := func(cachedCtx sdk.Context) error { + return im.contractKeeper.IBCOnAcknowledgementPacketCallback( + cachedCtx, packet, acknowledgement, relayer, callbackData.CallbackAddress, callbackData.SenderAddress, + ) + } + + // callback execution errors are not allowed to block the packet lifecycle, they are only used in event emissions + err = im.processCallback(ctx, types.CallbackTypeAcknowledgementPacket, callbackData, callbackExecutor) + types.EmitCallbackEvent( + ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), + types.CallbackTypeAcknowledgementPacket, callbackData, err, + ) + + return nil +} + +// OnTimeoutPacket implements timeout source callbacks for the ibc-callbacks middleware. +// It defers to the underlying application and then calls the contract callback. +// If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are +// reverted via a panic. +func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error { + err := im.app.OnTimeoutPacket(ctx, packet, relayer) + if err != nil { + return err + } + + callbackData, err := types.GetSourceCallbackData( + im.app, packet.GetData(), packet.GetSourcePort(), ctx.GasMeter().GasRemaining(), im.maxCallbackGas, + ) + // OnTimeoutPacket is not blocked if the packet does not opt-in to callbacks + if err != nil { + return nil + } + + callbackExecutor := func(cachedCtx sdk.Context) error { + return im.contractKeeper.IBCOnTimeoutPacketCallback(cachedCtx, packet, relayer, callbackData.CallbackAddress, callbackData.SenderAddress) + } + + // callback execution errors are not allowed to block the packet lifecycle, they are only used in event emissions + err = im.processCallback(ctx, types.CallbackTypeTimeoutPacket, callbackData, callbackExecutor) + types.EmitCallbackEvent( + ctx, packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence(), + types.CallbackTypeTimeoutPacket, callbackData, err, + ) + + return nil +} + +// OnRecvPacket implements the ReceivePacket destination callbacks for the ibc-callbacks middleware during +// synchronous packet acknowledgement. +// It defers to the underlying application and then calls the contract callback. +// If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are +// reverted via a panic. +func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement { + ack := im.app.OnRecvPacket(ctx, packet, relayer) + // if ack is nil (asynchronous acknowledgements), then the callback will be handled in WriteAcknowledgement + // if ack is not successful, all state changes are reverted. If a packet cannot be received, then there is + // no need to execute a callback on the receiving chain. + if ack == nil || !ack.Success() { + return ack + } + + callbackData, err := types.GetDestCallbackData( + im.app, packet.GetData(), packet.GetSourcePort(), ctx.GasMeter().GasRemaining(), im.maxCallbackGas, + ) + // OnRecvPacket is not blocked if the packet does not opt-in to callbacks + if err != nil { + return ack + } + + callbackExecutor := func(cachedCtx sdk.Context) error { + return im.contractKeeper.IBCReceivePacketCallback(cachedCtx, packet, ack, callbackData.CallbackAddress) + } + + // callback execution errors are not allowed to block the packet lifecycle, they are only used in event emissions + err = im.processCallback(ctx, types.CallbackTypeReceivePacket, callbackData, callbackExecutor) + types.EmitCallbackEvent( + ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), + types.CallbackTypeReceivePacket, callbackData, err, + ) + + return ack +} + +// WriteAcknowledgement implements the ReceivePacket destination callbacks for the ibc-callbacks middleware +// during asynchronous packet acknowledgement. +// It defers to the underlying application and then calls the contract callback. +// If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are +// reverted via a panic. +func (im IBCMiddleware) WriteAcknowledgement( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + packet ibcexported.PacketI, + ack ibcexported.Acknowledgement, +) error { + err := im.ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, ack) + if err != nil { + return err + } + + callbackData, err := types.GetDestCallbackData( + im.app, packet.GetData(), packet.GetSourcePort(), ctx.GasMeter().GasRemaining(), im.maxCallbackGas, + ) + // WriteAcknowledgement is not blocked if the packet does not opt-in to callbacks + if err != nil { + return nil + } + + callbackExecutor := func(cachedCtx sdk.Context) error { + return im.contractKeeper.IBCReceivePacketCallback(cachedCtx, packet, ack, callbackData.CallbackAddress) + } + + // callback execution errors are not allowed to block the packet lifecycle, they are only used in event emissions + err = im.processCallback(ctx, types.CallbackTypeReceivePacket, callbackData, callbackExecutor) + types.EmitCallbackEvent( + ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence(), + types.CallbackTypeReceivePacket, callbackData, err, + ) + + return nil +} + +// processCallback executes the callbackExecutor and reverts contract changes if the callbackExecutor fails. +// +// panics if +// - the contractExecutor panics for any reason, and the callbackType is SendPacket, or +// - the contractExecutor runs out of gas and the relayer has not reserved gas grater than or equal to +// CommitGasLimit. +func (IBCMiddleware) processCallback( + ctx sdk.Context, callbackType types.CallbackType, + callbackData types.CallbackData, callbackExecutor func(sdk.Context) error, +) (err error) { + cachedCtx, writeFn := ctx.CacheContext() + cachedCtx = cachedCtx.WithGasMeter(sdk.NewGasMeter(callbackData.ExecutionGasLimit)) + + defer func() { + // consume the minimum of g.consumed and g.limit + ctx.GasMeter().ConsumeGas(cachedCtx.GasMeter().GasConsumedToLimit(), fmt.Sprintf("ibc %s callback", callbackType)) + + // recover from all panics except during SendPacket callbacks + if r := recover(); r != nil { + if callbackType == types.CallbackTypeSendPacket { + panic(r) + } + } + + // if the callback ran out of gas and the relayer has not reserved enough gas, then revert the state + if cachedCtx.GasMeter().IsPastLimit() && callbackData.AllowRetry() { + panic(sdk.ErrorOutOfGas{Descriptor: fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", callbackType, callbackData.CommitGasLimit)}) + } + + // allow the transaction to be committed, continuing the packet lifecycle + }() + + err = callbackExecutor(cachedCtx) + if err == nil { + writeFn() + } + + return err +} + +// OnChanOpenInit defers to the underlying application +func (im IBCMiddleware) OnChanOpenInit( + ctx sdk.Context, + channelOrdering channeltypes.Order, + connectionHops []string, + portID, + channelID string, + channelCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, +) (string, error) { + return im.app.OnChanOpenInit(ctx, channelOrdering, connectionHops, portID, channelID, channelCap, counterparty, version) +} + +// OnChanOpenTry defers to the underlying application +func (im IBCMiddleware) OnChanOpenTry( + ctx sdk.Context, + channelOrdering channeltypes.Order, + connectionHops []string, portID, + channelID string, + channelCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + counterpartyVersion string, +) (string, error) { + return im.app.OnChanOpenTry(ctx, channelOrdering, connectionHops, portID, channelID, channelCap, counterparty, counterpartyVersion) +} + +// OnChanOpenAck defers to the underlying application +func (im IBCMiddleware) OnChanOpenAck( + ctx sdk.Context, + portID, + channelID, + counterpartyChannelID, + counterpartyVersion string, +) error { + return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) +} + +// OnChanOpenConfirm defers to the underlying application +func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error { + return im.app.OnChanOpenConfirm(ctx, portID, channelID) +} + +// OnChanCloseInit defers to the underlying application +func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error { + return im.app.OnChanCloseInit(ctx, portID, channelID) +} + +// OnChanCloseConfirm defers to the underlying application +func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error { + return im.app.OnChanCloseConfirm(ctx, portID, channelID) +} + +// GetAppVersion implements the ICS4Wrapper interface. Callbacks has no version, +// so the call is deferred to the underlying application. +func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { + return im.ics4Wrapper.GetAppVersion(ctx, portID, channelID) +} + +// UnmarshalPacketData defers to the underlying app to unmarshal the packet data. +// This function implements the optional PacketDataUnmarshaler interface. +func (im IBCMiddleware) UnmarshalPacketData(bz []byte) (interface{}, error) { + return im.app.UnmarshalPacketData(bz) +} diff --git a/modules/apps/callbacks/ibc_middleware_test.go b/modules/apps/callbacks/ibc_middleware_test.go new file mode 100644 index 00000000000..47d95f96665 --- /dev/null +++ b/modules/apps/callbacks/ibc_middleware_test.go @@ -0,0 +1,1027 @@ +package ibccallbacks_test + +import ( + "fmt" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + + ibccallbacks "github.com/cosmos/ibc-go/modules/apps/callbacks" + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibctesting "github.com/cosmos/ibc-go/v7/testing" + ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" +) + +func (s *CallbacksTestSuite) TestNewIBCMiddleware() { + testCases := []struct { + name string + instantiateFn func() + expError error + }{ + { + "success", + func() { + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) + }, + nil, + }, + { + "panics with nil underlying app", + func() { + _ = ibccallbacks.NewIBCMiddleware(nil, channelkeeper.Keeper{}, simapp.ContractKeeper{}, maxCallbackGas) + }, + fmt.Errorf("underlying application does not implement %T", (*types.CallbacksCompatibleModule)(nil)), + }, + { + "panics with nil contract keeper", + func() { + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, nil, maxCallbackGas) + }, + fmt.Errorf("contract keeper cannot be nil"), + }, + { + "panics with nil ics4Wrapper", + func() { + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, nil, simapp.ContractKeeper{}, maxCallbackGas) + }, + fmt.Errorf("ICS4Wrapper cannot be nil"), + }, + { + "panics with zero maxCallbackGas", + func() { + _ = ibccallbacks.NewIBCMiddleware(ibcmock.IBCModule{}, channelkeeper.Keeper{}, simapp.ContractKeeper{}, uint64(0)) + }, + fmt.Errorf("maxCallbackGas cannot be zero"), + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + expPass := tc.expError == nil + if expPass { + s.Require().NotPanics(tc.instantiateFn, "unexpected panic: NewIBCMiddleware") + } else { + s.Require().PanicsWithError(tc.expError.Error(), tc.instantiateFn, "expected panic with error: ", tc.expError.Error()) + } + }) + } +} + +func (s *CallbacksTestSuite) TestWithICS4Wrapper() { + s.setupChains() + + cbsMiddleware := ibccallbacks.IBCMiddleware{} + s.Require().Nil(cbsMiddleware.GetICS4Wrapper()) + + cbsMiddleware.WithICS4Wrapper(s.chainA.App.GetIBCKeeper().ChannelKeeper) + ics4Wrapper := cbsMiddleware.GetICS4Wrapper() + + s.Require().IsType(channelkeeper.Keeper{}, ics4Wrapper) +} + +func (s *CallbacksTestSuite) TestSendPacket() { + var packetData transfertypes.FungibleTokenPacketData + + testCases := []struct { + name string + malleate func() + callbackType types.CallbackType + expPanic bool + expValue interface{} + }{ + { + "success", + func() {}, + types.CallbackTypeSendPacket, + false, + nil, + }, + { + "success: no-op on callback data is not valid", + func() { + //nolint:goconst + packetData.Memo = `{"src_callback": {"address": ""}}` + }, + "none", // improperly formatted callback data should result in no callback execution + false, + nil, + }, + { + "failure: ics4Wrapper SendPacket call fails", + func() { + s.path.EndpointA.ChannelID = "invalid-channel" + }, + "none", // ics4wrapper failure should result in no callback execution + false, + channeltypes.ErrChannelNotFound, + }, + { + "failure: callback execution fails", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s"}}`, simapp.ErrorContract) + }, + types.CallbackTypeSendPacket, + false, + ibcmock.MockApplicationCallbackError, // execution failure on SendPacket should prevent packet sends + }, + { + "failure: callback execution reach out of gas, but sufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"400000"}}`, simapp.OogPanicContract) + }, + types.CallbackTypeSendPacket, + true, + sdk.ErrorOutOfGas{Descriptor: fmt.Sprintf("mock %s callback oog panic", types.CallbackTypeSendPacket)}, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTransferTest() + + // callbacks module is routed as top level middleware + transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + packetData = transfertypes.NewFungibleTokenPacketData( + ibctesting.TestCoin.GetDenom(), ibctesting.TestCoin.Amount.String(), ibctesting.TestAccAddress, + ibctesting.TestAccAddress, fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + ) + + chanCap := s.path.EndpointA.Chain.GetChannelCapability(s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) + + tc.malleate() + + ctx := s.chainA.GetContext() + gasLimit := ctx.GasMeter().Limit() + + var ( + seq uint64 + err error + ) + sendPacket := func() { + seq, err = transferStack.(porttypes.ICS4Wrapper).SendPacket(ctx, chanCap, s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID, s.chainB.GetTimeoutHeight(), 0, packetData.GetBytes()) + } + + expPass := tc.expValue == nil + switch { + case expPass: + sendPacket() + s.Require().Nil(err) + s.Require().Equal(uint64(1), seq) + + expEvent, exists := GetExpectedEvent( + transferStack.(porttypes.PacketDataUnmarshaler), gasLimit, packetData.GetBytes(), s.path.EndpointA.ChannelConfig.PortID, + s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID, seq, types.CallbackTypeSendPacket, nil, + ) + if exists { + s.Require().Contains(ctx.EventManager().Events().ToABCIEvents(), expEvent) + } + + case tc.expPanic: + s.Require().PanicsWithValue(tc.expValue, sendPacket) + + default: + sendPacket() + s.Require().ErrorIs(tc.expValue.(error), err) + s.Require().Equal(uint64(0), seq) + } + + s.AssertHasExecutedExpectedCallback(tc.callbackType, expPass) + }) + } +} + +func (s *CallbacksTestSuite) TestOnAcknowledgementPacket() { + type expResult uint8 + const ( + noExecution expResult = iota + callbackFailed + callbackSuccess + ) + + var ( + packetData transfertypes.FungibleTokenPacketData + packet channeltypes.Packet + ack []byte + ctx sdk.Context + userGasLimit uint64 + ) + + panicError := fmt.Errorf("panic error") + + testCases := []struct { + name string + malleate func() + expResult expResult + expError error + }{ + { + "success", + func() {}, + callbackSuccess, + nil, + }, + { + "failure: underlying app OnAcknolwedgePacket fails", + func() { + ack = []byte("invalid ack") + }, + noExecution, + ibcerrors.ErrUnknownRequest, + }, + { + "success: no-op on callback data is not valid", + func() { + //nolint:goconst + packetData.Memo = `{"src_callback": {"address": ""}}` + packet.Data = packetData.GetBytes() + }, + noExecution, + nil, + }, + { + "failure: callback execution reach out of gas, but sufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"%d"}}`, simapp.OogPanicContract, userGasLimit) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + nil, + }, + { + "failure: callback execution panics on insufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"%d"}}`, simapp.OogPanicContract, userGasLimit) + packet.Data = packetData.GetBytes() + + ctx = ctx.WithGasMeter(sdk.NewGasMeter(300_000)) + }, + callbackFailed, + panicError, + }, + { + "failure: callback execution fails", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s"}}`, simapp.ErrorContract) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + nil, // execution failure in OnAcknowledgement should not block acknowledgement processing + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTransferTest() + + userGasLimit = 600000 + packetData = transfertypes.NewFungibleTokenPacketData( + ibctesting.TestCoin.GetDenom(), ibctesting.TestCoin.Amount.String(), ibctesting.TestAccAddress, ibctesting.TestAccAddress, + fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"%d"}}`, simapp.SuccessContract, userGasLimit), + ) + + packet = channeltypes.Packet{ + Sequence: 1, + SourcePort: s.path.EndpointA.ChannelConfig.PortID, + SourceChannel: s.path.EndpointA.ChannelID, + DestinationPort: s.path.EndpointB.ChannelConfig.PortID, + DestinationChannel: s.path.EndpointB.ChannelID, + Data: packetData.GetBytes(), + TimeoutHeight: s.chainB.GetTimeoutHeight(), + TimeoutTimestamp: 0, + } + + ack = channeltypes.NewResultAcknowledgement([]byte{1}).Acknowledgement() + + ctx = s.chainA.GetContext() + gasLimit := ctx.GasMeter().Limit() + + tc.malleate() + + // callbacks module is routed as top level middleware + transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + onAcknowledgementPacket := func() error { + return transferStack.OnAcknowledgementPacket(ctx, packet, ack, s.chainA.SenderAccount.GetAddress()) + } + + switch tc.expError { + case nil: + err := onAcknowledgementPacket() + s.Require().Nil(err) + + case panicError: + s.Require().PanicsWithValue(sdk.ErrorOutOfGas{ + Descriptor: fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", types.CallbackTypeAcknowledgementPacket, userGasLimit), + }, func() { + _ = onAcknowledgementPacket() + }) + + default: + err := onAcknowledgementPacket() + s.Require().ErrorIs(tc.expError, err) + } + + sourceStatefulCounter := GetSimApp(s.chainA).MockContractKeeper.GetStateEntryCounter(s.chainA.GetContext()) + sourceCounters := GetSimApp(s.chainA).MockContractKeeper.Counters + + switch tc.expResult { + case noExecution: + s.Require().Len(sourceCounters, 0) + s.Require().Equal(uint8(0), sourceStatefulCounter) + + case callbackFailed: + s.Require().Len(sourceCounters, 1) + s.Require().Equal(1, sourceCounters[types.CallbackTypeAcknowledgementPacket]) + s.Require().Equal(uint8(0), sourceStatefulCounter) + + case callbackSuccess: + s.Require().Len(sourceCounters, 1) + s.Require().Equal(1, sourceCounters[types.CallbackTypeAcknowledgementPacket]) + s.Require().Equal(uint8(1), sourceStatefulCounter) + + expEvent, exists := GetExpectedEvent( + transferStack.(porttypes.PacketDataUnmarshaler), gasLimit, packet.Data, packet.SourcePort, + packet.SourcePort, packet.SourceChannel, packet.Sequence, types.CallbackTypeAcknowledgementPacket, nil, + ) + s.Require().True(exists) + s.Require().Contains(ctx.EventManager().Events().ToABCIEvents(), expEvent) + } + }) + } +} + +func (s *CallbacksTestSuite) TestOnTimeoutPacket() { + type expResult uint8 + const ( + noExecution expResult = iota + callbackFailed + callbackSuccess + ) + + var ( + packetData transfertypes.FungibleTokenPacketData + packet channeltypes.Packet + ctx sdk.Context + ) + + testCases := []struct { + name string + malleate func() + expResult expResult + expValue interface{} + }{ + { + "success", + func() {}, + callbackSuccess, + nil, + }, + { + "failure: underlying app OnTimeoutPacket fails", + func() { + packet.Data = []byte("invalid packet data") + }, + noExecution, + ibcerrors.ErrUnknownRequest, + }, + { + "success: no-op on callback data is not valid", + func() { + //nolint:goconst + packetData.Memo = `{"src_callback": {"address": ""}}` + packet.Data = packetData.GetBytes() + }, + noExecution, + nil, + }, + { + "failure: callback execution reach out of gas, but sufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"400000"}}`, simapp.OogPanicContract) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + nil, + }, + { + "failure: callback execution panics on insufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s"}}`, simapp.OogPanicContract) + packet.Data = packetData.GetBytes() + + ctx = ctx.WithGasMeter(sdk.NewGasMeter(300_000)) + }, + callbackFailed, + sdk.ErrorOutOfGas{ + Descriptor: fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", types.CallbackTypeTimeoutPacket, maxCallbackGas), + }, + }, + { + "failure: callback execution fails", + func() { + packetData.Memo = fmt.Sprintf(`{"src_callback": {"address":"%s"}}`, simapp.ErrorContract) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + nil, // execution failure in OnTimeout should not block timeout processing + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTransferTest() + + // NOTE: we call send packet so transfer is setup with the correct logic to + // succeed on timeout + userGasLimit := 600_000 + timeoutTimestamp := uint64(s.chainB.GetContext().BlockTime().UnixNano()) + msg := transfertypes.NewMsgTransfer( + s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID, + ibctesting.TestCoin, s.chainA.SenderAccount.GetAddress().String(), + s.chainB.SenderAccount.GetAddress().String(), clienttypes.ZeroHeight(), timeoutTimestamp, + fmt.Sprintf(`{"src_callback": {"address":"%s", "gas_limit":"%d"}}`, ibctesting.TestAccAddress, userGasLimit), // set user gas limit above panic level in mock contract keeper + ) + + res, err := s.chainA.SendMsgs(msg) + s.Require().NoError(err) + s.Require().NotNil(res) + + packet, err = ibctesting.ParsePacketFromEvents(res.GetEvents().ToABCIEvents()) + s.Require().NoError(err) + s.Require().NotNil(packet) + + err = transfertypes.ModuleCdc.UnmarshalJSON(packet.Data, &packetData) + s.Require().NoError(err) + + ctx = s.chainA.GetContext() + gasLimit := ctx.GasMeter().Limit() + + tc.malleate() + + // callbacks module is routed as top level middleware + transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + onTimeoutPacket := func() error { + return transferStack.OnTimeoutPacket(ctx, packet, s.chainA.SenderAccount.GetAddress()) + } + + switch expValue := tc.expValue.(type) { + case nil: + err := onTimeoutPacket() + s.Require().Nil(err) + case error: + err := onTimeoutPacket() + s.Require().ErrorIs(expValue, err) + default: + s.Require().PanicsWithValue(tc.expValue, func() { + _ = onTimeoutPacket() + }) + } + + sourceStatefulCounter := GetSimApp(s.chainA).MockContractKeeper.GetStateEntryCounter(s.chainA.GetContext()) + sourceCounters := GetSimApp(s.chainA).MockContractKeeper.Counters + + // account for SendPacket succeeding + switch tc.expResult { + case noExecution: + s.Require().Len(sourceCounters, 1) + s.Require().Equal(uint8(1), sourceStatefulCounter) + + case callbackFailed: + s.Require().Len(sourceCounters, 2) + s.Require().Equal(1, sourceCounters[types.CallbackTypeTimeoutPacket]) + s.Require().Equal(1, sourceCounters[types.CallbackTypeSendPacket]) + s.Require().Equal(uint8(1), sourceStatefulCounter) + + case callbackSuccess: + s.Require().Len(sourceCounters, 2) + s.Require().Equal(1, sourceCounters[types.CallbackTypeTimeoutPacket]) + s.Require().Equal(1, sourceCounters[types.CallbackTypeSendPacket]) + s.Require().Equal(uint8(2), sourceStatefulCounter) + + expEvent, exists := GetExpectedEvent( + transferStack.(porttypes.PacketDataUnmarshaler), gasLimit, packet.Data, packet.SourcePort, + packet.SourcePort, packet.SourceChannel, packet.Sequence, types.CallbackTypeTimeoutPacket, nil, + ) + s.Require().True(exists) + s.Require().Contains(ctx.EventManager().Events().ToABCIEvents(), expEvent) + } + }) + } +} + +func (s *CallbacksTestSuite) TestOnRecvPacket() { + type expResult uint8 + const ( + noExecution expResult = iota + callbackFailed + callbackSuccess + ) + + var ( + packetData transfertypes.FungibleTokenPacketData + packet channeltypes.Packet + ctx sdk.Context + userGasLimit uint64 + ) + + successAck := channeltypes.NewResultAcknowledgement([]byte{byte(1)}) + panicAck := channeltypes.NewErrorAcknowledgement(fmt.Errorf("panic")) + + testCases := []struct { + name string + malleate func() + expResult expResult + expAck ibcexported.Acknowledgement + }{ + { + "success", + func() {}, + callbackSuccess, + successAck, + }, + { + "failure: underlying app OnRecvPacket fails", + func() { + packet.Data = []byte("invalid packet data") + }, + noExecution, + channeltypes.NewErrorAcknowledgement(ibcerrors.ErrInvalidType), + }, + { + "success: no-op on callback data is not valid", + func() { + //nolint:goconst + packetData.Memo = `{"dest_callback": {"address": ""}}` + packet.Data = packetData.GetBytes() + }, + noExecution, + successAck, + }, + { + "failure: callback execution reach out of gas, but sufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"dest_callback": {"address":"%s", "gas_limit":"%d"}}`, simapp.OogPanicContract, userGasLimit) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + successAck, + }, + { + "failure: callback execution panics on insufficient gas provided by relayer", + func() { + packetData.Memo = fmt.Sprintf(`{"dest_callback": {"address":"%s", "gas_limit":"%d"}}`, simapp.OogPanicContract, userGasLimit) + packet.Data = packetData.GetBytes() + + ctx = ctx.WithGasMeter(sdk.NewGasMeter(300_000)) + }, + callbackFailed, + panicAck, + }, + { + "failure: callback execution fails", + func() { + packetData.Memo = fmt.Sprintf(`{"dest_callback": {"address":"%s"}}`, simapp.ErrorContract) + packet.Data = packetData.GetBytes() + }, + callbackFailed, + successAck, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTransferTest() + + // set user gas limit above panic level in mock contract keeper + userGasLimit = 600_000 + packetData = transfertypes.NewFungibleTokenPacketData( + ibctesting.TestCoin.GetDenom(), ibctesting.TestCoin.Amount.String(), ibctesting.TestAccAddress, s.chainB.SenderAccount.GetAddress().String(), + fmt.Sprintf(`{"dest_callback": {"address":"%s", "gas_limit":"%d"}}`, ibctesting.TestAccAddress, userGasLimit), + ) + + packet = channeltypes.Packet{ + Sequence: 1, + SourcePort: s.path.EndpointA.ChannelConfig.PortID, + SourceChannel: s.path.EndpointA.ChannelID, + DestinationPort: s.path.EndpointB.ChannelConfig.PortID, + DestinationChannel: s.path.EndpointB.ChannelID, + Data: packetData.GetBytes(), + TimeoutHeight: s.chainB.GetTimeoutHeight(), + TimeoutTimestamp: 0, + } + + ctx = s.chainB.GetContext() + gasLimit := ctx.GasMeter().Limit() + + tc.malleate() + + // callbacks module is routed as top level middleware + transferStack, ok := s.chainB.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + onRecvPacket := func() ibcexported.Acknowledgement { + return transferStack.OnRecvPacket(ctx, packet, s.chainB.SenderAccount.GetAddress()) + } + + switch tc.expAck { + case successAck: + ack := onRecvPacket() + s.Require().NotNil(ack) + + case panicAck: + s.Require().PanicsWithValue(sdk.ErrorOutOfGas{ + Descriptor: fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", types.CallbackTypeReceivePacket, userGasLimit), + }, func() { + _ = onRecvPacket() + }) + + default: + ack := onRecvPacket() + s.Require().Equal(tc.expAck, ack) + } + + destStatefulCounter := GetSimApp(s.chainB).MockContractKeeper.GetStateEntryCounter(s.chainB.GetContext()) + destCounters := GetSimApp(s.chainB).MockContractKeeper.Counters + + switch tc.expResult { + case noExecution: + s.Require().Len(destCounters, 0) + s.Require().Equal(uint8(0), destStatefulCounter) + + case callbackFailed: + s.Require().Len(destCounters, 1) + s.Require().Equal(1, destCounters[types.CallbackTypeReceivePacket]) + s.Require().Equal(uint8(0), destStatefulCounter) + + case callbackSuccess: + s.Require().Len(destCounters, 1) + s.Require().Equal(1, destCounters[types.CallbackTypeReceivePacket]) + s.Require().Equal(uint8(1), destStatefulCounter) + + expEvent, exists := GetExpectedEvent( + transferStack.(porttypes.PacketDataUnmarshaler), gasLimit, packet.Data, packet.SourcePort, + packet.DestinationPort, packet.DestinationChannel, packet.Sequence, types.CallbackTypeReceivePacket, nil, + ) + s.Require().True(exists) + s.Require().Contains(ctx.EventManager().Events().ToABCIEvents(), expEvent) + + } + }) + } +} + +func (s *CallbacksTestSuite) TestWriteAcknowledgement() { + var ( + packetData transfertypes.FungibleTokenPacketData + packet channeltypes.Packet + ctx sdk.Context + ack ibcexported.Acknowledgement + ) + + successAck := channeltypes.NewResultAcknowledgement([]byte{byte(1)}) + + testCases := []struct { + name string + malleate func() + callbackType types.CallbackType + expError error + }{ + { + "success", + func() { + ack = successAck + }, + types.CallbackTypeReceivePacket, + nil, + }, + { + "success: no-op on callback data is not valid", + func() { + packetData.Memo = `{"dest_callback": {"address": ""}}` + packet.Data = packetData.GetBytes() + }, + "none", // improperly formatted callback data should result in no callback execution + nil, + }, + { + "failure: ics4Wrapper WriteAcknowledgement call fails", + func() { + packet.DestinationChannel = "invalid-channel" + }, + "none", + channeltypes.ErrChannelNotFound, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTransferTest() + + // set user gas limit above panic level in mock contract keeper + packetData = transfertypes.NewFungibleTokenPacketData( + ibctesting.TestCoin.GetDenom(), ibctesting.TestCoin.Amount.String(), ibctesting.TestAccAddress, s.chainB.SenderAccount.GetAddress().String(), + fmt.Sprintf(`{"dest_callback": {"address":"%s", "gas_limit":"600000"}}`, ibctesting.TestAccAddress), + ) + + packet = channeltypes.Packet{ + Sequence: 1, + SourcePort: s.path.EndpointA.ChannelConfig.PortID, + SourceChannel: s.path.EndpointA.ChannelID, + DestinationPort: s.path.EndpointB.ChannelConfig.PortID, + DestinationChannel: s.path.EndpointB.ChannelID, + Data: packetData.GetBytes(), + TimeoutHeight: s.chainB.GetTimeoutHeight(), + TimeoutTimestamp: 0, + } + + ctx = s.chainB.GetContext() + gasLimit := ctx.GasMeter().Limit() + + chanCap := s.chainB.GetChannelCapability(s.path.EndpointB.ChannelConfig.PortID, s.path.EndpointB.ChannelID) + + tc.malleate() + + // callbacks module is routed as top level middleware + transferStack, ok := s.chainB.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + err := transferStack.(porttypes.ICS4Wrapper).WriteAcknowledgement(ctx, chanCap, packet, ack) + + expPass := tc.expError == nil + s.AssertHasExecutedExpectedCallback(tc.callbackType, expPass) + + if expPass { + s.Require().NoError(err) + + expEvent, exists := GetExpectedEvent( + transferStack.(porttypes.PacketDataUnmarshaler), gasLimit, packet.Data, packet.SourcePort, + packet.DestinationPort, packet.DestinationChannel, packet.Sequence, types.CallbackTypeReceivePacket, nil, + ) + if exists { + s.Require().Contains(ctx.EventManager().Events().ToABCIEvents(), expEvent) + } + + } else { + s.Require().ErrorIs(tc.expError, err) + } + }) + } +} + +func (s *CallbacksTestSuite) TestProcessCallback() { + var ( + callbackType types.CallbackType + callbackData types.CallbackData + ctx sdk.Context + callbackExecutor func(sdk.Context) error + expGasConsumed uint64 + ) + + callbackError := fmt.Errorf("callbackExecutor error") + + testCases := []struct { + name string + malleate func() + expPanic bool + expValue interface{} + }{ + { + "success", + func() {}, + false, + nil, + }, + { + "success: callbackExecutor panic, but not out of gas", + func() { + callbackExecutor = func(cachedCtx sdk.Context) error { + cachedCtx.GasMeter().ConsumeGas(expGasConsumed, "callbackExecutor gas consumption") + panic("callbackExecutor panic") + } + }, + false, + nil, + }, + { + "success: callbackExecutor oog panic, but retry is not allowed", + func() { + executionGas := callbackData.ExecutionGasLimit + expGasConsumed = executionGas + callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam + cachedCtx.GasMeter().ConsumeGas(expGasConsumed+1, "callbackExecutor gas consumption") + return nil + } + }, + false, + nil, + }, + { + "failure: callbackExecutor error", + func() { + callbackExecutor = func(cachedCtx sdk.Context) error { + cachedCtx.GasMeter().ConsumeGas(expGasConsumed, "callbackExecutor gas consumption") + return callbackError + } + }, + false, + callbackError, + }, + { + "failure: callbackExecutor panic, not out of gas, and SendPacket", + func() { + callbackType = types.CallbackTypeSendPacket + callbackExecutor = func(cachedCtx sdk.Context) error { + cachedCtx.GasMeter().ConsumeGas(expGasConsumed, "callbackExecutor gas consumption") + panic("callbackExecutor panic") + } + }, + true, + "callbackExecutor panic", + }, + { + "failure: callbackExecutor oog panic, but retry is allowed", + func() { + executionGas := callbackData.ExecutionGasLimit + callbackData.CommitGasLimit = executionGas + 1 + expGasConsumed = executionGas + callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam + cachedCtx.GasMeter().ConsumeGas(executionGas+1, "callbackExecutor oog panic") + return nil + } + }, + true, + sdk.ErrorOutOfGas{Descriptor: fmt.Sprintf("ibc %s callback out of gas; commitGasLimit: %d", types.CallbackTypeReceivePacket, 1000000+1)}, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupMockFeeTest() + + // set a callback data that does not allow retry + callbackData = types.CallbackData{ + CallbackAddress: s.chainB.SenderAccount.GetAddress().String(), + ExecutionGasLimit: 1_000_000, + SenderAddress: s.chainB.SenderAccount.GetAddress().String(), + CommitGasLimit: 600_000, + } + + // this only makes a difference if it is SendPacket + callbackType = types.CallbackTypeReceivePacket + + // expGasConsumed can be overwritten in malleate + expGasConsumed = 300_000 + + ctx = s.chainB.GetContext() + + // set a callback executor that will always succeed after consuming expGasConsumed + callbackExecutor = func(cachedCtx sdk.Context) error { //nolint:unparam + cachedCtx.GasMeter().ConsumeGas(expGasConsumed, "callbackExecutor gas consumption") + return nil + } + + tc.malleate() + + module, _, err := s.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(s.chainA.GetContext(), ibctesting.MockFeePort) + s.Require().NoError(err) + cbs, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(module) + s.Require().True(ok) + mockCallbackStack, ok := cbs.(ibccallbacks.IBCMiddleware) + s.Require().True(ok) + + processCallback := func() { + err = mockCallbackStack.ProcessCallback(ctx, callbackType, callbackData, callbackExecutor) + } + + expPass := tc.expValue == nil + switch { + case expPass: + processCallback() + s.Require().NoError(err) + case tc.expPanic: + s.Require().PanicsWithValue(tc.expValue, processCallback) + default: + processCallback() + s.Require().ErrorIs(tc.expValue.(error), err) + } + + s.Require().Equal(expGasConsumed, ctx.GasMeter().GasConsumed()) + }) + } +} + +func (s *CallbacksTestSuite) TestUnmarshalPacketData() { + s.setupChains() + + // We will pass the function call down the transfer stack to the transfer module + // transfer stack UnmarshalPacketData call order: callbacks -> fee -> transfer + transferStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(transfertypes.ModuleName) + s.Require().True(ok) + + unmarshalerStack, ok := transferStack.(types.CallbacksCompatibleModule) + s.Require().True(ok) + + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: ibctesting.TestAccAddress, + Receiver: ibctesting.TestAccAddress, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}, "dest_callback": {"address":"%s"}}`, ibctesting.TestAccAddress, ibctesting.TestAccAddress), + } + data := expPacketData.GetBytes() + + packetData, err := unmarshalerStack.UnmarshalPacketData(data) + s.Require().NoError(err) + s.Require().Equal(expPacketData, packetData) +} + +func (s *CallbacksTestSuite) TestGetAppVersion() { + s.SetupICATest() + + // Obtain an IBC stack for testing. The function call will use the top of the stack which calls + // directly to the channel keeper. Calling from a further down module in the stack is not necessary + // for this test. + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + s.Require().True(ok) + + controllerStack := icaControllerStack.(porttypes.ICS4Wrapper) + appVersion, found := controllerStack.GetAppVersion(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) + s.Require().True(found) + s.Require().Equal(s.path.EndpointA.ChannelConfig.Version, appVersion) +} + +func (s *CallbacksTestSuite) TestOnChanCloseInit() { + s.SetupICATest() + + // We will pass the function call down the icacontroller stack to the icacontroller module + // icacontroller stack OnChanCloseInit call order: callbacks -> fee -> icacontroller + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + s.Require().True(ok) + + controllerStack := icaControllerStack.(porttypes.Middleware) + err := controllerStack.OnChanCloseInit(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) + // we just check that this call is passed down to the icacontroller to return an error + s.Require().ErrorIs(errorsmod.Wrap(ibcerrors.ErrInvalidRequest, "user cannot close channel"), err) +} + +func (s *CallbacksTestSuite) TestOnChanCloseConfirm() { + s.SetupICATest() + + // We will pass the function call down the icacontroller stack to the icacontroller module + // icacontroller stack OnChanCloseConfirm call order: callbacks -> fee -> icacontroller + icaControllerStack, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(icacontrollertypes.SubModuleName) + s.Require().True(ok) + + controllerStack := icaControllerStack.(porttypes.Middleware) + err := controllerStack.OnChanCloseConfirm(s.chainA.GetContext(), s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) + // we just check that this call is passed down to the icacontroller + s.Require().NoError(err) +} + +func (s *CallbacksTestSuite) TestOnRecvPacketAsyncAck() { + s.SetupMockFeeTest() + + module, _, err := s.chainA.App.GetIBCKeeper().PortKeeper.LookupModuleByPort(s.chainA.GetContext(), ibctesting.MockFeePort) + s.Require().NoError(err) + cbs, ok := s.chainA.App.GetIBCKeeper().Router.GetRoute(module) + s.Require().True(ok) + mockFeeCallbackStack, ok := cbs.(porttypes.Middleware) + s.Require().True(ok) + + packet := channeltypes.NewPacket( + ibcmock.MockAsyncPacketData, + s.chainA.SenderAccount.GetSequence(), + s.path.EndpointA.ChannelConfig.PortID, + s.path.EndpointA.ChannelID, + s.path.EndpointB.ChannelConfig.PortID, + s.path.EndpointB.ChannelID, + clienttypes.NewHeight(0, 100), + 0, + ) + + ack := mockFeeCallbackStack.OnRecvPacket(s.chainA.GetContext(), packet, s.chainA.SenderAccount.GetAddress()) + s.Require().Nil(ack) + s.AssertHasExecutedExpectedCallback("none", true) +} diff --git a/modules/apps/callbacks/ica_test.go b/modules/apps/callbacks/ica_test.go new file mode 100644 index 00000000000..a79d53f6a45 --- /dev/null +++ b/modules/apps/callbacks/ica_test.go @@ -0,0 +1,210 @@ +package ibccallbacks_test + +import ( + "fmt" + "time" + + "github.com/cosmos/gogoproto/proto" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "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" + ibctesting "github.com/cosmos/ibc-go/v7/testing" +) + +func (s *CallbacksTestSuite) TestICACallbacks() { + // Destination callbacks are not supported for ICA packets + testCases := []struct { + name string + icaMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: send ica tx with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with other json fields", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, "something_else": {}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with malformed json", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, malformed}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: source callback with missing address", + `{"src_callback": {"address": ""}}`, + "none", + true, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + icaAddr := s.SetupICATest() + + s.ExecuteICATx(icaAddr, tc.icaMemo) + s.AssertHasExecutedExpectedCallback(tc.expCallback, tc.expSuccess) + }) + } +} + +func (s *CallbacksTestSuite) TestICATimeoutCallbacks() { + // ICA channels are closed after a timeout packet is executed + testCases := []struct { + name string + icaMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: send ica tx timeout with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeTimeoutPacket, + true, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.Run(tc.name, func() { + icaAddr := s.SetupICATest() + + s.ExecuteICATimeout(icaAddr, tc.icaMemo) + s.AssertHasExecutedExpectedCallback(tc.expCallback, tc.expSuccess) + }) + } +} + +// ExecuteICATx executes a stakingtypes.MsgDelegate on chainB by sending a packet containing the msg to chainB +func (s *CallbacksTestSuite) ExecuteICATx(icaAddress, memo string) { + timeoutTimestamp := uint64(s.chainA.GetContext().BlockTime().Add(time.Minute).UnixNano()) + icaOwner := s.chainA.SenderAccount.GetAddress().String() + connectionID := s.path.EndpointA.ConnectionID + // build the interchain accounts packet data + packetData := s.buildICAMsgDelegatePacketData(icaAddress, memo) + msg := icacontrollertypes.NewMsgSendTx(icaOwner, connectionID, timeoutTimestamp, packetData) + + res, err := s.chainA.SendMsgs(msg) + if err != nil { + return // we return if send packet is rejected + } + + packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents().ToABCIEvents()) + s.Require().NoError(err) + + err = s.path.RelayPacket(packet) + s.Require().NoError(err) +} + +// ExecuteICATx sends and times out an ICA tx +func (s *CallbacksTestSuite) ExecuteICATimeout(icaAddress, memo string) { + relativeTimeout := uint64(1) + icaOwner := s.chainA.SenderAccount.GetAddress().String() + connectionID := s.path.EndpointA.ConnectionID + // build the interchain accounts packet data + packetData := s.buildICAMsgDelegatePacketData(icaAddress, memo) + msg := icacontrollertypes.NewMsgSendTx(icaOwner, connectionID, relativeTimeout, packetData) + + res, err := s.chainA.SendMsgs(msg) + if err != nil { + return // we return if send packet is rejected + } + + packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents().ToABCIEvents()) + s.Require().NoError(err) + + // proof query requires up to date client + err = s.path.EndpointA.UpdateClient() + s.Require().NoError(err) + + err = s.path.EndpointA.TimeoutPacket(packet) + s.Require().NoError(err) +} + +// buildICAMsgDelegatePacketData builds a packetData containing a stakingtypes.MsgDelegate to be executed on chainB +func (s *CallbacksTestSuite) buildICAMsgDelegatePacketData(icaAddress string, memo string) icatypes.InterchainAccountPacketData { + // prepare a simple stakingtypes.MsgDelegate to be used as the interchain account msg executed on chainB + validatorAddr := (sdk.ValAddress)(s.chainB.Vals.Validators[0].Address) + msgDelegate := &stakingtypes.MsgDelegate{ + DelegatorAddress: icaAddress, + ValidatorAddress: validatorAddr.String(), + Amount: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(5000)), + } + + // ensure chainB is allowed to execute stakingtypes.MsgDelegate + params := icahosttypes.NewParams(true, []string{sdk.MsgTypeURL(msgDelegate)}) + GetSimApp(s.chainB).ICAHostKeeper.SetParams(s.chainB.GetContext(), params) + + data, err := icatypes.SerializeCosmosTx(GetSimApp(s.chainA).AppCodec(), []proto.Message{msgDelegate}, icatypes.EncodingProtobuf) + s.Require().NoError(err) + + icaPacketData := icatypes.InterchainAccountPacketData{ + Type: icatypes.EXECUTE_TX, + Data: data, + Memo: memo, + } + + return icaPacketData +} diff --git a/modules/apps/callbacks/testing/simapp/README.md b/modules/apps/callbacks/testing/simapp/README.md new file mode 100644 index 00000000000..7ee00030c45 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/README.md @@ -0,0 +1,7 @@ +# Callbacks Testing SimApp + +This testing directory is a duplicate of the ibc-go testing directory. +It is only here as a way of creating a separate SimApp binary to avoid introducing a dependency on the callbacks +module from within ibc-go. + +The simapp can be built with the workflow found [here](../../../../../.github/workflows/build-callbacks-simd-image-from-tag.yml). diff --git a/modules/apps/callbacks/testing/simapp/ante_handler.go b/modules/apps/callbacks/testing/simapp/ante_handler.go new file mode 100644 index 00000000000..1214324e66b --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/ante_handler.go @@ -0,0 +1,50 @@ +package simapp + +import ( + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + + ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" + "github.com/cosmos/ibc-go/v7/modules/core/keeper" +) + +// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC keeper. +type HandlerOptions struct { + ante.HandlerOptions + + IBCKeeper *keeper.Keeper +} + +// NewAnteHandler creates a new ante handler +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if options.AccountKeeper == nil { + return nil, errorsmod.Wrap(ibcerrors.ErrLogic, "account keeper is required for AnteHandler") + } + if options.BankKeeper == nil { + return nil, errorsmod.Wrap(ibcerrors.ErrLogic, "bank keeper is required for AnteHandler") + } + if options.SignModeHandler == nil { + return nil, errorsmod.Wrap(ibcerrors.ErrLogic, "sign mode handler is required for AnteHandler") + } + + anteDecorators := []sdk.AnteDecorator{ + ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), + ante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + ante.NewValidateSigCountDecorator(options.AccountKeeper), + ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), + ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + ante.NewIncrementSequenceDecorator(options.AccountKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), + } + + return sdk.ChainAnteDecorators(anteDecorators...), nil +} diff --git a/modules/apps/callbacks/testing/simapp/app.go b/modules/apps/callbacks/testing/simapp/app.go new file mode 100644 index 00000000000..15c8a1bb027 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/app.go @@ -0,0 +1,1013 @@ +package simapp + +import ( + "encoding/json" + "io" + "os" + "path/filepath" + + "github.com/spf13/cast" + + _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // this is used for serving docs + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + + "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" + 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" + "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" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/consensus" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + "github.com/cosmos/cosmos-sdk/x/crisis" + crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + distr "github.com/cosmos/cosmos-sdk/x/distribution" + distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/cosmos/cosmos-sdk/x/evidence" + evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" + evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" + "github.com/cosmos/cosmos-sdk/x/genutil" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/group" + groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" + groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" + "github.com/cosmos/cosmos-sdk/x/mint" + mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/cosmos/cosmos-sdk/x/params" + paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "github.com/cosmos/cosmos-sdk/x/slashing" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + "github.com/cosmos/cosmos-sdk/x/staking" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/cosmos-sdk/x/upgrade" + upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" + upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + + ibccallbacks "github.com/cosmos/ibc-go/modules/apps/callbacks" + simappparams "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp/params" + "github.com/cosmos/ibc-go/modules/capability" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller" + icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" + icahosttypes "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" + ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee" + ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper" + ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" + transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine" + ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" + ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types" +) + +const appName = "SimApp" + +// IBC application testing ports +const ( + MockFeePort string = ibcmock.ModuleName + ibcfeetypes.ModuleName +) + +var ( + // DefaultNodeHome default home directories for the application daemon + DefaultNodeHome string + + // ModuleBasics defines the module BasicManager is in charge of setting up basic, + // non-dependant module elements, such as codec registration + // and genesis verification. + ModuleBasics = module.NewBasicManager( + auth.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + bank.AppModuleBasic{}, + capability.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distr.AppModuleBasic{}, + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + ibcclientclient.UpdateClientProposalHandler, + ibcclientclient.UpgradeProposalHandler, + }, + ), + groupmodule.AppModuleBasic{}, + params.AppModuleBasic{}, + crisis.AppModuleBasic{}, + slashing.AppModuleBasic{}, + ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, + solomachine.AppModuleBasic{}, + feegrantmodule.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + evidence.AppModuleBasic{}, + transfer.AppModuleBasic{}, + ibcmock.AppModuleBasic{}, + ica.AppModuleBasic{}, + authzmodule.AppModuleBasic{}, + vesting.AppModuleBasic{}, + ibcfee.AppModuleBasic{}, + consensus.AppModuleBasic{}, + ) + + // module account permissions + maccPerms = map[string][]string{ + authtypes.FeeCollectorName: nil, + distrtypes.ModuleName: nil, + minttypes.ModuleName: {authtypes.Minter}, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + govtypes.ModuleName: {authtypes.Burner}, + ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + ibcfeetypes.ModuleName: nil, + icatypes.ModuleName: nil, + ibcmock.ModuleName: nil, + } +) + +var ( + _ runtime.AppI = (*SimApp)(nil) + _ servertypes.Application = (*SimApp)(nil) +) + +// SimApp extends an ABCI application, but with most of its parameters exported. +// They are exported for convenience in creating helper functions, as object +// capabilities aren't needed for testing. +type SimApp struct { + *baseapp.BaseApp + legacyAmino *codec.LegacyAmino + appCodec codec.Codec + txConfig client.TxConfig + interfaceRegistry types.InterfaceRegistry + + // keys to access the substores + keys map[string]*storetypes.KVStoreKey + tkeys map[string]*storetypes.TransientStoreKey + memKeys map[string]*storetypes.MemoryStoreKey + + // keepers + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper + GovKeeper govkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper + ParamsKeeper paramskeeper.Keeper + AuthzKeeper authzkeeper.Keeper + IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + IBCFeeKeeper ibcfeekeeper.Keeper + ICAControllerKeeper icacontrollerkeeper.Keeper + ICAHostKeeper icahostkeeper.Keeper + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + GroupKeeper groupkeeper.Keeper + ConsensusParamsKeeper consensusparamkeeper.Keeper + + // make scoped keepers public for test purposes + ScopedIBCKeeper capabilitykeeper.ScopedKeeper + ScopedTransferKeeper capabilitykeeper.ScopedKeeper + ScopedFeeMockKeeper capabilitykeeper.ScopedKeeper + ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper + ScopedICAHostKeeper capabilitykeeper.ScopedKeeper + ScopedIBCMockKeeper capabilitykeeper.ScopedKeeper + ScopedICAMockKeeper capabilitykeeper.ScopedKeeper + + // mock contract keeper used for testing + MockContractKeeper ContractKeeper + + // make IBC modules public for test purposes + // these modules are never directly routed to by the IBC Router + ICAAuthModule ibcmock.IBCModule + FeeMockModule ibcmock.IBCModule + + // the module manager + ModuleManager *module.Manager + + // simulation manager + simulationManager *module.SimulationManager + + // module configurator + configurator module.Configurator +} + +func init() { + userHomeDir, err := os.UserHomeDir() + if err != nil { + panic(err) + } + + DefaultNodeHome = filepath.Join(userHomeDir, ".simapp") +} + +// NewSimApp returns a reference to an initialized SimApp. +func NewSimApp( + 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, 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, + 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, + keys: keys, + tkeys: tkeys, + memKeys: memKeys, + } + + app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) + + // set the BaseApp's parameter store + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String()) + bApp.SetParamStore(&app.ConsensusParamsKeeper) + + // 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) + scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) + + // NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do + // not replicate if you do not need to test core IBC or light clients. + scopedIBCMockKeeper := app.CapabilityKeeper.ScopeToModule(ibcmock.ModuleName) + scopedFeeMockKeeper := app.CapabilityKeeper.ScopeToModule(MockFeePort) + 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( + appCodec, + keys[banktypes.StoreKey], + app.AccountKeeper, + BlockedAddresses(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // register the staking hooks + // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks + 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.DistrKeeper = distrkeeper.NewKeeper(appCodec, keys[distrtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.StakingKeeper, authtypes.FeeCollectorName, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + + app.SlashingKeeper = slashingkeeper.NewKeeper( + 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.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) + + groupConfig := group.DefaultConfig() + /* + Example of setting group params: + groupConfig.MaxMetadataLen = 1000 + */ + app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig) + + 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 + + app.IBCKeeper = ibckeeper.NewKeeper( + appCodec, keys[ibcexported.StoreKey], app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // NOTE: The mock ContractKeeper is only created for testing. + // Real applications should not use the mock ContractKeeper + app.MockContractKeeper = NewContractKeeper(memKeys[ibcmock.MemStoreKey]) + + // register the proposal types + govRouter := govv1beta1.NewRouter() + govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). + AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) + + govConfig := govtypes.DefaultConfig() + /* + Example of setting gov params: + govConfig.MaxMetadataLen = 10000 + */ + govKeeper := govkeeper.NewKeeper( + appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, + app.StakingKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // Set legacy router for backwards compatibility with gov v1beta1 + govKeeper.SetLegacyRouter(govRouter) + + app.GovKeeper = *govKeeper.SetHooks( + govtypes.NewMultiGovHooks( + // register the governance hooks + ), + ) + + // IBC Fee Module keeper + app.IBCFeeKeeper = ibcfeekeeper.NewKeeper( + appCodec, keys[ibcfeetypes.StoreKey], + app.IBCKeeper.ChannelKeeper, // may be replaced with IBC middleware + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, + ) + + // ICA Controller keeper + app.ICAControllerKeeper = icacontrollerkeeper.NewKeeper( + appCodec, keys[icacontrollertypes.StoreKey], app.GetSubspace(icacontrollertypes.SubModuleName), + app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + scopedICAControllerKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // ICA Host keeper + app.ICAHostKeeper = icahostkeeper.NewKeeper( + appCodec, keys[icahosttypes.StoreKey], app.GetSubspace(icahosttypes.SubModuleName), + app.IBCFeeKeeper, // use ics29 fee as ics4Wrapper in middleware stack + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.AccountKeeper, scopedICAHostKeeper, app.MsgServiceRouter(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // Create IBC Router + ibcRouter := porttypes.NewRouter() + + // Middleware Stacks + maxCallbackGas := uint64(1_000_000) + + // Create Transfer Keeper and pass IBCFeeKeeper as expected Channel and PortKeeper + // since fee middleware will wrap the IBCKeeper for underlying application. + // NOTE: the Transfer Keeper's ICS4Wrapper can later be replaced. + app.TransferKeeper = ibctransferkeeper.NewKeeper( + appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), + app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + // Mock Module Stack + + // Mock Module setup for testing IBC and also acts as the interchain accounts authentication module + // NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do + // not replicate if you do not need to test core IBC or light clients. + mockModule := ibcmock.NewAppModule(&app.IBCKeeper.PortKeeper) + + // The mock module is used for testing IBC + mockIBCModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp(ibcmock.ModuleName, scopedIBCMockKeeper)) + ibcRouter.AddRoute(ibcmock.ModuleName, mockIBCModule) + + // Create Transfer Stack + // SendPacket, since it is originating from the application to core IBC: + // transferKeeper.SendPacket -> callbacks.SendPacket -> feeKeeper.SendPacket -> channel.SendPacket + + // RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way + // channel.RecvPacket -> callbacks.OnRecvPacket -> fee.OnRecvPacket -> transfer.OnRecvPacket + + // transfer stack contains (from top to bottom): + // - IBC Callbacks Middleware + // - IBC Fee Middleware + // - Transfer + + // create IBC module from bottom to top of stack + var transferStack porttypes.IBCModule + transferStack = transfer.NewIBCModule(app.TransferKeeper) + transferStack = ibcfee.NewIBCMiddleware(transferStack, app.IBCFeeKeeper) + transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) + // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the transfer keeper + app.TransferKeeper.WithICS4Wrapper(transferStack.(porttypes.ICS4Wrapper)) + + // Add transfer stack to IBC Router + ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferStack) + + // Create Interchain Accounts Stack + // SendPacket, since it is originating from the application to core IBC: + // icaControllerKeeper.SendTx -> callbacks.SendPacket -> fee.SendPacket -> channel.SendPacket + + // initialize ICA module with mock module as the authentication module on the controller side + var icaControllerStack porttypes.IBCModule + icaControllerStack = ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp("", scopedICAMockKeeper)) + app.ICAAuthModule = icaControllerStack.(ibcmock.IBCModule) + icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, app.ICAControllerKeeper) + icaControllerStack = ibcfee.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper) + icaControllerStack = ibccallbacks.NewIBCMiddleware(icaControllerStack, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) + // Since the callbacks middleware itself is an ics4wrapper, it needs to be passed to the ica controller keeper + app.ICAControllerKeeper.WithICS4Wrapper(icaControllerStack.(porttypes.ICS4Wrapper)) + + // RecvPacket, message that originates from core IBC and goes down to app, the flow is: + // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket + + var icaHostStack porttypes.IBCModule + icaHostStack = icahost.NewIBCModule(app.ICAHostKeeper) + icaHostStack = ibcfee.NewIBCMiddleware(icaHostStack, app.IBCFeeKeeper) + + // Add host, controller & ica auth modules to IBC router + ibcRouter. + // the ICA Controller middleware needs to be explicitly added to the IBC Router because the + // ICA controller module owns the port capability for ICA. The ICA authentication module + // owns the channel capability. + AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). + AddRoute(icahosttypes.SubModuleName, icaHostStack). + AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerStack) // ica with mock auth module stack route to ica (top level of middleware stack) + + // Create Mock IBC Fee module stack for testing + // SendPacket, mock module cannot send packets + + // OnRecvPacket, message that originates from core IBC and goes down to app, the flow is the otherway + // channel.RecvPacket -> callbacks.OnRecvPacket -> fee.OnRecvPacket -> mockModule.OnRecvPacket + + // OnAcknowledgementPacket as this is where fee's are paid out + // mockModule.OnAcknowledgementPacket -> callbacks.OnAcknowledgementPacket -> fee.OnAcknowledgementPacket -> channel.OnAcknowledgementPacket + + // create fee wrapped mock module + feeMockModule := ibcmock.NewIBCModule(&mockModule, ibcmock.NewIBCApp(MockFeePort, scopedFeeMockKeeper)) + app.FeeMockModule = feeMockModule + var feeWithMockModule porttypes.Middleware = ibcfee.NewIBCMiddleware(feeMockModule, app.IBCFeeKeeper) + feeWithMockModule = ibccallbacks.NewIBCMiddleware(feeWithMockModule, app.IBCFeeKeeper, app.MockContractKeeper, maxCallbackGas) + ibcRouter.AddRoute(MockFeePort, feeWithMockModule) + + // Seal the IBC Router + app.IBCKeeper.SetRouter(ibcRouter) + + // create evidence keeper with router + evidenceKeeper := evidencekeeper.NewKeeper( + appCodec, keys[evidencetypes.StoreKey], app.StakingKeeper, app.SlashingKeeper, + ) + // If evidence needs to be handled for the app, set routes in router here and seal + app.EvidenceKeeper = *evidenceKeeper + + // **** Module Options **** + + // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment + // we prefer to be more strict in what arguments the modules expect. + skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants)) + + // NOTE: Any module instantiated in the module manager that is later modified + // must be passed by reference here. + app.ModuleManager = module.NewManager( + // SDK app modules + genutil.NewAppModule( + app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, + encodingConfig.TxConfig, + ), + auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), + vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), + 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)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), + staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), + upgrade.NewAppModule(app.UpgradeKeeper), + evidence.NewAppModule(app.EvidenceKeeper), + params.NewAppModule(app.ParamsKeeper), + authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), + + // IBC modules + ibc.NewAppModule(app.IBCKeeper), + transfer.NewAppModule(app.TransferKeeper), + ibcfee.NewAppModule(app.IBCFeeKeeper), + ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), + mockModule, + ) + + // During begin block slashing happens after distr.BeginBlocker so that + // there is nothing left over in the validator fee pool, so as to keep the + // 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.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.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, + upgradetypes.ModuleName, vestingtypes.ModuleName, icatypes.ModuleName, ibcfeetypes.ModuleName, ibcmock.ModuleName, group.ModuleName, consensusparamtypes.ModuleName, + ) + + // 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. + + 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.ModuleManager.RegisterInvariants(app.CrisisKeeper) + app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) + app.ModuleManager.RegisterServices(app.configurator) + + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) + + reflectionSvc, err := runtimeservices.NewReflectionService() + if err != nil { + panic(err) + } + reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) + + // add test gRPC service for testing gRPC queries in isolation + 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 + 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.simulationManager.RegisterStoreDecoders() + + // initialize stores + app.MountKVStores(keys) + app.MountTransientStores(tkeys) + app.MountMemoryStores(memKeys) + + // initialize BaseApp + app.SetInitChainer(app.InitChainer) + app.SetBeginBlocker(app.BeginBlocker) + 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 { + logger.Error("error on loading last version", "err", err) + os.Exit(1) + } + } + + app.ScopedIBCKeeper = scopedIBCKeeper + app.ScopedTransferKeeper = scopedTransferKeeper + app.ScopedICAControllerKeeper = scopedICAControllerKeeper + app.ScopedICAHostKeeper = scopedICAHostKeeper + + // NOTE: the IBC mock keeper and application module is used only for testing core IBC. Do + // note replicate if you do not need to test core IBC or light clients. + app.ScopedIBCMockKeeper = scopedIBCMockKeeper + app.ScopedICAMockKeeper = scopedICAMockKeeper + app.ScopedFeeMockKeeper = scopedFeeMockKeeper + + 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.ModuleManager.BeginBlock(ctx, req) +} + +// EndBlocker application updates every end block +func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { + return app.ModuleManager.EndBlock(ctx, req) +} + +// Configurator returns the configurator for the app +func (app *SimApp) Configurator() module.Configurator { + return app.configurator +} + +// InitChainer application update at chain initialization +func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { + var genesisState GenesisState + if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { + panic(err) + } + app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) + return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) +} + +// LoadHeight loads a particular height +func (app *SimApp) LoadHeight(height int64) error { + return app.LoadVersion(height) +} + +// LegacyAmino returns SimApp's amino codec. +// +// NOTE: This is solely to be used for testing purposes as it may be desirable +// for modules to register their own custom testing types. +func (app *SimApp) LegacyAmino() *codec.LegacyAmino { + return app.legacyAmino +} + +// AppCodec returns SimApp's app codec. +// +// NOTE: This is solely to be used for testing purposes as it may be desirable +// for modules to register their own custom testing types. +func (app *SimApp) AppCodec() codec.Codec { + return app.appCodec +} + +// InterfaceRegistry returns SimApp's InterfaceRegistry +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 (app *SimApp) DefaultGenesis() map[string]json.RawMessage { + return ModuleBasics.DefaultGenesis(app.appCodec) +} + +// GetKey returns the KVStoreKey for the provided store key. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey { + return app.keys[storeKey] +} + +// GetTKey returns the TransientStoreKey for the provided store key. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetTKey(storeKey string) *storetypes.TransientStoreKey { + return app.tkeys[storeKey] +} + +// GetMemKey returns the MemStoreKey for the provided mem key. +// +// NOTE: This is solely used for testing purposes. +func (app *SimApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey { + return app.memKeys[storeKey] +} + +// GetSubspace returns a param subspace for a given module name. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace { + subspace, _ := app.ParamsKeeper.GetSubspace(moduleName) + return subspace +} + +// SimulationManager implements the SimulationApp interface +func (app *SimApp) SimulationManager() *module.SimulationManager { + return app.simulationManager +} + +// RegisterAPIRoutes registers all application module routes with the provided +// API server. +func (*SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { + 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 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 err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { + panic(err) + } +} + +// RegisterTxService implements the Application.RegisterTxService method. +func (app *SimApp) RegisterTxService(clientCtx client.Context) { + authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) +} + +// RegisterTendermintService implements the Application.RegisterTendermintService method. +func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { + tmservice.RegisterTendermintService( + clientCtx, + app.BaseApp.GRPCQueryRouter(), + app.interfaceRegistry, + app.Query, + ) +} + +func (app *SimApp) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +} + +// 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 +} + +// 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 + } + + // allow the following addresses to receive funds + delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + delete(modAccAddrs, authtypes.NewModuleAddress(ibcmock.ModuleName).String()) + + return modAccAddrs +} + +// initParamsKeeper init params keeper and its subspaces +func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { + paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) + + // TODO: ibc module subspaces can be removed after migration of params + // https://github.com/cosmos/ibc-go/issues/2010 + paramsKeeper.Subspace(ibctransfertypes.ModuleName) + paramsKeeper.Subspace(ibcexported.ModuleName) + paramsKeeper.Subspace(icacontrollertypes.SubModuleName) + paramsKeeper.Subspace(icahosttypes.SubModuleName) + + 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 (*SimApp) setupUpgradeHandlers() {} + +// setupUpgradeStoreLoaders sets all necessary store loaders required by upgrades. +func (*SimApp) setupUpgradeStoreLoaders() {} + +// 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/modules/apps/callbacks/testing/simapp/contract_keeper.go b/modules/apps/callbacks/testing/simapp/contract_keeper.go new file mode 100644 index 00000000000..1e0d9e702f2 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/contract_keeper.go @@ -0,0 +1,199 @@ +package simapp + +import ( + "fmt" + + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + callbacktypes "github.com/cosmos/ibc-go/modules/apps/callbacks/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" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" +) + +// MockKeeper implements callbacktypes.ContractKeeper +var _ callbacktypes.ContractKeeper = (*ContractKeeper)(nil) + +var StatefulCounterKey = "stateful-callback-counter" + +const ( + // OogPanicContract is a contract address that will panic out of gas + OogPanicContract = "panics out of gas" + // OogErrorContract is a contract address that will error out of gas + OogErrorContract = "errors out of gas" + // PanicContract is a contract address that will panic + PanicContract = "panics" + // ErrorContract is a contract address that will return an error + ErrorContract = "errors" + // SuccessContract is a contract address that will return nil + SuccessContract = "success" +) + +// This is a mock contract keeper used for testing. It is not wired up to any modules. +// It implements the interface functions expected by the ibccallbacks middleware +// so that it can be tested with simapp. The keeper is responsible for tracking +// two metrics: +// - number of callbacks called per callback type +// - stateful entry attempts +// +// The counter for callbacks allows us to ensure the correct callbacks were routed to +// and the stateful entries allows us to track state reversals or reverted state upon +// contract execution failure or out of gas errors. +type ContractKeeper struct { + key storetypes.StoreKey + + Counters map[callbacktypes.CallbackType]int +} + +// SetStateEntryCounter sets state entry counter. The number of stateful +// entries is tracked as a uint8. This function is used to test state reversals. +func (k ContractKeeper) SetStateEntryCounter(ctx sdk.Context, count uint8) { + store := ctx.KVStore(k.key) + store.Set([]byte(StatefulCounterKey), []byte{count}) +} + +// GetStateEntryCounter returns the state entry counter stored in state. +func (k ContractKeeper) GetStateEntryCounter(ctx sdk.Context) uint8 { + store := ctx.KVStore(k.key) + bz := store.Get([]byte(StatefulCounterKey)) + if bz == nil { + return 0 + } + return bz[0] +} + +// IncrementStatefulCounter increments the stateful callback counter in state. +func (k ContractKeeper) IncrementStateEntryCounter(ctx sdk.Context) { + count := k.GetStateEntryCounter(ctx) + k.SetStateEntryCounter(ctx, count+1) +} + +// NewKeeper creates a new mock ContractKeeper. +func NewContractKeeper(key storetypes.StoreKey) ContractKeeper { + return ContractKeeper{ + key: key, + Counters: make(map[callbacktypes.CallbackType]int), + } +} + +// IBCPacketSendCallback increments the stateful entry counter and the send_packet callback counter. +// This function: +// - returns MockApplicationCallbackError and consumes half the remaining gas if the contract address is ErrorContract +// - Oog panics and consumes all the remaining gas + 1 if the contract address is OogPanicContract +// - returns MockApplicationCallbackError and consumes all the remaining gas + 1 if the contract address is OogErrorContract +// - Panics and consumes half the remaining gas if the contract address is PanicContract +// - returns nil and consumes half the remaining gas if the contract address is SuccessContract or any other value +func (k ContractKeeper) IBCSendPacketCallback( + ctx sdk.Context, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + packetData []byte, + contractAddress, + packetSenderAddress string, +) error { + return k.processMockCallback(ctx, callbacktypes.CallbackTypeSendPacket, contractAddress) +} + +// IBCOnAcknowledgementPacketCallback increments the stateful entry counter and the acknowledgement_packet callback counter. +// This function: +// - returns MockApplicationCallbackError and consumes half the remaining gas if the contract address is ErrorContract +// - Oog panics and consumes all the remaining gas + 1 if the contract address is OogPanicContract +// - returns MockApplicationCallbackError and consumes all the remaining gas + 1 if the contract address is OogErrorContract +// - Panics and consumes half the remaining gas if the contract address is PanicContract +// - returns nil and consumes half the remaining gas if the contract address is SuccessContract or any other value +func (k ContractKeeper) IBCOnAcknowledgementPacketCallback( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, +) error { + return k.processMockCallback(ctx, callbacktypes.CallbackTypeAcknowledgementPacket, contractAddress) +} + +// IBCOnTimeoutPacketCallback increments the stateful entry counter and the timeout_packet callback counter. +// This function: +// - returns MockApplicationCallbackError and consumes half the remaining gas if the contract address is ErrorContract +// - Oog panics and consumes all the remaining gas + 1 if the contract address is OogPanicContract +// - returns MockApplicationCallbackError and consumes all the remaining gas + 1 if the contract address is OogErrorContract +// - Panics and consumes half the remaining gas if the contract address is PanicContract +// - returns nil and consumes half the remaining gas if the contract address is SuccessContract or any other value +func (k ContractKeeper) IBCOnTimeoutPacketCallback( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, +) error { + return k.processMockCallback(ctx, callbacktypes.CallbackTypeTimeoutPacket, contractAddress) +} + +// IBCReceivePacketCallback increments the stateful entry counter and the receive_packet callback counter. +// This function: +// - returns MockApplicationCallbackError and consumes half the remaining gas if the contract address is ErrorContract +// - Oog panics and consumes all the remaining gas + 1 if the contract address is OogPanicContract +// - returns MockApplicationCallbackError and consumes all the remaining gas + 1 if the contract address is OogErrorContract +// - Panics and consumes half the remaining gas if the contract address is PanicContract +// - returns nil and consumes half the remaining gas if the contract address is SuccessContract or any other value +func (k ContractKeeper) IBCReceivePacketCallback( + ctx sdk.Context, + packet ibcexported.PacketI, + ack ibcexported.Acknowledgement, + contractAddress string, +) error { + return k.processMockCallback(ctx, callbacktypes.CallbackTypeReceivePacket, contractAddress) +} + +// processMockCallback processes a mock callback. +// It increments the stateful entry counter and the callback counter. +// This function: +// - returns MockApplicationCallbackError and consumes half the remaining gas if the contract address is ErrorContract +// - Oog panics and consumes all the remaining gas + 1 if the contract address is OogPanicContract +// - returns MockApplicationCallbackError and consumes all the remaining gas + 1 if the contract address is OogErrorContract +// - Panics and consumes half the remaining gas if the contract address is PanicContract +// - returns nil and consumes half the remaining gas if the contract address is SuccessContract or any other value +func (k ContractKeeper) processMockCallback( + ctx sdk.Context, + callbackType callbacktypes.CallbackType, + contractAddress string, +) (err error) { + gasRemaining := ctx.GasMeter().GasRemaining() + + // increment stateful entries, if the callbacks module handler + // reverts state, we can check by querying for the counter + // currently stored. + k.IncrementStateEntryCounter(ctx) + + // increment callback execution attempts + k.Counters[callbackType]++ + + switch contractAddress { + case ErrorContract: + // consume half of the remaining gas so that ConsumeGas cannot oog panic + ctx.GasMeter().ConsumeGas(gasRemaining/2, fmt.Sprintf("mock %s callback unauthorized", callbackType)) + return ibcmock.MockApplicationCallbackError + case OogPanicContract: + ctx.GasMeter().ConsumeGas(gasRemaining+1, fmt.Sprintf("mock %s callback oog panic", callbackType)) + return nil // unreachable + case OogErrorContract: + defer func() { + _ = recover() + err = ibcmock.MockApplicationCallbackError + }() + ctx.GasMeter().ConsumeGas(gasRemaining+1, fmt.Sprintf("mock %s callback oog error", callbackType)) + return nil // unreachable + case PanicContract: + // consume half of the remaining gas so that ConsumeGas cannot oog panic + ctx.GasMeter().ConsumeGas(gasRemaining/2, fmt.Sprintf("mock %s callback panic", callbackType)) + panic(ibcmock.MockApplicationCallbackError) + default: + // consume half of the remaining gas so that ConsumeGas cannot oog panic + ctx.GasMeter().ConsumeGas(gasRemaining/2, fmt.Sprintf("mock %s callback success", callbackType)) + return nil // success + } +} diff --git a/modules/apps/callbacks/testing/simapp/encoding.go b/modules/apps/callbacks/testing/simapp/encoding.go new file mode 100644 index 00000000000..80b7092f715 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/encoding.go @@ -0,0 +1,20 @@ +package simapp + +import ( + "github.com/cosmos/cosmos-sdk/std" + + simappparams "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp/params" +) + +// MakeTestEncodingConfig creates an EncodingConfig for testing. This function +// should be used only in tests or when creating a new app instance (NewApp*()). +// App user shouldn't create new codecs - use the app.AppCodec instead. +// [DEPRECATED] +func MakeTestEncodingConfig() simappparams.EncodingConfig { + encodingConfig := simappparams.MakeTestEncodingConfig() + std.RegisterLegacyAminoCodec(encodingConfig.Amino) + std.RegisterInterfaces(encodingConfig.InterfaceRegistry) + ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) + ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) + return encodingConfig +} diff --git a/modules/apps/callbacks/testing/simapp/export.go b/modules/apps/callbacks/testing/simapp/export.go new file mode 100644 index 00000000000..4d6489f63d4 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/export.go @@ -0,0 +1,200 @@ +package simapp + +import ( + "encoding/json" + "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" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +) + +// ExportAppStateAndValidators exports the state of the application for a genesis +// file. +func (app *SimApp) ExportAppStateAndValidators( + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, +) (servertypes.ExportedApp, error) { + // as if they could withdraw from the start of the next block + ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + + // We export at last height + 1, because that's the height at which + // Tendermint will start InitChain. + height := app.LastBlockHeight() + 1 + if forZeroHeight { + height = 0 + app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) + } + + genState := app.ModuleManager.ExportGenesis(ctx, app.appCodec) + appState, err := json.MarshalIndent(genState, "", " ") + if err != nil { + return servertypes.ExportedApp{}, err + } + + validators, err := staking.WriteValidators(ctx, app.StakingKeeper) + return servertypes.ExportedApp{ + AppState: appState, + Validators: validators, + Height: height, + ConsensusParams: app.BaseApp.GetConsensusParams(ctx), + }, err +} + +// prepare for fresh start at zero height +// NOTE zero height genesis is a temporary feature which will be deprecated +// in favour of export at a block height +func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { + applyAllowedAddrs := false + + // check if there is a allowed address list + if len(jailAllowedAddrs) > 0 { + applyAllowedAddrs = true + } + + allowedAddrsMap := make(map[string]bool) + + for _, addr := range jailAllowedAddrs { + _, err := sdk.ValAddressFromBech32(addr) + if err != nil { + log.Fatal(err) + } + allowedAddrsMap[addr] = true + } + + /* Just to be safe, assert the invariants on current state. */ + app.CrisisKeeper.AssertInvariants(ctx) + + /* Handle fee distribution state. */ + + // withdraw all validator commission + app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + return false + }) + + // withdraw all delegator rewards + dels := app.StakingKeeper.GetAllDelegations(ctx) + for _, delegation := range dels { + valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) + if err != nil { + panic(err) + } + + delAddr, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) + } + + // clear validator slash events + app.DistrKeeper.DeleteAllValidatorSlashEvents(ctx) + + // clear validator historical rewards + app.DistrKeeper.DeleteAllValidatorHistoricalRewards(ctx) + + // set context height to zero + height := ctx.BlockHeight() + ctx = ctx.WithBlockHeight(0) + + // reinitialize all validators + app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + // donate any unwithdrawn outstanding reward fraction tokens to the community pool + scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) + feePool := app.DistrKeeper.GetFeePool(ctx) + feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) + app.DistrKeeper.SetFeePool(ctx, feePool) + + err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + return err != nil + }) + + // reinitialize all delegations + for _, del := range dels { + valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + if err != nil { + panic(err) + } + delAddr, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + if err != nil { + panic(err) + } + } + + // reset context height + ctx = ctx.WithBlockHeight(height) + + /* Handle staking state. */ + + // iterate through redelegations, reset creation height + app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + for i := range red.Entries { + red.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetRedelegation(ctx, red) + return false + }) + + // iterate through unbonding delegations, reset creation height + app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + for i := range ubd.Entries { + ubd.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + return false + }) + + // Iterate through validators by power descending, reset bond heights, and + // update bond intra-tx counters. + store := ctx.KVStore(app.keys[stakingtypes.StoreKey]) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + counter := int16(0) + + for ; iter.Valid(); iter.Next() { + addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) + validator, found := app.StakingKeeper.GetValidator(ctx, addr) + if !found { + panic("expected validator, not found") + } + + validator.UnbondingHeight = 0 + if applyAllowedAddrs && !allowedAddrsMap[addr.String()] { + validator.Jailed = true + } + + app.StakingKeeper.SetValidator(ctx, validator) + counter++ + } + + iter.Close() + + _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + if err != nil { + log.Fatal(err) + } + + /* Handle slashing state. */ + + // reset start height on signing infos + app.SlashingKeeper.IterateValidatorSigningInfos( + ctx, + func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { + info.StartHeight = 0 + app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) + return false + }, + ) +} diff --git a/modules/apps/callbacks/testing/simapp/genesis.go b/modules/apps/callbacks/testing/simapp/genesis.go new file mode 100644 index 00000000000..772e452d443 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/genesis.go @@ -0,0 +1,21 @@ +package simapp + +import ( + "encoding/json" + + "github.com/cosmos/cosmos-sdk/codec" +) + +// The genesis state of the blockchain is represented here as a map of raw json +// messages key'd by a identifier string. +// The identifier is used to determine which module genesis information belongs +// to so it may be appropriately routed during init chain. +// Within this application default genesis information is retrieved from +// the ModuleBasicManager which populates json from each BasicModule +// object provided to it during init. +type GenesisState map[string]json.RawMessage + +// NewDefaultGenesisState generates the default state for the application. +func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState { + return ModuleBasics.DefaultGenesis(cdc) +} diff --git a/modules/apps/callbacks/testing/simapp/genesis_account.go b/modules/apps/callbacks/testing/simapp/genesis_account.go new file mode 100644 index 00000000000..5c9c7f9a03f --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/genesis_account.go @@ -0,0 +1,47 @@ +package simapp + +import ( + "errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +var _ authtypes.GenesisAccount = (*SimGenesisAccount)(nil) + +// SimGenesisAccount defines a type that implements the GenesisAccount interface +// to be used for simulation accounts in the genesis state. +type SimGenesisAccount struct { + *authtypes.BaseAccount + + // vesting account fields + OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` // total vesting coins upon initialization + DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` // delegated vested coins at time of delegation + DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` // delegated vesting coins at time of delegation + StartTime int64 `json:"start_time" yaml:"start_time"` // vesting start time (UNIX Epoch time) + EndTime int64 `json:"end_time" yaml:"end_time"` // vesting end time (UNIX Epoch time) + + // module account fields + ModuleName string `json:"module_name" yaml:"module_name"` // name of the module account + ModulePermissions []string `json:"module_permissions" yaml:"module_permissions"` // permissions of module account +} + +// Validate checks for errors on the vesting and module account parameters +func (sga SimGenesisAccount) Validate() error { + if !sga.OriginalVesting.IsZero() { + if sga.StartTime >= sga.EndTime { + return errors.New("vesting start-time cannot be before end-time") + } + } + + if sga.ModuleName != "" { + ma := authtypes.ModuleAccount{ + BaseAccount: sga.BaseAccount, Name: sga.ModuleName, Permissions: sga.ModulePermissions, + } + if err := ma.Validate(); err != nil { + return err + } + } + + return sga.BaseAccount.Validate() +} diff --git a/modules/apps/callbacks/testing/simapp/params/amino.go b/modules/apps/callbacks/testing/simapp/params/amino.go new file mode 100644 index 00000000000..c7d8ba0045d --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/params/amino.go @@ -0,0 +1,27 @@ +//go:build test_amino +// +build test_amino + +package params + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" +) + +// MakeTestEncodingConfig creates an EncodingConfig for an amino based test configuration. +// This function should be used only internally (in the SDK). +// App user shouldn't create new codecs - use the app.AppCodec instead. +// [DEPRECATED] +func MakeTestEncodingConfig() EncodingConfig { + cdc := codec.NewLegacyAmino() + interfaceRegistry := types.NewInterfaceRegistry() + marshaler := codec.NewAminoCodec(cdc) + + return EncodingConfig{ + InterfaceRegistry: interfaceRegistry, + Marshaler: marshaler, + TxConfig: legacytx.StdTxConfig{Cdc: cdc}, + Amino: cdc, + } +} diff --git a/modules/apps/callbacks/testing/simapp/params/doc.go b/modules/apps/callbacks/testing/simapp/params/doc.go new file mode 100644 index 00000000000..a2f3620a835 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/params/doc.go @@ -0,0 +1,19 @@ +/* +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 given operation. + +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: + + { + "op_weight_msg_send": 60, + "op_weight_msg_delegate": 100, + } + +In the example above, the `MsgSend` has 60% chance to be simulated, while the +`MsgDelegate` will always be simulated. +*/ +package params diff --git a/modules/apps/callbacks/testing/simapp/params/encoding.go b/modules/apps/callbacks/testing/simapp/params/encoding.go new file mode 100644 index 00000000000..8ff9ea04b39 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/params/encoding.go @@ -0,0 +1,16 @@ +package params + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" +) + +// EncodingConfig specifies the concrete encoding types to use for a given app. +// This is provided for compatibility between protobuf and amino implementations. +type EncodingConfig struct { + InterfaceRegistry types.InterfaceRegistry + Codec codec.Codec + TxConfig client.TxConfig + Amino *codec.LegacyAmino +} diff --git a/modules/apps/callbacks/testing/simapp/params/proto.go b/modules/apps/callbacks/testing/simapp/params/proto.go new file mode 100644 index 00000000000..4270c2b0dbf --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/params/proto.go @@ -0,0 +1,27 @@ +//go:build !test_amino +// +build !test_amino + +package params + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/x/auth/tx" +) + +// MakeTestEncodingConfig creates an EncodingConfig for a non-amino based test configuration. +// This function should be used only internally (in the SDK). +// App user should'nt create new codecs - use the app.AppCodec instead. +// [DEPRECATED] +func MakeTestEncodingConfig() EncodingConfig { + cdc := codec.NewLegacyAmino() + interfaceRegistry := types.NewInterfaceRegistry() + protoCdc := codec.NewProtoCodec(interfaceRegistry) + + return EncodingConfig{ + InterfaceRegistry: interfaceRegistry, + Codec: protoCdc, + TxConfig: tx.NewTxConfig(protoCdc, tx.DefaultSignModes), + Amino: cdc, + } +} diff --git a/modules/apps/callbacks/testing/simapp/simd/cmd/root.go b/modules/apps/callbacks/testing/simapp/simd/cmd/root.go new file mode 100644 index 00000000000..ef4106c1337 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/simd/cmd/root.go @@ -0,0 +1,305 @@ +package cmd + +import ( + "errors" + "io" + "os" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + + "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" + 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" + "github.com/cosmos/cosmos-sdk/x/crisis" + genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + + dbm "github.com/cometbft/cometbft-db" + cmtcfg "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp/params" +) + +// NewRootCmd creates a new root command for simd. It is called once in the +// main function. +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). + WithTxConfig(encodingConfig.TxConfig). + WithLegacyAmino(encodingConfig.Amino). + WithInput(os.Stdin). + WithAccountRetriever(types.AccountRetriever{}). + WithHomeDir(simapp.DefaultNodeHome). + WithViper("") // In simapp, we don't use any prefix for env variables. + + rootCmd := &cobra.Command{ + Use: "simd", + Short: "simulation app", + PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { + // set the default command outputs + cmd.SetOut(cmd.OutOrStdout()) + cmd.SetErr(cmd.ErrOrStderr()) + + initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) + if err != nil { + return err + } + + initClientCtx, err = config.ReadFromClientConfig(initClientCtx) + if err != nil { + return err + } + + if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { + return err + } + + customAppTemplate, customAppConfig := initAppConfig() + customTMConfig := initTendermintConfig() + + return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, customTMConfig) + }, + } + + initRootCmd(rootCmd, encodingConfig) + + return rootCmd +} + +// initTendermintConfig helps to override default Tendermint Config values. +// return cmtcfg.DefaultConfig if no custom configuration is required for the application. +func initTendermintConfig() *cmtcfg.Config { + cfg := cmtcfg.DefaultConfig() + + // these values put a higher strain on node memory + // cfg.P2P.MaxNumInboundPeers = 100 + // cfg.P2P.MaxNumOutboundPeers = 40 + + return cfg +} + +// initAppConfig helps to override default appConfig template and configs. +// return "", nil if no custom configuration is required for the application. +func initAppConfig() (string, interface{}) { + // The following code snippet is just for reference. + + // WASMConfig defines configuration for the wasm module. + type WASMConfig struct { + // This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries + QueryGasLimit uint64 `mapstructure:"query_gas_limit"` + + // Address defines the gRPC-web server to listen on + LruSize uint64 `mapstructure:"lru_size"` + } + + type CustomAppConfig struct { + serverconfig.Config + + WASM WASMConfig `mapstructure:"wasm"` + } + + // Optionally allow the chain developer to overwrite the SDK's default + // server config. + srvCfg := serverconfig.DefaultConfig() + // The SDK's default minimum gas price is set to "" (empty value) inside + // app.toml. If left empty by validators, the node will halt on startup. + // However, the chain developer can set a default app.toml value for their + // validators here. + // + // In summary: + // - if you leave srvCfg.MinGasPrices = "", all validators MUST tweak their + // own app.toml config, + // - if you set srvCfg.MinGasPrices non-empty, validators CAN tweak their + // own app.toml to override, or use this default value. + // + // 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, + WASM: WASMConfig{ + LruSize: 1, + QueryGasLimit: 300000, + }, + } + + customAppTemplate := serverconfig.DefaultConfigTemplate + ` +[wasm] +# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries +query_gas_limit = 300000 +# This is the number of wasm vm instances we keep cached in memory for speed-up +# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally +lru_size = 0` + + return customAppTemplate, customAppConfig +} + +func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { + cfg := sdk.GetConfig() + cfg.Seal() + + rootCmd.AddCommand( + genutilcli.InitCmd(simapp.ModuleBasics, simapp.DefaultNodeHome), + debug.Cmd(), + config.Cmd(), + pruning.PruningCmd(newApp), + snapshot.Cmd(newApp), + ) + + server.AddCommands(rootCmd, simapp.DefaultNodeHome, newApp, appExport, addModuleInitFlags) + + // add keybase, auxiliary RPC, query, genesis, and tx child commands + rootCmd.AddCommand( + rpc.StatusCommand(), + genesisCommand(encodingConfig), + queryCommand(), + txCommand(), + keys.Commands(simapp.DefaultNodeHome), + ) +} + +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 _, subCmd := range cmds { + cmd.AddCommand(subCmd) + } + return cmd +} + +func queryCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "query", + Aliases: []string{"q"}, + Short: "Querying subcommands", + DisableFlagParsing: false, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + authcmd.GetAccountCmd(), + rpc.ValidatorCommand(), + rpc.BlockCommand(), + authcmd.QueryTxsByEventsCmd(), + authcmd.QueryTxCmd(), + ) + + simapp.ModuleBasics.AddQueryCommands(cmd) + + return cmd +} + +func txCommand() *cobra.Command { + cmd := &cobra.Command{ + Use: "tx", + Short: "Transactions subcommands", + DisableFlagParsing: false, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + authcmd.GetSignCommand(), + authcmd.GetSignBatchCommand(), + authcmd.GetMultiSignCommand(), + authcmd.GetMultiSignBatchCmd(), + authcmd.GetValidateSignaturesCommand(), + authcmd.GetBroadcastCommand(), + authcmd.GetEncodeCommand(), + authcmd.GetDecodeCommand(), + authcmd.GetAuxToFeeCommand(), + ) + + simapp.ModuleBasics.AddTxCommands(cmd) + + return cmd +} + +// 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, + appOpts, + baseappOptions..., + ) +} + +// 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, appOpts) + + if err := simApp.LoadHeight(height); err != nil { + return servertypes.ExportedApp{}, err + } + } else { + simApp = simapp.NewSimApp(logger, db, traceStore, true, appOpts) + } + + return simApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) +} diff --git a/modules/apps/callbacks/testing/simapp/simd/main.go b/modules/apps/callbacks/testing/simapp/simd/main.go new file mode 100644 index 00000000000..632c87573e5 --- /dev/null +++ b/modules/apps/callbacks/testing/simapp/simd/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "os" + + "github.com/cosmos/cosmos-sdk/server" + svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp/simd/cmd" +) + +func main() { + rootCmd := cmd.NewRootCmd() + if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { + switch e := err.(type) { + case server.ErrorCode: + os.Exit(e.Code) + + default: + os.Exit(1) + } + } +} diff --git a/modules/apps/callbacks/transfer_test.go b/modules/apps/callbacks/transfer_test.go new file mode 100644 index 00000000000..8677c9fcf09 --- /dev/null +++ b/modules/apps/callbacks/transfer_test.go @@ -0,0 +1,238 @@ +package ibccallbacks_test + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/testing/simapp" + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" +) + +func (s *CallbacksTestSuite) TestTransferCallbacks() { + testCases := []struct { + name string + transferMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: transfer with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeReceivePacket, + true, + }, + { + "success: dest callback with other json fields", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}, "something_else": {}}`, simapp.SuccessContract), + types.CallbackTypeReceivePacket, + true, + }, + { + "success: dest callback with malformed json", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}, malformed}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: dest callback with missing address", + `{"dest_callback": {"address": ""}}`, + "none", + true, + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with other json fields", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, "something_else": {}}`, simapp.SuccessContract), + types.CallbackTypeAcknowledgementPacket, + true, + }, + { + "success: source callback with malformed json", + fmt.Sprintf(`{"src_callback": {"address": "%s"}, malformed}`, simapp.SuccessContract), + "none", + true, + }, + { + "success: source callback with missing address", + `{"src_callback": {"address": ""}}`, + "none", + true, + }, + { + "failure: dest callback with low gas (panic)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeReceivePacket, + false, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "failure: dest callback with low gas (error)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeReceivePacket, + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.SetupTransferTest() + + s.ExecuteTransfer(tc.transferMemo) + s.AssertHasExecutedExpectedCallback(tc.expCallback, tc.expSuccess) + } +} + +func (s *CallbacksTestSuite) TestTransferTimeoutCallbacks() { + testCases := []struct { + name string + transferMemo string + expCallback types.CallbackType + expSuccess bool + }{ + { + "success: transfer with no memo", + "", + "none", + true, + }, + { + "success: dest callback", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.SuccessContract), + "none", // timeouts don't reach destination chain execution + true, + }, + { + "success: source callback", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.SuccessContract), + types.CallbackTypeTimeoutPacket, + true, + }, + { + "success: dest callback with low gas (panic)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogPanicContract), + "none", // timeouts don't reach destination chain execution + true, + }, + { + "success: dest callback with low gas (error)", + fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, simapp.OogErrorContract), + "none", // timeouts don't reach destination chain execution + true, + }, + { + "failure: source callback with low gas (panic)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogPanicContract), + types.CallbackTypeSendPacket, + false, + }, + { + "failure: source callback with low gas (error)", + fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, simapp.OogErrorContract), + types.CallbackTypeSendPacket, + false, + }, + } + + for _, tc := range testCases { + s.SetupTransferTest() + + s.ExecuteTransferTimeout(tc.transferMemo) + s.AssertHasExecutedExpectedCallback(tc.expCallback, tc.expSuccess) + } +} + +// ExecuteTransfer executes a transfer message on chainA for ibctesting.TestCoin (100 "stake"). +// It checks that the transfer is successful and that the packet is relayed to chainB. +func (s *CallbacksTestSuite) ExecuteTransfer(memo string) { + escrowAddress := transfertypes.GetEscrowAddress(s.path.EndpointA.ChannelConfig.PortID, s.path.EndpointA.ChannelID) + // record the balance of the escrow address before the transfer + escrowBalance := GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), escrowAddress, sdk.DefaultBondDenom) + // record the balance of the receiving address before the transfer + voucherDenomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(s.path.EndpointB.ChannelConfig.PortID, s.path.EndpointB.ChannelID, sdk.DefaultBondDenom)) + receiverBalance := GetSimApp(s.chainB).BankKeeper.GetBalance(s.chainB.GetContext(), s.chainB.SenderAccount.GetAddress(), voucherDenomTrace.IBCDenom()) + + amount := ibctesting.TestCoin + msg := transfertypes.NewMsgTransfer( + s.path.EndpointA.ChannelConfig.PortID, + s.path.EndpointA.ChannelID, + amount, + s.chainA.SenderAccount.GetAddress().String(), + s.chainB.SenderAccount.GetAddress().String(), + clienttypes.NewHeight(1, 100), 0, memo, + ) + + res, err := s.chainA.SendMsgs(msg) + if err != nil { + return // we return if send packet is rejected + } + + packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents().ToABCIEvents()) + s.Require().NoError(err) + + // relay send + err = s.path.RelayPacket(packet) + s.Require().NoError(err) // relay committed + + // check that the escrow address balance increased by 100 + s.Require().Equal(escrowBalance.Add(amount), GetSimApp(s.chainA).BankKeeper.GetBalance(s.chainA.GetContext(), escrowAddress, sdk.DefaultBondDenom)) + // check that the receiving address balance increased by 100 + s.Require().Equal(receiverBalance.AddAmount(sdk.NewInt(100)), GetSimApp(s.chainB).BankKeeper.GetBalance(s.chainB.GetContext(), s.chainB.SenderAccount.GetAddress(), voucherDenomTrace.IBCDenom())) +} + +// ExecuteTransferTimeout executes a transfer message on chainA for 100 denom. +// This message is not relayed to chainB, and it times out on chainA. +func (s *CallbacksTestSuite) ExecuteTransferTimeout(memo string) { + timeoutHeight := clienttypes.GetSelfHeight(s.chainB.GetContext()) + timeoutTimestamp := uint64(s.chainB.GetContext().BlockTime().UnixNano()) + + amount := ibctesting.TestCoin + msg := transfertypes.NewMsgTransfer( + s.path.EndpointA.ChannelConfig.PortID, + s.path.EndpointA.ChannelID, + amount, + s.chainA.SenderAccount.GetAddress().String(), + s.chainB.SenderAccount.GetAddress().String(), + timeoutHeight, timeoutTimestamp, memo, + ) + + res, err := s.chainA.SendMsgs(msg) + if err != nil { + return // we return if send packet is rejected + } + + packet, err := ibctesting.ParsePacketFromEvents(res.GetEvents().ToABCIEvents()) + s.Require().NoError(err) // packet committed + s.Require().NotNil(packet) + + // need to update chainA's client representing chainB to prove missing ack + err = s.path.EndpointA.UpdateClient() + s.Require().NoError(err) + + err = s.path.EndpointA.TimeoutPacket(packet) + s.Require().NoError(err) // timeout committed +} diff --git a/modules/apps/callbacks/types/callbacks.go b/modules/apps/callbacks/types/callbacks.go new file mode 100644 index 00000000000..7d18259af29 --- /dev/null +++ b/modules/apps/callbacks/types/callbacks.go @@ -0,0 +1,198 @@ +package types + +import ( + "strconv" + "strings" + + errorsmod "cosmossdk.io/errors" + + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +/* + +ADR-8 implementation + +The Memo is used to ensure that the callback is desired by the user. This allows a user to send a packet to an ADR-8 enabled contract. + +The Memo format is defined like so: + +```json +{ + // ... other memo fields we don't care about + "src_callback": { + "address": {stringCallbackAddress}, + + // optional fields + "gas_limit": {stringForCallback} + }, + "dest_callback": { + "address": {stringCallbackAddress}, + + // optional fields + "gas_limit": {stringForCallback} + } +} +``` + +We will pass the packet sender info (if available) to the contract keeper for source callback executions. This will allow the contract +keeper to verify that the packet sender is the same as the callback address if desired. + +*/ + +// CallbacksCompatibleModule is an interface that combines the IBCModule and PacketDataUnmarshaler +// interfaces to assert that the underlying application supports both. +type CallbacksCompatibleModule interface { + porttypes.IBCModule + porttypes.PacketDataUnmarshaler +} + +// CallbackData is the callback data parsed from the packet. +type CallbackData struct { + // CallbackAddress is the address of the callback actor. + CallbackAddress string + // ExecutionGasLimit is the gas limit which will be used for the callback execution. + ExecutionGasLimit uint64 + // SenderAddress is the sender of the packet. This is passed to the contract keeper + // to verify that the packet sender is the same as the callback address if desired. + // This address is empty during destination callback execution. + // This address may be empty if the sender is unknown or undefined. + SenderAddress string + // CommitGasLimit is the gas needed to commit the callback even if the callback + // execution fails due to out of gas. + // This parameter is only used in event emissions, or logging. + CommitGasLimit uint64 +} + +// GetSourceCallbackData parses the packet data and returns the source callback data. +func GetSourceCallbackData( + packetDataUnmarshaler porttypes.PacketDataUnmarshaler, + data []byte, srcPortID string, remainingGas uint64, maxGas uint64, +) (CallbackData, error) { + return getCallbackData(packetDataUnmarshaler, data, srcPortID, remainingGas, maxGas, SourceCallbackKey) +} + +// GetDestCallbackData parses the packet data and returns the destination callback data. +func GetDestCallbackData( + packetDataUnmarshaler porttypes.PacketDataUnmarshaler, + data []byte, srcPortID string, remainingGas, maxGas uint64, +) (CallbackData, error) { + return getCallbackData(packetDataUnmarshaler, data, srcPortID, remainingGas, maxGas, DestinationCallbackKey) +} + +// getCallbackData parses the packet data and returns the callback data. +// It also checks that the remaining gas is greater than the gas limit specified in the packet data. +// The addressGetter and gasLimitGetter functions are used to retrieve the callback +// address and gas limit from the callback data. +func getCallbackData( + packetDataUnmarshaler porttypes.PacketDataUnmarshaler, + data []byte, srcPortID string, remainingGas, + maxGas uint64, callbackKey string, +) (CallbackData, error) { + // unmarshal packet data + packetData, err := packetDataUnmarshaler.UnmarshalPacketData(data) + if err != nil { + return CallbackData{}, errorsmod.Wrap(ErrCannotUnmarshalPacketData, err.Error()) + } + + packetDataProvider, ok := packetData.(ibcexported.PacketDataProvider) + if !ok { + return CallbackData{}, ErrNotPacketDataProvider + } + + callbackData, ok := packetDataProvider.GetCustomPacketData(callbackKey).(map[string]interface{}) + if callbackData == nil || !ok { + return CallbackData{}, ErrCallbackKeyNotFound + } + + // get the callback address from the callback data + callbackAddress := getCallbackAddress(callbackData) + if strings.TrimSpace(callbackAddress) == "" { + return CallbackData{}, ErrCallbackAddressNotFound + } + + // retrieve packet sender from packet data if possible and if needed + var packetSender string + if callbackKey == SourceCallbackKey { + packetData, ok := packetData.(ibcexported.PacketData) + if ok { + packetSender = packetData.GetPacketSender(srcPortID) + } + } + + // get the gas limit from the callback data + executionGasLimit, commitGasLimit := computeExecAndCommitGasLimit(callbackData, remainingGas, maxGas) + + return CallbackData{ + CallbackAddress: callbackAddress, + ExecutionGasLimit: executionGasLimit, + SenderAddress: packetSender, + CommitGasLimit: commitGasLimit, + }, nil +} + +func computeExecAndCommitGasLimit(callbackData map[string]interface{}, remainingGas, maxGas uint64) (uint64, uint64) { + // get the gas limit from the callback data + commitGasLimit := getUserDefinedGasLimit(callbackData) + + // ensure user defined gas limit does not exceed the max gas limit + if commitGasLimit == 0 || commitGasLimit > maxGas { + commitGasLimit = maxGas + } + + // account for the remaining gas in the context being less than the desired gas limit for the callback execution + // in this case, the callback execution may be retried upon failure + executionGasLimit := commitGasLimit + if remainingGas < executionGasLimit { + executionGasLimit = remainingGas + } + + return executionGasLimit, commitGasLimit +} + +// getUserDefinedGasLimit returns the custom gas limit provided for callbacks if it is +// in the callback data. It is assumed that callback data is not nil. +// If no gas limit is specified or the gas limit is improperly formatted, 0 is returned. +// +// The memo is expected to specify the user defined gas limit in the following format: +// { "{callbackKey}": { ... , "gas_limit": {stringForCallback} } +// +// Note: the user defined gas limit must be set as a string and not a json number. +func getUserDefinedGasLimit(callbackData map[string]interface{}) uint64 { + // the gas limit must be specified as a string and not a json number + gasLimit, ok := callbackData[UserDefinedGasLimitKey].(string) + if !ok { + return 0 + } + + userGas, err := strconv.ParseUint(gasLimit, 10, 64) + if err != nil { + return 0 + } + + return userGas +} + +// getCallbackAddress returns the callback address if it is specified in the callback data. +// It is assumed that callback data is not nil. +// If no callback address is specified or the memo is improperly formatted, an empty string is returned. +// +// The memo is expected to contain the callback address in the following format: +// { "{callbackKey}": { "address": {stringCallbackAddress}} +// +// ADR-8 middleware should callback on the returned address if it is a PacketActor +// (i.e. smart contract that accepts IBC callbacks). +func getCallbackAddress(callbackData map[string]interface{}) string { + callbackAddress, ok := callbackData[CallbackAddressKey].(string) + if !ok { + return "" + } + + return callbackAddress +} + +// AllowRetry returns true if the callback execution gas limit is less than the commit gas limit. +func (c CallbackData) AllowRetry() bool { + return c.ExecutionGasLimit < c.CommitGasLimit +} diff --git a/modules/apps/callbacks/types/callbacks_test.go b/modules/apps/callbacks/types/callbacks_test.go new file mode 100644 index 00000000000..7faac7f9a23 --- /dev/null +++ b/modules/apps/callbacks/types/callbacks_test.go @@ -0,0 +1,578 @@ +package types_test + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cometbft/cometbft/crypto/secp256k1" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/types" + transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibctesting "github.com/cosmos/ibc-go/v7/testing" + ibcmock "github.com/cosmos/ibc-go/v7/testing/mock" +) + +func (s *CallbacksTypesTestSuite) TestGetCallbackData() { + var ( + sender = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + packetDataUnmarshaler porttypes.PacketDataUnmarshaler + packetData []byte + remainingGas uint64 + callbackKey string + ) + + // max gas is 1_000_000 + testCases := []struct { + name string + malleate func() + expCallbackData types.CallbackData + expError error + }{ + { + "success: source callback", + func() { + remainingGas = 2_000_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "success: destination callback", + func() { + callbackKey = types.DestinationCallbackKey + remainingGas = 2_000_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: "", + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "success: destination callback with 0 user defined gas limit", + func() { + callbackKey = types.DestinationCallbackKey + remainingGas = 2_000_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"dest_callback": {"address": "%s", "gas_limit":"0"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: "", + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "success: source callback with gas limit < remaining gas < max gas", + func() { + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "50000"}}`, sender), + } + packetData = expPacketData.GetBytes() + + remainingGas = 100_000 + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 50_000, + CommitGasLimit: 50_000, + }, + nil, + }, + { + "success: source callback with remaining gas < gas limit < max gas", + func() { + remainingGas = 100_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "200000"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + }, + { + "success: source callback with remaining gas < max gas < gas limit", + func() { + remainingGas = 100_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "2000000"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 100_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "success: destination callback with remaining gas < max gas < gas limit", + func() { + callbackKey = types.DestinationCallbackKey + remainingGas = 100_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"dest_callback": {"address": "%s", "gas_limit": "2000000"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: "", + ExecutionGasLimit: 100_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "success: source callback with max gas < remaining gas < gas limit", + func() { + remainingGas = 2_000_000 + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "3000000"}}`, sender), + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + }, + nil, + }, + { + "failure: invalid packet data", + func() { + packetData = []byte("invalid packet data") + }, + types.CallbackData{}, + types.ErrCannotUnmarshalPacketData, + }, + { + "failure: packet data does not implement PacketDataProvider", + func() { + packetData = ibcmock.MockPacketData + packetDataUnmarshaler = ibcmock.IBCModule{} + }, + types.CallbackData{}, + types.ErrNotPacketDataProvider, + }, + { + "failure: empty memo", + func() { + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: "", + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{}, + types.ErrCallbackKeyNotFound, + }, + { + "failure: empty address", + func() { + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"address": ""}}`, + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{}, + types.ErrCallbackAddressNotFound, + }, + { + "failure: space address", + func() { + expPacketData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"address": " "}}`, + } + packetData = expPacketData.GetBytes() + }, + types.CallbackData{}, + types.ErrCallbackAddressNotFound, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + callbackKey = types.SourceCallbackKey + + packetDataUnmarshaler = transfer.IBCModule{} + + tc.malleate() + + callbackData, err := types.GetCallbackData(packetDataUnmarshaler, packetData, ibcmock.PortID, remainingGas, uint64(1_000_000), callbackKey) + + expPass := tc.expError == nil + if expPass { + s.Require().NoError(err, tc.name) + s.Require().Equal(tc.expCallbackData, callbackData, tc.name) + + expAllowRetry := tc.expCallbackData.ExecutionGasLimit < tc.expCallbackData.CommitGasLimit + s.Require().Equal(expAllowRetry, callbackData.AllowRetry(), tc.name) + } else { + s.Require().ErrorIs(err, tc.expError, tc.name) + } + }) + } +} + +func (s *CallbacksTypesTestSuite) TestGetSourceCallbackDataTransfer() { + sender := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + + packetData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, sender), + } + packetDataBytes := packetData.GetBytes() + + expCallbackData := types.CallbackData{ + CallbackAddress: sender, + SenderAddress: sender, + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + } + + packetUnmarshaler := transfer.IBCModule{} + + callbackData, err := types.GetSourceCallbackData(packetUnmarshaler, packetDataBytes, ibcmock.PortID, 2_000_000, 1_000_000) + s.Require().NoError(err) + s.Require().Equal(expCallbackData, callbackData) +} + +func (s *CallbacksTypesTestSuite) TestGetDestCallbackDataTransfer() { + sender := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + + packetData := transfertypes.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"dest_callback": {"address": "%s"}}`, sender), + } + packetDataBytes := packetData.GetBytes() + + expCallbackData := types.CallbackData{ + CallbackAddress: sender, + SenderAddress: "", + ExecutionGasLimit: 1_000_000, + CommitGasLimit: 1_000_000, + } + + packetUnmarshaler := transfer.IBCModule{} + + callbackData, err := types.GetDestCallbackData(packetUnmarshaler, packetDataBytes, ibcmock.PortID, 2_000_000, 1_000_000) + s.Require().NoError(err) + s.Require().Equal(expCallbackData, callbackData) +} + +func (s *CallbacksTypesTestSuite) TestGetCallbackAddress() { + denom := ibctesting.TestCoin.Denom + amount := ibctesting.TestCoin.Amount.String() + sender := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + + testCases := []struct { + name string + packetData transfertypes.FungibleTokenPacketData + expAddress string + }{ + { + "success: memo has callbacks in json struct and properly formatted src_callback_address which does not match packet sender", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, receiver), + }, + receiver, + }, + { + "success: valid src_callback address specified in memo that matches sender", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, sender), + }, + sender, + }, + { + "failure: memo is empty", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "", + }, + "", + }, + { + "failure: memo is not json string", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "memo", + }, + "", + }, + { + "failure: memo has empty src_callback object", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {}}`, + }, + "", + }, + { + "failure: memo does not have callbacks in json struct", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"Key": 10}`, + }, + "", + }, + { + "failure: memo has src_callback in json struct but does not have address key", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"Key": 10}}`, + }, + "", + }, + { + "failure: memo has src_callback in json struct but does not have string value for address key", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"address": 10}}`, + }, + "", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + callbackData, ok := tc.packetData.GetCustomPacketData(types.SourceCallbackKey).(map[string]interface{}) + s.Require().Equal(ok, callbackData != nil) + s.Require().Equal(tc.expAddress, types.GetCallbackAddress(callbackData), tc.name) + }) + } +} + +func (s *CallbacksTypesTestSuite) TestUserDefinedGasLimit() { + denom := ibctesting.TestCoin.Denom + amount := ibctesting.TestCoin.Amount.String() + sender := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + + testCases := []struct { + name string + packetData transfertypes.FungibleTokenPacketData + expUserGas uint64 + }{ + { + "success: memo is empty", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "", + }, + 0, + }, + { + "success: memo has user defined gas limit", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": "100"}}`, + }, + 100, + }, + { + "success: user defined gas limit is zero", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": "0"}}`, + }, + 0, + }, + { + "failure: memo has empty src_callback object", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {}}`, + }, + 0, + }, + { + "failure: memo has user defined gas limit as json number", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": 100}}`, + }, + 0, + }, + { + "failure: memo has user defined gas limit as negative", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": "-100"}}`, + }, + 0, + }, + { + "failure: memo has user defined gas limit as string", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": "invalid"}}`, + }, + 0, + }, + { + "failure: memo has user defined gas limit as empty string", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": {"gas_limit": ""}}`, + }, + 0, + }, + { + "failure: malformed memo", + transfertypes.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `invalid`, + }, + 0, + }, + } + + for _, tc := range testCases { + callbackData, ok := tc.packetData.GetCustomPacketData(types.SourceCallbackKey).(map[string]interface{}) + s.Require().Equal(ok, callbackData != nil) + s.Require().Equal(tc.expUserGas, types.GetUserDefinedGasLimit(callbackData), tc.name) + } +} diff --git a/modules/apps/callbacks/types/errors.go b/modules/apps/callbacks/types/errors.go new file mode 100644 index 00000000000..b1b37209625 --- /dev/null +++ b/modules/apps/callbacks/types/errors.go @@ -0,0 +1,12 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +var ( + ErrCannotUnmarshalPacketData = errorsmod.Register(ModuleName, 2, "cannot unmarshal packet data") + ErrNotPacketDataProvider = errorsmod.Register(ModuleName, 3, "packet is not a PacketDataProvider") + ErrCallbackKeyNotFound = errorsmod.Register(ModuleName, 4, "callback key not found in packet data") + ErrCallbackAddressNotFound = errorsmod.Register(ModuleName, 5, "callback address not found in packet data") +) diff --git a/modules/apps/callbacks/types/events.go b/modules/apps/callbacks/types/events.go new file mode 100644 index 00000000000..b05fc96faa8 --- /dev/null +++ b/modules/apps/callbacks/types/events.go @@ -0,0 +1,102 @@ +package types + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // EventTypeSourceCallback is the event type for a source callback + EventTypeSourceCallback = "ibc_src_callback" + // EventTypeDestinationCallback is the event type for a destination callback + EventTypeDestinationCallback = "ibc_dest_callback" + + // AttributeKeyCallbackType denotes the condition that the callback is executed on: + // "acknowledgement": the callback is executed on the acknowledgement of the packet + // "timeout": the callback is executed on the timeout of the packet + // "recv_packet": the callback is executed on the reception of the packet + AttributeKeyCallbackType = "callback_type" + // AttributeKeyCallbackAddress denotes the callback address + AttributeKeyCallbackAddress = "callback_address" + // AttributeKeyCallbackResult denotes the callback result: + // AttributeValueCallbackSuccess: the callback is successfully executed + // AttributeValueCallbackFailure: the callback has failed to execute + AttributeKeyCallbackResult = "callback_result" + // AttributeKeyCallbackError denotes the callback error message + // if no error is returned, then this key will not be included in the event + AttributeKeyCallbackError = "callback_error" + // AttributeKeyCallbackGasLimit denotes the custom gas limit for the callback execution + // if custom gas limit is not in effect, then this key will not be included in the event + AttributeKeyCallbackGasLimit = "callback_exec_gas_limit" + // AttributeKeyCallbackCommitGasLimit denotes the gas needed to commit the callback even + // if the callback execution fails due to out of gas. + AttributeKeyCallbackCommitGasLimit = "callback_commit_gas_limit" + // AttributeKeyCallbackSourcePortID denotes the source port ID of the packet + AttributeKeyCallbackSourcePortID = "packet_src_port" + // AttributeKeyCallbackSourceChannelID denotes the source channel ID of the packet + AttributeKeyCallbackSourceChannelID = "packet_src_channel" + // AttributeKeyCallbackDestPortID denotes the destination port ID of the packet + AttributeKeyCallbackDestPortID = "packet_dest_port" + // AttributeKeyCallbackDestChannelID denotes the destination channel ID of the packet + AttributeKeyCallbackDestChannelID = "packet_dest_channel" + // AttributeKeyCallbackSequence denotes the sequence of the packet + AttributeKeyCallbackSequence = "packet_sequence" + + // AttributeValueCallbackSuccess denotes that the callback is successfully executed + AttributeValueCallbackSuccess = "success" + // AttributeValueCallbackFailure denotes that the callback has failed to execute + AttributeValueCallbackFailure = "failure" +) + +// EmitCallbackEvent emits an event for a callback +func EmitCallbackEvent( + ctx sdk.Context, + portID, + channelID string, + sequence uint64, + callbackType CallbackType, + callbackData CallbackData, + err error, +) { + attributes := []sdk.Attribute{ + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(AttributeKeyCallbackType, string(callbackType)), + sdk.NewAttribute(AttributeKeyCallbackAddress, callbackData.CallbackAddress), + sdk.NewAttribute(AttributeKeyCallbackGasLimit, fmt.Sprintf("%d", callbackData.ExecutionGasLimit)), + sdk.NewAttribute(AttributeKeyCallbackCommitGasLimit, fmt.Sprintf("%d", callbackData.CommitGasLimit)), + sdk.NewAttribute(AttributeKeyCallbackSequence, fmt.Sprintf("%d", sequence)), + } + if err == nil { + attributes = append(attributes, sdk.NewAttribute(AttributeKeyCallbackResult, AttributeValueCallbackSuccess)) + } else { + attributes = append( + attributes, + sdk.NewAttribute(AttributeKeyCallbackError, err.Error()), + sdk.NewAttribute(AttributeKeyCallbackResult, AttributeValueCallbackFailure), + ) + } + + var eventType string + switch callbackType { + case CallbackTypeReceivePacket: + eventType = EventTypeDestinationCallback + attributes = append( + attributes, sdk.NewAttribute(AttributeKeyCallbackDestPortID, portID), + sdk.NewAttribute(AttributeKeyCallbackDestChannelID, channelID), + ) + default: + eventType = EventTypeSourceCallback + attributes = append( + attributes, sdk.NewAttribute(AttributeKeyCallbackSourcePortID, portID), + sdk.NewAttribute(AttributeKeyCallbackSourceChannelID, channelID), + ) + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + eventType, + attributes..., + ), + ) +} diff --git a/modules/apps/callbacks/types/events_test.go b/modules/apps/callbacks/types/events_test.go new file mode 100644 index 00000000000..3f6084c9555 --- /dev/null +++ b/modules/apps/callbacks/types/events_test.go @@ -0,0 +1,177 @@ +package types_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/ibc-go/modules/apps/callbacks/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 (s *CallbacksTypesTestSuite) TestEvents() { + constEvents := func() ibctesting.EventsMap { + return ibctesting.EventsMap{ + types.EventTypeSourceCallback: { + sdk.AttributeKeyModule: types.ModuleName, + types.AttributeKeyCallbackType: string(types.CallbackTypeAcknowledgementPacket), + types.AttributeKeyCallbackAddress: ibctesting.TestAccAddress, + types.AttributeKeyCallbackGasLimit: "100000", + types.AttributeKeyCallbackCommitGasLimit: "200000", + types.AttributeKeyCallbackSourcePortID: ibctesting.MockPort, + types.AttributeKeyCallbackSourceChannelID: ibctesting.FirstChannelID, + types.AttributeKeyCallbackSequence: "1", + types.AttributeKeyCallbackResult: types.AttributeValueCallbackSuccess, + }, + types.EventTypeDestinationCallback: { + sdk.AttributeKeyModule: types.ModuleName, + types.AttributeKeyCallbackType: string(types.CallbackTypeReceivePacket), + types.AttributeKeyCallbackAddress: ibctesting.TestAccAddress, + types.AttributeKeyCallbackGasLimit: "100000", + types.AttributeKeyCallbackCommitGasLimit: "200000", + types.AttributeKeyCallbackDestPortID: ibctesting.MockFeePort, + types.AttributeKeyCallbackDestChannelID: ibctesting.InvalidID, + types.AttributeKeyCallbackSequence: "1", + types.AttributeKeyCallbackResult: types.AttributeValueCallbackSuccess, + }, + } + } + + var expEvents ibctesting.EventsMap + testCases := []struct { + name string + packet channeltypes.Packet + callbackType types.CallbackType + callbackData types.CallbackData + callbackError error + malleate func() + }{ + { + "success: ack callback", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + types.CallbackTypeAcknowledgementPacket, + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + func() {}, + }, + { + "success: send packet callback", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + types.CallbackTypeSendPacket, + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + func() { + expEvents[types.EventTypeSourceCallback][types.AttributeKeyCallbackType] = string(types.CallbackTypeSendPacket) + }, + }, + { + "success: timeout callback", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + types.CallbackTypeTimeoutPacket, + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + func() { + expEvents[types.EventTypeSourceCallback][types.AttributeKeyCallbackType] = string(types.CallbackTypeTimeoutPacket) + }, + }, + { + "success: receive packet callback", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + types.CallbackTypeReceivePacket, + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + func() {}, + }, + { + "success: unknown callback", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + "something", + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + nil, + func() { + expEvents[types.EventTypeSourceCallback][types.AttributeKeyCallbackType] = "something" + }, + }, + { + "failure: ack callback with error", + channeltypes.NewPacket( + ibctesting.MockPacketData, 1, ibctesting.MockPort, ibctesting.FirstChannelID, + ibctesting.MockFeePort, ibctesting.InvalidID, clienttypes.NewHeight(1, 100), 0, + ), + types.CallbackTypeAcknowledgementPacket, + types.CallbackData{ + CallbackAddress: ibctesting.TestAccAddress, + ExecutionGasLimit: 100_000, + CommitGasLimit: 200_000, + }, + types.ErrNotPacketDataProvider, + func() { + expEvents[types.EventTypeSourceCallback][types.AttributeKeyCallbackResult] = types.AttributeValueCallbackFailure + expEvents[types.EventTypeSourceCallback][types.AttributeKeyCallbackError] = types.ErrNotPacketDataProvider.Error() + }, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + expEvents = constEvents() + tc.malleate() + newCtx := sdk.Context{}.WithEventManager(sdk.NewEventManager()) + + switch tc.callbackType { + case types.CallbackTypeReceivePacket: + delete(expEvents, types.EventTypeSourceCallback) + types.EmitCallbackEvent( + newCtx, tc.packet.GetDestPort(), tc.packet.GetDestChannel(), + tc.packet.GetSequence(), tc.callbackType, tc.callbackData, tc.callbackError, + ) + + default: + delete(expEvents, types.EventTypeDestinationCallback) + types.EmitCallbackEvent( + newCtx, tc.packet.GetSourcePort(), tc.packet.GetSourceChannel(), + tc.packet.GetSequence(), tc.callbackType, tc.callbackData, tc.callbackError, + ) + } + + events := newCtx.EventManager().Events().ToABCIEvents() + ibctesting.AssertEvents(&s.Suite, expEvents, events) + }) + } +} diff --git a/modules/apps/callbacks/types/expected_keepers.go b/modules/apps/callbacks/types/expected_keepers.go new file mode 100644 index 00000000000..ba168602dbe --- /dev/null +++ b/modules/apps/callbacks/types/expected_keepers.go @@ -0,0 +1,83 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/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" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +// ContractKeeper defines the entry points exposed to the VM module which invokes a smart contract +type ContractKeeper interface { + // IBCSendPacketCallback is called in the source chain when a PacketSend is executed. The + // packetSenderAddress is determined by the underlying module, and may be empty if the sender is + // unknown or undefined. The contract is expected to handle the callback within the user defined + // gas limit, and handle any errors, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, and the error will be propagated to the underlying IBC + // application, resulting in a packet send failure. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCSendPacketCallback( + cachedCtx sdk.Context, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + packetData []byte, + contractAddress, + packetSenderAddress string, + ) error + // IBCOnAcknowledgementPacketCallback is called in the source chain when a packet acknowledgement + // is received. The packetSenderAddress is determined by the underlying module, and may be empty if + // the sender is unknown or undefined. The contract is expected to handle the callback within the + // user defined gas limit, and handle any errors, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCOnAcknowledgementPacketCallback( + cachedCtx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, + ) error + // IBCOnTimeoutPacketCallback is called in the source chain when a packet is not received before + // the timeout height. The packetSenderAddress is determined by the underlying module, and may be + // empty if the sender is unknown or undefined. The contract is expected to handle the callback + // within the user defined gas limit, and handle any error, out of gas, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + // + // Implementations are provided with the packetSenderAddress and MAY choose to use this to perform + // validation on the origin of a given packet. It is recommended to perform the same validation + // on all source chain callbacks (SendPacket, AcknowledgementPacket, TimeoutPacket). This + // defensively guards against exploits due to incorrectly wired SendPacket ordering in IBC stacks. + IBCOnTimeoutPacketCallback( + cachedCtx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, + contractAddress, + packetSenderAddress string, + ) error + // IBCReceivePacketCallback is called in the destination chain when a packet acknowledgement is written. + // The contract is expected to handle the callback within the user defined gas limit, and handle any errors, + // out of gas, or panics gracefully. + // This entry point is called with a cached context. If an error is returned, then the changes in + // this context will not be persisted, but the packet lifecycle will not be blocked. + IBCReceivePacketCallback( + cachedCtx sdk.Context, + packet ibcexported.PacketI, + ack ibcexported.Acknowledgement, + contractAddress string, + ) error +} diff --git a/modules/apps/callbacks/types/export_test.go b/modules/apps/callbacks/types/export_test.go new file mode 100644 index 00000000000..b87550dd34a --- /dev/null +++ b/modules/apps/callbacks/types/export_test.go @@ -0,0 +1,28 @@ +package types + +import ( + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" +) + +/* + This file is to allow for unexported functions to be accessible to the testing package. +*/ + +// GetCallbackData is a wrapper around getCallbackData to allow the function to be directly called in tests. +func GetCallbackData( + packetDataUnmarshaler porttypes.PacketDataUnmarshaler, + packetData []byte, srcPortID string, remainingGas, + maxGas uint64, callbackKey string, +) (CallbackData, error) { + return getCallbackData(packetDataUnmarshaler, packetData, srcPortID, remainingGas, maxGas, callbackKey) +} + +// GetCallbackAddress is a wrapper around getCallbackAddress to allow the function to be directly called in tests. +func GetCallbackAddress(callbackData map[string]interface{}) string { + return getCallbackAddress(callbackData) +} + +// GetUserDefinedGasLimit is a wrapper around getUserDefinedGasLimit to allow the function to be directly called in tests. +func GetUserDefinedGasLimit(callbackData map[string]interface{}) uint64 { + return getUserDefinedGasLimit(callbackData) +} diff --git a/modules/apps/callbacks/types/keys.go b/modules/apps/callbacks/types/keys.go new file mode 100644 index 00000000000..d07613cc466 --- /dev/null +++ b/modules/apps/callbacks/types/keys.go @@ -0,0 +1,31 @@ +package types + +type CallbackType string + +const ( + ModuleName = "ibccallbacks" + + CallbackTypeSendPacket CallbackType = "send_packet" + CallbackTypeAcknowledgementPacket CallbackType = "acknowledgement_packet" + CallbackTypeTimeoutPacket CallbackType = "timeout_packet" + CallbackTypeReceivePacket CallbackType = "receive_packet" + + // Source callback packet data is set inside the underlying packet data using the this key. + // ICS20 and ICS27 will store the callback packet data in the memo field as a json object. + // The expected format is as follows: + // {"src_callback": { ... }} + SourceCallbackKey = "src_callback" + // Destination callback packet data is set inside the underlying packet data using the this key. + // ICS20 and ICS27 will store the callback packet data in the memo field as a json object. + // The expected format is as follows: + // {"dest_callback": { ... }} + DestinationCallbackKey = "dest_callback" + // Callbacks' packet data is expected to contain the callback address under this key. + // The expected format for ICS20 and ICS27 memo field is as follows: + // { "{callbackKey}": { "address": {stringCallbackAddress}} + CallbackAddressKey = "address" + // Callbacks' packet data is expected to specify the user defined gas limit under this key. + // The expected format for ICS20 and ICS27 memo field is as follows: + // { "{callbackKey}": { ... , "gas_limit": {stringForCallback} } + UserDefinedGasLimitKey = "gas_limit" +) diff --git a/modules/apps/callbacks/types/types_test.go b/modules/apps/callbacks/types/types_test.go new file mode 100644 index 00000000000..ef21db59989 --- /dev/null +++ b/modules/apps/callbacks/types/types_test.go @@ -0,0 +1,28 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + ibctesting "github.com/cosmos/ibc-go/v7/testing" +) + +// CallbacksTestSuite defines the needed instances and methods to test callbacks +type CallbacksTypesTestSuite struct { + suite.Suite + + coord *ibctesting.Coordinator + + chain *ibctesting.TestChain +} + +// SetupTest creates a coordinator with 1 test chain. +func (s *CallbacksTypesTestSuite) SetupSuite() { + s.coord = ibctesting.NewCoordinator(s.T(), 1) + s.chain = s.coord.GetChain(ibctesting.GetChainID(1)) +} + +func TestCallbacksTypesTestSuite(t *testing.T) { + suite.Run(t, new(CallbacksTypesTestSuite)) +} diff --git a/modules/apps/transfer/ibc_module.go b/modules/apps/transfer/ibc_module.go index 613315bacc3..da807cef434 100644 --- a/modules/apps/transfer/ibc_module.go +++ b/modules/apps/transfer/ibc_module.go @@ -19,6 +19,11 @@ import ( ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) +var ( + _ porttypes.IBCModule = (*IBCModule)(nil) + _ porttypes.PacketDataUnmarshaler = (*IBCModule)(nil) +) + // IBCModule implements the ICS26 interface for transfer given the transfer keeper. type IBCModule struct { keeper keeper.Keeper @@ -36,7 +41,7 @@ func NewIBCModule(k keeper.Keeper) IBCModule { // supported version. Only 2^32 channels are allowed to be created. func ValidateTransferChannelParams( ctx sdk.Context, - keeper keeper.Keeper, + transferkeeper keeper.Keeper, order channeltypes.Order, portID string, channelID string, @@ -55,7 +60,7 @@ func ValidateTransferChannelParams( } // Require portID is the portID transfer module is bound to - boundPort := keeper.GetPort(ctx) + boundPort := transferkeeper.GetPort(ctx) if boundPort != portID { return errorsmod.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) } @@ -122,7 +127,7 @@ func (im IBCModule) OnChanOpenTry( } // OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenAck( +func (IBCModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, @@ -136,7 +141,7 @@ func (im IBCModule) OnChanOpenAck( } // OnChanOpenConfirm implements the IBCModule interface -func (im IBCModule) OnChanOpenConfirm( +func (IBCModule) OnChanOpenConfirm( ctx sdk.Context, portID, channelID string, @@ -145,7 +150,7 @@ func (im IBCModule) OnChanOpenConfirm( } // OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( +func (IBCModule) OnChanCloseInit( ctx sdk.Context, portID, channelID string, @@ -155,7 +160,7 @@ func (im IBCModule) OnChanCloseInit( } // OnChanCloseConfirm implements the IBCModule interface -func (im IBCModule) OnChanCloseConfirm( +func (IBCModule) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, @@ -301,3 +306,15 @@ func (im IBCModule) OnTimeoutPacket( return nil } + +// UnmarshalPacketData attempts to unmarshal the provided packet data bytes +// into a FungibleTokenPacketData. This function implements the optional +// PacketDataUnmarshaler interface required for ADR 008 support. +func (IBCModule) UnmarshalPacketData(bz []byte) (interface{}, error) { + var packetData types.FungibleTokenPacketData + if err := types.ModuleCdc.UnmarshalJSON(bz, &packetData); err != nil { + return nil, err + } + + return packetData, nil +} diff --git a/modules/apps/transfer/ibc_module_test.go b/modules/apps/transfer/ibc_module_test.go index deed17c37c6..d8e532632a4 100644 --- a/modules/apps/transfer/ibc_module_test.go +++ b/modules/apps/transfer/ibc_module_test.go @@ -3,6 +3,9 @@ package transfer_test import ( "math" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" @@ -238,3 +241,69 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { }) } } + +func (suite *TransferTestSuite) TestPacketDataUnmarshalerInterface() { + var ( + sender = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + receiver = sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()).String() + + data []byte + expPacketData types.FungibleTokenPacketData + ) + + testCases := []struct { + name string + malleate func() + expPass bool + }{ + { + "success: valid packet data with memo", + func() { + expPacketData = types.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: "some memo", + } + data = expPacketData.GetBytes() + }, + true, + }, + { + "success: valid packet data without memo", + func() { + expPacketData = types.FungibleTokenPacketData{ + Denom: ibctesting.TestCoin.Denom, + Amount: ibctesting.TestCoin.Amount.String(), + Sender: sender, + Receiver: receiver, + Memo: "", + } + data = expPacketData.GetBytes() + }, + true, + }, + { + "failure: invalid packet data", + func() { + data = []byte("invalid packet data") + }, + false, + }, + } + + for _, tc := range testCases { + tc.malleate() + + packetData, err := transfer.IBCModule{}.UnmarshalPacketData(data) + + if tc.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expPacketData, packetData) + } else { + suite.Require().Error(err) + suite.Require().Nil(packetData) + } + } +} diff --git a/modules/apps/transfer/keeper/export_test.go b/modules/apps/transfer/keeper/export_test.go new file mode 100644 index 00000000000..3600380f0a8 --- /dev/null +++ b/modules/apps/transfer/keeper/export_test.go @@ -0,0 +1,12 @@ +package keeper + +/* + This file is to allow for unexported functions and fields to be accessible to the testing package. +*/ + +import porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + +// GetICS4Wrapper is a getter for the keeper's ICS4Wrapper. +func (k *Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper { + return k.ics4Wrapper +} diff --git a/modules/apps/transfer/keeper/grpc_query.go b/modules/apps/transfer/keeper/grpc_query.go index f33db868d35..de30f1d1b1d 100644 --- a/modules/apps/transfer/keeper/grpc_query.go +++ b/modules/apps/transfer/keeper/grpc_query.go @@ -112,7 +112,7 @@ func (k Keeper) DenomHash(c context.Context, req *types.QueryDenomHashRequest) ( } // EscrowAddress implements the EscrowAddress gRPC method -func (k Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) { +func (Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } diff --git a/modules/apps/transfer/keeper/keeper.go b/modules/apps/transfer/keeper/keeper.go index a2cdd55e2cc..d21f34190f1 100644 --- a/modules/apps/transfer/keeper/keeper.go +++ b/modules/apps/transfer/keeper/keeper.go @@ -77,13 +77,20 @@ func NewKeeper( } } +// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after +// the keepers creation to set the middleware which is above this module +// in the IBC application stack. +func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper) { + k.ics4Wrapper = wrapper +} + // GetAuthority returns the transfer module's authority. func (k Keeper) GetAuthority() string { return k.authority } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"-"+types.ModuleName) } @@ -235,9 +242,9 @@ func (k Keeper) GetAllTotalEscrowed(ctx sdk.Context) sdk.Coins { // IterateTokensInEscrow iterates over the denomination escrows in the store // and performs a callback function. Denominations for which an invalid value // (i.e. not integer) is stored, will be skipped. -func (k Keeper) IterateTokensInEscrow(ctx sdk.Context, prefix []byte, cb func(denomEscrow sdk.Coin) bool) { +func (k Keeper) IterateTokensInEscrow(ctx sdk.Context, storeprefix []byte, cb func(denomEscrow sdk.Coin) bool) { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, prefix) + iterator := storetypes.KVStorePrefixIterator(store, storeprefix) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/apps/transfer/keeper/keeper_test.go b/modules/apps/transfer/keeper/keeper_test.go index f5c1937543e..04ea5100ada 100644 --- a/modules/apps/transfer/keeper/keeper_test.go +++ b/modules/apps/transfer/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" @@ -14,11 +14,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -39,7 +40,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestSetGetTotalEscrowForDenom() { @@ -263,3 +264,20 @@ func (suite *KeeperTestSuite) TestUnsetParams() { suite.chainA.GetSimApp().TransferKeeper.GetParams(ctx) }) } + +func (suite *KeeperTestSuite) TestWithICS4Wrapper() { + suite.SetupTest() + + // test if the ics4 wrapper is the channel keeper initially + ics4Wrapper := suite.chainA.GetSimApp().TransferKeeper.GetICS4Wrapper() + + _, isChannelKeeper := ics4Wrapper.(channelkeeper.Keeper) + suite.Require().False(isChannelKeeper) + + // set the ics4 wrapper to the channel keeper + suite.chainA.GetSimApp().TransferKeeper.WithICS4Wrapper(suite.chainA.GetSimApp().IBCKeeper.ChannelKeeper) + ics4Wrapper = suite.chainA.GetSimApp().TransferKeeper.GetICS4Wrapper() + + _, isChannelKeeper = ics4Wrapper.(channelkeeper.Keeper) + suite.Require().True(isChannelKeeper) +} diff --git a/modules/apps/transfer/keeper/mbt_relay_test.go b/modules/apps/transfer/keeper/mbt_relay_test.go index 6c5f7a406fe..1b091350a86 100644 --- a/modules/apps/transfer/keeper/mbt_relay_test.go +++ b/modules/apps/transfer/keeper/mbt_relay_test.go @@ -1,8 +1,8 @@ package keeper_test -/// This file is a test driver for model-based tests generated from the TLA+ model of token transfer -/// Written by Andrey Kuprianov within the scope of IBC Audit performed by Informal Systems. -/// In case of any questions please don't hesitate to contact andrey@informal.systems. +// This file is a test driver for model-based tests generated from the TLA+ model of token transfer +// Written by Andrey Kuprianov within the scope of IBC Audit performed by Informal Systems. +// In case of any questions please don't hesitate to contact andrey@informal.systems. import ( "encoding/json" @@ -269,13 +269,13 @@ func BankOfChain(chain *ibctesting.TestChain) Bank { } // Check that the state of the bank is the bankBefore + expectedBankChange -func (suite *KeeperTestSuite) CheckBankBalances(chain *ibctesting.TestChain, bankBefore *Bank, expectedBankChange *Bank) error { +func (*KeeperTestSuite) CheckBankBalances(chain *ibctesting.TestChain, bankBefore *Bank, expectedBankChange *Bank) error { bankAfter := BankOfChain(chain) bankChange := bankAfter.Sub(bankBefore) diff := bankChange.Sub(expectedBankChange) - NonZeroString := diff.NonZeroString() - if len(NonZeroString) != 0 { - return errorsmod.Wrap(ibcerrors.ErrInvalidCoins, "Unexpected changes in the bank: \n"+NonZeroString) + nonZeroString := diff.NonZeroString() + if len(nonZeroString) != 0 { + return errorsmod.Wrap(ibcerrors.ErrInvalidCoins, "Unexpected changes in the bank: \n"+nonZeroString) } return nil } diff --git a/modules/apps/transfer/keeper/msg_server.go b/modules/apps/transfer/keeper/msg_server.go index 41961e57261..ed3d0969586 100644 --- a/modules/apps/transfer/keeper/msg_server.go +++ b/modules/apps/transfer/keeper/msg_server.go @@ -63,8 +63,8 @@ func (k Keeper) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types. // UpdateParams defines an rpc handler method for MsgUpdateParams. Updates the ibc-transfer module's parameters. func (k Keeper) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { - if k.authority != msg.Authority { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.authority, msg.Authority) + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/modules/apps/transfer/keeper/msg_server_test.go b/modules/apps/transfer/keeper/msg_server_test.go index 10310b7097f..74d3f7a6365 100644 --- a/modules/apps/transfer/keeper/msg_server_test.go +++ b/modules/apps/transfer/keeper/msg_server_test.go @@ -131,34 +131,34 @@ func (suite *KeeperTestSuite) TestMsgTransfer() { // TestUpdateParams tests UpdateParams rpc handler func (suite *KeeperTestSuite) TestUpdateParams() { - validAuthority := suite.chainA.GetSimApp().TransferKeeper.GetAuthority() + signer := suite.chainA.GetSimApp().TransferKeeper.GetAuthority() testCases := []struct { name string msg *types.MsgUpdateParams expPass bool }{ { - "success: valid authority and default params", - types.NewMsgUpdateParams(validAuthority, types.DefaultParams()), + "success: valid signer and default params", + types.NewMsgUpdateParams(signer, types.DefaultParams()), true, }, { - "failure: malformed authority address", + "failure: malformed signer address", types.NewMsgUpdateParams(ibctesting.InvalidID, types.DefaultParams()), false, }, { - "failure: empty authority address", + "failure: empty signer address", types.NewMsgUpdateParams("", types.DefaultParams()), false, }, { - "failure: whitespace authority address", + "failure: whitespace signer address", types.NewMsgUpdateParams(" ", types.DefaultParams()), false, }, { - "failure: unauthorized authority address", + "failure: unauthorized signer address", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), false, }, diff --git a/modules/apps/transfer/module.go b/modules/apps/transfer/module.go index 8d84ff0311b..ad9c4e39b39 100644 --- a/modules/apps/transfer/module.go +++ b/modules/apps/transfer/module.go @@ -139,11 +139,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 4 } // BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -160,6 +160,6 @@ func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the transfer module operations with their respective weights. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/modules/apps/transfer/simulation/genesis_test.go b/modules/apps/transfer/simulation/genesis_test.go index 11c61aca767..1aae1278e56 100644 --- a/modules/apps/transfer/simulation/genesis_test.go +++ b/modules/apps/transfer/simulation/genesis_test.go @@ -73,6 +73,7 @@ func TestRandomizedGenState1(t *testing.T) { } for _, tt := range tests { + tt := tt require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg) } } diff --git a/modules/apps/transfer/transfer_test.go b/modules/apps/transfer/transfer_test.go index 8b68e6570a2..a5232b9e702 100644 --- a/modules/apps/transfer/transfer_test.go +++ b/modules/apps/transfer/transfer_test.go @@ -3,7 +3,7 @@ package transfer_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" @@ -15,7 +15,7 @@ import ( ) type TransferTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -134,5 +134,5 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { } func TestTransferTestSuite(t *testing.T) { - suite.Run(t, new(TransferTestSuite)) + testifysuite.Run(t, new(TransferTestSuite)) } diff --git a/modules/apps/transfer/types/msgs.go b/modules/apps/transfer/types/msgs.go index 08eeaff89f9..3ac7bb9defa 100644 --- a/modules/apps/transfer/types/msgs.go +++ b/modules/apps/transfer/types/msgs.go @@ -25,16 +25,16 @@ var ( ) // NewMsgUpdateParams creates a new MsgUpdateParams instance -func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { +func NewMsgUpdateParams(signer string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ - Authority: authority, - Params: params, + Signer: signer, + Params: params, } } // ValidateBasic implements sdk.Msg func (msg MsgUpdateParams) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Authority) + _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } @@ -44,7 +44,7 @@ func (msg MsgUpdateParams) ValidateBasic() error { // GetSigners implements sdk.Msg func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { panic(err) } diff --git a/modules/apps/transfer/types/msgs_test.go b/modules/apps/transfer/types/msgs_test.go index b967e699fa8..2004645a9f4 100644 --- a/modules/apps/transfer/types/msgs_test.go +++ b/modules/apps/transfer/types/msgs_test.go @@ -112,9 +112,9 @@ func TestMsgUpdateParamsValidateBasic(t *testing.T) { msg *types.MsgUpdateParams expPass bool }{ - {"success: valid authority and valid params", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), true}, - {"failure: invalid authority with valid params", types.NewMsgUpdateParams(invalidAddress, types.DefaultParams()), false}, - {"failure: empty authority with valid params", types.NewMsgUpdateParams(emptyAddr, types.DefaultParams()), false}, + {"success: valid signer and valid params", types.NewMsgUpdateParams(ibctesting.TestAccAddress, types.DefaultParams()), true}, + {"failure: invalid signer with valid params", types.NewMsgUpdateParams(invalidAddress, types.DefaultParams()), false}, + {"failure: empty signer with valid params", types.NewMsgUpdateParams(emptyAddr, types.DefaultParams()), false}, } for i, tc := range testCases { @@ -140,8 +140,8 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { for _, tc := range testCases { msg := types.MsgUpdateParams{ - Authority: tc.address.String(), - Params: types.DefaultParams(), + Signer: tc.address.String(), + Params: types.DefaultParams(), } if tc.expPass { require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) diff --git a/modules/apps/transfer/types/packet.go b/modules/apps/transfer/types/packet.go index 66f3e5730e1..ec543dd75f9 100644 --- a/modules/apps/transfer/types/packet.go +++ b/modules/apps/transfer/types/packet.go @@ -1,6 +1,7 @@ package types import ( + "encoding/json" "strings" "time" @@ -10,6 +11,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ibcerrors "github.com/cosmos/ibc-go/v7/modules/core/errors" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" +) + +var ( + _ ibcexported.PacketData = (*FungibleTokenPacketData)(nil) + _ ibcexported.PacketDataProvider = (*FungibleTokenPacketData)(nil) ) var ( @@ -64,3 +71,36 @@ func (ftpd FungibleTokenPacketData) ValidateBasic() error { func (ftpd FungibleTokenPacketData) GetBytes() []byte { return sdk.MustSortJSON(mustProtoMarshalJSON(&ftpd)) } + +// GetPacketSender returns the sender address embedded in the packet data. +// +// NOTE: +// - The sender address is set by the module which requested the packet to be sent, +// and this module may not have validated the sender address by a signature check. +// - The sender address must only be used by modules on the sending chain. +// - sourcePortID is not used in this implementation. +func (ftpd FungibleTokenPacketData) GetPacketSender(sourcePortID string) string { + return ftpd.Sender +} + +// GetCustomPacketData interprets the memo field of the packet data as a JSON object +// and returns the value associated with the given key. +// If the key is missing or the memo is not properly formatted, then nil is returned. +func (ftpd FungibleTokenPacketData) GetCustomPacketData(key string) interface{} { + if len(ftpd.Memo) == 0 { + return nil + } + + jsonObject := make(map[string]interface{}) + err := json.Unmarshal([]byte(ftpd.Memo), &jsonObject) + if err != nil { + return nil + } + + memoData, found := jsonObject[key] + if !found { + return nil + } + + return memoData +} diff --git a/modules/apps/transfer/types/packet_test.go b/modules/apps/transfer/types/packet_test.go index 6c877d4fcb0..fa10f64e5ba 100644 --- a/modules/apps/transfer/types/packet_test.go +++ b/modules/apps/transfer/types/packet_test.go @@ -1,6 +1,7 @@ package types_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -43,3 +44,89 @@ func TestFungibleTokenPacketDataValidateBasic(t *testing.T) { } } } + +func (suite *TypesTestSuite) TestGetPacketSender() { + packetData := types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "", + } + + suite.Require().Equal(sender, packetData.GetPacketSender(types.PortID)) +} + +func (suite *TypesTestSuite) TestPacketDataProvider() { + testCases := []struct { + name string + packetData types.FungibleTokenPacketData + expCustomData interface{} + }{ + { + "success: src_callback key in memo", + types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s"}}`, receiver), + }, + map[string]interface{}{ + "address": receiver, + }, + }, + { + "success: src_callback key in memo with additional fields", + types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: fmt.Sprintf(`{"src_callback": {"address": "%s", "gas_limit": "200000"}}`, receiver), + }, + map[string]interface{}{ + "address": receiver, + "gas_limit": "200000", + }, + }, + { + "success: src_callback has string value", + types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: `{"src_callback": "string"}`, + }, + "string", + }, + { + "failure: empty memo", + types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "", + }, + nil, + }, + { + "failure: non-json memo", + types.FungibleTokenPacketData{ + Denom: denom, + Amount: amount, + Sender: sender, + Receiver: receiver, + Memo: "invalid", + }, + nil, + }, + } + + for _, tc := range testCases { + customData := tc.packetData.GetCustomPacketData("src_callback") + suite.Require().Equal(tc.expCustomData, customData) + } +} diff --git a/modules/apps/transfer/types/trace.go b/modules/apps/transfer/types/trace.go index f539ba65cf4..d9151f93faa 100644 --- a/modules/apps/transfer/types/trace.go +++ b/modules/apps/transfer/types/trace.go @@ -86,8 +86,8 @@ func (dt DenomTrace) IsNativeDenom() bool { // the elements that constitute the complete denom. func extractPathAndBaseFromFullDenom(fullDenomItems []string) (string, string) { var ( - path []string - baseDenom []string + pathSlice []string + baseDenomSlice []string ) length := len(fullDenomItems) @@ -102,14 +102,17 @@ func extractPathAndBaseFromFullDenom(fullDenomItems []string) (string, string) { // as an IBC denomination. The hash used to store the token internally on our chain // will be the same value as the base denomination being correctly parsed. if i < length-1 && length > 2 && channeltypes.IsValidChannelID(fullDenomItems[i+1]) { - path = append(path, fullDenomItems[i], fullDenomItems[i+1]) + pathSlice = append(pathSlice, fullDenomItems[i], fullDenomItems[i+1]) } else { - baseDenom = fullDenomItems[i:] + baseDenomSlice = fullDenomItems[i:] break } } - return strings.Join(path, "/"), strings.Join(baseDenom, "/") + path := strings.Join(pathSlice, "/") + baseDenom := strings.Join(baseDenomSlice, "/") + + return path, baseDenom } func validateTraceIdentifiers(identifiers []string) error { diff --git a/modules/apps/transfer/types/transfer_authorization.go b/modules/apps/transfer/types/transfer_authorization.go index c276064e422..f8537f0174c 100644 --- a/modules/apps/transfer/types/transfer_authorization.go +++ b/modules/apps/transfer/types/transfer_authorization.go @@ -27,7 +27,7 @@ func NewTransferAuthorization(allocations ...Allocation) *TransferAuthorization } // MsgTypeURL implements Authorization.MsgTypeURL. -func (a TransferAuthorization) MsgTypeURL() string { +func (TransferAuthorization) MsgTypeURL() string { return sdk.MsgTypeURL(&MsgTransfer{}) } diff --git a/modules/apps/transfer/types/tx.pb.go b/modules/apps/transfer/types/tx.pb.go index 95069745f2c..c1e0e40ad54 100644 --- a/modules/apps/transfer/types/tx.pb.go +++ b/modules/apps/transfer/types/tx.pb.go @@ -129,8 +129,8 @@ var xxx_messageInfo_MsgTransferResponse proto.InternalMessageInfo // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // params defines the transfer parameters to update. // // NOTE: All parameters must be supplied. @@ -220,44 +220,44 @@ func init() { } var fileDescriptor_7401ed9bed2f8e09 = []byte{ - // 589 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x4f, 0xd4, 0x40, - 0x14, 0xde, 0xc2, 0xb2, 0xc2, 0xac, 0x80, 0x8e, 0x46, 0x4a, 0x43, 0xba, 0x64, 0x23, 0x09, 0x42, - 0x98, 0x49, 0x31, 0x84, 0x84, 0x23, 0x1c, 0xf4, 0x42, 0x82, 0x1b, 0xbc, 0x78, 0x21, 0xed, 0xf0, - 0x6c, 0x27, 0x6e, 0x3b, 0x75, 0x66, 0xda, 0xc8, 0xcd, 0x78, 0xd1, 0xa3, 0x3f, 0xc1, 0x9f, 0xc0, - 0xcf, 0xe0, 0xc8, 0xd1, 0xc4, 0xc4, 0x18, 0x38, 0x70, 0xf1, 0x47, 0x98, 0x4e, 0xa7, 0xcb, 0xea, - 0x61, 0xd5, 0x53, 0x67, 0xde, 0xfb, 0xde, 0xf7, 0xbe, 0xf7, 0x4d, 0x1f, 0x5a, 0xe3, 0x11, 0xa3, - 0x61, 0x9e, 0x0f, 0x39, 0x0b, 0x35, 0x17, 0x99, 0xa2, 0x5a, 0x86, 0x99, 0x7a, 0x0d, 0x92, 0x96, - 0x01, 0xd5, 0xef, 0x48, 0x2e, 0x85, 0x16, 0x78, 0x85, 0x47, 0x8c, 0x8c, 0xc3, 0x48, 0x03, 0x23, - 0x65, 0xe0, 0x3d, 0x8c, 0x45, 0x2c, 0x0c, 0x90, 0x56, 0xa7, 0xba, 0xc6, 0x5b, 0x62, 0x42, 0xa5, - 0x42, 0xd1, 0x54, 0xc5, 0x15, 0x57, 0xaa, 0x62, 0x9b, 0xf0, 0x6d, 0x22, 0x0a, 0x15, 0xd0, 0x32, - 0x88, 0x40, 0x87, 0x01, 0x65, 0x82, 0x67, 0x36, 0xdf, 0xab, 0x34, 0x31, 0x21, 0x81, 0xb2, 0x21, - 0x87, 0x4c, 0x57, 0xd5, 0xf5, 0xc9, 0x02, 0x36, 0x27, 0x8b, 0x6e, 0x94, 0x19, 0x70, 0xff, 0xdb, - 0x14, 0xea, 0x1e, 0xaa, 0xf8, 0xd8, 0x46, 0x71, 0x0f, 0x75, 0x95, 0x28, 0x24, 0x83, 0x93, 0x5c, - 0x48, 0xed, 0x3a, 0xab, 0xce, 0xfa, 0xdc, 0x00, 0xd5, 0xa1, 0x23, 0x21, 0x35, 0x5e, 0x43, 0x0b, - 0x16, 0xc0, 0x92, 0x30, 0xcb, 0x60, 0xe8, 0x4e, 0x19, 0xcc, 0x7c, 0x1d, 0x3d, 0xa8, 0x83, 0x78, - 0x07, 0xcd, 0x68, 0xf1, 0x06, 0x32, 0x77, 0x7a, 0xd5, 0x59, 0xef, 0x6e, 0x2f, 0x93, 0x7a, 0x2a, - 0x52, 0x4d, 0x45, 0xec, 0x54, 0xe4, 0x40, 0xf0, 0x6c, 0xbf, 0x7d, 0xf1, 0xbd, 0xd7, 0x1a, 0xd4, - 0x68, 0xfc, 0x08, 0x75, 0x14, 0x64, 0xa7, 0x20, 0xdd, 0xb6, 0x61, 0xb5, 0x37, 0xec, 0xa1, 0x59, - 0x09, 0x0c, 0x78, 0x09, 0xd2, 0x9d, 0x31, 0x99, 0xd1, 0x1d, 0x3f, 0x43, 0x0b, 0x9a, 0xa7, 0x20, - 0x0a, 0x7d, 0x92, 0x00, 0x8f, 0x13, 0xed, 0x76, 0x4c, 0x4f, 0x8f, 0x54, 0xcf, 0x52, 0x39, 0x45, - 0xac, 0x3f, 0x65, 0x40, 0x9e, 0x1b, 0x84, 0x6d, 0x3a, 0x6f, 0xeb, 0xea, 0x20, 0xde, 0x44, 0xf7, - 0x1b, 0xa2, 0xea, 0xab, 0x74, 0x98, 0xe6, 0xee, 0x9d, 0x55, 0x67, 0xbd, 0x3d, 0xb8, 0x67, 0x13, - 0xc7, 0x4d, 0x1c, 0x63, 0xd4, 0x4e, 0x21, 0x15, 0xee, 0xac, 0x51, 0x63, 0xce, 0x7b, 0x8b, 0x9f, - 0xbe, 0xf4, 0x5a, 0x1f, 0x6e, 0xce, 0x37, 0xac, 0xec, 0xfe, 0x2e, 0x7a, 0x30, 0x66, 0xee, 0x00, - 0x54, 0x2e, 0x32, 0x05, 0xd5, 0x34, 0x0a, 0xde, 0x16, 0x90, 0x31, 0x30, 0x0e, 0xb7, 0x07, 0xa3, - 0xfb, 0x5e, 0xbb, 0xe2, 0xe8, 0x7f, 0x74, 0xd0, 0xe2, 0xa1, 0x8a, 0x5f, 0xe6, 0xa7, 0xa1, 0x86, - 0xa3, 0x50, 0x86, 0xa9, 0xc2, 0x2b, 0x68, 0x2e, 0x2c, 0x74, 0x22, 0x24, 0xd7, 0x67, 0xf6, 0x61, - 0x6e, 0x03, 0x78, 0x1f, 0x75, 0x72, 0x83, 0x33, 0xef, 0xd1, 0xdd, 0x7e, 0x4c, 0x26, 0xfd, 0x94, - 0xa4, 0xe6, 0xb4, 0x3e, 0xd8, 0xca, 0x3d, 0xdc, 0xe8, 0xbf, 0xe5, 0xed, 0x2f, 0xa3, 0xa5, 0x3f, - 0x84, 0x34, 0x63, 0x6c, 0xff, 0x74, 0xd0, 0xf4, 0xa1, 0x8a, 0x71, 0x82, 0x66, 0x47, 0xff, 0xcf, - 0x93, 0xc9, 0x6d, 0xc7, 0xdc, 0xf0, 0x82, 0x7f, 0x86, 0x8e, 0x8c, 0xd3, 0xe8, 0xee, 0x6f, 0x96, - 0x6c, 0xfd, 0x95, 0x62, 0x1c, 0xee, 0xed, 0xfc, 0x17, 0xbc, 0xe9, 0xea, 0xcd, 0xbc, 0xbf, 0x39, - 0xdf, 0x70, 0xf6, 0x5f, 0x5c, 0x5c, 0xf9, 0xce, 0xe5, 0x95, 0xef, 0xfc, 0xb8, 0xf2, 0x9d, 0xcf, - 0xd7, 0x7e, 0xeb, 0xf2, 0xda, 0x6f, 0x7d, 0xbd, 0xf6, 0x5b, 0xaf, 0x76, 0x63, 0xae, 0x93, 0x22, - 0x22, 0x4c, 0xa4, 0xd4, 0x6e, 0x2f, 0x8f, 0xd8, 0x56, 0x2c, 0x68, 0xb9, 0x4b, 0x53, 0x71, 0x5a, - 0x0c, 0x41, 0x55, 0x1b, 0x39, 0xb6, 0x89, 0xfa, 0x2c, 0x07, 0x15, 0x75, 0xcc, 0x12, 0x3e, 0xfd, - 0x15, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x2f, 0xbe, 0x20, 0x68, 0x04, 0x00, 0x00, + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x4f, 0xd4, 0x4e, + 0x14, 0xdf, 0x42, 0xd9, 0x3f, 0xff, 0x59, 0x01, 0x1d, 0x8d, 0x94, 0xc6, 0x74, 0xc9, 0x46, 0x12, + 0x84, 0x30, 0x93, 0x62, 0x08, 0x09, 0x47, 0x38, 0xe8, 0x85, 0x04, 0x37, 0x78, 0xf1, 0x42, 0xda, + 0xe1, 0xd9, 0x9d, 0xb8, 0x9d, 0xa9, 0x33, 0xb3, 0x8d, 0x5e, 0x8c, 0xf1, 0xe4, 0xd1, 0x8f, 0xe0, + 0x47, 0xe0, 0x63, 0x70, 0xe4, 0x68, 0x62, 0x62, 0x0c, 0x1c, 0xb8, 0xf8, 0x21, 0x4c, 0xa7, 0xd3, + 0x4d, 0xf5, 0x80, 0x7a, 0xea, 0xcc, 0x7b, 0xbf, 0xf7, 0x7b, 0xbf, 0xf7, 0x9b, 0x3e, 0xb4, 0xc6, + 0x53, 0x46, 0x93, 0xa2, 0x18, 0x73, 0x96, 0x18, 0x2e, 0x85, 0xa6, 0x46, 0x25, 0x42, 0xbf, 0x04, + 0x45, 0xcb, 0x98, 0x9a, 0x37, 0xa4, 0x50, 0xd2, 0x48, 0xfc, 0x80, 0xa7, 0x8c, 0xb4, 0x61, 0xa4, + 0x81, 0x91, 0x32, 0x0e, 0xef, 0x65, 0x32, 0x93, 0x16, 0x48, 0xab, 0x53, 0x5d, 0x13, 0x2e, 0x33, + 0xa9, 0x73, 0xa9, 0x69, 0xae, 0xb3, 0x8a, 0x2b, 0xd7, 0x99, 0x4b, 0x44, 0x2e, 0x91, 0x26, 0x1a, + 0x68, 0x19, 0xa7, 0x60, 0x92, 0x98, 0x32, 0xc9, 0x85, 0xcb, 0xf7, 0x2b, 0x4d, 0x4c, 0x2a, 0xa0, + 0x6c, 0xcc, 0x41, 0x98, 0xaa, 0xba, 0x3e, 0x39, 0xc0, 0xe6, 0xcd, 0xa2, 0x1b, 0x65, 0x16, 0x3c, + 0xf8, 0x3a, 0x83, 0x7a, 0x87, 0x3a, 0x3b, 0x76, 0x51, 0xdc, 0x47, 0x3d, 0x2d, 0x27, 0x8a, 0xc1, + 0x49, 0x21, 0x95, 0x09, 0xbc, 0x55, 0x6f, 0xfd, 0xff, 0x21, 0xaa, 0x43, 0x47, 0x52, 0x19, 0xbc, + 0x86, 0x16, 0x1d, 0x80, 0x8d, 0x12, 0x21, 0x60, 0x1c, 0xcc, 0x58, 0xcc, 0x42, 0x1d, 0x3d, 0xa8, + 0x83, 0x78, 0x07, 0xcd, 0x19, 0xf9, 0x0a, 0x44, 0x30, 0xbb, 0xea, 0xad, 0xf7, 0xb6, 0x57, 0x48, + 0x3d, 0x15, 0xa9, 0xa6, 0x22, 0x6e, 0x2a, 0x72, 0x20, 0xb9, 0xd8, 0xf7, 0xcf, 0xbf, 0xf5, 0x3b, + 0xc3, 0x1a, 0x8d, 0xef, 0xa3, 0xae, 0x06, 0x71, 0x0a, 0x2a, 0xf0, 0x2d, 0xab, 0xbb, 0xe1, 0x10, + 0xcd, 0x2b, 0x60, 0xc0, 0x4b, 0x50, 0xc1, 0x9c, 0xcd, 0x4c, 0xef, 0xf8, 0x09, 0x5a, 0x34, 0x3c, + 0x07, 0x39, 0x31, 0x27, 0x23, 0xe0, 0xd9, 0xc8, 0x04, 0x5d, 0xdb, 0x33, 0x24, 0xd5, 0xb3, 0x54, + 0x4e, 0x11, 0xe7, 0x4f, 0x19, 0x93, 0xa7, 0x16, 0xe1, 0x9a, 0x2e, 0xb8, 0xba, 0x3a, 0x88, 0x37, + 0xd1, 0x9d, 0x86, 0xa8, 0xfa, 0x6a, 0x93, 0xe4, 0x45, 0xf0, 0xdf, 0xaa, 0xb7, 0xee, 0x0f, 0x6f, + 0xbb, 0xc4, 0x71, 0x13, 0xc7, 0x18, 0xf9, 0x39, 0xe4, 0x32, 0x98, 0xb7, 0x6a, 0xec, 0x79, 0x6f, + 0xe9, 0xe3, 0xe7, 0x7e, 0xe7, 0xc3, 0xf5, 0xd9, 0x86, 0x93, 0x3d, 0xd8, 0x45, 0x77, 0x5b, 0xe6, + 0x0e, 0x41, 0x17, 0x52, 0x68, 0xa8, 0xa6, 0xd1, 0xf0, 0x7a, 0x02, 0x82, 0x81, 0x75, 0xd8, 0x1f, + 0x4e, 0xef, 0x7b, 0x7e, 0xc5, 0x31, 0x78, 0x87, 0x96, 0x0e, 0x75, 0xf6, 0xbc, 0x38, 0x4d, 0x0c, + 0x1c, 0x25, 0x2a, 0xc9, 0xb5, 0xb5, 0x86, 0x67, 0x02, 0x94, 0x7b, 0x14, 0x77, 0xc3, 0xfb, 0xa8, + 0x5b, 0x58, 0x84, 0x7d, 0x88, 0xde, 0xf6, 0x43, 0x72, 0xd3, 0xdf, 0x48, 0x6a, 0x36, 0x67, 0x80, + 0xab, 0x6c, 0x0b, 0xb7, 0xa4, 0x83, 0x15, 0xb4, 0xfc, 0x5b, 0xff, 0x46, 0xfc, 0xf6, 0x0f, 0x0f, + 0xcd, 0x1e, 0xea, 0x0c, 0x8f, 0xd0, 0xfc, 0xf4, 0xaf, 0x79, 0x74, 0x73, 0xcf, 0x96, 0x07, 0x61, + 0xfc, 0xd7, 0xd0, 0xa9, 0x5d, 0x06, 0xdd, 0xfa, 0xc5, 0x89, 0xad, 0x3f, 0x52, 0xb4, 0xe1, 0xe1, + 0xce, 0x3f, 0xc1, 0x9b, 0xae, 0xe1, 0xdc, 0xfb, 0xeb, 0xb3, 0x0d, 0x6f, 0xff, 0xd9, 0xf9, 0x65, + 0xe4, 0x5d, 0x5c, 0x46, 0xde, 0xf7, 0xcb, 0xc8, 0xfb, 0x74, 0x15, 0x75, 0x2e, 0xae, 0xa2, 0xce, + 0x97, 0xab, 0xa8, 0xf3, 0x62, 0x37, 0xe3, 0x66, 0x34, 0x49, 0x09, 0x93, 0x39, 0x75, 0x3b, 0xcb, + 0x53, 0xb6, 0x95, 0x49, 0x5a, 0xee, 0xd2, 0x5c, 0x9e, 0x4e, 0xc6, 0xa0, 0xab, 0x3d, 0x6c, 0xed, + 0x9f, 0x79, 0x5b, 0x80, 0x4e, 0xbb, 0x76, 0xf5, 0x1e, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x31, + 0x59, 0x33, 0x3e, 0x5e, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -521,10 +521,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- dAtA[i] = 0xa } @@ -619,7 +619,7 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = l - l = len(m.Authority) + l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -1038,7 +1038,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1066,7 +1066,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/modules/apps/transfer/types/types_test.go b/modules/apps/transfer/types/types_test.go index 86069b1a887..d17bf91bf49 100644 --- a/modules/apps/transfer/types/types_test.go +++ b/modules/apps/transfer/types/types_test.go @@ -3,14 +3,14 @@ package types_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) type TypesTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -36,5 +36,5 @@ func NewTransferPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path { } func TestTypesTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) + testifysuite.Run(t, new(TypesTestSuite)) } diff --git a/modules/capability/capability_test.go b/modules/capability/capability_test.go index 1ed4cb1457e..70e27d8123b 100644 --- a/modules/capability/capability_test.go +++ b/modules/capability/capability_test.go @@ -3,12 +3,11 @@ package capability_test import ( "testing" - "github.com/stretchr/testify/suite" - "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" + testifysuite "github.com/stretchr/testify/suite" dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec" @@ -26,7 +25,7 @@ import ( const mockMemStoreKey = "memory:mock" type CapabilityTestSuite struct { - suite.Suite + testifysuite.Suite cdc codec.Codec ctx sdk.Context @@ -125,5 +124,5 @@ func (suite *CapabilityTestSuite) TestInitializeMemStore() { } func TestCapabilityTestSuite(t *testing.T) { - suite.Run(t, new(CapabilityTestSuite)) + testifysuite.Run(t, new(CapabilityTestSuite)) } diff --git a/modules/capability/go.mod b/modules/capability/go.mod index 0e3d75d4ebb..a0249bc80fe 100644 --- a/modules/capability/go.mod +++ b/modules/capability/go.mod @@ -1,19 +1,19 @@ module github.com/cosmos/ibc-go/modules/capability -go 1.20 +go 1.21 replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( - cosmossdk.io/core v0.9.0 + cosmossdk.io/core v0.10.0 cosmossdk.io/errors v1.0.0 - cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca - cosmossdk.io/math v1.0.1 - cosmossdk.io/store v1.0.0-alpha.1 + cosmossdk.io/log v1.2.0 + cosmossdk.io/math v1.1.2 + cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982 github.com/cometbft/cometbft v0.38.0-rc3 github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-sdk v0.50.0-beta.0 - github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/cosmos-sdk v0.50.0-rc.0 + github.com/cosmos/gogoproto v1.4.11 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -22,8 +22,8 @@ require ( require ( cosmossdk.io/api v0.7.0 // indirect - cosmossdk.io/collections v0.3.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/x/tx v0.9.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -37,9 +37,9 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230711190327-88bbab59ff4f // indirect + github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cockroachdb/tokenbucket v0.0.0-20230613231145-182959a1fad6 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect @@ -61,7 +61,7 @@ require ( github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.22.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -112,11 +112,11 @@ require ( github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -130,21 +130,21 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.56.2 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect + google.golang.org/grpc v1.57.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 gotest.tools/v3 v3.5.0 // indirect nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v1.0.0 // indirect + pgregory.net/rapid v1.1.0 // indirect ) diff --git a/modules/capability/go.sum b/modules/capability/go.sum index 8adffd56dfe..89b9415c827 100644 --- a/modules/capability/go.sum +++ b/modules/capability/go.sum @@ -37,20 +37,20 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.7.0 h1:QsEMIWuv9xWDbF2HZnW4Lpu1/SejCztPu0LQx7t6MN4= cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= -cosmossdk.io/collections v0.3.0 h1:v0eEqLBxebAV+t+Ahwf9tSJOu95HVLINwROXx2TTZ08= -cosmossdk.io/collections v0.3.0/go.mod h1:CHE1+niUElL9ikCpevRZcp0yqQ4TU0TrEEGirN0mvIg= -cosmossdk.io/core v0.9.0 h1:30ScAOHDIUOCg1DKAwqkho9wuQJnu7GUrMcg0XLioic= -cosmossdk.io/core v0.9.0/go.mod h1:NFgl5r41Q36+RixTvyrfsS6qQ65agCbZ1FTpnN7/G1Y= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= +cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -cosmossdk.io/store v1.0.0-alpha.1 h1:/151XxAgm0tiKuYrtJzMG61lf6enpPuP+D/hIN8cRjQ= -cosmossdk.io/store v1.0.0-alpha.1/go.mod h1:ejgU9GhRGMNBduVnDwC3RyhOmu4uKlNQlTiJgPmbDkI= +cosmossdk.io/log v1.2.0 h1:BbykkDsutXPSy8RojFB3KZEWyvMsToLy0ykb/ZhsLqQ= +cosmossdk.io/log v1.2.0/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982 h1:61YFeW2AhwwPfoJWzNJWvVubCj32sm5jZkJfraS9pDQ= +cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982/go.mod h1:QAF9zeRa/9ghuv7E8NS9SzWqRbgVNwH/dZwGhYDHUjI= cosmossdk.io/x/tx v0.9.1 h1:9pmmXA9Vs4qdouOFnzhsdsff2mif0f0kylMq5xTGhRI= cosmossdk.io/x/tx v0.9.1/go.mod h1:/YFGTXG6+kyihd8YbfuJiXHV4R/mIMm2uvVzo80CIhA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -73,7 +73,6 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -99,11 +98,15 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -118,6 +121,7 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= @@ -131,19 +135,19 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230711190327-88bbab59ff4f h1:V7Cg5eC+VAHz4rusEB1/kSEQ1mbhHJfV0RICDcTBFLw= -github.com/cockroachdb/pebble v0.0.0-20230711190327-88bbab59ff4f/go.mod h1:FN5O47SBEz5+kO9fG8UTR64g2WS1u5ZFCgTvxGjoSks= +github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 h1:M4A5LioEhkZ/s+m0g0pWgiLBQr83p0jWnQUo320Qy+A= +github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/tokenbucket v0.0.0-20230613231145-182959a1fad6 h1:DJK8W/iB+s/qkTtmXSrHA49lp5O3OsR7E6z4byOLy34= -github.com/cockroachdb/tokenbucket v0.0.0-20230613231145-182959a1fad6/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/cometbft/cometbft v0.38.0-rc3 h1:Ly3eVPWoFu0y68PmZwLljucPdEBtfigZtqm+OV1W6dE= github.com/cometbft/cometbft v0.38.0-rc3/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= @@ -161,15 +165,15 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-beta.0 h1:cPblupyMlA4qvnvuuQEjYQPq1uqSXBgQmsiGREQ5hd0= -github.com/cosmos/cosmos-sdk v0.50.0-beta.0/go.mod h1:MF/wnXyreoL0g8YdRZhUD4apPdgebMc29LgMJB+dh6M= +github.com/cosmos/cosmos-sdk v0.50.0-rc.0 h1:cdcJSFqy4Yl7f9F3c5QsvDz+GF7/zR53571ECQeucvE= +github.com/cosmos/cosmos-sdk v0.50.0-rc.0/go.mod h1:6HsAg8cQ/D3JnFN7jao6DOuTLWnUC4qh/vracVlSLAM= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= @@ -181,14 +185,13 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= @@ -231,21 +234,25 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/sentry-go v0.22.0 h1:XNX9zKbv7baSEI65l+H1GEJgSeIC1c7EN5kluWaP6dM= -github.com/getsentry/sentry-go v0.22.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -265,10 +272,13 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -278,10 +288,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -307,6 +317,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -350,10 +361,12 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -448,6 +461,7 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -459,6 +473,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -486,7 +501,9 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -498,6 +515,7 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -516,6 +534,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -534,6 +553,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -550,6 +570,7 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -566,6 +587,7 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -590,6 +612,7 @@ github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7c github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -630,12 +653,11 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -645,9 +667,9 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -723,6 +745,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -772,8 +795,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= 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= @@ -785,8 +808,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -856,8 +879,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= 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= @@ -878,6 +901,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/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= @@ -950,12 +974,12 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= 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= @@ -965,8 +989,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= @@ -1102,12 +1126,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1134,8 +1158,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1158,6 +1182,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1194,8 +1219,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4= -pgregory.net/rapid v1.0.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/modules/capability/keeper/keeper_test.go b/modules/capability/keeper/keeper_test.go index e606219edd1..357c2e72314 100644 --- a/modules/capability/keeper/keeper_test.go +++ b/modules/capability/keeper/keeper_test.go @@ -4,9 +4,8 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" - storetypes "cosmossdk.io/store/types" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,7 +22,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite ctx sdk.Context keeper *keeper.Keeper @@ -308,5 +307,5 @@ func (suite *KeeperTestSuite) TestRevertCapability() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } diff --git a/modules/core/02-client/abci_test.go b/modules/core/02-client/abci_test.go index b825acee6ba..48fc0423de4 100644 --- a/modules/core/02-client/abci_test.go +++ b/modules/core/02-client/abci_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" @@ -19,7 +19,7 @@ import ( ) type ClientTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -35,7 +35,7 @@ func (suite *ClientTestSuite) SetupTest() { } func TestClientTestSuite(t *testing.T) { - suite.Run(t, new(ClientTestSuite)) + testifysuite.Run(t, new(ClientTestSuite)) } func (suite *ClientTestSuite) TestBeginBlocker() { diff --git a/modules/core/02-client/keeper/grpc_query.go b/modules/core/02-client/keeper/grpc_query.go index 3b0b671c18c..5f31c5c3bf3 100644 --- a/modules/core/02-client/keeper/grpc_query.go +++ b/modules/core/02-client/keeper/grpc_query.go @@ -247,10 +247,10 @@ func (k Keeper) ClientStatus(c context.Context, req *types.QueryClientStatusRequ ) } - status := k.GetClientStatus(ctx, clientState, req.ClientId) + clientStatus := k.GetClientStatus(ctx, clientState, req.ClientId) return &types.QueryClientStatusResponse{ - Status: status.String(), + Status: clientStatus.String(), }, nil } diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index 8fabbb1d0b5..5b78b0e5cfd 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -54,7 +54,7 @@ func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace pa } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"/"+types.SubModuleName) } @@ -388,9 +388,9 @@ func (k Keeper) SetUpgradedConsensusState(ctx sdk.Context, planHeight int64, bz // IterateClientStates provides an iterator over all stored light client State // objects. For each State object, cb will be called. If the cb returns true, // the iterator will close and stop. -func (k Keeper) IterateClientStates(ctx sdk.Context, prefix []byte, cb func(clientID string, cs exported.ClientState) bool) { +func (k Keeper) IterateClientStates(ctx sdk.Context, storeprefix []byte, cb func(clientID string, cs exported.ClientState) bool) { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, host.PrefixedClientStoreKey(prefix)) + iterator := storetypes.KVStorePrefixIterator(store, host.PrefixedClientStoreKey(storeprefix)) defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index 659eb9e30a3..b2e8ba7209b 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdkmath "cosmossdk.io/math" @@ -51,7 +51,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestSetClientState() { diff --git a/modules/core/02-client/migrations/v7/solomachine.go b/modules/core/02-client/migrations/v7/solomachine.go index 333f77e5674..ac90209285a 100644 --- a/modules/core/02-client/migrations/v7/solomachine.go +++ b/modules/core/02-client/migrations/v7/solomachine.go @@ -50,80 +50,80 @@ func (cs ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error } // ClientType panics! -func (cs ClientState) ClientType() string { +func (ClientState) ClientType() string { panic("legacy solo machine is deprecated!") } // GetLatestHeight panics! -func (cs ClientState) GetLatestHeight() exported.Height { +func (ClientState) GetLatestHeight() exported.Height { panic("legacy solo machine is deprecated!") } // Status panics! -func (cs ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { +func (ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { panic("legacy solo machine is deprecated!") } // Validate panics! -func (cs ClientState) Validate() error { +func (ClientState) Validate() error { panic("legacy solo machine is deprecated!") } // ZeroCustomFields panics! -func (cs ClientState) ZeroCustomFields() exported.ClientState { +func (ClientState) ZeroCustomFields() exported.ClientState { panic("legacy solo machine is deprecated!") } // Initialize panics! -func (cs ClientState) Initialize(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, consState exported.ConsensusState) error { +func (ClientState) Initialize(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ConsensusState) error { panic("legacy solo machine is deprecated!") } // ExportMetadata panics! -func (cs ClientState) ExportMetadata(_ storetypes.KVStore) []exported.GenesisMetadata { +func (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 storetypes.KVStore, msg exported.ClientMessage) bool { +func (ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) bool { panic("legacy solo machine is deprecated!") } // UpdateStateOnMisbehaviour panics! -func (cs *ClientState) UpdateStateOnMisbehaviour( +func (*ClientState) UpdateStateOnMisbehaviour( _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) { panic("legacy solo machine is deprecated!") } // VerifyClientMessage panics! -func (cs *ClientState) VerifyClientMessage( +func (*ClientState) VerifyClientMessage( _ 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, _ storetypes.KVStore, _ exported.ClientMessage) []exported.Height { +func (*ClientState) UpdateState(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage) []exported.Height { panic("legacy solo machine is deprecated!") } // CheckHeaderAndUpdateState panics! -func (cs *ClientState) CheckHeaderAndUpdateState( +func (*ClientState) CheckHeaderAndUpdateState( _ 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( +func (ClientState) CheckMisbehaviourAndUpdateState( _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientMessage, ) (exported.ClientState, error) { panic("legacy solo machine is deprecated!") } // CheckSubstituteAndUpdateState panics! -func (cs ClientState) CheckSubstituteAndUpdateState( +func (ClientState) CheckSubstituteAndUpdateState( ctx sdk.Context, _ codec.BinaryCodec, _, _ storetypes.KVStore, _ exported.ClientState, ) error { @@ -131,7 +131,7 @@ func (cs ClientState) CheckSubstituteAndUpdateState( } // VerifyUpgradeAndUpdateState panics! -func (cs ClientState) VerifyUpgradeAndUpdateState( +func (ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientState, _ exported.ConsensusState, _, _ []byte, ) error { @@ -139,7 +139,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( } // VerifyClientState panics! -func (cs ClientState) VerifyClientState( +func (ClientState) VerifyClientState( store storetypes.KVStore, cdc codec.BinaryCodec, _ exported.Height, _ exported.Prefix, _ string, _ []byte, clientState exported.ClientState, ) error { @@ -147,7 +147,7 @@ func (cs ClientState) VerifyClientState( } // VerifyClientConsensusState panics! -func (cs ClientState) VerifyClientConsensusState( +func (ClientState) VerifyClientConsensusState( storetypes.KVStore, codec.BinaryCodec, exported.Height, string, exported.Height, exported.Prefix, []byte, exported.ConsensusState, @@ -156,7 +156,7 @@ func (cs ClientState) VerifyClientConsensusState( } // VerifyConnectionState panics! -func (cs ClientState) VerifyConnectionState( +func (ClientState) VerifyConnectionState( storetypes.KVStore, codec.BinaryCodec, exported.Height, exported.Prefix, []byte, string, exported.ConnectionI, ) error { @@ -164,7 +164,7 @@ func (cs ClientState) VerifyConnectionState( } // VerifyChannelState panics! -func (cs ClientState) VerifyChannelState( +func (ClientState) VerifyChannelState( storetypes.KVStore, codec.BinaryCodec, exported.Height, exported.Prefix, []byte, string, string, exported.ChannelI, ) error { @@ -172,7 +172,7 @@ func (cs ClientState) VerifyChannelState( } // VerifyPacketCommitment panics! -func (cs ClientState) VerifyPacketCommitment( +func (ClientState) VerifyPacketCommitment( sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, []byte, @@ -181,7 +181,7 @@ func (cs ClientState) VerifyPacketCommitment( } // VerifyPacketAcknowledgement panics! -func (cs ClientState) VerifyPacketAcknowledgement( +func (ClientState) VerifyPacketAcknowledgement( sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, []byte, @@ -190,7 +190,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( } // VerifyPacketReceiptAbsence panics! -func (cs ClientState) VerifyPacketReceiptAbsence( +func (ClientState) VerifyPacketReceiptAbsence( sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, @@ -199,7 +199,7 @@ func (cs ClientState) VerifyPacketReceiptAbsence( } // VerifyNextSequenceRecv panics! -func (cs ClientState) VerifyNextSequenceRecv( +func (ClientState) VerifyNextSequenceRecv( sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, uint64, uint64, exported.Prefix, []byte, string, string, uint64, @@ -208,14 +208,14 @@ func (cs ClientState) VerifyNextSequenceRecv( } // GetTimestampAtHeight panics! -func (cs ClientState) GetTimestampAtHeight( +func (ClientState) GetTimestampAtHeight( sdk.Context, storetypes.KVStore, codec.BinaryCodec, exported.Height, ) (uint64, error) { panic("legacy solo machine is deprecated!") } // VerifyMembership panics! -func (cs *ClientState) VerifyMembership( +func (*ClientState) VerifyMembership( ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, @@ -230,7 +230,7 @@ func (cs *ClientState) VerifyMembership( } // VerifyNonMembership panics! -func (cs *ClientState) VerifyNonMembership( +func (*ClientState) VerifyNonMembership( ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, @@ -249,11 +249,11 @@ func (ConsensusState) ClientType() string { } // GetTimestamp panics! -func (cs ConsensusState) GetTimestamp() uint64 { +func (ConsensusState) GetTimestamp() uint64 { panic("legacy solo machine is deprecated!") } // ValidateBasic panics! -func (cs ConsensusState) ValidateBasic() error { +func (ConsensusState) ValidateBasic() error { panic("legacy solo machine is deprecated!") } diff --git a/modules/core/02-client/migrations/v7/store.go b/modules/core/02-client/migrations/v7/store.go index cc6086e206a..d4a86b51841 100644 --- a/modules/core/02-client/migrations/v7/store.go +++ b/modules/core/02-client/migrations/v7/store.go @@ -36,11 +36,11 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar return err } - if err := handleTendermintMigration(ctx, store, cdc, clientKeeper); err != nil { + if err := handleTendermintMigration(ctx, store, clientKeeper); err != nil { return err } - return handleLocalhostMigration(ctx, store, cdc, clientKeeper) + return handleLocalhostMigration(ctx, store, clientKeeper) } // handleSolomachineMigration iterates over the solo machine clients and migrates client state from @@ -82,7 +82,7 @@ func handleSolomachineMigration(ctx sdk.Context, store storetypes.KVStore, cdc c // 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 storetypes.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { +func handleTendermintMigration(ctx sdk.Context, store storetypes.KVStore, 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 storetypes.KVStore, cdc co } // handleLocalhostMigration removes all client and consensus states associated with the localhost client type. -func handleLocalhostMigration(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec, clientKeeper ClientKeeper) error { +func handleLocalhostMigration(ctx sdk.Context, store storetypes.KVStore, clientKeeper ClientKeeper) error { clients, err := collectClients(ctx, store, Localhost) if err != nil { return err diff --git a/modules/core/02-client/migrations/v7/store_test.go b/modules/core/02-client/migrations/v7/store_test.go index 524e439a4f6..981888ac01d 100644 --- a/modules/core/02-client/migrations/v7/store_test.go +++ b/modules/core/02-client/migrations/v7/store_test.go @@ -4,7 +4,7 @@ import ( "strconv" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" @@ -20,7 +20,7 @@ import ( const numCreations = 10 type MigrationsV7TestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -36,7 +36,7 @@ func (suite *MigrationsV7TestSuite) SetupTest() { } func TestIBCTestSuite(t *testing.T) { - suite.Run(t, new(MigrationsV7TestSuite)) + testifysuite.Run(t, new(MigrationsV7TestSuite)) } // create multiple solo machine clients, tendermint and localhost clients diff --git a/modules/core/02-client/types/msgs.go b/modules/core/02-client/types/msgs.go index 764154afcb5..56fef082573 100644 --- a/modules/core/02-client/types/msgs.go +++ b/modules/core/02-client/types/msgs.go @@ -260,16 +260,16 @@ func (msg MsgSubmitMisbehaviour) UnpackInterfaces(unpacker codectypes.AnyUnpacke } // NewMsgUpdateParams creates a new instance of MsgUpdateParams. -func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { +func NewMsgUpdateParams(signer string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ - Authority: authority, - Params: params, + Signer: signer, + Params: params, } } // GetSigners returns the expected signers for a MsgUpdateParams message. func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { - accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { panic(err) } @@ -278,7 +278,7 @@ func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { // ValidateBasic performs basic checks on a MsgUpdateParams. func (msg *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Params.Validate() diff --git a/modules/core/02-client/types/msgs_test.go b/modules/core/02-client/types/msgs_test.go index 2d265dcbc6c..fae00318003 100644 --- a/modules/core/02-client/types/msgs_test.go +++ b/modules/core/02-client/types/msgs_test.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/proto" //nolint:staticcheck "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +18,7 @@ import ( ) type TypesTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -35,7 +35,7 @@ func (suite *TypesTestSuite) SetupTest() { } func TestTypesTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) + testifysuite.Run(t, new(TypesTestSuite)) } // tests that different clients within MsgCreateClient can be marshaled @@ -615,30 +615,30 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { // TestMsgUpdateParamsValidateBasic tests ValidateBasic for MsgUpdateParams func (suite *TypesTestSuite) TestMsgUpdateParamsValidateBasic() { - authority := suite.chainA.App.GetIBCKeeper().GetAuthority() + signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string msg *types.MsgUpdateParams expPass bool }{ { - "success: valid authority and params", - types.NewMsgUpdateParams(authority, types.DefaultParams()), + "success: valid signer and params", + types.NewMsgUpdateParams(signer, types.DefaultParams()), true, }, { - "success: valid authority empty params", - types.NewMsgUpdateParams(authority, types.Params{}), + "success: valid signer empty params", + types.NewMsgUpdateParams(signer, types.Params{}), true, }, { - "failure: invalid authority address", + "failure: invalid signer address", types.NewMsgUpdateParams("invalid", types.DefaultParams()), false, }, { "failure: invalid allowed client", - types.NewMsgUpdateParams(authority, types.NewParams("")), + types.NewMsgUpdateParams(signer, types.NewParams("")), false, }, } @@ -666,8 +666,8 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { for _, tc := range testCases { msg := types.MsgUpdateParams{ - Authority: tc.address.String(), - Params: types.DefaultParams(), + Signer: tc.address.String(), + Params: types.DefaultParams(), } if tc.expPass { require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) diff --git a/modules/core/02-client/types/proposal.go b/modules/core/02-client/types/proposal.go index c51f4cf1900..b00169275b6 100644 --- a/modules/core/02-client/types/proposal.go +++ b/modules/core/02-client/types/proposal.go @@ -47,10 +47,10 @@ func (cup *ClientUpdateProposal) GetTitle() string { return cup.Title } func (cup *ClientUpdateProposal) GetDescription() string { return cup.Description } // ProposalRoute returns the routing key of a client update proposal. -func (cup *ClientUpdateProposal) ProposalRoute() string { return RouterKey } +func (*ClientUpdateProposal) ProposalRoute() string { return RouterKey } // ProposalType returns the type of a client update proposal. -func (cup *ClientUpdateProposal) ProposalType() string { return ProposalTypeClientUpdate } +func (*ClientUpdateProposal) ProposalType() string { return ProposalTypeClientUpdate } // ValidateBasic runs basic stateless validity checks func (cup *ClientUpdateProposal) ValidateBasic() error { @@ -94,10 +94,10 @@ func (up *UpgradeProposal) GetTitle() string { return up.Title } func (up *UpgradeProposal) GetDescription() string { return up.Description } // ProposalRoute returns the routing key of a upgrade proposal. -func (up *UpgradeProposal) ProposalRoute() string { return RouterKey } +func (*UpgradeProposal) ProposalRoute() string { return RouterKey } // ProposalType returns the upgrade proposal type. -func (up *UpgradeProposal) ProposalType() string { return ProposalTypeUpgrade } +func (*UpgradeProposal) ProposalType() string { return ProposalTypeUpgrade } // ValidateBasic runs basic stateless validity checks func (up *UpgradeProposal) ValidateBasic() error { diff --git a/modules/core/02-client/types/tx.pb.go b/modules/core/02-client/types/tx.pb.go index b7bda73776a..fcfd62bb821 100644 --- a/modules/core/02-client/types/tx.pb.go +++ b/modules/core/02-client/types/tx.pb.go @@ -367,8 +367,8 @@ var xxx_messageInfo_MsgSubmitMisbehaviourResponse proto.InternalMessageInfo // MsgUpdateParams defines the sdk.Msg type to update the client parameters. type MsgUpdateParams struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // params defines the client parameters to update. // // NOTE: All parameters must be supplied. @@ -461,49 +461,48 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/tx.proto", fileDescriptor_cb5dc4651eb49a04) } var fileDescriptor_cb5dc4651eb49a04 = []byte{ - // 658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xc7, 0xe3, 0xfe, 0x89, 0x7e, 0xb9, 0xa6, 0xed, 0x8f, 0x53, 0xa1, 0xa9, 0x4b, 0x9d, 0x2a, - 0x30, 0x94, 0x42, 0xed, 0x26, 0x0c, 0x8d, 0x8a, 0x18, 0xda, 0x4e, 0x0c, 0x91, 0x90, 0x2b, 0x16, - 0x96, 0x60, 0x3b, 0x97, 0x8b, 0xa5, 0xd8, 0x67, 0xf9, 0xec, 0x88, 0x0c, 0x48, 0x88, 0x89, 0x11, - 0x24, 0x16, 0x36, 0x5e, 0x42, 0xc5, 0x7b, 0x40, 0xea, 0xd8, 0x91, 0x09, 0xa1, 0x64, 0xe8, 0xdb, - 0x40, 0xf6, 0x5d, 0x1c, 0xdb, 0x8d, 0x4d, 0x2a, 0x36, 0xfb, 0x9e, 0xcf, 0x73, 0xdf, 0xef, 0xf3, - 0xf8, 0x39, 0x1f, 0xd8, 0x36, 0x75, 0x43, 0x31, 0x88, 0x8b, 0x14, 0xa3, 0x6f, 0x22, 0xdb, 0x53, - 0x06, 0x75, 0xc5, 0x7b, 0x2b, 0x3b, 0x2e, 0xf1, 0x08, 0x84, 0xa6, 0x6e, 0xc8, 0x41, 0x50, 0x66, - 0x41, 0x79, 0x50, 0x17, 0x37, 0x0d, 0x42, 0x2d, 0x42, 0x15, 0x8b, 0xe2, 0x80, 0xb5, 0x28, 0x66, - 0xb0, 0xb8, 0x81, 0x09, 0x26, 0xe1, 0xa3, 0x12, 0x3c, 0xf1, 0xd5, 0x2d, 0x4c, 0x08, 0xee, 0x23, - 0x25, 0x7c, 0xd3, 0xfd, 0xae, 0xa2, 0xd9, 0x43, 0x1e, 0xaa, 0xce, 0x90, 0xe6, 0x3a, 0x21, 0x50, - 0xfb, 0x2e, 0x80, 0xf5, 0x16, 0xc5, 0x67, 0x2e, 0xd2, 0x3c, 0x74, 0x16, 0x46, 0xe0, 0x11, 0x28, - 0x33, 0xa6, 0x4d, 0x3d, 0xcd, 0x43, 0x15, 0x61, 0x57, 0xd8, 0x5b, 0x69, 0x6c, 0xc8, 0x4c, 0x46, - 0x9e, 0xc8, 0xc8, 0x27, 0xf6, 0x50, 0x5d, 0x61, 0xe4, 0x79, 0x00, 0xc2, 0xe7, 0x60, 0xdd, 0x20, - 0x36, 0x45, 0x36, 0xf5, 0x29, 0xcf, 0x5d, 0xc8, 0xc9, 0x5d, 0x8b, 0x60, 0x96, 0x7e, 0x0f, 0x14, - 0xa9, 0x89, 0x6d, 0xe4, 0x56, 0x16, 0x77, 0x85, 0xbd, 0x92, 0xca, 0xdf, 0x8e, 0xd7, 0x3f, 0x7e, - 0xab, 0x16, 0x3e, 0x5c, 0x5f, 0xec, 0xf3, 0x85, 0xda, 0x16, 0xd8, 0x4c, 0x79, 0x56, 0x11, 0x75, - 0x82, 0xcd, 0x6a, 0x5f, 0x58, 0x3d, 0xaf, 0x9c, 0xce, 0xb4, 0x9e, 0x6d, 0x50, 0xe2, 0xf5, 0x98, - 0x9d, 0xb0, 0x98, 0x92, 0xfa, 0x1f, 0x5b, 0x78, 0xd1, 0x81, 0xcf, 0xc0, 0x1a, 0x0f, 0x5a, 0x88, - 0x52, 0x0d, 0xe7, 0x5b, 0x5e, 0x65, 0x6c, 0x8b, 0xa1, 0xb7, 0x75, 0x1c, 0x77, 0x15, 0x39, 0xfe, - 0xb1, 0x00, 0xfe, 0x0f, 0x63, 0xd8, 0xd5, 0x3a, 0x73, 0x59, 0x4e, 0x7f, 0x9f, 0x85, 0x7f, 0xf8, - 0x3e, 0x8b, 0xb7, 0xf8, 0x3e, 0x87, 0x60, 0xc3, 0x71, 0x09, 0xe9, 0xb6, 0x7d, 0xe6, 0xb5, 0xcd, - 0xf6, 0xae, 0x2c, 0xed, 0x0a, 0x7b, 0x65, 0x15, 0x86, 0xb1, 0x64, 0x19, 0x27, 0x60, 0x27, 0x95, - 0x91, 0x92, 0x5f, 0x0e, 0x53, 0xc5, 0x44, 0x6a, 0xd6, 0x50, 0x14, 0xf3, 0x5b, 0x2c, 0x82, 0x4a, - 0xba, 0x8d, 0x51, 0x8f, 0xbf, 0x0a, 0xe0, 0x6e, 0x8b, 0xe2, 0x73, 0x5f, 0xb7, 0x4c, 0xaf, 0x65, - 0x52, 0x1d, 0xf5, 0xb4, 0x81, 0x49, 0x7c, 0x37, 0xbf, 0xd1, 0x4d, 0x50, 0xb6, 0x62, 0x70, 0x6e, - 0xa3, 0x13, 0x64, 0xe6, 0x60, 0xdc, 0x49, 0xb9, 0xae, 0x08, 0xb5, 0x2a, 0xd8, 0x99, 0x69, 0x2d, - 0x32, 0xff, 0x2e, 0x36, 0xd1, 0x2f, 0x35, 0x57, 0xb3, 0x28, 0xbc, 0x0f, 0x4a, 0x9a, 0xef, 0xf5, - 0x88, 0x6b, 0x7a, 0x43, 0xee, 0x7a, 0xba, 0x00, 0x9b, 0xa0, 0xe8, 0x84, 0x1c, 0x37, 0x2c, 0xca, - 0x37, 0xff, 0x31, 0x32, 0xdb, 0xe9, 0x74, 0xe9, 0xf2, 0x57, 0xb5, 0xa0, 0x72, 0xfe, 0x18, 0x4e, - 0xec, 0x4d, 0x77, 0x4b, 0x8c, 0x2e, 0x4b, 0x9a, 0x38, 0x6b, 0x7c, 0x5e, 0x02, 0x8b, 0x2d, 0x8a, - 0xe1, 0x1b, 0x50, 0x4e, 0xfc, 0x40, 0x1e, 0xcc, 0x12, 0x4c, 0x9d, 0x58, 0xf1, 0xf1, 0x1c, 0xd0, - 0x44, 0x29, 0x50, 0x48, 0x1c, 0xe9, 0x2c, 0x85, 0x38, 0x94, 0xa9, 0x30, 0xeb, 0x18, 0x42, 0x03, - 0xac, 0x26, 0x67, 0xf7, 0x61, 0x66, 0x76, 0x8c, 0x12, 0x9f, 0xcc, 0x43, 0x45, 0x22, 0x2e, 0x80, - 0x33, 0x66, 0xf0, 0x51, 0xc6, 0x1e, 0x37, 0x51, 0xb1, 0x3e, 0x37, 0x1a, 0x69, 0x76, 0x01, 0x8c, - 0x17, 0xcc, 0x27, 0x28, 0xbf, 0x81, 0x0c, 0xfa, 0x4b, 0x03, 0x93, 0xc3, 0x20, 0x2e, 0xbf, 0xbf, - 0xbe, 0xd8, 0x17, 0x4e, 0xd5, 0xcb, 0x91, 0x24, 0x5c, 0x8d, 0x24, 0xe1, 0xf7, 0x48, 0x12, 0x3e, - 0x8d, 0xa5, 0xc2, 0xd5, 0x58, 0x2a, 0xfc, 0x1c, 0x4b, 0x85, 0xd7, 0x4d, 0x6c, 0x7a, 0x3d, 0x5f, - 0x97, 0x0d, 0x62, 0x29, 0xfc, 0x82, 0x33, 0x75, 0xe3, 0x00, 0x13, 0x65, 0x70, 0xa4, 0x58, 0xa4, - 0xe3, 0xf7, 0x11, 0x65, 0x77, 0xd5, 0x61, 0xe3, 0x80, 0x5f, 0x57, 0xde, 0xd0, 0x41, 0x54, 0x2f, - 0x86, 0x27, 0xed, 0xe9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x00, 0x5d, 0xdc, 0x49, 0x07, - 0x00, 0x00, + // 641 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3f, 0x6f, 0xd3, 0x5c, + 0x14, 0xc6, 0x73, 0xfb, 0x27, 0x7a, 0x73, 0x9b, 0x36, 0x2f, 0x56, 0xa0, 0xa9, 0xab, 0x3a, 0x51, + 0x60, 0x08, 0x85, 0xda, 0x4d, 0x18, 0x1a, 0x81, 0x18, 0xda, 0x4e, 0x0c, 0x91, 0x90, 0x2b, 0x16, + 0x96, 0x60, 0x3b, 0x37, 0xb7, 0x96, 0x62, 0x5f, 0xcb, 0xd7, 0x8e, 0xc8, 0x86, 0x98, 0x18, 0x41, + 0x62, 0x61, 0xe3, 0x23, 0x54, 0x7c, 0x07, 0xa4, 0x8e, 0x1d, 0x99, 0x10, 0x4a, 0x86, 0x7e, 0x0d, + 0x64, 0xdf, 0x1b, 0x63, 0xbb, 0xb1, 0x49, 0xc5, 0x66, 0xfb, 0xfc, 0xce, 0x79, 0x9e, 0x73, 0x7c, + 0xae, 0x0d, 0x77, 0x4d, 0xdd, 0x50, 0x0c, 0xe2, 0x22, 0xc5, 0x18, 0x99, 0xc8, 0xf6, 0x94, 0x71, + 0x5b, 0xf1, 0xde, 0xca, 0x8e, 0x4b, 0x3c, 0x22, 0x08, 0xa6, 0x6e, 0xc8, 0x41, 0x50, 0x66, 0x41, + 0x79, 0xdc, 0x16, 0xb7, 0x0d, 0x42, 0x2d, 0x42, 0x15, 0x8b, 0xe2, 0x80, 0xb5, 0x28, 0x66, 0xb0, + 0x58, 0xc5, 0x04, 0x93, 0xf0, 0x52, 0x09, 0xae, 0xf8, 0xd3, 0x1d, 0x4c, 0x08, 0x1e, 0x21, 0x25, + 0xbc, 0xd3, 0xfd, 0xa1, 0xa2, 0xd9, 0x13, 0x1e, 0xaa, 0x2f, 0x90, 0xe6, 0x3a, 0x21, 0xd0, 0xfc, + 0x06, 0x60, 0xa5, 0x47, 0xf1, 0xa9, 0x8b, 0x34, 0x0f, 0x9d, 0x86, 0x11, 0xe1, 0x08, 0x96, 0x19, + 0xd3, 0xa7, 0x9e, 0xe6, 0xa1, 0x1a, 0x68, 0x80, 0xd6, 0x46, 0xa7, 0x2a, 0x33, 0x19, 0x79, 0x2e, + 0x23, 0x1f, 0xdb, 0x13, 0x75, 0x83, 0x91, 0x67, 0x01, 0x28, 0x3c, 0x87, 0x15, 0x83, 0xd8, 0x14, + 0xd9, 0xd4, 0xa7, 0x3c, 0x77, 0x25, 0x27, 0x77, 0x2b, 0x82, 0x59, 0xfa, 0x3d, 0x58, 0xa4, 0x26, + 0xb6, 0x91, 0x5b, 0x5b, 0x6d, 0x80, 0x56, 0x49, 0xe5, 0x77, 0x4f, 0x2b, 0x1f, 0xbe, 0xd6, 0x0b, + 0xef, 0xaf, 0x2f, 0xf6, 0xf9, 0x83, 0xe6, 0x0e, 0xdc, 0x4e, 0x79, 0x56, 0x11, 0x75, 0x82, 0x62, + 0xcd, 0xcf, 0xac, 0x9f, 0x57, 0xce, 0xe0, 0x4f, 0x3f, 0xbb, 0xb0, 0xc4, 0xfb, 0x31, 0x07, 0x61, + 0x33, 0x25, 0xf5, 0x3f, 0xf6, 0xe0, 0xc5, 0x40, 0x78, 0x06, 0xb7, 0x78, 0xd0, 0x42, 0x94, 0x6a, + 0x38, 0xdf, 0xf2, 0x26, 0x63, 0x7b, 0x0c, 0xbd, 0xad, 0xe3, 0xb8, 0xab, 0xc8, 0xf1, 0xf7, 0x15, + 0xf8, 0x7f, 0x18, 0xc3, 0xae, 0x36, 0x58, 0xca, 0x72, 0xfa, 0xfd, 0xac, 0xfc, 0xc3, 0xfb, 0x59, + 0xbd, 0xc5, 0xfb, 0x39, 0x84, 0x55, 0xc7, 0x25, 0x64, 0xd8, 0xf7, 0x99, 0xd7, 0x3e, 0xab, 0x5d, + 0x5b, 0x6b, 0x80, 0x56, 0x59, 0x15, 0xc2, 0x58, 0xb2, 0x8d, 0x63, 0xb8, 0x97, 0xca, 0x48, 0xc9, + 0xaf, 0x87, 0xa9, 0x62, 0x22, 0x35, 0x6b, 0x29, 0x8a, 0xf9, 0x23, 0x16, 0x61, 0x2d, 0x3d, 0xc6, + 0x68, 0xc6, 0x5f, 0x00, 0xbc, 0xdb, 0xa3, 0xf8, 0xcc, 0xd7, 0x2d, 0xd3, 0xeb, 0x99, 0x54, 0x47, + 0xe7, 0xda, 0xd8, 0x24, 0xbe, 0x9b, 0x3f, 0xe8, 0x2e, 0x2c, 0x5b, 0x31, 0x38, 0x77, 0xd0, 0x09, + 0x32, 0x73, 0x31, 0xee, 0xa4, 0x5c, 0xd7, 0x40, 0xb3, 0x0e, 0xf7, 0x16, 0x5a, 0x8b, 0xcc, 0x7b, + 0xb1, 0x8d, 0x7e, 0xa9, 0xb9, 0x9a, 0x45, 0x63, 0xe5, 0x41, 0xbc, 0xbc, 0xd0, 0x85, 0x45, 0x27, + 0x24, 0xb8, 0x55, 0x51, 0xbe, 0xf9, 0x75, 0x91, 0x59, 0x8d, 0x93, 0xb5, 0xcb, 0x9f, 0xf5, 0x82, + 0xca, 0xf9, 0xfc, 0x8d, 0x65, 0x19, 0x73, 0x43, 0x9d, 0x4f, 0x6b, 0x70, 0xb5, 0x47, 0xb1, 0xf0, + 0x06, 0x96, 0x13, 0xdf, 0x8d, 0xfb, 0x8b, 0xd4, 0x52, 0x07, 0x55, 0x7c, 0xb4, 0x04, 0x34, 0x57, + 0x0a, 0x14, 0x12, 0x27, 0x39, 0x4b, 0x21, 0x0e, 0x65, 0x2a, 0x2c, 0x3a, 0x7d, 0x82, 0x01, 0x37, + 0x93, 0x2b, 0xfb, 0x20, 0x33, 0x3b, 0x46, 0x89, 0x8f, 0x97, 0xa1, 0x22, 0x11, 0x17, 0x0a, 0x0b, + 0x56, 0xef, 0x61, 0x46, 0x8d, 0x9b, 0xa8, 0xd8, 0x5e, 0x1a, 0x8d, 0x34, 0x87, 0x50, 0x88, 0x37, + 0xcc, 0x17, 0x27, 0x7f, 0x80, 0x0c, 0xfa, 0xcb, 0x00, 0x93, 0xcb, 0x20, 0xae, 0xbf, 0xbb, 0xbe, + 0xd8, 0x07, 0x27, 0xea, 0xe5, 0x54, 0x02, 0x57, 0x53, 0x09, 0xfc, 0x9a, 0x4a, 0xe0, 0xe3, 0x4c, + 0x2a, 0x5c, 0xcd, 0xa4, 0xc2, 0x8f, 0x99, 0x54, 0x78, 0xdd, 0xc5, 0xa6, 0x77, 0xee, 0xeb, 0xb2, + 0x41, 0x2c, 0x85, 0xff, 0xd7, 0x4c, 0xdd, 0x38, 0xc0, 0x44, 0x19, 0x1f, 0x29, 0x16, 0x19, 0xf8, + 0x23, 0x44, 0xd9, 0x2f, 0xea, 0xb0, 0x73, 0xc0, 0xff, 0x52, 0xde, 0xc4, 0x41, 0x54, 0x2f, 0x86, + 0x07, 0xec, 0xc9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x3b, 0xe1, 0x4e, 0x40, 0x07, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1089,10 +1088,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- dAtA[i] = 0xa } @@ -1271,7 +1270,7 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = l - l = len(m.Authority) + l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2234,7 +2233,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2262,7 +2261,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/modules/core/03-connection/keeper/keeper.go b/modules/core/03-connection/keeper/keeper.go index 220e09f30c4..b0a910f3e08 100644 --- a/modules/core/03-connection/keeper/keeper.go +++ b/modules/core/03-connection/keeper/keeper.go @@ -44,7 +44,7 @@ func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, legacySubspace pa } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"/"+types.SubModuleName) } diff --git a/modules/core/03-connection/keeper/keeper_test.go b/modules/core/03-connection/keeper/keeper_test.go index 37f185a6d66..375ba0eb658 100644 --- a/modules/core/03-connection/keeper/keeper_test.go +++ b/modules/core/03-connection/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" @@ -13,7 +13,7 @@ import ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -29,7 +29,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestSetAndGetConnection() { diff --git a/modules/core/03-connection/types/msgs.go b/modules/core/03-connection/types/msgs.go index 67837a2133f..05bf802b906 100644 --- a/modules/core/03-connection/types/msgs.go +++ b/modules/core/03-connection/types/msgs.go @@ -285,16 +285,16 @@ func (msg MsgConnectionOpenConfirm) GetSigners() []sdk.AccAddress { } // NewMsgUpdateParams creates a new MsgUpdateParams instance -func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { +func NewMsgUpdateParams(signer string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ - Authority: authority, - Params: params, + Signer: signer, + Params: params, } } // GetSigners returns the expected signers for a MsgUpdateParams message. func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { - accAddr, err := sdk.AccAddressFromBech32(msg.Authority) + accAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { panic(err) } @@ -303,7 +303,7 @@ func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { // ValidateBasic performs basic checks on a MsgUpdateParams. func (msg *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Params.Validate() diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index 588875dd693..571e7a6f14c 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/rootmulti" @@ -34,7 +34,7 @@ var ( ) type MsgTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -79,7 +79,7 @@ func (suite *MsgTestSuite) SetupTest() { } func TestMsgTestSuite(t *testing.T) { - suite.Run(t, new(MsgTestSuite)) + testifysuite.Run(t, new(MsgTestSuite)) } func (suite *MsgTestSuite) TestNewMsgConnectionOpenInit() { @@ -238,25 +238,25 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() { // TestMsgUpdateParamsValidateBasic tests ValidateBasic for MsgUpdateParams func (suite *MsgTestSuite) TestMsgUpdateParamsValidateBasic() { - authority := suite.chainA.App.GetIBCKeeper().GetAuthority() + signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string msg *types.MsgUpdateParams expPass bool }{ { - "success: valid authority and params", - types.NewMsgUpdateParams(authority, types.DefaultParams()), + "success: valid signer and params", + types.NewMsgUpdateParams(signer, types.DefaultParams()), true, }, { - "failure: invalid authority address", + "failure: invalid signer address", types.NewMsgUpdateParams("invalid", types.DefaultParams()), false, }, { "failure: invalid time per block", - types.NewMsgUpdateParams(authority, types.NewParams(0)), + types.NewMsgUpdateParams(signer, types.NewParams(0)), false, }, } @@ -284,8 +284,8 @@ func TestMsgUpdateParamsGetSigners(t *testing.T) { for _, tc := range testCases { msg := types.MsgUpdateParams{ - Authority: tc.address.String(), - Params: types.DefaultParams(), + Signer: tc.address.String(), + Params: types.DefaultParams(), } if tc.expPass { require.Equal(t, []sdk.AccAddress{tc.address}, msg.GetSigners()) diff --git a/modules/core/03-connection/types/tx.pb.go b/modules/core/03-connection/types/tx.pb.go index 8be9326652a..d9fb4381a62 100644 --- a/modules/core/03-connection/types/tx.pb.go +++ b/modules/core/03-connection/types/tx.pb.go @@ -380,8 +380,8 @@ var xxx_messageInfo_MsgConnectionOpenConfirmResponse proto.InternalMessageInfo // MsgUpdateParams defines the sdk.Msg type to update the connection parameters. type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // params defines the connection parameters to update. // // NOTE: All parameters must be supplied. @@ -474,66 +474,65 @@ func init() { func init() { proto.RegisterFile("ibc/core/connection/v1/tx.proto", fileDescriptor_5d00fde5fc97399e) } var fileDescriptor_5d00fde5fc97399e = []byte{ - // 944 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0xc7, 0x45, 0x5b, 0x92, 0xad, 0x91, 0x52, 0xb7, 0x0b, 0xd9, 0x66, 0x98, 0x44, 0x52, 0xd4, - 0x02, 0x36, 0x82, 0x9a, 0x8c, 0x93, 0x16, 0x49, 0x53, 0x5f, 0x6c, 0x5d, 0x6a, 0x14, 0x6e, 0x03, - 0xd5, 0xcd, 0xa1, 0x17, 0x41, 0xa2, 0xd6, 0xd4, 0xc2, 0x16, 0x97, 0xe0, 0xae, 0xd4, 0xb2, 0xa7, - 0x7e, 0x5c, 0x0a, 0xf4, 0xd2, 0x47, 0xe8, 0x23, 0xe4, 0x31, 0x82, 0x1e, 0x8a, 0xa0, 0xa7, 0x9e, - 0x8a, 0xc2, 0x3e, 0xe4, 0x05, 0xfa, 0x00, 0x05, 0x77, 0x97, 0x1f, 0xd6, 0x87, 0x41, 0xd9, 0xb9, - 0x49, 0xc3, 0xff, 0xcc, 0xfe, 0x67, 0xf6, 0xb7, 0xe4, 0x42, 0x9d, 0xf4, 0x6c, 0xcb, 0xa6, 0x3e, - 0xb6, 0x6c, 0xea, 0xba, 0xd8, 0xe6, 0x84, 0xba, 0xd6, 0x78, 0xd7, 0xe2, 0xdf, 0x99, 0x9e, 0x4f, - 0x39, 0x45, 0x1b, 0xa4, 0x67, 0x9b, 0xa1, 0xc0, 0x4c, 0x04, 0xe6, 0x78, 0xd7, 0xa8, 0x3a, 0xd4, - 0xa1, 0x42, 0x62, 0x85, 0xbf, 0xa4, 0xda, 0xd8, 0xb4, 0x29, 0x1b, 0x52, 0x66, 0x0d, 0x99, 0x13, - 0x56, 0x19, 0x32, 0x47, 0x3d, 0xb8, 0xed, 0x50, 0xea, 0x9c, 0x61, 0x4b, 0xfc, 0xeb, 0x8d, 0x4e, - 0xac, 0xae, 0x1b, 0xa8, 0x47, 0x29, 0x0b, 0x67, 0x04, 0xbb, 0x3c, 0x4c, 0x94, 0xbf, 0x94, 0x60, - 0x6b, 0x8e, 0xc7, 0x94, 0x21, 0x21, 0x6c, 0xfe, 0xba, 0x04, 0xeb, 0x47, 0xcc, 0x69, 0xc5, 0xf1, - 0x2f, 0x3d, 0xec, 0x1e, 0xba, 0x84, 0xa3, 0x3b, 0x50, 0x92, 0x25, 0x3b, 0xa4, 0xaf, 0x6b, 0x0d, - 0x6d, 0xbb, 0xd4, 0x5e, 0x95, 0x81, 0xc3, 0x3e, 0xfa, 0x02, 0x2a, 0x36, 0x1d, 0xb9, 0x1c, 0xfb, - 0x5e, 0xd7, 0xe7, 0x81, 0xbe, 0xd4, 0xd0, 0xb6, 0xcb, 0x8f, 0x3e, 0x30, 0x67, 0x77, 0x6e, 0xb6, - 0x52, 0xda, 0x83, 0xfc, 0xab, 0x7f, 0xea, 0xb9, 0xf6, 0xa5, 0x7c, 0xf4, 0x09, 0xac, 0x8c, 0xb1, - 0xcf, 0x08, 0x75, 0xf5, 0x65, 0x51, 0xaa, 0x3e, 0xaf, 0xd4, 0x0b, 0x29, 0x6b, 0x47, 0x7a, 0x74, - 0x1f, 0x2a, 0x7d, 0x7c, 0xd6, 0x0d, 0x3a, 0x1e, 0xf6, 0x09, 0xed, 0xeb, 0xf9, 0x86, 0xb6, 0x9d, - 0x6f, 0x97, 0x45, 0xec, 0xb9, 0x08, 0xa1, 0x0d, 0x28, 0x32, 0xe2, 0xb8, 0xd8, 0xd7, 0x0b, 0xa2, - 0x0f, 0xf5, 0xef, 0xd9, 0xda, 0x2f, 0xbf, 0xd7, 0x73, 0x3f, 0xbd, 0x79, 0xf9, 0x40, 0x05, 0x9a, - 0x75, 0xb8, 0x37, 0x73, 0x18, 0x6d, 0xcc, 0x3c, 0xea, 0x32, 0xdc, 0xfc, 0xab, 0x00, 0xd5, 0x29, - 0xc5, 0xb1, 0x1f, 0x5c, 0x3d, 0xad, 0xa7, 0xb0, 0xe1, 0xf9, 0x78, 0x4c, 0xe8, 0x88, 0x75, 0x92, - 0x6e, 0x42, 0x65, 0x38, 0xb7, 0xd2, 0xc1, 0x92, 0xae, 0xb5, 0xab, 0x91, 0x22, 0xa9, 0x7d, 0xd8, - 0x47, 0x4f, 0xa0, 0xa2, 0xca, 0x32, 0xde, 0xe5, 0x58, 0x0d, 0xa7, 0x6a, 0x4a, 0x34, 0xcc, 0x08, - 0x0d, 0x73, 0xdf, 0x0d, 0xda, 0x65, 0xa9, 0xfc, 0x2a, 0x14, 0x4e, 0x6d, 0x50, 0xfe, 0x86, 0x1b, - 0x34, 0x39, 0xe5, 0xc2, 0xf4, 0x94, 0x8f, 0x61, 0x3d, 0x9d, 0xd2, 0x51, 0x1b, 0xc4, 0xf4, 0x62, - 0x63, 0x39, 0xcb, 0x8e, 0x56, 0xd3, 0xd9, 0x2a, 0xc8, 0x50, 0x0b, 0x2a, 0x9e, 0x4f, 0xe9, 0x49, - 0x67, 0x80, 0x89, 0x33, 0xe0, 0xfa, 0x8a, 0x68, 0xc4, 0x48, 0x15, 0x93, 0xdc, 0x8f, 0x77, 0xcd, - 0xcf, 0x84, 0x42, 0xd9, 0x2f, 0x8b, 0x2c, 0x19, 0x42, 0xf7, 0x00, 0x64, 0x11, 0xe2, 0x12, 0xae, - 0xaf, 0x36, 0xb4, 0xed, 0x4a, 0xbb, 0x24, 0x22, 0x02, 0xf5, 0xfb, 0xd1, 0x1a, 0xb2, 0x96, 0x5e, - 0x12, 0x02, 0x59, 0xa1, 0x25, 0x42, 0x68, 0x0b, 0xd6, 0x94, 0x24, 0xe4, 0xc0, 0x65, 0x23, 0xa6, - 0x83, 0x50, 0xbd, 0x23, 0x55, 0x51, 0x14, 0x7d, 0x0e, 0xef, 0xc6, 0x92, 0xc8, 0x73, 0x39, 0xa3, - 0xe7, 0xb5, 0x38, 0x53, 0xf9, 0x4e, 0xc0, 0xad, 0xa4, 0xc1, 0x45, 0x9f, 0x82, 0x31, 0xa0, 0x8c, - 0x27, 0x66, 0x24, 0x1e, 0x1d, 0xe1, 0x45, 0xbf, 0x25, 0x8c, 0x6d, 0x86, 0x8a, 0xd8, 0x97, 0xa0, - 0xe2, 0x79, 0xf8, 0x78, 0x9a, 0xfa, 0x1a, 0xdc, 0x9d, 0xc5, 0x74, 0x0c, 0xfd, 0x9f, 0xf9, 0x19, - 0xd0, 0xef, 0xdb, 0xa7, 0xe8, 0x7d, 0xb8, 0x75, 0x19, 0x67, 0x09, 0x7e, 0xc5, 0x4e, 0x23, 0xbc, - 0x07, 0xc6, 0x25, 0x2c, 0x66, 0x1c, 0x80, 0xb6, 0x9e, 0x56, 0x5c, 0x3a, 0x00, 0x37, 0x78, 0x31, - 0x4c, 0x9e, 0x9d, 0x7c, 0xd6, 0xb3, 0x33, 0x89, 0x5c, 0xe1, 0x3a, 0xc8, 0xdd, 0x01, 0x09, 0x58, - 0x87, 0xfb, 0x81, 0x5e, 0x14, 0x3b, 0xb2, 0x2a, 0x02, 0xe1, 0xdb, 0x62, 0x12, 0xb8, 0x95, 0x4c, - 0xc0, 0xad, 0x66, 0x06, 0xae, 0x74, 0x73, 0xe0, 0x60, 0x01, 0xe0, 0xca, 0x6f, 0x01, 0xb8, 0x7d, - 0xfb, 0x34, 0x06, 0xee, 0x0f, 0x0d, 0xf4, 0x29, 0x41, 0x8b, 0xba, 0x27, 0xc4, 0x1f, 0x66, 0x83, - 0x2e, 0x9e, 0x7e, 0xd7, 0x3e, 0x15, 0x8c, 0x45, 0xd3, 0x0f, 0xb1, 0x9d, 0xdc, 0xdf, 0xe5, 0xeb, - 0xec, 0x6f, 0x32, 0xa9, 0xfc, 0xd5, 0xdf, 0x94, 0x26, 0x34, 0xe6, 0xf5, 0x12, 0x37, 0xfc, 0xa3, - 0x06, 0x6b, 0x47, 0xcc, 0xf9, 0xda, 0xeb, 0x87, 0x43, 0xeb, 0xfa, 0xdd, 0x21, 0x43, 0x77, 0xa1, - 0xd4, 0x1d, 0xf1, 0x01, 0xf5, 0x09, 0x0f, 0x54, 0x8f, 0x49, 0x00, 0xed, 0x41, 0xd1, 0x13, 0x3a, - 0xf5, 0xe9, 0xad, 0xcd, 0x3b, 0x16, 0xb2, 0x9a, 0xea, 0x40, 0xe5, 0x3c, 0x43, 0x91, 0xc9, 0xa4, - 0x62, 0xf3, 0x36, 0x6c, 0x4e, 0x58, 0x88, 0xec, 0x3d, 0xfa, 0x2f, 0x0f, 0xcb, 0x47, 0xcc, 0x41, - 0xdf, 0x03, 0x9a, 0x71, 0x51, 0xd8, 0x99, 0xb7, 0xf4, 0xcc, 0x4f, 0xa9, 0xf1, 0xf1, 0x42, 0xf2, - 0xc8, 0x03, 0xfa, 0x16, 0xde, 0x9b, 0xfe, 0xea, 0x7e, 0x98, 0xb9, 0xd6, 0xb1, 0x1f, 0x18, 0x1f, - 0x2d, 0xa2, 0x9e, 0xbf, 0x70, 0x88, 0x50, 0xf6, 0x85, 0xf7, 0xed, 0xd3, 0x05, 0x16, 0x4e, 0x9d, - 0x02, 0xf4, 0xb3, 0x06, 0xeb, 0xb3, 0x8f, 0xc0, 0xc3, 0xcc, 0xf5, 0x54, 0x86, 0xf1, 0x74, 0xd1, - 0x8c, 0xd8, 0x85, 0x0f, 0x1b, 0x92, 0x89, 0x44, 0xa6, 0x00, 0xdd, 0xba, 0xa2, 0x66, 0x1a, 0x23, - 0xc3, 0xca, 0x28, 0x8c, 0xd6, 0x34, 0x0a, 0x3f, 0xbc, 0x79, 0xf9, 0x40, 0x3b, 0x78, 0xf1, 0xea, - 0xbc, 0xa6, 0xbd, 0x3e, 0xaf, 0x69, 0xff, 0x9e, 0xd7, 0xb4, 0xdf, 0x2e, 0x6a, 0xb9, 0xd7, 0x17, - 0xb5, 0xdc, 0xdf, 0x17, 0xb5, 0xdc, 0x37, 0x7b, 0x0e, 0xe1, 0x83, 0x51, 0xcf, 0xb4, 0xe9, 0xd0, - 0x52, 0xd7, 0x67, 0xd2, 0xb3, 0x77, 0x1c, 0x6a, 0x8d, 0x9f, 0x58, 0x43, 0xda, 0x1f, 0x9d, 0x61, - 0x26, 0xaf, 0xbf, 0x0f, 0x1f, 0xef, 0xa4, 0x6e, 0xc0, 0x3c, 0xf0, 0x30, 0xeb, 0x15, 0xc5, 0xab, - 0xff, 0xf1, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xb0, 0x86, 0xad, 0xc9, 0x0b, 0x00, 0x00, + // 928 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0xd6, 0x49, 0x9b, 0x97, 0x2c, 0x85, 0x51, 0xda, 0x7a, 0xbd, 0xac, 0x93, 0x2d, + 0x48, 0xad, 0x56, 0xd4, 0xde, 0xee, 0x82, 0x76, 0x81, 0x5e, 0xda, 0x5c, 0xa8, 0x50, 0x61, 0x65, + 0xca, 0x1e, 0xb8, 0x44, 0x89, 0x33, 0x75, 0x47, 0x6d, 0x3c, 0x96, 0xc7, 0x09, 0x6b, 0x4e, 0x08, + 0x2e, 0x48, 0x5c, 0xf8, 0x08, 0x7c, 0x84, 0xfd, 0x18, 0x2b, 0x0e, 0x68, 0xc5, 0x89, 0x13, 0x42, + 0xed, 0x61, 0xbf, 0x00, 0x1f, 0x00, 0x79, 0x66, 0xec, 0x38, 0x89, 0x53, 0x39, 0xdb, 0xbd, 0x25, + 0xcf, 0xff, 0xf7, 0xe6, 0x3f, 0xef, 0xfd, 0xc6, 0x1e, 0x68, 0x92, 0x9e, 0x63, 0x39, 0x34, 0xc0, + 0x96, 0x43, 0x3d, 0x0f, 0x3b, 0x21, 0xa1, 0x9e, 0x35, 0xda, 0xb3, 0xc2, 0xe7, 0xa6, 0x1f, 0xd0, + 0x90, 0xa2, 0x0d, 0xd2, 0x73, 0xcc, 0x58, 0x60, 0x8e, 0x05, 0xe6, 0x68, 0x4f, 0x6f, 0xb8, 0xd4, + 0xa5, 0x5c, 0x62, 0xc5, 0xbf, 0x84, 0x5a, 0xdf, 0x74, 0x28, 0x1b, 0x50, 0x66, 0x0d, 0x98, 0x1b, + 0x57, 0x19, 0x30, 0x57, 0x3e, 0xb8, 0xed, 0x52, 0xea, 0x5e, 0x60, 0x8b, 0xff, 0xeb, 0x0d, 0x4f, + 0xad, 0xae, 0x17, 0xc9, 0x47, 0x19, 0x0b, 0x17, 0x04, 0x7b, 0x61, 0x9c, 0x28, 0x7e, 0x49, 0xc1, + 0xf6, 0x1c, 0x8f, 0x19, 0x43, 0x5c, 0xb8, 0xf5, 0xeb, 0x12, 0xac, 0x1f, 0x33, 0xb7, 0x9d, 0xc6, + 0xbf, 0xf6, 0xb1, 0x77, 0xe4, 0x91, 0x10, 0xdd, 0x81, 0xaa, 0x28, 0xd9, 0x21, 0x7d, 0x4d, 0x69, + 0x29, 0x3b, 0x55, 0x7b, 0x55, 0x04, 0x8e, 0xfa, 0xe8, 0x2b, 0xa8, 0x3b, 0x74, 0xe8, 0x85, 0x38, + 0xf0, 0xbb, 0x41, 0x18, 0x69, 0x4b, 0x2d, 0x65, 0xa7, 0xf6, 0xf0, 0x43, 0x33, 0x7f, 0xe7, 0x66, + 0x3b, 0xa3, 0x3d, 0x54, 0x5f, 0xfe, 0xd3, 0x2c, 0xd9, 0x13, 0xf9, 0xe8, 0x53, 0x58, 0x19, 0xe1, + 0x80, 0x11, 0xea, 0x69, 0xcb, 0xbc, 0x54, 0x73, 0x5e, 0xa9, 0x67, 0x42, 0x66, 0x27, 0x7a, 0x74, + 0x0f, 0xea, 0x7d, 0x7c, 0xd1, 0x8d, 0x3a, 0x3e, 0x0e, 0x08, 0xed, 0x6b, 0x6a, 0x4b, 0xd9, 0x51, + 0xed, 0x1a, 0x8f, 0x3d, 0xe5, 0x21, 0xb4, 0x01, 0x15, 0x46, 0x5c, 0x0f, 0x07, 0x5a, 0x99, 0xef, + 0x43, 0xfe, 0xfb, 0x6c, 0xed, 0x97, 0xdf, 0x9b, 0xa5, 0x9f, 0x5e, 0xbf, 0xb8, 0x2f, 0x03, 0x5b, + 0x4d, 0xb8, 0x9b, 0xdb, 0x0c, 0x1b, 0x33, 0x9f, 0x7a, 0x0c, 0x6f, 0xfd, 0x55, 0x86, 0xc6, 0x8c, + 0xe2, 0x24, 0x88, 0xae, 0xef, 0xd6, 0x13, 0xd8, 0xf0, 0x03, 0x3c, 0x22, 0x74, 0xc8, 0x3a, 0xe3, + 0xdd, 0xc4, 0xca, 0xb8, 0x6f, 0xd5, 0xc3, 0x25, 0x4d, 0xb1, 0x1b, 0x89, 0x62, 0x5c, 0xfb, 0xa8, + 0x8f, 0x1e, 0x43, 0x5d, 0x96, 0x65, 0x61, 0x37, 0xc4, 0xb2, 0x39, 0x0d, 0x53, 0xa0, 0x61, 0x26, + 0x68, 0x98, 0x07, 0x5e, 0x64, 0xd7, 0x84, 0xf2, 0x9b, 0x58, 0x38, 0x33, 0x20, 0xf5, 0x86, 0x03, + 0x9a, 0xee, 0x72, 0x79, 0xb6, 0xcb, 0x27, 0xb0, 0x9e, 0x4d, 0xe9, 0xc8, 0x01, 0x31, 0xad, 0xd2, + 0x5a, 0x2e, 0x32, 0xd1, 0x46, 0x36, 0x5b, 0x06, 0x19, 0x6a, 0x43, 0xdd, 0x0f, 0x28, 0x3d, 0xed, + 0x9c, 0x61, 0xe2, 0x9e, 0x85, 0xda, 0x0a, 0xdf, 0x88, 0x9e, 0x29, 0x26, 0xb8, 0x1f, 0xed, 0x99, + 0x5f, 0x70, 0x85, 0xb4, 0x5f, 0xe3, 0x59, 0x22, 0x84, 0xee, 0x02, 0x88, 0x22, 0xc4, 0x23, 0xa1, + 0xb6, 0xda, 0x52, 0x76, 0xea, 0x76, 0x95, 0x47, 0x38, 0xea, 0xf7, 0x92, 0x35, 0x44, 0x2d, 0xad, + 0xca, 0x05, 0xa2, 0x42, 0x9b, 0x87, 0xd0, 0x36, 0xac, 0x49, 0x49, 0xcc, 0x81, 0xc7, 0x86, 0x4c, + 0x03, 0xae, 0x7a, 0x47, 0xa8, 0x92, 0x28, 0xfa, 0x12, 0xde, 0x4d, 0x25, 0x89, 0xe7, 0x5a, 0x41, + 0xcf, 0x6b, 0x69, 0xa6, 0xf4, 0x3d, 0x06, 0xb7, 0x9e, 0x05, 0x17, 0x7d, 0x0e, 0xfa, 0x19, 0x65, + 0xe1, 0xd8, 0x8c, 0xc0, 0xa3, 0xc3, 0xbd, 0x68, 0xb7, 0xb8, 0xb1, 0xcd, 0x58, 0x91, 0xfa, 0xe2, + 0x54, 0x3c, 0x8d, 0x1f, 0xcf, 0x52, 0x6f, 0xc0, 0xfb, 0x79, 0x4c, 0xa7, 0xd0, 0xff, 0xa9, 0xe6, + 0x40, 0x7f, 0xe0, 0x9c, 0xa3, 0x0f, 0xe0, 0xd6, 0x24, 0xce, 0x02, 0xfc, 0xba, 0x93, 0x45, 0x78, + 0x1f, 0xf4, 0x09, 0x2c, 0x72, 0x0e, 0x80, 0xad, 0x65, 0x15, 0x13, 0x07, 0xe0, 0x06, 0x2f, 0x86, + 0xe9, 0xb3, 0xa3, 0x16, 0x3d, 0x3b, 0xd3, 0xc8, 0x95, 0xdf, 0x04, 0xb9, 0x3b, 0x20, 0x00, 0xeb, + 0x84, 0x41, 0xa4, 0x55, 0xf8, 0x44, 0x56, 0x79, 0x20, 0x7e, 0x5b, 0x4c, 0x03, 0xb7, 0x52, 0x08, + 0xb8, 0xd5, 0xc2, 0xc0, 0x55, 0x6f, 0x0e, 0x1c, 0x2c, 0x00, 0x5c, 0xed, 0x2d, 0x00, 0x77, 0xe0, + 0x9c, 0xa7, 0xc0, 0xfd, 0xa1, 0x80, 0x36, 0x23, 0x68, 0x53, 0xef, 0x94, 0x04, 0x83, 0x62, 0xd0, + 0xa5, 0xdd, 0xef, 0x3a, 0xe7, 0x9c, 0xb1, 0xa4, 0xfb, 0x31, 0xb6, 0xd3, 0xf3, 0x5d, 0x7e, 0x93, + 0xf9, 0x8e, 0x3b, 0xa5, 0x5e, 0xff, 0x4d, 0xd9, 0x82, 0xd6, 0xbc, 0xbd, 0xa4, 0x1b, 0x7e, 0x0e, + 0x6b, 0xc7, 0xcc, 0xfd, 0xd6, 0xef, 0xc7, 0x3d, 0xeb, 0x06, 0xdd, 0x01, 0xcb, 0xd4, 0x57, 0x26, + 0x26, 0xb1, 0x0f, 0x15, 0x9f, 0x2b, 0xe4, 0x37, 0xd7, 0x98, 0x77, 0x1e, 0x44, 0x1d, 0x69, 0x5d, + 0xe6, 0xcc, 0xba, 0xbb, 0x0d, 0x9b, 0x53, 0x2b, 0x27, 0xa6, 0x1e, 0xfe, 0xa7, 0xc2, 0xf2, 0x31, + 0x73, 0xd1, 0x0f, 0x80, 0x72, 0xae, 0x07, 0xbb, 0xf3, 0xd6, 0xcd, 0xfd, 0x80, 0xea, 0x9f, 0x2c, + 0x24, 0x4f, 0x3c, 0xa0, 0xef, 0xe1, 0xbd, 0xd9, 0x6f, 0xed, 0x47, 0x85, 0x6b, 0x9d, 0x04, 0x91, + 0xfe, 0xf1, 0x22, 0xea, 0xf9, 0x0b, 0xc7, 0xe0, 0x14, 0x5f, 0xf8, 0xc0, 0x39, 0x5f, 0x60, 0xe1, + 0x0c, 0xfb, 0xe8, 0x67, 0x05, 0xd6, 0xf3, 0xc1, 0x7f, 0x50, 0xb8, 0x9e, 0xcc, 0xd0, 0x9f, 0x2c, + 0x9a, 0x91, 0xba, 0x08, 0x60, 0x43, 0x30, 0x31, 0x96, 0x49, 0x2e, 0xb7, 0xaf, 0xa9, 0x99, 0xc5, + 0x48, 0xb7, 0x0a, 0x0a, 0x93, 0x35, 0xf5, 0xf2, 0x8f, 0xaf, 0x5f, 0xdc, 0x57, 0x0e, 0x9f, 0xbd, + 0xbc, 0x34, 0x94, 0x57, 0x97, 0x86, 0xf2, 0xef, 0xa5, 0xa1, 0xfc, 0x76, 0x65, 0x94, 0x5e, 0x5d, + 0x19, 0xa5, 0xbf, 0xaf, 0x8c, 0xd2, 0x77, 0xfb, 0x2e, 0x09, 0xcf, 0x86, 0x3d, 0xd3, 0xa1, 0x03, + 0x4b, 0x5e, 0x9a, 0x49, 0xcf, 0xd9, 0x75, 0xa9, 0x35, 0x7a, 0x6c, 0x0d, 0x68, 0x7f, 0x78, 0x81, + 0x99, 0xb8, 0xf4, 0x3e, 0x78, 0xb4, 0x9b, 0xb9, 0xf7, 0x86, 0x91, 0x8f, 0x59, 0xaf, 0xc2, 0x5f, + 0xf8, 0x8f, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x47, 0x10, 0x9f, 0xbf, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1263,10 +1262,10 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) i-- dAtA[i] = 0xa } @@ -1503,7 +1502,7 @@ func (m *MsgUpdateParams) Size() (n int) { } var l int _ = l - l = len(m.Authority) + l = len(m.Signer) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3031,7 +3030,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3059,7 +3058,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/modules/core/03-connection/types/version.go b/modules/core/03-connection/types/version.go index 6efcdb76569..393a36bbc30 100644 --- a/modules/core/03-connection/types/version.go +++ b/modules/core/03-connection/types/version.go @@ -5,7 +5,7 @@ import ( errorsmod "cosmossdk.io/errors" - collections "github.com/cosmos/ibc-go/v7/internal/collections" + "github.com/cosmos/ibc-go/v7/internal/collections" ) var ( @@ -100,12 +100,7 @@ func (version Version) VerifyProposedVersion(proposedVersion *Version) error { // VerifySupportedFeature takes in a version and feature string and returns // true if the feature is supported by the version and false otherwise. func VerifySupportedFeature(version *Version, feature string) bool { - for _, f := range version.GetFeatures() { - if f == feature { - return true - } - } - return false + return collections.Contains(feature, version.GetFeatures()) } // GetCompatibleVersions returns a descending ordered set of compatible IBC diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index 7f2b8b65fa8..5cb39ab6dab 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -125,7 +125,7 @@ func emitSendPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeSendPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, timeoutHeight.String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -153,7 +153,7 @@ func emitRecvPacketEvent(ctx sdk.Context, packet exported.PacketI, channel types ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeRecvPacket, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -180,7 +180,7 @@ func emitWriteAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, cha ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeWriteAck, - sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyData, string(packet.GetData())), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyDataHex, hex.EncodeToString(packet.GetData())), sdk.NewAttribute(types.AttributeKeyTimeoutHeight, packet.GetTimeoutHeight().String()), sdk.NewAttribute(types.AttributeKeyTimeoutTimestamp, fmt.Sprintf("%d", packet.GetTimeoutTimestamp())), @@ -189,7 +189,7 @@ func emitWriteAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, cha sdk.NewAttribute(types.AttributeKeySrcChannel, packet.GetSourceChannel()), sdk.NewAttribute(types.AttributeKeyDstPort, packet.GetDestPort()), sdk.NewAttribute(types.AttributeKeyDstChannel, packet.GetDestChannel()), - sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), // DEPRECATED + sdk.NewAttribute(types.AttributeKeyAck, string(acknowledgement)), //nolint:staticcheck // DEPRECATED sdk.NewAttribute(types.AttributeKeyAckHex, hex.EncodeToString(acknowledgement)), // we only support 1-hop packets now, and that is the most important hop for a relayer // (is it going to a chain I am connected to) diff --git a/modules/core/04-channel/keeper/keeper.go b/modules/core/04-channel/keeper/keeper.go index 9bfd53f5bcf..edab92bc071 100644 --- a/modules/core/04-channel/keeper/keeper.go +++ b/modules/core/04-channel/keeper/keeper.go @@ -54,7 +54,7 @@ func NewKeeper( } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"/"+types.SubModuleName) } @@ -242,7 +242,7 @@ func (k Keeper) HasPacketAcknowledgement(ctx sdk.Context, portID, channelID stri // IteratePacketSequence provides an iterator over all send, receive or ack sequences. // For each sequence, cb will be called. If the cb returns true, the iterator // will close and stop. -func (k Keeper) IteratePacketSequence(ctx sdk.Context, iterator db.Iterator, cb func(portID, channelID string, sequence uint64) bool) { +func (Keeper) IteratePacketSequence(ctx sdk.Context, iterator db.Iterator, cb func(portID, channelID string, sequence uint64) bool) { defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { portID, channelID, err := host.ParseChannelPath(string(iterator.Key())) @@ -481,7 +481,7 @@ func (k Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) } // common functionality for IteratePacketCommitment and IteratePacketAcknowledgement -func (k Keeper) iterateHashes(ctx sdk.Context, iterator db.Iterator, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { +func (Keeper) iterateHashes(ctx sdk.Context, iterator db.Iterator, cb func(portID, channelID string, sequence uint64, hash []byte) bool) { defer sdk.LogDeferred(ctx.Logger(), func() error { return iterator.Close() }) for ; iterator.Valid(); iterator.Next() { diff --git a/modules/core/04-channel/keeper/keeper_test.go b/modules/core/04-channel/keeper/keeper_test.go index 92afaba9135..835e9da87c0 100644 --- a/modules/core/04-channel/keeper/keeper_test.go +++ b/modules/core/04-channel/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" @@ -14,7 +14,7 @@ import ( // KeeperTestSuite is a testing suite to test keeper functions. type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -25,7 +25,7 @@ type KeeperTestSuite struct { // TestKeeperTestSuite runs all the tests within this package. func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } // SetupTest creates a coordinator with 2 test chains. diff --git a/modules/core/04-channel/keeper/packet.go b/modules/core/04-channel/keeper/packet.go index d448d45b822..a01fc36abef 100644 --- a/modules/core/04-channel/keeper/packet.go +++ b/modules/core/04-channel/keeper/packet.go @@ -34,10 +34,10 @@ func (k Keeper) SendPacket( return 0, errorsmod.Wrap(types.ErrChannelNotFound, sourceChannel) } - if channel.State != types.OPEN { + if !channel.IsOpen() { return 0, errorsmod.Wrapf( types.ErrInvalidChannelState, - "channel is not OPEN (got %s)", channel.State.String(), + "channel state is not OPEN (got %s)", channel.State.String(), ) } @@ -93,7 +93,7 @@ func (k Keeper) SendPacket( if packet.GetTimeoutTimestamp() != 0 && latestTimestamp >= packet.GetTimeoutTimestamp() { return 0, errorsmod.Wrapf( types.ErrPacketTimeout, - "receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)), time.Unix(0, int64(packet.GetTimeoutTimestamp())), + "receiving chain block timestamp >= packet timeout timestamp (%s >= %s)", time.Unix(0, int64(latestTimestamp)).UTC(), time.Unix(0, int64(packet.GetTimeoutTimestamp())).UTC(), ) } @@ -130,7 +130,7 @@ func (k Keeper) RecvPacket( return errorsmod.Wrap(types.ErrChannelNotFound, packet.GetDestChannel()) } - if channel.State != types.OPEN { + if !channel.IsOpen() { return errorsmod.Wrapf( types.ErrInvalidChannelState, "channel state is not OPEN (got %s)", channel.State.String(), @@ -190,7 +190,7 @@ func (k Keeper) RecvPacket( if packet.GetTimeoutTimestamp() != 0 && uint64(ctx.BlockTime().UnixNano()) >= packet.GetTimeoutTimestamp() { return errorsmod.Wrapf( types.ErrPacketTimeout, - "block timestamp >= packet timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(packet.GetTimeoutTimestamp())), + "block timestamp >= packet timeout timestamp (%s >= %s)", ctx.BlockTime(), time.Unix(0, int64(packet.GetTimeoutTimestamp())).UTC(), ) } @@ -296,7 +296,7 @@ func (k Keeper) WriteAcknowledgement( return errorsmod.Wrap(types.ErrChannelNotFound, packet.GetDestChannel()) } - if channel.State != types.OPEN { + if !channel.IsOpen() { return errorsmod.Wrapf( types.ErrInvalidChannelState, "channel state is not OPEN (got %s)", channel.State.String(), @@ -371,7 +371,7 @@ func (k Keeper) AcknowledgePacket( ) } - if channel.State != types.OPEN { + if !channel.IsOpen() { return errorsmod.Wrapf( types.ErrInvalidChannelState, "channel state is not OPEN (got %s)", channel.State.String(), diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 6077127d432..88858ca5daa 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -10,6 +10,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" "github.com/cosmos/ibc-go/v7/modules/core/exported" ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" @@ -261,225 +262,277 @@ func (suite *KeeperTestSuite) TestRecvPacket() { path *ibctesting.Path packet exported.PacketI channelCap *capabilitytypes.Capability - expError *errorsmod.Error ) - testCases := []testCase{ - {"success: ORDERED channel", func() { - path.SetChannelOrdered() - suite.coordinator.Setup(path) - - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, true}, - {"success UNORDERED channel", func() { - // setup uses an UNORDERED channel - suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, true}, - {"success with out of order packet: UNORDERED channel", func() { - // setup uses an UNORDERED channel - suite.coordinator.Setup(path) - // send 2 packets - _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - // attempts to receive packet 2 without receiving packet 1 - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, true}, - {"packet already relayed ORDERED channel (no-op)", func() { - expError = types.ErrNoOpMsg - - path.SetChannelOrdered() - suite.coordinator.Setup(path) - - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - err = path.EndpointB.RecvPacket(packet.(types.Packet)) - suite.Require().NoError(err) - }, false}, - {"packet already relayed UNORDERED channel (no-op)", func() { - expError = types.ErrNoOpMsg - - // setup uses an UNORDERED channel - suite.coordinator.Setup(path) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - err = path.EndpointB.RecvPacket(packet.(types.Packet)) - suite.Require().NoError(err) - }, false}, - {"out of order packet failure with ORDERED channel", func() { - expError = types.ErrPacketSequenceOutOfOrder - - path.SetChannelOrdered() - suite.coordinator.Setup(path) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + testCases := []struct { + name string + malleate func() + expError error + }{ + { + "success: ORDERED channel", + func() { + path.SetChannelOrdered() + suite.coordinator.Setup(path) - // send 2 packets - _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - // attempts to receive packet 2 without receiving packet 1 - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"channel not found", func() { - expError = types.ErrChannelNotFound + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + nil, + }, + { + "success UNORDERED channel", + func() { + // setup uses an UNORDERED channel + suite.coordinator.Setup(path) + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + nil, + }, + { + "success with out of order packet: UNORDERED channel", + func() { + // setup uses an UNORDERED channel + suite.coordinator.Setup(path) + // send 2 packets + _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + // attempts to receive packet 2 without receiving packet 1 + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + nil, + }, + { + "packet already relayed ORDERED channel (no-op)", + func() { + path.SetChannelOrdered() + suite.coordinator.Setup(path) - // use wrong channel naming - suite.coordinator.Setup(path) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"channel not open", func() { - expError = types.ErrInvalidChannelState + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - suite.coordinator.Setup(path) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + err = path.EndpointB.RecvPacket(packet.(types.Packet)) + suite.Require().NoError(err) + }, + types.ErrNoOpMsg, + }, + { + "packet already relayed UNORDERED channel (no-op)", + func() { + // setup uses an UNORDERED channel + suite.coordinator.Setup(path) + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - err := path.EndpointB.SetChannelState(types.CLOSED) - suite.Require().NoError(err) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"capability cannot authenticate ORDERED", func() { - expError = types.ErrInvalidChannelCapability + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + err = path.EndpointB.RecvPacket(packet.(types.Packet)) + suite.Require().NoError(err) + }, + types.ErrNoOpMsg, + }, + { + "out of order packet failure with ORDERED channel", + func() { + path.SetChannelOrdered() + suite.coordinator.Setup(path) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - path.SetChannelOrdered() - suite.coordinator.Setup(path) + // send 2 packets + _, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + // attempts to receive packet 2 without receiving packet 1 + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrPacketSequenceOutOfOrder, + }, + { + "channel not found", + func() { + // use wrong channel naming + suite.coordinator.Setup(path) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, ibctesting.InvalidID, ibctesting.InvalidID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrChannelNotFound, + }, + { + "channel not open", + func() { + suite.coordinator.Setup(path) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = capabilitytypes.NewCapability(3) - }, false}, - {"packet source port ≠ channel counterparty port", func() { - expError = types.ErrInvalidPacket - suite.coordinator.Setup(path) + err := path.EndpointB.SetChannelState(types.CLOSED) + suite.Require().NoError(err) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrInvalidChannelState, + }, + { + "capability cannot authenticate ORDERED", + func() { + path.SetChannelOrdered() + suite.coordinator.Setup(path) - // use wrong port for dest - packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"packet source channel ID ≠ channel counterparty channel ID", func() { - expError = types.ErrInvalidPacket - suite.coordinator.Setup(path) + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = capabilitytypes.NewCapability(3) + }, + types.ErrInvalidChannelCapability, + }, + { + "packet source port ≠ channel counterparty port", + func() { + suite.coordinator.Setup(path) - // use wrong port for dest - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"connection not found", func() { - expError = connectiontypes.ErrConnectionNotFound - suite.coordinator.Setup(path) + // use wrong port for dest + packet = types.NewPacket(ibctesting.MockPacketData, 1, ibctesting.InvalidID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrInvalidPacket, + }, + { + "packet source channel ID ≠ channel counterparty channel ID", + func() { + suite.coordinator.Setup(path) - // pass channel check - suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( - suite.chainB.GetContext(), - path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{connIDB}, path.EndpointB.ChannelConfig.Version), - ) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"connection not OPEN", func() { - expError = connectiontypes.ErrInvalidConnectionState - suite.coordinator.SetupClients(path) + // use wrong port for dest + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, ibctesting.InvalidID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrInvalidPacket, + }, + { + "connection not found", + func() { + suite.coordinator.Setup(path) - // connection on chainB is in INIT - err := path.EndpointB.ConnOpenInit() - suite.Require().NoError(err) + // pass channel check + suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( + suite.chainB.GetContext(), + path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, + types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{connIDB}, path.EndpointB.ChannelConfig.Version), + ) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + connectiontypes.ErrConnectionNotFound, + }, + { + "connection not OPEN", + func() { + suite.coordinator.SetupClients(path) - // pass channel check - suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( - suite.chainB.GetContext(), - path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{path.EndpointB.ConnectionID}, path.EndpointB.ChannelConfig.Version), - ) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"timeout height passed", func() { - expError = types.ErrPacketTimeout - suite.coordinator.Setup(path) + // connection on chainB is in INIT + err := path.EndpointB.ConnOpenInit() + suite.Require().NoError(err) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"timeout timestamp passed", func() { - expError = types.ErrPacketTimeout - suite.coordinator.Setup(path) + // pass channel check + suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( + suite.chainB.GetContext(), + path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, + types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{path.EndpointB.ConnectionID}, path.EndpointB.ChannelConfig.Version), + ) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + connectiontypes.ErrInvalidConnectionState, + }, + { + "timeout height passed", + func() { + suite.coordinator.Setup(path) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, disabledTimeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"next receive sequence is not found", func() { - expError = types.ErrSequenceReceiveNotFound - suite.coordinator.SetupConnections(path) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrPacketTimeout, + }, + { + "timeout timestamp passed", + func() { + suite.coordinator.Setup(path) - path.EndpointA.ChannelID = ibctesting.FirstChannelID - path.EndpointB.ChannelID = ibctesting.FirstChannelID + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, disabledTimeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrPacketTimeout, + }, + { + "next receive sequence is not found", + func() { + suite.coordinator.SetupConnections(path) - // manually creating channel prevents next recv sequence from being set - suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( - suite.chainB.GetContext(), - path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, - types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{path.EndpointB.ConnectionID}, path.EndpointB.ChannelConfig.Version), - ) + path.EndpointA.ChannelID = ibctesting.FirstChannelID + path.EndpointB.ChannelID = ibctesting.FirstChannelID - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + // manually creating channel prevents next recv sequence from being set + suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetChannel( + suite.chainB.GetContext(), + path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, + types.NewChannel(types.OPEN, types.ORDERED, types.NewCounterparty(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID), []string{path.EndpointB.ConnectionID}, path.EndpointB.ChannelConfig.Version), + ) - // manually set packet commitment - suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, packet.GetSequence(), types.CommitPacket(suite.chainA.App.AppCodec(), packet)) - suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + // manually set packet commitment + suite.chainA.App.GetIBCKeeper().ChannelKeeper.SetPacketCommitment(suite.chainA.GetContext(), path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, packet.GetSequence(), types.CommitPacket(suite.chainA.App.AppCodec(), packet)) + suite.chainB.CreateChannelCapability(suite.chainB.GetSimApp().ScopedIBCMockKeeper, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - err := path.EndpointA.UpdateClient() - suite.Require().NoError(err) - err = path.EndpointB.UpdateClient() - suite.Require().NoError(err) - }, false}, - {"receipt already stored", func() { - expError = types.ErrNoOpMsg - suite.coordinator.Setup(path) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) - suite.Require().NoError(err) - suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetPacketReceipt(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sequence) - packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, - {"validation failed", func() { - // skip error code check, downstream error code is used from light-client implementations + err := path.EndpointA.UpdateClient() + suite.Require().NoError(err) + err = path.EndpointB.UpdateClient() + suite.Require().NoError(err) + }, + types.ErrSequenceReceiveNotFound, + }, + { + "receipt already stored", + func() { + suite.coordinator.Setup(path) - // packet commitment not set resulting in invalid proof - suite.coordinator.Setup(path) - packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) - channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) - }, false}, + sequence, err := path.EndpointA.SendPacket(defaultTimeoutHeight, disabledTimeoutTimestamp, ibctesting.MockPacketData) + suite.Require().NoError(err) + suite.chainB.App.GetIBCKeeper().ChannelKeeper.SetPacketReceipt(suite.chainB.GetContext(), path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, sequence) + packet = types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + types.ErrNoOpMsg, + }, + { + "validation failed", + func() { + // packet commitment not set resulting in invalid proof + suite.coordinator.Setup(path) + packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, defaultTimeoutHeight, disabledTimeoutTimestamp) + channelCap = suite.chainB.GetChannelCapability(path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID) + }, + commitmenttypes.ErrInvalidProof, + }, } - for i, tc := range testCases { + for _, tc := range testCases { tc := tc - suite.Run(fmt.Sprintf("Case %s, %d/%d tests", tc.msg, i, len(testCases)), func() { + suite.Run(tc.name, func() { suite.SetupTest() // reset - expError = nil // must explicitly set for failed cases path = ibctesting.NewPath(suite.chainA, suite.chainB) tc.malleate() @@ -490,7 +543,8 @@ func (suite *KeeperTestSuite) TestRecvPacket() { err := suite.chainB.App.GetIBCKeeper().ChannelKeeper.RecvPacket(suite.chainB.GetContext(), channelCap, packet, proof, proofHeight) - if tc.expPass { + expPass := tc.expError == nil + if expPass { suite.Require().NoError(err) channelB, _ := suite.chainB.App.GetIBCKeeper().ChannelKeeper.GetChannel(suite.chainB.GetContext(), packet.GetDestPort(), packet.GetDestChannel()) @@ -508,11 +562,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { } } else { suite.Require().Error(err) - - // only check if expError is set, since not all error codes can be known - if expError != nil { - suite.Require().True(errors.Is(err, expError)) - } + suite.Require().ErrorIs(err, tc.expError) } }) } diff --git a/modules/core/04-channel/keeper/timeout.go b/modules/core/04-channel/keeper/timeout.go index a596c3d7558..88e940d8381 100644 --- a/modules/core/04-channel/keeper/timeout.go +++ b/modules/core/04-channel/keeper/timeout.go @@ -84,7 +84,7 @@ func (k Keeper) TimeoutPacket( return types.ErrNoOpMsg } - if channel.State != types.OPEN { + if !channel.IsOpen() { return errorsmod.Wrapf( types.ErrInvalidChannelState, "channel state is not OPEN (got %s)", channel.State.String(), diff --git a/modules/core/04-channel/types/msgs_test.go b/modules/core/04-channel/types/msgs_test.go index ae437a476b6..f2f5d4d82ed 100644 --- a/modules/core/04-channel/types/msgs_test.go +++ b/modules/core/04-channel/types/msgs_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/rootmulti" @@ -69,7 +69,7 @@ var ( ) type TypesTestSuite struct { - suite.Suite + testifysuite.Suite proof []byte } @@ -104,7 +104,7 @@ func (suite *TypesTestSuite) SetupTest() { } func TestTypesTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) + testifysuite.Run(t, new(TypesTestSuite)) } func (suite *TypesTestSuite) TestMsgChannelOpenInitValidateBasic() { diff --git a/modules/core/05-port/keeper/keeper.go b/modules/core/05-port/keeper/keeper.go index f83c42af64b..11a20255192 100644 --- a/modules/core/05-port/keeper/keeper.go +++ b/modules/core/05-port/keeper/keeper.go @@ -28,7 +28,7 @@ func NewKeeper(sck exported.ScopedKeeper) Keeper { } // Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+exported.ModuleName+"/"+types.SubModuleName) } diff --git a/modules/core/05-port/keeper/keeper_test.go b/modules/core/05-port/keeper/keeper_test.go index da61c501428..55e428b4e11 100644 --- a/modules/core/05-port/keeper/keeper_test.go +++ b/modules/core/05-port/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" @@ -20,7 +20,7 @@ var ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite ctx sdk.Context keeper *keeper.Keeper @@ -35,7 +35,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } func (suite *KeeperTestSuite) TestBind() { diff --git a/modules/core/05-port/types/module.go b/modules/core/05-port/types/module.go index 33465bf6f98..a8306f73064 100644 --- a/modules/core/05-port/types/module.go +++ b/modules/core/05-port/types/module.go @@ -138,3 +138,10 @@ type Middleware interface { IBCModule ICS4Wrapper } + +// PacketDataUnmarshaler defines an optional interface which allows a middleware to +// request the packet data to be unmarshaled by the base application. +type PacketDataUnmarshaler interface { + // UnmarshalPacketData unmarshals the packet data into a concrete type + UnmarshalPacketData([]byte) (interface{}, error) +} diff --git a/modules/core/23-commitment/types/commitment_test.go b/modules/core/23-commitment/types/commitment_test.go index 9d204e108bf..c08a94ab1bb 100644 --- a/modules/core/23-commitment/types/commitment_test.go +++ b/modules/core/23-commitment/types/commitment_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/rootmulti" @@ -14,7 +14,7 @@ import ( ) type MerkleTestSuite struct { - suite.Suite + testifysuite.Suite store *rootmulti.Store storeKey *storetypes.KVStoreKey @@ -36,5 +36,5 @@ func (suite *MerkleTestSuite) SetupTest() { } func TestMerkleTestSuite(t *testing.T) { - suite.Run(t, new(MerkleTestSuite)) + testifysuite.Run(t, new(MerkleTestSuite)) } diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 79a2c113fc6..4367a27ccfe 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -81,6 +81,12 @@ func NewMerklePath(keyPath ...string) MerklePath { // This represents the path in the same way the tendermint KeyPath will // represent a key path. The backslashes partition the key path into // the respective stores they belong to. +// +// Deprecated: This function makes assumptions about the way a merkle path +// in a multistore should be represented as a string that are not standardized. +// The decision on how to represent the merkle path as a string will be deferred +// to upstream users of the type. +// This function will be removed in a next release. func (mp MerklePath) String() string { pathStr := "" for _, k := range mp.KeyPath { @@ -93,6 +99,12 @@ func (mp MerklePath) String() string { // This function will unescape any backslash within a particular store key. // This makes the keypath more human-readable while removing information // about the exact partitions in the key path. +// +// Deprecated: This function makes assumptions about the way a merkle path +// in a multistore should be represented as a string that are not standardized. +// The decision on how to represent the merkle path as a string will be deferred +// to upstream users of the type. +// This function will be removed in a next release. func (mp MerklePath) Pretty() string { path, err := url.PathUnescape(mp.String()) if err != nil { @@ -107,11 +119,7 @@ func (mp MerklePath) GetKey(i uint64) ([]byte, error) { if i >= uint64(len(mp.KeyPath)) { return nil, fmt.Errorf("index out of range. %d (index) >= %d (len)", i, len(mp.KeyPath)) } - key, err := url.PathUnescape(mp.KeyPath[i]) - if err != nil { - return nil, err - } - return []byte(key), nil + return []byte(mp.KeyPath[i]), nil } // Empty returns true if the path is empty @@ -205,13 +213,13 @@ func (proof MerkleProof) VerifyNonMembership(specs []*ics23.ProofSpec, root expo // BatchVerifyMembership verifies a group of key value pairs against the given root // NOTE: Currently left unimplemented as it is unused -func (proof MerkleProof) BatchVerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items map[string][]byte) error { +func (MerkleProof) BatchVerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items map[string][]byte) error { return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } // BatchVerifyNonMembership verifies absence of a group of keys against the given root // NOTE: Currently left unimplemented as it is unused -func (proof MerkleProof) BatchVerifyNonMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items [][]byte) error { +func (MerkleProof) BatchVerifyNonMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items [][]byte) error { return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } diff --git a/modules/core/24-host/parse.go b/modules/core/24-host/parse.go index 81074bbfcca..f838cc07b9d 100644 --- a/modules/core/24-host/parse.go +++ b/modules/core/24-host/parse.go @@ -63,7 +63,9 @@ func parseClientStatePath(path string) (string, error) { return "", errorsmod.Wrap(ErrInvalidPath, "clientID is empty") } - return split[1], nil + clientID := split[1] + + return clientID, nil } // ParseConnectionPath returns the connection ID from a full path. It returns @@ -74,7 +76,9 @@ func ParseConnectionPath(path string) (string, error) { return "", errorsmod.Wrapf(ErrInvalidPath, "cannot parse connection path %s", path) } - return split[1], nil + connectionID := split[1] + + return connectionID, nil } // ParseChannelPath returns the port and channel ID from a full path. It returns @@ -89,7 +93,10 @@ func ParseChannelPath(path string) (string, string, error) { return "", "", errorsmod.Wrapf(ErrInvalidPath, "cannot parse channel path %s", path) } - return split[2], split[4], nil + portID := split[2] + channelID := split[4] + + return portID, channelID, nil } // MustParseConnectionPath returns the connection ID from a full path. Panics diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index 1ec224abe58..649390d30f5 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,7 +17,7 @@ import ( ) type AnteTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -42,7 +42,7 @@ func (suite *AnteTestSuite) SetupTest() { // TestAnteTestSuite runs all the tests within this package. func TestAnteTestSuite(t *testing.T) { - suite.Run(t, new(AnteTestSuite)) + testifysuite.Run(t, new(AnteTestSuite)) } // createRecvPacketMessage creates a RecvPacket message for a packet sent from chain A to chain B. @@ -337,7 +337,7 @@ func (suite *AnteTestSuite) TestAnteDecorator() { } // append non packet and update message to msgs to ensure multimsg tx should pass - msgs = append(msgs, &clienttypes.MsgSubmitMisbehaviour{}) + msgs = append(msgs, &clienttypes.MsgSubmitMisbehaviour{}) //nolint:staticcheck // we're using the deprecated message for testing return msgs }, true, diff --git a/modules/core/exported/channel.go b/modules/core/exported/channel.go index ac52a3f34ba..a6ec511880b 100644 --- a/modules/core/exported/channel.go +++ b/modules/core/exported/channel.go @@ -17,36 +17,3 @@ type CounterpartyChannelI interface { GetChannelID() string ValidateBasic() error } - -// PacketI defines the standard interface for IBC packets -type PacketI interface { - GetSequence() uint64 - GetTimeoutHeight() Height - GetTimeoutTimestamp() uint64 - GetSourcePort() string - GetSourceChannel() string - GetDestPort() string - GetDestChannel() string - GetData() []byte - ValidateBasic() error -} - -// Acknowledgement defines the interface used to return acknowledgements in the OnRecvPacket callback. -// The Acknowledgement interface is used by core IBC to ensure partial state changes are not committed -// when packet receives have not properly succeeded (typically resulting in an error acknowledgement being returned). -// The interface also allows core IBC to obtain the acknowledgement bytes whose encoding is determined by each IBC application or middleware. -// Each custom acknowledgement type must implement this interface. -type Acknowledgement interface { - // Success determines if the IBC application state should be persisted when handling `RecvPacket`. - // During `OnRecvPacket` IBC application callback execution, all state changes are held in a cache store and committed if: - // - the acknowledgement.Success() returns true - // - a nil acknowledgement is returned (asynchronous acknowledgements) - // - // Note 1: IBC application callback events are always persisted so long as `RecvPacket` succeeds without error. - // - // Note 2: The return value should account for the success of the underlying IBC application or middleware. Thus the `acknowledgement.Success` is representative of the entire IBC stack's success when receiving a packet. The individual success of each acknowledgement associated with an IBC application or middleware must be determined by obtaining the actual acknowledgement type after decoding the acknowledgement bytes. - // - // See https://github.com/cosmos/ibc-go/blob/v7.0.0/docs/ibc/apps.md for further explanations. - Success() bool - Acknowledgement() []byte -} diff --git a/modules/core/exported/commitment.go b/modules/core/exported/commitment.go index 904910e44e9..9a8b47f0151 100644 --- a/modules/core/exported/commitment.go +++ b/modules/core/exported/commitment.go @@ -28,7 +28,7 @@ type Prefix interface { // Path implements spec:CommitmentPath. // A path is the additional information provided to the verification function. type Path interface { - String() string + String() string // deprecated Empty() bool } diff --git a/modules/core/exported/packet.go b/modules/core/exported/packet.go new file mode 100644 index 00000000000..f8e6a09ebd6 --- /dev/null +++ b/modules/core/exported/packet.go @@ -0,0 +1,52 @@ +package exported + +// PacketI defines the standard interface for IBC packets +type PacketI interface { + GetSequence() uint64 + GetTimeoutHeight() Height + GetTimeoutTimestamp() uint64 + GetSourcePort() string + GetSourceChannel() string + GetDestPort() string + GetDestChannel() string + GetData() []byte + ValidateBasic() error +} + +// Acknowledgement defines the interface used to return acknowledgements in the OnRecvPacket callback. +// The Acknowledgement interface is used by core IBC to ensure partial state changes are not committed +// when packet receives have not properly succeeded (typically resulting in an error acknowledgement being returned). +// The interface also allows core IBC to obtain the acknowledgement bytes whose encoding is determined by each IBC application or middleware. +// Each custom acknowledgement type must implement this interface. +type Acknowledgement interface { + // Success determines if the IBC application state should be persisted when handling `RecvPacket`. + // During `OnRecvPacket` IBC application callback execution, all state changes are held in a cache store and committed if: + // - the acknowledgement.Success() returns true + // - a nil acknowledgement is returned (asynchronous acknowledgements) + // + // Note 1: IBC application callback events are always persisted so long as `RecvPacket` succeeds without error. + // + // Note 2: The return value should account for the success of the underlying IBC application or middleware. Thus the `acknowledgement.Success` is representative of the entire IBC stack's success when receiving a packet. The individual success of each acknowledgement associated with an IBC application or middleware must be determined by obtaining the actual acknowledgement type after decoding the acknowledgement bytes. + // + // See https://github.com/cosmos/ibc-go/blob/v7.0.0/docs/ibc/apps.md for further explanations. + Success() bool + Acknowledgement() []byte +} + +// PacketData defines an optional interface which an application's packet data structure may implement. +type PacketData interface { + // GetPacketSender returns the sender address of the packet data. + // If the packet sender is unknown or undefined, an empty string should be returned. + GetPacketSender(sourcePortID string) string +} + +// PacketDataProvider defines an optional interfaces for retrieving custom packet data stored on behalf of another application. +// An existing problem in the IBC middleware design is the inability for a middleware to define its own packet data type and insert packet sender provided information. +// A short term solution was introduced into several application's packet data to utilize a memo field to carry this information on behalf of another application. +// This interfaces standardizes that behaviour. Upon realization of the ability for middleware's to define their own packet data types, this interface will be deprecated and removed with time. +type PacketDataProvider interface { + // GetCustomPacketData returns the packet data held on behalf of another application. + // The name the information is stored under should be provided as the key. + // If no custom packet data exists for the key, nil should be returned. + GetCustomPacketData(key string) interface{} +} diff --git a/modules/core/genesis_test.go b/modules/core/genesis_test.go index fb1472cc507..8e20fb2cf15 100644 --- a/modules/core/genesis_test.go +++ b/modules/core/genesis_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" @@ -38,7 +38,7 @@ const ( var clientHeight = clienttypes.NewHeight(1, 10) type IBCTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -55,7 +55,7 @@ func (suite *IBCTestSuite) SetupTest() { } func TestIBCTestSuite(t *testing.T) { - suite.Run(t, new(IBCTestSuite)) + testifysuite.Run(t, new(IBCTestSuite)) } func (suite *IBCTestSuite) TestValidateGenesis() { diff --git a/modules/core/keeper/keeper_test.go b/modules/core/keeper/keeper_test.go index 19fb8132a07..0cf893873dc 100644 --- a/modules/core/keeper/keeper_test.go +++ b/modules/core/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" @@ -19,7 +19,7 @@ import ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -40,7 +40,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } // MockStakingKeeper implements clienttypes.StakingKeeper used in ibckeeper.NewKeeper @@ -48,11 +48,11 @@ type MockStakingKeeper struct { mockField string } -func (d MockStakingKeeper) GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) { +func (MockStakingKeeper) GetHistoricalInfo(_ sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) { return stakingtypes.HistoricalInfo{}, true } -func (d MockStakingKeeper) UnbondingTime(ctx sdk.Context) time.Duration { +func (MockStakingKeeper) UnbondingTime(_ sdk.Context) time.Duration { return 0 } diff --git a/modules/core/keeper/msg_server.go b/modules/core/keeper/msg_server.go index 4916403edb8..a61f9c83199 100644 --- a/modules/core/keeper/msg_server.go +++ b/modules/core/keeper/msg_server.go @@ -85,7 +85,7 @@ func (k Keeper) UpgradeClient(goCtx context.Context, msg *clienttypes.MsgUpgrade // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. // Warning: DEPRECATED // This handler is redudant as `MsgUpdateClient` is now capable of handling both a Header and a Misbehaviour -func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSubmitMisbehaviour) (*clienttypes.MsgSubmitMisbehaviourResponse, error) { +func (k Keeper) SubmitMisbehaviour(goCtx context.Context, msg *clienttypes.MsgSubmitMisbehaviour) (*clienttypes.MsgSubmitMisbehaviourResponse, error) { //nolint:staticcheck // for now, we're using msgsubmitmisbehaviour. ctx := sdk.UnwrapSDKContext(goCtx) misbehaviour, err := clienttypes.UnpackClientMessage(msg.Misbehaviour) @@ -523,6 +523,7 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c writeFn() case channeltypes.ErrNoOpMsg: // no-ops do not need event emission as they will be ignored + ctx.Logger().Debug("no-op on redundant relay", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel) return &channeltypes.MsgTimeoutResponse{Result: channeltypes.NOOP}, nil default: ctx.Logger().Error("timeout failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "timeout packet verification failed")) @@ -594,6 +595,7 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo writeFn() case channeltypes.ErrNoOpMsg: // no-ops do not need event emission as they will be ignored + ctx.Logger().Debug("no-op on redundant relay", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel) return &channeltypes.MsgTimeoutOnCloseResponse{Result: channeltypes.NOOP}, nil default: ctx.Logger().Error("timeout on close failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "timeout on close packet verification failed")) @@ -668,6 +670,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn writeFn() case channeltypes.ErrNoOpMsg: // no-ops do not need event emission as they will be ignored + ctx.Logger().Debug("no-op on redundant relay", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel) return &channeltypes.MsgAcknowledgementResponse{Result: channeltypes.NOOP}, nil default: ctx.Logger().Error("acknowledgement failed", "port-id", msg.Packet.SourcePort, "channel-id", msg.Packet.SourceChannel, "error", errorsmod.Wrap(err, "acknowledge packet verification failed")) @@ -699,8 +702,8 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn // UpdateClientParams defines a rpc handler method for MsgUpdateParams. func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUpdateParams) (*clienttypes.MsgUpdateParamsResponse, error) { - if k.GetAuthority() != msg.Authority { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } ctx := sdk.UnwrapSDKContext(goCtx) @@ -711,8 +714,8 @@ func (k Keeper) UpdateClientParams(goCtx context.Context, msg *clienttypes.MsgUp // UpdateConnectionParams defines a rpc handler method for MsgUpdateParams for the 03-connection submodule. func (k Keeper) UpdateConnectionParams(goCtx context.Context, msg *connectiontypes.MsgUpdateParams) (*connectiontypes.MsgUpdateParamsResponse, error) { - if k.GetAuthority() != msg.Authority { - return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) } ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index fdcc5f172e4..d1579e1be77 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -777,34 +777,34 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // TestUpdateClientParams tests the UpdateClientParams rpc handler func (suite *KeeperTestSuite) TestUpdateClientParams() { - validAuthority := suite.chainA.App.GetIBCKeeper().GetAuthority() + signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string msg *clienttypes.MsgUpdateParams expPass bool }{ { - "success: valid authority and default params", - clienttypes.NewMsgUpdateParams(validAuthority, clienttypes.DefaultParams()), + "success: valid signer and default params", + clienttypes.NewMsgUpdateParams(signer, clienttypes.DefaultParams()), true, }, { - "failure: malformed authority address", + "failure: malformed signer address", clienttypes.NewMsgUpdateParams(ibctesting.InvalidID, clienttypes.DefaultParams()), false, }, { - "failure: empty authority address", + "failure: empty signer address", clienttypes.NewMsgUpdateParams("", clienttypes.DefaultParams()), false, }, { - "failure: whitespace authority address", + "failure: whitespace signer address", clienttypes.NewMsgUpdateParams(" ", clienttypes.DefaultParams()), false, }, { - "failure: unauthorized authority address", + "failure: unauthorized signer address", clienttypes.NewMsgUpdateParams(ibctesting.TestAccAddress, clienttypes.DefaultParams()), false, }, @@ -828,34 +828,34 @@ func (suite *KeeperTestSuite) TestUpdateClientParams() { // TestUpdateConnectionParams tests the UpdateConnectionParams rpc handler func (suite *KeeperTestSuite) TestUpdateConnectionParams() { - validAuthority := suite.chainA.App.GetIBCKeeper().GetAuthority() + signer := suite.chainA.App.GetIBCKeeper().GetAuthority() testCases := []struct { name string msg *connectiontypes.MsgUpdateParams expPass bool }{ { - "success: valid authority and default params", - connectiontypes.NewMsgUpdateParams(validAuthority, connectiontypes.DefaultParams()), + "success: valid signer and default params", + connectiontypes.NewMsgUpdateParams(signer, connectiontypes.DefaultParams()), true, }, { - "failure: malformed authority address", + "failure: malformed signer address", connectiontypes.NewMsgUpdateParams(ibctesting.InvalidID, connectiontypes.DefaultParams()), false, }, { - "failure: empty authority address", + "failure: empty signer address", connectiontypes.NewMsgUpdateParams("", connectiontypes.DefaultParams()), false, }, { - "failure: whitespace authority address", + "failure: whitespace signer address", connectiontypes.NewMsgUpdateParams(" ", connectiontypes.DefaultParams()), false, }, { - "failure: unauthorized authority address", + "failure: unauthorized signer address", connectiontypes.NewMsgUpdateParams(ibctesting.TestAccAddress, connectiontypes.DefaultParams()), false, }, diff --git a/modules/core/migrations/v7/genesis_test.go b/modules/core/migrations/v7/genesis_test.go index bdbacb066b8..77111b2b705 100644 --- a/modules/core/migrations/v7/genesis_test.go +++ b/modules/core/migrations/v7/genesis_test.go @@ -3,7 +3,7 @@ package v7_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -20,7 +20,7 @@ import ( ) type MigrationsV7TestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -31,7 +31,7 @@ type MigrationsV7TestSuite struct { // TestMigrationsV7TestSuite runs all the tests within this package. func TestMigrationsV7TestSuite(t *testing.T) { - suite.Run(t, new(MigrationsV7TestSuite)) + testifysuite.Run(t, new(MigrationsV7TestSuite)) } // SetupTest creates a coordinator with 2 test chains. diff --git a/modules/core/module.go b/modules/core/module.go index 501e5459f5b..5369c955bc1 100644 --- a/modules/core/module.go +++ b/modules/core/module.go @@ -113,7 +113,7 @@ func (AppModule) Name() string { } // RegisterInvariants registers the ibc module invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { +func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // TODO: } @@ -179,7 +179,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { // EndBlock returns the end blocker for the ibc module. It returns no validator // updates. -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } @@ -196,6 +196,6 @@ func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the ibc module operations with their respective weights. -func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } diff --git a/modules/light-clients/06-solomachine/client_state.go b/modules/light-clients/06-solomachine/client_state.go index 301cdfecc1b..06866cea3d0 100644 --- a/modules/light-clients/06-solomachine/client_state.go +++ b/modules/light-clients/06-solomachine/client_state.go @@ -30,7 +30,7 @@ func NewClientState(latestSequence uint64, consensusState *ConsensusState) *Clie } // ClientType is Solo Machine. -func (cs ClientState) ClientType() string { +func (ClientState) ClientType() string { return exported.Solomachine } @@ -75,7 +75,7 @@ func (cs ClientState) Validate() error { } // ZeroCustomFields is not implemented for solo machine -func (cs ClientState) ZeroCustomFields() exported.ClientState { +func (ClientState) ZeroCustomFields() exported.ClientState { panic("ZeroCustomFields is not implemented as the solo machine implementation does not support upgrades.") } @@ -93,12 +93,12 @@ 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(_ storetypes.KVStore) []exported.GenesisMetadata { +func (ClientState) ExportMetadata(_ storetypes.KVStore) []exported.GenesisMetadata { return nil } // VerifyUpgradeAndUpdateState returns an error since solomachine client does not support upgrades -func (cs ClientState) VerifyUpgradeAndUpdateState( +func (ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, _ exported.ClientState, _ exported.ConsensusState, _, _ []byte, ) error { @@ -128,15 +128,21 @@ func (cs *ClientState) VerifyMembership( return errorsmod.Wrapf(ibcerrors.ErrInvalidType, "expected %T, got %T", commitmenttypes.MerklePath{}, path) } - if merklePath.Empty() { - return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "path is empty") + if len(merklePath.GetKeyPath()) != 2 { + return errorsmod.Wrapf(host.ErrInvalidPath, "path must be of length 2: %s", merklePath.GetKeyPath()) + } + + // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + key, err := merklePath.GetKey(1) + if err != nil { + return errorsmod.Wrapf(host.ErrInvalidPath, "key not found at index 1: %v", err) } signBytes := &SignBytes{ Sequence: sequence, Timestamp: timestamp, Diversifier: cs.ConsensusState.Diversifier, - Path: []byte(merklePath.String()), + Path: key, Data: value, } @@ -178,11 +184,21 @@ func (cs *ClientState) VerifyNonMembership( return errorsmod.Wrapf(ibcerrors.ErrInvalidType, "expected %T, got %T", commitmenttypes.MerklePath{}, path) } + if len(merklePath.GetKeyPath()) != 2 { + return errorsmod.Wrapf(host.ErrInvalidPath, "path must be of length 2: %s", merklePath.GetKeyPath()) + } + + // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + key, err := merklePath.GetKey(1) + if err != nil { + return errorsmod.Wrapf(host.ErrInvalidPath, "key not found at index 1: %v", err) + } + signBytes := &SignBytes{ Sequence: sequence, Timestamp: timestamp, Diversifier: cs.ConsensusState.Diversifier, - Path: []byte(merklePath.String()), + Path: key, Data: nil, } diff --git a/modules/light-clients/06-solomachine/client_state_test.go b/modules/light-clients/06-solomachine/client_state_test.go index 33888252e4e..418c8c6f9c8 100644 --- a/modules/light-clients/06-solomachine/client_state_test.go +++ b/modules/light-clients/06-solomachine/client_state_test.go @@ -176,11 +176,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { suite.Require().NoError(err) path = suite.solomachine.GetClientStatePath(counterpartyClientIdentifier) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: clientStateBz, } @@ -208,11 +212,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { suite.Require().NoError(err) path = sm.GetConsensusStatePath(counterpartyClientIdentifier, clienttypes.NewHeight(0, 1)) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: consensusStateBz, } @@ -243,11 +251,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { suite.Require().NoError(err) path = sm.GetConnectionStatePath(ibctesting.FirstConnectionID) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: connectionEndBz, } @@ -279,11 +291,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { suite.Require().NoError(err) path = sm.GetChannelStatePath(ibctesting.MockPort, ibctesting.FirstChannelID) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: channelEndBz, } @@ -312,11 +328,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { suite.Require().True(found) path = sm.GetNextSequenceRecvPath(ibctesting.MockPort, ibctesting.FirstChannelID) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: sdk.Uint64ToBigEndian(nextSeqRecv), } @@ -351,11 +371,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { commitmentBz := channeltypes.CommitPacket(suite.chainA.Codec, packet) path = sm.GetPacketCommitmentPath(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: commitmentBz, } @@ -378,11 +402,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { "success: packet acknowledgement verification", func() { path = sm.GetPacketAcknowledgementPath(ibctesting.MockPort, ibctesting.FirstChannelID, 1) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: ibctesting.MockAcknowledgement, } @@ -405,11 +433,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { "success: packet receipt verification", func() { path = sm.GetPacketReceiptPath(ibctesting.MockPort, ibctesting.FirstChannelID, 1) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.Sequence, Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: []byte{byte(1)}, // packet receipt is stored as a single byte } @@ -429,7 +461,7 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { true, }, { - "invalid path type", + "invalid path type - empty", func() { path = ibcmock.KeyPath{} }, @@ -521,11 +553,15 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { clientState = sm.ClientState() path = commitmenttypes.NewMerklePath("ibc", "solomachine") + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: []byte("solomachine"), } @@ -570,11 +606,13 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() { func (suite *SoloMachineTestSuite) TestSignBytesMarshalling() { sm := suite.solomachine merklePath := commitmenttypes.NewMerklePath("ibc", "solomachine") + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytesNilData := solomachine.SignBytes{ Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(merklePath.String()), + Path: key, Data: nil, } @@ -582,7 +620,7 @@ func (suite *SoloMachineTestSuite) TestSignBytesMarshalling() { Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(merklePath.String()), + Path: key, Data: []byte{}, } @@ -621,11 +659,15 @@ func (suite *SoloMachineTestSuite) TestVerifyNonMembership() { "success: packet receipt absence verification", func() { path = suite.solomachine.GetPacketReceiptPath(ibctesting.MockPort, ibctesting.FirstChannelID, 1) + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: nil, } @@ -740,11 +782,15 @@ func (suite *SoloMachineTestSuite) TestVerifyNonMembership() { clientState = sm.ClientState() path = commitmenttypes.NewMerklePath("ibc", "solomachine") + merklePath, ok := path.(commitmenttypes.MerklePath) + suite.Require().True(ok) + key, err := merklePath.GetKey(1) // in a multistore context: index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + suite.Require().NoError(err) signBytes = solomachine.SignBytes{ Sequence: sm.GetHeight().GetRevisionHeight(), Timestamp: sm.Time, Diversifier: sm.Diversifier, - Path: []byte(path.String()), + Path: key, Data: nil, } diff --git a/modules/light-clients/06-solomachine/misbehaviour.go b/modules/light-clients/06-solomachine/misbehaviour.go index fcfb8fdb277..becc6ca1e2f 100644 --- a/modules/light-clients/06-solomachine/misbehaviour.go +++ b/modules/light-clients/06-solomachine/misbehaviour.go @@ -12,12 +12,12 @@ import ( var _ exported.ClientMessage = (*Misbehaviour)(nil) // ClientType is a Solo Machine light client. -func (misbehaviour Misbehaviour) ClientType() string { +func (Misbehaviour) ClientType() string { return exported.Solomachine } // Type implements Misbehaviour interface. -func (misbehaviour Misbehaviour) Type() string { +func (Misbehaviour) Type() string { return exported.TypeClientMisbehaviour } diff --git a/modules/light-clients/06-solomachine/misbehaviour_handle.go b/modules/light-clients/06-solomachine/misbehaviour_handle.go index 4fe350ca973..77175adf729 100644 --- a/modules/light-clients/06-solomachine/misbehaviour_handle.go +++ b/modules/light-clients/06-solomachine/misbehaviour_handle.go @@ -12,7 +12,7 @@ import ( ) // CheckForMisbehaviour returns true for type Misbehaviour (passed VerifyClientMessage check), otherwise returns false -func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, clientMsg exported.ClientMessage) bool { +func (ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, clientMsg exported.ClientMessage) bool { if _, ok := clientMsg.(*Misbehaviour); ok { return true } @@ -20,7 +20,7 @@ func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ return false } -func (cs ClientState) verifyMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, misbehaviour *Misbehaviour) error { +func (cs ClientState) verifyMisbehaviour(cdc codec.BinaryCodec, 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/solomachine_test.go b/modules/light-clients/06-solomachine/solomachine_test.go index 3084c820049..72fbd98f0d9 100644 --- a/modules/light-clients/06-solomachine/solomachine_test.go +++ b/modules/light-clients/06-solomachine/solomachine_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -26,7 +26,7 @@ import ( var channelIDSolomachine = "channel-on-solomachine" // channelID generated on solo machine side type SoloMachineTestSuite struct { - suite.Suite + testifysuite.Suite solomachine *ibctesting.Solomachine // singlesig public key solomachineMulti *ibctesting.Solomachine // multisig public key @@ -51,7 +51,7 @@ func (suite *SoloMachineTestSuite) SetupTest() { } func TestSoloMachineTestSuite(t *testing.T) { - suite.Run(t, new(SoloMachineTestSuite)) + testifysuite.Run(t, new(SoloMachineTestSuite)) } func (suite *SoloMachineTestSuite) SetupSolomachine() string { diff --git a/modules/light-clients/06-solomachine/update.go b/modules/light-clients/06-solomachine/update.go index 1e5a78fbe01..6fd76f292a3 100644 --- a/modules/light-clients/06-solomachine/update.go +++ b/modules/light-clients/06-solomachine/update.go @@ -19,15 +19,15 @@ import ( 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) + return cs.verifyHeader(cdc, msg) case *Misbehaviour: - return cs.verifyMisbehaviour(ctx, cdc, clientStore, msg) + return cs.verifyMisbehaviour(cdc, msg) default: return errorsmod.Wrapf(clienttypes.ErrInvalidClientType, "expected type of %T or %T, got type %T", Header{}, Misbehaviour{}, msg) } } -func (cs ClientState) verifyHeader(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, header *Header) error { +func (cs ClientState) verifyHeader(cdc codec.BinaryCodec, header *Header) error { // assert update timestamp is not less than current consensus state timestamp if header.Timestamp < cs.ConsensusState.Timestamp { return errorsmod.Wrapf( diff --git a/modules/light-clients/07-tendermint/client_state.go b/modules/light-clients/07-tendermint/client_state.go index 72ed5f0d3e3..c41e8c3d40e 100644 --- a/modules/light-clients/07-tendermint/client_state.go +++ b/modules/light-clients/07-tendermint/client_state.go @@ -49,7 +49,7 @@ func (cs ClientState) GetChainID() string { } // ClientType is tendermint. -func (cs ClientState) ClientType() string { +func (ClientState) ClientType() string { return exported.Tendermint } @@ -59,7 +59,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( +func (ClientState) GetTimestampAtHeight( ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec, diff --git a/modules/light-clients/07-tendermint/genesis.go b/modules/light-clients/07-tendermint/genesis.go index d163559bd7b..00ae2ef25ed 100644 --- a/modules/light-clients/07-tendermint/genesis.go +++ b/modules/light-clients/07-tendermint/genesis.go @@ -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 storetypes.KVStore) []exported.GenesisMetadata { +func (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/header.go b/modules/light-clients/07-tendermint/header.go index 1014c8a75ee..caa81e7493c 100644 --- a/modules/light-clients/07-tendermint/header.go +++ b/modules/light-clients/07-tendermint/header.go @@ -25,7 +25,7 @@ func (h Header) ConsensusState() *ConsensusState { } // ClientType defines that the Header is a Tendermint consensus algorithm -func (h Header) ClientType() string { +func (Header) ClientType() string { return exported.Tendermint } diff --git a/modules/light-clients/07-tendermint/migrations/migrations_test.go b/modules/light-clients/07-tendermint/migrations/migrations_test.go index 7a261caaf8c..906aa1f0932 100644 --- a/modules/light-clients/07-tendermint/migrations/migrations_test.go +++ b/modules/light-clients/07-tendermint/migrations/migrations_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" @@ -15,7 +15,7 @@ import ( ) type MigrationsTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -31,7 +31,7 @@ func (suite *MigrationsTestSuite) SetupTest() { } func TestTendermintTestSuite(t *testing.T) { - suite.Run(t, new(MigrationsTestSuite)) + testifysuite.Run(t, new(MigrationsTestSuite)) } // test pruning of multiple expired tendermint consensus states diff --git a/modules/light-clients/07-tendermint/misbehaviour.go b/modules/light-clients/07-tendermint/misbehaviour.go index bce812e4537..de6c97d191a 100644 --- a/modules/light-clients/07-tendermint/misbehaviour.go +++ b/modules/light-clients/07-tendermint/misbehaviour.go @@ -28,7 +28,7 @@ func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour { } // ClientType is Tendermint light client -func (misbehaviour Misbehaviour) ClientType() string { +func (Misbehaviour) ClientType() string { return exported.Tendermint } diff --git a/modules/light-clients/07-tendermint/misbehaviour_handle.go b/modules/light-clients/07-tendermint/misbehaviour_handle.go index aaac72ada13..1431d86cc07 100644 --- a/modules/light-clients/07-tendermint/misbehaviour_handle.go +++ b/modules/light-clients/07-tendermint/misbehaviour_handle.go @@ -19,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 storetypes.KVStore, msg exported.ClientMessage) bool { +func (ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, msg exported.ClientMessage) bool { switch msg := msg.(type) { case *Header: tmHeader := msg diff --git a/modules/light-clients/07-tendermint/tendermint_test.go b/modules/light-clients/07-tendermint/tendermint_test.go index 025c57deeb1..48887f8ab72 100644 --- a/modules/light-clients/07-tendermint/tendermint_test.go +++ b/modules/light-clients/07-tendermint/tendermint_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -37,7 +37,7 @@ var ( ) type TendermintTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -112,5 +112,5 @@ func getBothSigners(suite *TendermintTestSuite, altVal *tmtypes.Validator, altPr } func TestTendermintTestSuite(t *testing.T) { - suite.Run(t, new(TendermintTestSuite)) + testifysuite.Run(t, new(TendermintTestSuite)) } diff --git a/modules/light-clients/07-tendermint/upgrade.go b/modules/light-clients/07-tendermint/upgrade.go index bd91ac438d8..29acb4a6577 100644 --- a/modules/light-clients/07-tendermint/upgrade.go +++ b/modules/light-clients/07-tendermint/upgrade.go @@ -83,7 +83,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // construct clientState Merkle path upgradeClientPath := constructUpgradeClientMerklePath(cs.UpgradePath, lastHeight) if err := merkleProofClient.VerifyMembership(cs.ProofSpecs, consState.GetRoot(), upgradeClientPath, bz); err != nil { - return errorsmod.Wrapf(err, "client state proof failed. Path: %s", upgradeClientPath.Pretty()) + return errorsmod.Wrapf(err, "client state proof failed. Path: %s", upgradeClientPath.GetKeyPath()) } // Verify consensus state proof @@ -94,7 +94,7 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // construct consensus state Merkle path upgradeConsStatePath := constructUpgradeConsStateMerklePath(cs.UpgradePath, lastHeight) if err := merkleProofConsState.VerifyMembership(cs.ProofSpecs, consState.GetRoot(), upgradeConsStatePath, bz); err != nil { - return errorsmod.Wrapf(err, "consensus state proof failed. Path: %s", upgradeConsStatePath.Pretty()) + return errorsmod.Wrapf(err, "consensus state proof failed. Path: %s", upgradeConsStatePath.GetKeyPath()) } // Construct new client state and consensus state diff --git a/modules/light-clients/08-wasm/client/cli/cli.go b/modules/light-clients/08-wasm/client/cli/cli.go index 208c74108dd..eb82e6c20f4 100644 --- a/modules/light-clients/08-wasm/client/cli/cli.go +++ b/modules/light-clients/08-wasm/client/cli/cli.go @@ -36,6 +36,7 @@ func NewTxCmd() *cobra.Command { txCmd.AddCommand( newStoreCodeCmd(), + newSubmitStoreCodeProposalCmd(), ) return txCmd diff --git a/modules/light-clients/08-wasm/client/cli/tx.go b/modules/light-clients/08-wasm/client/cli/tx.go index 330640ca898..01359e549bd 100644 --- a/modules/light-clients/08-wasm/client/cli/tx.go +++ b/modules/light-clients/08-wasm/client/cli/tx.go @@ -2,23 +2,29 @@ package cli import ( "fmt" - "io/ioutil" + "os" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/version" + govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" types "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) +const FlagAuthority = "authority" + // newStoreCodeCmd returns the command to create a MsgStoreCode transaction func newStoreCodeCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "store-code [path/to/wasm-file]", + Use: "legacy-store-code [path/to/wasm-file]", Short: "Reads wasm code from the file and creates transaction to store code", Long: "Reads wasm code from the file and creates transaction to store code", Example: fmt.Sprintf("%s tx %s wasm [path/to/wasm_file]", version.AppName, ibcexported.ModuleName), @@ -31,7 +37,7 @@ func newStoreCodeCmd() *cobra.Command { fileName := args[0] - code, err := ioutil.ReadFile(fileName) + code, err := os.ReadFile(fileName) if err != nil { return err } @@ -53,3 +59,65 @@ func newStoreCodeCmd() *cobra.Command { return cmd } + +// newSubmitStoreCodeProposalCmd returns the command to send a proposal to store new wasm bytecode. +func newSubmitStoreCodeProposalCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "store-code [path/to/wasm-file]", + Short: "Reads wasm code from the file and creates a proposal to store the wasm code", + Long: "Reads wasm code from the file and creates a proposal to store the wasm code", + Example: fmt.Sprintf("%s tx %s wasm [path/to/wasm_file]", version.AppName, ibcexported.ModuleName), + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + proposal, err := govcli.ReadGovPropFlags(clientCtx, cmd.Flags()) + if err != nil { + return err + } + + authority, _ := cmd.Flags().GetString(FlagAuthority) + if authority != "" { + if _, err = sdk.AccAddressFromBech32(authority); err != nil { + return fmt.Errorf("invalid authority address: %w", err) + } + } else { + authority = sdk.AccAddress(address.Module(govtypes.ModuleName)).String() + } + + code, err := os.ReadFile(args[0]) + if err != nil { + return err + } + + msg := &types.MsgStoreCode{ + Signer: authority, + WasmByteCode: code, + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + + if err := proposal.SetMsgs([]sdk.Msg{msg}); err != nil { + return fmt.Errorf("failed to create a store code proposal message: %w", err) + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), proposal) + }, + } + + cmd.Flags().String(FlagAuthority, "", "The address of the wasm client module authority (defaults to gov)") + + flags.AddTxFlagsToCmd(cmd) + govcli.AddGovPropFlagsToCmd(cmd) + err := cmd.MarkFlagRequired(govcli.FlagTitle) + if err != nil { + panic(err) + } + + return cmd +} diff --git a/modules/light-clients/08-wasm/go.mod b/modules/light-clients/08-wasm/go.mod index ccc9c5d8f43..568016b6a66 100644 --- a/modules/light-clients/08-wasm/go.mod +++ b/modules/light-clients/08-wasm/go.mod @@ -1,17 +1,18 @@ module github.com/cosmos/ibc-go/modules/light-clients/08-wasm -go 1.19 +go 1.21 replace github.com/cosmos/ibc-go/v7 => ../../../ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( + cosmossdk.io/core v0.5.1 cosmossdk.io/errors v1.0.0 github.com/CosmWasm/wasmvm v1.2.4 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.2.0 github.com/golang/protobuf v1.5.3 @@ -29,10 +30,9 @@ require ( cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/api v0.3.1 // indirect - cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect - cosmossdk.io/math v1.0.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/math v1.1.2 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -49,6 +49,9 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect @@ -72,6 +75,7 @@ require ( github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -110,6 +114,8 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.16.3 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect @@ -134,8 +140,9 @@ require ( 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/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -152,13 +159,13 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.12.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/modules/light-clients/08-wasm/go.sum b/modules/light-clients/08-wasm/go.sum index f79ba65f256..063d22cbebb 100644 --- a/modules/light-clients/08-wasm/go.sum +++ b/modules/light-clients/08-wasm/go.sum @@ -191,14 +191,14 @@ cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= -cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= -cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= -cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -209,6 +209,7 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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= @@ -218,7 +219,9 @@ github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8 github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -226,8 +229,8 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -261,8 +264,11 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -300,8 +306,13 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= @@ -312,6 +323,7 @@ github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3Hf github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -322,8 +334,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -348,14 +360,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/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= @@ -370,7 +382,9 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn 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/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= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -397,18 +411,25 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -425,12 +446,15 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -440,10 +464,10 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -520,12 +544,14 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -649,6 +675,7 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -664,6 +691,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -685,11 +713,14 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -745,6 +776,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -761,6 +793,7 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -769,14 +802,19 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -786,6 +824,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -800,6 +839,9 @@ github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6 github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -846,17 +888,18 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -871,6 +914,7 @@ 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= @@ -933,6 +977,7 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1002,8 +1047,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1030,7 +1075,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1235,8 +1281,8 @@ 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.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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= @@ -1253,8 +1299,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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= @@ -1322,6 +1368,7 @@ 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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= @@ -1572,6 +1619,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1599,6 +1647,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/modules/light-clients/08-wasm/keeper/genesis_test.go b/modules/light-clients/08-wasm/keeper/genesis_test.go index 6886c19ffb4..474389032b4 100644 --- a/modules/light-clients/08-wasm/keeper/genesis_test.go +++ b/modules/light-clients/08-wasm/keeper/genesis_test.go @@ -23,7 +23,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { { "success", func() { - codeHash := "9b18dc4aa6a4dc6183f148bdcadbf7d3de2fdc7aac59394f1589b81e77de5e3c" + codeHash := "9b18dc4aa6a4dc6183f148bdcadbf7d3de2fdc7aac59394f1589b81e77de5e3c" //nolint:gosec // these are not hard-coded credentials contractCode, err := os.ReadFile("../test_data/ics07_tendermint_cw.wasm.gz") suite.Require().NoError(err) @@ -70,7 +70,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() { suite.SetupTest() ctx := suite.chainA.GetContext() - expCodeHash := "9b18dc4aa6a4dc6183f148bdcadbf7d3de2fdc7aac59394f1589b81e77de5e3c" + expCodeHash := "9b18dc4aa6a4dc6183f148bdcadbf7d3de2fdc7aac59394f1589b81e77de5e3c" //nolint:gosec // these are not hard-coded credentials signer := authtypes.NewModuleAddress(govtypes.ModuleName).String() contractCode, err := os.ReadFile("../test_data/ics07_tendermint_cw.wasm.gz") diff --git a/modules/light-clients/08-wasm/keeper/keeper_test.go b/modules/light-clients/08-wasm/keeper/keeper_test.go index d3f1873b5b3..68661a6e67a 100644 --- a/modules/light-clients/08-wasm/keeper/keeper_test.go +++ b/modules/light-clients/08-wasm/keeper/keeper_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/baseapp" @@ -12,7 +12,7 @@ import ( ) type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -33,5 +33,5 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } diff --git a/modules/light-clients/08-wasm/module.go b/modules/light-clients/08-wasm/module.go index add51209859..c1303b9d966 100644 --- a/modules/light-clients/08-wasm/module.go +++ b/modules/light-clients/08-wasm/module.go @@ -8,11 +8,15 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/gov/simulation" abci "github.com/cometbft/cometbft/abci/types" @@ -22,10 +26,18 @@ import ( ) var ( - _ module.AppModule = (*AppModule)(nil) - _ module.AppModuleBasic = (*AppModule)(nil) + _ module.AppModule = (*AppModule)(nil) + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.HasProposalMsgs = (*AppModule)(nil) + _ appmodule.AppModule = (*AppModule)(nil) ) +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (AppModule) IsAppModule() {} + // AppModuleBasic defines the basic application module used by the tendermint light client. // Only the RegisterInterfaces function needs to be implemented. All other function perform // a no-op. @@ -97,6 +109,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { + return simulation.ProposalMsgs() +} + func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { var gs types.GenesisState err := cdc.UnmarshalJSON(bz, &gs) @@ -116,10 +133,10 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { +func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } diff --git a/modules/light-clients/08-wasm/simulation/proposals.go b/modules/light-clients/08-wasm/simulation/proposals.go new file mode 100644 index 00000000000..2767d5fa52c --- /dev/null +++ b/modules/light-clients/08-wasm/simulation/proposals.go @@ -0,0 +1,40 @@ +package simulation + +import ( + "math/rand" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" +) + +// Simulation operation weights constants +const ( + DefaultWeightMsgStoreCode int = 100 + + OpWeightMsgStoreCode = "op_weight_msg_store_code" // #nosec +) + +// ProposalMsgs defines the module weighted proposals' contents +func ProposalMsgs() []simtypes.WeightedProposalMsg { + return []simtypes.WeightedProposalMsg{ + simulation.NewWeightedProposalMsg( + OpWeightMsgStoreCode, + DefaultWeightMsgStoreCode, + SimulateMsgStoreCode, + ), + } +} + +// SimulateMsgStoreCode returns a random MsgStoreCode for the 08-wasm module +func SimulateMsgStoreCode(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg { + var signer sdk.AccAddress = address.Module("gov") + + return &types.MsgStoreCode{ + Signer: signer.String(), + WasmByteCode: []byte{0x01}, + } +} diff --git a/modules/light-clients/08-wasm/simulation/proposals_test.go b/modules/light-clients/08-wasm/simulation/proposals_test.go new file mode 100644 index 00000000000..cc1f6dd9925 --- /dev/null +++ b/modules/light-clients/08-wasm/simulation/proposals_test.go @@ -0,0 +1,41 @@ +package simulation_test + +import ( + "math/rand" + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/simulation" + "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" +) + +func TestProposalMsgs(t *testing.T) { + // initialize parameters + s := rand.NewSource(1) + r := rand.New(s) + + ctx := sdk.NewContext(nil, cmtproto.Header{}, true, nil) + accounts := simtypes.RandomAccounts(r, 3) + + // execute ProposalMsgs function + weightedProposalMsgs := simulation.ProposalMsgs() + require.Equal(t, 1, len(weightedProposalMsgs)) + w0 := weightedProposalMsgs[0] + + require.Equal(t, simulation.OpWeightMsgStoreCode, w0.AppParamsKey()) + require.Equal(t, simulation.DefaultWeightMsgStoreCode, w0.DefaultWeight()) + + msg := w0.MsgSimulatorFn()(r, ctx, accounts) + msgStoreCode, ok := msg.(*types.MsgStoreCode) + require.True(t, ok) + + require.Equal(t, sdk.AccAddress(address.Module("gov")).String(), msgStoreCode.Signer) + require.Equal(t, msgStoreCode.WasmByteCode, []byte{0x01}) +} diff --git a/modules/light-clients/08-wasm/types/client_message.go b/modules/light-clients/08-wasm/types/client_message.go index 434b1830d9d..cf7a0b8a12e 100644 --- a/modules/light-clients/08-wasm/types/client_message.go +++ b/modules/light-clients/08-wasm/types/client_message.go @@ -9,7 +9,7 @@ import ( var _ exported.ClientMessage = &ClientMessage{} // ClientType is a Wasm light client. -func (c ClientMessage) ClientType() string { +func (ClientMessage) ClientType() string { return exported.Wasm } diff --git a/modules/light-clients/08-wasm/types/client_state.go b/modules/light-clients/08-wasm/types/client_state.go index 942ec0a4217..377c6cc11be 100644 --- a/modules/light-clients/08-wasm/types/client_state.go +++ b/modules/light-clients/08-wasm/types/client_state.go @@ -1,10 +1,6 @@ package types import ( - "encoding/hex" - "encoding/json" - "errors" - errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" @@ -28,7 +24,7 @@ func NewClientState(data []byte, codeHash []byte, height clienttypes.Height) *Cl } // ClientType is Wasm light client. -func (cs ClientState) ClientType() string { +func (ClientState) ClientType() string { return exported.Wasm } @@ -116,19 +112,10 @@ func (cs ClientState) Initialize(ctx sdk.Context, _ codec.BinaryCodec, clientSto ConsensusState: consensusState, } - encodedData, err := json.Marshal(payload) - if err != nil { - return errorsmod.Wrapf(err, "failed to marshal payload for wasm contract instantiation") - } - // The global store key can be used here to implement #4085 // wasmStore := ctx.KVStore(WasmStoreKey) - _, err = initContract(ctx, clientStore, cs.CodeHash, encodedData) - if err != nil { - return errorsmod.Wrapf(err, "failed to initialize contract") - } - return nil + return wasmInit(ctx, clientStore, &cs, payload) } // 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. @@ -208,53 +195,3 @@ func (cs ClientState) VerifyNonMembership( _, err := wasmQuery[contractResult](ctx, clientStore, &cs, payload) return err } - -// call calls the contract with the given payload and returns the result. -func call[T ContractResult](ctx sdk.Context, clientStore sdk.KVStore, cs *ClientState, payload any) (T, error) { - var result T - encodedData, err := json.Marshal(payload) - if err != nil { - return result, errorsmod.Wrapf(err, "failed to marshal payload for wasm execution") - } - resp, err := callContract(ctx, clientStore, cs.CodeHash, encodedData) - if err != nil { - return result, errorsmod.Wrapf(err, "call to wasm contract failed") - } - // Only allow Data to flow back to us. SubMessages, Events and Attributes are not allowed. - if len(resp.Messages) > 0 { - return result, errorsmod.Wrapf(ErrWasmSubMessagesNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) - } - if len(resp.Events) > 0 { - return result, errorsmod.Wrapf(ErrWasmEventsNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) - } - if len(resp.Attributes) > 0 { - return result, errorsmod.Wrapf(ErrWasmAttributesNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) - } - if err := json.Unmarshal(resp.Data, &result); err != nil { - return result, errorsmod.Wrapf(err, "failed to unmarshal result of wasm execution") - } - if !result.Validate() { - return result, errorsmod.Wrapf(errors.New(result.Error()), "error occurred while executing contract with code hash %s", hex.EncodeToString(cs.CodeHash)) - } - return result, nil -} - -// wasmQuery queries the contract with the given payload and returns the result. -func wasmQuery[T ContractResult](ctx sdk.Context, clientStore sdk.KVStore, cs *ClientState, payload any) (T, error) { - var result T - encodedData, err := json.Marshal(payload) - if err != nil { - return result, errorsmod.Wrapf(err, "failed to marshal payload for wasm query") - } - resp, err := queryContract(ctx, clientStore, cs.CodeHash, encodedData) - if err != nil { - return result, errorsmod.Wrapf(err, "query to wasm contract failed") - } - if err := json.Unmarshal(resp, &result); err != nil { - return result, errorsmod.Wrapf(err, "failed to unmarshal result of wasm query") - } - if !result.Validate() { - return result, errorsmod.Wrapf(errors.New(result.Error()), "error occurred while querying contract with code hash %s", hex.EncodeToString(cs.CodeHash)) - } - return result, nil -} diff --git a/modules/light-clients/08-wasm/types/consensus_state.go b/modules/light-clients/08-wasm/types/consensus_state.go index 30dd8af3c44..d6b41a6a669 100644 --- a/modules/light-clients/08-wasm/types/consensus_state.go +++ b/modules/light-clients/08-wasm/types/consensus_state.go @@ -16,12 +16,12 @@ func NewConsensusState(data []byte, timestamp uint64) *ConsensusState { } // ClientType returns Wasm type. -func (cs ConsensusState) ClientType() string { +func (ConsensusState) ClientType() string { return exported.Wasm } // GetTimestamp returns block time in nanoseconds of the header that created consensus state. -func (cs ConsensusState) GetTimestamp() uint64 { +func (ConsensusState) GetTimestamp() uint64 { return 0 } diff --git a/modules/light-clients/08-wasm/types/contract_api.go b/modules/light-clients/08-wasm/types/contract_api.go index e4221e0911c..193769d9ace 100644 --- a/modules/light-clients/08-wasm/types/contract_api.go +++ b/modules/light-clients/08-wasm/types/contract_api.go @@ -5,15 +5,15 @@ import ( "github.com/cosmos/ibc-go/v7/modules/core/exported" ) -// instantiateMessage +// instantiateMessage is the message that is sent to the contract's instantiate entry point. type instantiateMessage struct { ClientState *ClientState `json:"client_state"` ConsensusState *ConsensusState `json:"consensus_state"` } -// queryMsg is used to encode query messages -// omitempty tag is mandatory for JSON serialization -// to be compatible with Rust contract enum matching +// queryMsg is used to encode messages that are sent to the contract's query entry point. +// The json omitempty tag is mandatory since it omits any empty (default initialized) fields from the encoded JSON, +// this is required in order to be compatible with Rust's enum matching as used in the contract. type queryMsg struct { Status *statusMsg `json:"status,omitempty"` ExportMetadata *exportMetadataMsg `json:"export_metadata,omitempty"` @@ -24,17 +24,23 @@ type queryMsg struct { CheckForMisbehaviour *checkForMisbehaviourMsg `json:"check_for_misbehaviour,omitempty"` } -type ( - statusMsg struct{} - exportMetadataMsg struct{} - timestampAtHeightMsg struct { - Height exported.Height `json:"height"` - } -) +// statusMsg is a queryMsg sent to the contract to query the status of the wasm client. +type statusMsg struct{} + +// exportMetadataMsg is a queryMsg sent to the contract to query the exported metadata of the wasm client. +type exportMetadataMsg struct{} +// timestampAtHeightMsg is a queryMsg sent to the contract to query the timestamp at a given height. +type timestampAtHeightMsg struct { + Height exported.Height `json:"height"` +} + +// verifyClientMessageMsg is a queryMsg sent to the contract to verify a client message. type verifyClientMessageMsg struct { ClientMessage *ClientMessage `json:"client_message"` } + +// verifyMembershipMsg is a queryMsg sent to the contract to verify a membership proof. type verifyMembershipMsg struct { Height exported.Height `json:"height"` DelayTimePeriod uint64 `json:"delay_time_period"` @@ -43,6 +49,8 @@ type verifyMembershipMsg struct { Path exported.Path `json:"path"` Value []byte `json:"value"` } + +// verifyNonMembershipMsg is a queryMsg sent to the contract to verify a non-membership proof. type verifyNonMembershipMsg struct { Height exported.Height `json:"height"` DelayTimePeriod uint64 `json:"delay_time_period"` @@ -50,13 +58,15 @@ type verifyNonMembershipMsg struct { Proof []byte `json:"proof"` Path exported.Path `json:"path"` } + +// checkForMisbehaviourMsg is a queryMsg sent to the contract to check for misbehaviour. type checkForMisbehaviourMsg struct { ClientMessage *ClientMessage `json:"client_message"` } -// sudoMsg is used to encode sudo messages -// omitempty tag is mandatory for JSON serialization -// to be compatible with Rust contract enum matching +// sudoMsg is used to encode messages that are sent to the contract's sudo entry point. +// The json omitempty tag is mandatory since it omits any empty (default initialized) fields from the encoded JSON, +// this is required in order to be compatible with Rust's enum matching as used in the contract. type sudoMsg struct { UpdateState *updateStateMsg `json:"update_state,omitempty"` UpdateStateOnMisbehaviour *updateStateOnMisbehaviourMsg `json:"update_state_on_misbehaviour,omitempty"` @@ -64,26 +74,35 @@ type sudoMsg struct { CheckSubstituteAndUpdateState *checkSubstituteAndUpdateStateMsg `json:"check_substitute_and_update_state,omitempty"` } +// updateStateMsg is a sudoMsg sent to the contract to update the client state. type updateStateMsg struct { ClientMessage *ClientMessage `json:"client_message"` } + +// updateStateOnMisbehaviourMsg is a sudoMsg sent to the contract to update its state on misbehaviour. type updateStateOnMisbehaviourMsg struct { ClientMessage *ClientMessage `json:"client_message"` } + +// verifyUpgradeAndUpdateStateMsg is a sudoMsg sent to the contract to verify an upgrade and update its state. type verifyUpgradeAndUpdateStateMsg struct { UpgradeClientState exported.ClientState `json:"upgrade_client_state"` UpgradeConsensusState exported.ConsensusState `json:"upgrade_consensus_state"` ProofUpgradeClient []byte `json:"proof_upgrade_client"` ProofUpgradeConsensusState []byte `json:"proof_upgrade_consensus_state"` } + +// checkSubstituteAndUpdateStateMsg is a sudoMsg sent to the contract to check a given substitute client and update to its state. type checkSubstituteAndUpdateStateMsg struct{} -// ContractResult defines the expected result returned by a contract call +// ContractResult defines the expected interface a Result returned by a contract call is expected to implement. type ContractResult interface { Validate() bool Error() string } +// contractResult is the default implementation of the ContractResult interface and the default return type of any contract call +// that does not require a custom return type. type contractResult struct { IsValid bool `json:"is_valid,omitempty"` ErrorMsg string `json:"error_msg,omitempty"` @@ -98,26 +117,33 @@ func (r contractResult) Error() string { return r.ErrorMsg } +// statusResult is the expected return type of the statusMsg query. It returns the status of the wasm client. type statusResult struct { contractResult Status exported.Status `json:"status"` } +// exportMetadataResult is the expected return type of the exportMetadataMsg query. It returns the exported metadata of the wasm client. type exportMetadataResult struct { contractResult GenesisMetadata []clienttypes.GenesisMetadata `json:"genesis_metadata,omitempty"` } +// timestampAtHeightResult is the expected return type of the timestampAtHeightMsg query. It returns the timestamp for a light client +// at a given height. type timestampAtHeightResult struct { contractResult Timestamp uint64 `json:"timestamp"` } +// checkForMisbehaviourResult is the expected return type of the checkForMisbehaviourMsg query. It returns a boolean indicating +// if misbehaviour was detected. type checkForMisbehaviourResult struct { contractResult FoundMisbehaviour bool `json:"found_misbehaviour"` } +// updateStateResult is the expected return type of the updateStateMsg sudo call. It returns the updated consensus heights. type updateStateResult struct { contractResult Heights []clienttypes.Height `json:"heights"` diff --git a/modules/light-clients/08-wasm/types/proposal_handle.go b/modules/light-clients/08-wasm/types/proposal_handle.go index e543ed494ed..fe44e6a5998 100644 --- a/modules/light-clients/08-wasm/types/proposal_handle.go +++ b/modules/light-clients/08-wasm/types/proposal_handle.go @@ -21,8 +21,8 @@ func (cs ClientState) CheckSubstituteAndUpdateState( substituteClient exported.ClientState, ) error { var ( - SubjectPrefix = []byte("subject/") - SubstitutePrefix = []byte("substitute/") + subjectPrefix = []byte("subject/") + substitutePrefix = []byte("substitute/") ) _, ok := substituteClient.(*ClientState) @@ -33,12 +33,12 @@ func (cs ClientState) CheckSubstituteAndUpdateState( ) } - store := newUpdateProposalWrappedStore(subjectClientStore, substituteClientStore, SubjectPrefix, SubstitutePrefix) + store := newUpdateProposalWrappedStore(subjectClientStore, substituteClientStore, subjectPrefix, substitutePrefix) payload := sudoMsg{ CheckSubstituteAndUpdateState: &checkSubstituteAndUpdateStateMsg{}, } - _, err := call[contractResult](ctx, store, &cs, payload) + _, err := wasmCall[contractResult](ctx, store, &cs, payload) return err } diff --git a/modules/light-clients/08-wasm/types/types_test.go b/modules/light-clients/08-wasm/types/types_test.go index 1ecbe167c89..3fb5565a686 100644 --- a/modules/light-clients/08-wasm/types/types_test.go +++ b/modules/light-clients/08-wasm/types/types_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/baseapp" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -41,7 +41,7 @@ var ( ) type TypesTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator chainA *ibctesting.TestChain chainB *ibctesting.TestChain @@ -52,7 +52,7 @@ type TypesTestSuite struct { testData map[string]string } -func (suite *TypesTestSuite) SetupTest() { +func (*TypesTestSuite) SetupTest() { ibctesting.DefaultTestingAppInit = ibctesting.SetupTestingApp } @@ -153,7 +153,7 @@ func (suite *TypesTestSuite) SetupWasmGrandpaWithChannel() { } func TestWasmTestSuite(t *testing.T) { - suite.Run(t, new(TypesTestSuite)) + testifysuite.Run(t, new(TypesTestSuite)) } func getAltSigners(altVal *tmtypes.Validator, altPrivVal tmtypes.PrivValidator) map[string]tmtypes.PrivValidator { diff --git a/modules/light-clients/08-wasm/types/update.go b/modules/light-clients/08-wasm/types/update.go index de08992bac8..f9912e1dbbf 100644 --- a/modules/light-clients/08-wasm/types/update.go +++ b/modules/light-clients/08-wasm/types/update.go @@ -42,7 +42,7 @@ func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, client UpdateState: &updateStateMsg{ClientMessage: clientMessage}, } - result, err := call[updateStateResult](ctx, clientStore, &cs, payload) + result, err := wasmCall[updateStateResult](ctx, clientStore, &cs, payload) if err != nil { panic(err) } @@ -67,7 +67,7 @@ func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, _ codec.BinaryC UpdateStateOnMisbehaviour: &updateStateOnMisbehaviourMsg{ClientMessage: clientMessage}, } - _, err := call[contractResult](ctx, clientStore, &cs, payload) + _, err := wasmCall[contractResult](ctx, clientStore, &cs, payload) if err != nil { panic(err) } diff --git a/modules/light-clients/08-wasm/types/upgrade.go b/modules/light-clients/08-wasm/types/upgrade.go index 930361e5dda..d4f99bfd04f 100644 --- a/modules/light-clients/08-wasm/types/upgrade.go +++ b/modules/light-clients/08-wasm/types/upgrade.go @@ -51,6 +51,6 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( }, } - _, err := call[contractResult](ctx, clientStore, &cs, payload) + _, err := wasmCall[contractResult](ctx, clientStore, &cs, payload) return err } diff --git a/modules/light-clients/08-wasm/types/validation_test.go b/modules/light-clients/08-wasm/types/validation_test.go index b7d827a047f..da00feb3feb 100644 --- a/modules/light-clients/08-wasm/types/validation_test.go +++ b/modules/light-clients/08-wasm/types/validation_test.go @@ -1,7 +1,7 @@ package types import ( - "math/rand" + "crypto/rand" "os" "testing" diff --git a/modules/light-clients/08-wasm/types/vm.go b/modules/light-clients/08-wasm/types/vm.go index 8e73564d64d..8b43708f4a3 100644 --- a/modules/light-clients/08-wasm/types/vm.go +++ b/modules/light-clients/08-wasm/types/vm.go @@ -1,9 +1,15 @@ package types import ( + "encoding/hex" + "encoding/json" + "errors" + wasmvm "github.com/CosmWasm/wasmvm" wasmvmtypes "github.com/CosmWasm/wasmvm/types" + errorsmod "cosmossdk.io/errors" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -64,6 +70,69 @@ func queryContract(ctx sdk.Context, clientStore sdk.KVStore, codeHash []byte, ms return resp, err } +// wasmInit accepts a message to instantiate a wasm contract, JSON encodes it and calls initContract. +func wasmInit(ctx sdk.Context, clientStore sdk.KVStore, cs *ClientState, payload instantiateMessage) error { + encodedData, err := json.Marshal(payload) + if err != nil { + return errorsmod.Wrapf(err, "failed to marshal payload for wasm contract instantiation") + } + _, err = initContract(ctx, clientStore, cs.CodeHash, encodedData) + if err != nil { + return errorsmod.Wrapf(err, "call to wasm contract failed") + } + return nil +} + +// wasmCall calls the contract with the given payload and returns the result. +func wasmCall[T ContractResult](ctx sdk.Context, clientStore sdk.KVStore, cs *ClientState, payload sudoMsg) (T, error) { + var result T + encodedData, err := json.Marshal(payload) + if err != nil { + return result, errorsmod.Wrapf(err, "failed to marshal payload for wasm execution") + } + resp, err := callContract(ctx, clientStore, cs.CodeHash, encodedData) + if err != nil { + return result, errorsmod.Wrapf(err, "call to wasm contract failed") + } + // Only allow Data to flow back to us. SubMessages, Events and Attributes are not allowed. + if len(resp.Messages) > 0 { + return result, errorsmod.Wrapf(ErrWasmSubMessagesNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) + } + if len(resp.Events) > 0 { + return result, errorsmod.Wrapf(ErrWasmEventsNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) + } + if len(resp.Attributes) > 0 { + return result, errorsmod.Wrapf(ErrWasmAttributesNotAllowed, "code hash (%s)", hex.EncodeToString(cs.CodeHash)) + } + if err := json.Unmarshal(resp.Data, &result); err != nil { + return result, errorsmod.Wrapf(err, "failed to unmarshal result of wasm execution") + } + if !result.Validate() { + return result, errorsmod.Wrapf(errors.New(result.Error()), "error occurred while executing contract with code hash %s", hex.EncodeToString(cs.CodeHash)) + } + return result, nil +} + +// wasmQuery queries the contract with the given payload and returns the result. +func wasmQuery[T ContractResult](ctx sdk.Context, clientStore sdk.KVStore, cs *ClientState, payload queryMsg) (T, error) { + var result T + encodedData, err := json.Marshal(payload) + if err != nil { + return result, errorsmod.Wrapf(err, "failed to marshal payload for wasm query") + } + resp, err := queryContract(ctx, clientStore, cs.CodeHash, encodedData) + if err != nil { + return result, errorsmod.Wrapf(err, "query to wasm contract failed") + } + if err := json.Unmarshal(resp, &result); err != nil { + return result, errorsmod.Wrapf(err, "failed to unmarshal result of wasm query") + } + if !result.Validate() { + return result, errorsmod.Wrapf(errors.New(result.Error()), "error occurred while querying contract with code hash %s", hex.EncodeToString(cs.CodeHash)) + } + return result, nil +} + // getEnv returns the state of the blockchain environment the contract is running on func getEnv(ctx sdk.Context) wasmvmtypes.Env { chainID := ctx.BlockHeader().ChainID diff --git a/modules/light-clients/09-localhost/client_state.go b/modules/light-clients/09-localhost/client_state.go index 89013ffb2cb..0815126ba45 100644 --- a/modules/light-clients/09-localhost/client_state.go +++ b/modules/light-clients/09-localhost/client_state.go @@ -26,7 +26,7 @@ func NewClientState(height clienttypes.Height) exported.ClientState { } // ClientType returns the 09-localhost client type. -func (cs ClientState) ClientType() string { +func (ClientState) ClientType() string { return exported.Localhost } @@ -36,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, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { +func (ClientState) Status(_ sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec) exported.Status { return exported.Active } @@ -55,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 storetypes.KVStore, consState exported.ConsensusState) error { +func (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.") } @@ -71,14 +71,14 @@ 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, _ storetypes.KVStore, _ codec.BinaryCodec, _ exported.Height) (uint64, error) { +func (ClientState) GetTimestampAtHeight(ctx sdk.Context, _ storetypes.KVStore, _ codec.BinaryCodec, _ exported.Height) (uint64, error) { return uint64(ctx.BlockTime().UnixNano()), nil } // VerifyMembership is a generic proof verification method which verifies the existence of a given key and value within the IBC store. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). // The caller must provide the full IBC store. -func (cs ClientState) VerifyMembership( +func (ClientState) VerifyMembership( ctx sdk.Context, store storetypes.KVStore, _ codec.BinaryCodec, @@ -119,7 +119,7 @@ func (cs ClientState) VerifyMembership( // VerifyNonMembership is a generic proof verification method which verifies the absence of a given CommitmentPath within the IBC store. // The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24). // The caller must provide the full IBC store. -func (cs ClientState) VerifyNonMembership( +func (ClientState) VerifyNonMembership( ctx sdk.Context, store storetypes.KVStore, _ codec.BinaryCodec, @@ -152,17 +152,17 @@ 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, _ storetypes.KVStore, _ exported.ClientMessage) error { +func (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, _ storetypes.KVStore, _ exported.ClientMessage) bool { +func (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, _ storetypes.KVStore, _ exported.ClientMessage) { +func (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. @@ -177,18 +177,18 @@ 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(_ storetypes.KVStore) []exported.GenesisMetadata { +func (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, _, _ storetypes.KVStore, _ exported.ClientState) error { +func (ClientState) CheckSubstituteAndUpdateState(_ sdk.Context, _ codec.BinaryCodec, _, _ storetypes.KVStore, _ exported.ClientState) error { return errorsmod.Wrap(clienttypes.ErrUpdateClientFailed, "cannot update localhost client with a proposal") } // VerifyUpgradeAndUpdateState returns an error since localhost cannot be upgraded -func (cs ClientState) VerifyUpgradeAndUpdateState( +func (ClientState) VerifyUpgradeAndUpdateState( _ sdk.Context, _ codec.BinaryCodec, _ storetypes.KVStore, diff --git a/modules/light-clients/09-localhost/localhost_test.go b/modules/light-clients/09-localhost/localhost_test.go index c22ef1e35ae..555337f1cef 100644 --- a/modules/light-clients/09-localhost/localhost_test.go +++ b/modules/light-clients/09-localhost/localhost_test.go @@ -3,13 +3,13 @@ package localhost_test import ( "testing" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" ibctesting "github.com/cosmos/ibc-go/v7/testing" ) type LocalhostTestSuite struct { - suite.Suite + testifysuite.Suite coordinator ibctesting.Coordinator chain *ibctesting.TestChain @@ -21,5 +21,5 @@ func (suite *LocalhostTestSuite) SetupTest() { } func TestLocalhostTestSuite(t *testing.T) { - suite.Run(t, new(LocalhostTestSuite)) + testifysuite.Run(t, new(LocalhostTestSuite)) } diff --git a/proto/ibc/applications/fee/v1/fee.proto b/proto/ibc/applications/fee/v1/fee.proto index 6cdfdd39082..7d451c0c6e8 100644 --- a/proto/ibc/applications/fee/v1/fee.proto +++ b/proto/ibc/applications/fee/v1/fee.proto @@ -7,6 +7,7 @@ option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; +import "cosmos/msg/v1/msg.proto"; // Fee defines the ICS29 receive, acknowledgement and timeout fees message Fee { @@ -23,6 +24,8 @@ message Fee { // PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers message PacketFee { + option (cosmos.msg.v1.signer) = "refund_address"; + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet Fee fee = 1 [(gogoproto.nullable) = false]; // the refund address for unspent fees diff --git a/proto/ibc/applications/fee/v1/tx.proto b/proto/ibc/applications/fee/v1/tx.proto index 9c48974931b..3b72b8aa599 100644 --- a/proto/ibc/applications/fee/v1/tx.proto +++ b/proto/ibc/applications/fee/v1/tx.proto @@ -104,7 +104,7 @@ message MsgPayPacketFeeResponse {} // MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc // This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) message MsgPayPacketFeeAsync { - option (cosmos.msg.v1.signer) = "packet_fee.refundaddress"; + option (cosmos.msg.v1.signer) = "packet_fee"; option (gogoproto.goproto_getters) = false; // unique packet identifier comprised of the channel ID, port ID and sequence diff --git a/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto b/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto index ed47b6e385d..626a6631474 100644 --- a/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto +++ b/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto @@ -63,12 +63,12 @@ message MsgSendTxResponse { // MsgUpdateParams defines the payload for Msg/UpdateParams message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the 27-interchain-accounts/controller parameters to update. // diff --git a/proto/ibc/applications/interchain_accounts/host/v1/tx.proto b/proto/ibc/applications/interchain_accounts/host/v1/tx.proto index 727c50149d5..af5d0b33ad3 100644 --- a/proto/ibc/applications/interchain_accounts/host/v1/tx.proto +++ b/proto/ibc/applications/interchain_accounts/host/v1/tx.proto @@ -18,12 +18,12 @@ service Msg { // MsgUpdateParams defines the payload for Msg/UpdateParams message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the 27-interchain-accounts/host parameters to update. // diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto index 61bbaa79e5d..1f021aa73e5 100644 --- a/proto/ibc/applications/transfer/v1/tx.proto +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -59,12 +59,12 @@ message MsgTransferResponse { // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the transfer parameters to update. // diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto index 76efcc7e7b1..89865e37f2f 100644 --- a/proto/ibc/core/client/v1/tx.proto +++ b/proto/ibc/core/client/v1/tx.proto @@ -113,12 +113,12 @@ message MsgSubmitMisbehaviourResponse {} // MsgUpdateParams defines the sdk.Msg type to update the client parameters. message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; - // authority is the address of the governance account. - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the client parameters to update. // diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto index 5bba1821980..c31e73d1366 100644 --- a/proto/ibc/core/connection/v1/tx.proto +++ b/proto/ibc/core/connection/v1/tx.proto @@ -129,12 +129,12 @@ message MsgConnectionOpenConfirmResponse {} // MsgUpdateParams defines the sdk.Msg type to update the connection parameters. message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "signer"; option (gogoproto.goproto_getters) = false; - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1; + // signer address (it may be the the address that controls the module, which defaults to x/gov unless overwritten). + string signer = 1; // params defines the connection parameters to update. // diff --git a/testing/README.md b/testing/README.md index 9a9be197211..3961f7f378a 100644 --- a/testing/README.md +++ b/testing/README.md @@ -152,7 +152,7 @@ Here is an example of how to setup your testing environment in every package you ```go // KeeperTestSuite is a testing suite to test keeper functions. type KeeperTestSuite struct { - suite.Suite + testifysuite.Suite coordinator *ibctesting.Coordinator @@ -163,7 +163,7 @@ type KeeperTestSuite struct { // TestKeeperTestSuite runs all the tests within this package. func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) + testifysuite.Run(t, new(KeeperTestSuite)) } // SetupTest creates a coordinator with 2 test chains. diff --git a/testing/chain.go b/testing/chain.go index 2629fd29708..8beb072b36f 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -382,10 +382,24 @@ func (chain *TestChain) GetConsensusState(clientID string, height exported.Heigh return chain.App.GetIBCKeeper().ClientKeeper.GetClientConsensusState(chain.GetContext(), clientID, height) } -// GetValsAtHeight will return the validator set of the chain at a given height. It will return +// GetValsAtHeight will return the trusted validator set of the chain for the given trusted height. It will return // a success boolean depending on if the validator set exists or not at that height. -func (chain *TestChain) GetValsAtHeight(height int64) (*cmttypes.ValidatorSet, bool) { - histInfo, ok := chain.App.GetStakingKeeper().GetHistoricalInfo(chain.GetContext(), height) +func (chain *TestChain) GetValsAtHeight(trustedHeight int64) (*cmttypes.ValidatorSet, bool) { + // historical information does not store the validator set which committed the header at + // height h. During BeginBlock, it stores the last updated validator set. This is equivalent to + // the next validator set at height h. This is because cometbft processes the validator set + // as follows: + // + // valSetChanges := endBlock() + // chain.Vals = chain.NextVals + // chain.NextVals = applyValSetChanges(chain.NextVals, valSetChanges) + // + // At height h, the validators in the historical information are the: + // validators used to sign height h + 1 (next validator set) + // + // Since we want to return the trusted validator set, which is the next validator set + // for height h, we can simply query using the trusted height. + histInfo, ok := chain.App.GetStakingKeeper().GetHistoricalInfo(chain.GetContext(), trustedHeight) if !ok { return nil, false } @@ -431,21 +445,12 @@ func (chain *TestChain) ConstructUpdateTMClientHeaderWithTrustedHeight(counterpa tmTrustedVals *cmttypes.ValidatorSet ok bool ) - // Once we get TrustedHeight from client, we must query the validators from the counterparty chain - // If the LatestHeight == LastHeader.Height, then TrustedValidators are current validators - // If LatestHeight < LastHeader.Height, we can query the historical validator set from HistoricalInfo - if trustedHeight == counterparty.LastHeader.GetHeight() { - tmTrustedVals = counterparty.Vals - } else { - // NOTE: We need to get validators from counterparty at height: trustedHeight+1 - // since the last trusted validators for a header at height h - // is the NextValidators at h+1 committed to in header h by - // NextValidatorsHash - tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.RevisionHeight + 1)) - if !ok { - return nil, errorsmod.Wrapf(ibctm.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) - } + + tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.RevisionHeight)) + if !ok { + return nil, errorsmod.Wrapf(ibctm.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) } + // inject trusted fields into last header // for now assume revision number is 0 header.TrustedHeight = trustedHeight diff --git a/testing/endpoint.go b/testing/endpoint.go index f17a8f5db31..c36ef352ed3 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -356,7 +356,7 @@ func (endpoint *Endpoint) QueryConnectionHandshakeProof() ( connectionKey := host.ConnectionKey(endpoint.Counterparty.ConnectionID) proofConnection, _ = endpoint.Counterparty.QueryProofAtHeight(connectionKey, proofHeight.GetRevisionHeight()) - return + return clientState, proofClient, proofConsensus, consensusHeight, proofConnection, proofHeight } // ChanOpenInit will construct and execute a MsgChannelOpenInit on the associated endpoint. @@ -568,8 +568,9 @@ func (endpoint *Endpoint) TimeoutPacket(packet channeltypes.Packet) error { return fmt.Errorf("unsupported order type %s", endpoint.ChannelConfig.Order) } - proof, proofHeight := endpoint.Counterparty.QueryProof(packetKey) - nextSeqRecv, found := endpoint.Counterparty.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceRecv(endpoint.Counterparty.Chain.GetContext(), endpoint.ChannelConfig.PortID, endpoint.ChannelID) + counterparty := endpoint.Counterparty + proof, proofHeight := counterparty.QueryProof(packetKey) + nextSeqRecv, found := counterparty.Chain.App.GetIBCKeeper().ChannelKeeper.GetNextSequenceRecv(counterparty.Chain.GetContext(), counterparty.ChannelConfig.PortID, counterparty.ChannelID) require.True(endpoint.Chain.TB, found) timeoutMsg := channeltypes.NewMsgTimeout( diff --git a/testing/events.go b/testing/events.go index 733b526e3c0..3679a65f3c4 100644 --- a/testing/events.go +++ b/testing/events.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/stretchr/testify/suite" + testifysuite "github.com/stretchr/testify/suite" abci "github.com/cometbft/cometbft/abci/types" @@ -69,7 +69,7 @@ func ParsePacketFromEvents(events []abci.Event) (channeltypes.Packet, error) { packet := channeltypes.Packet{} for _, attr := range ev.Attributes { switch attr.Key { - case channeltypes.AttributeKeyData: // DEPRECATED + case channeltypes.AttributeKeyData: //nolint:staticcheck // DEPRECATED packet.Data = []byte(attr.Value) case channeltypes.AttributeKeySequence: @@ -125,7 +125,7 @@ func ParseAckFromEvents(events []abci.Event) ([]byte, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeWriteAck { for _, attr := range ev.Attributes { - if attr.Key == channeltypes.AttributeKeyAck { // DEPRECATED + if attr.Key == channeltypes.AttributeKeyAck { //nolint:staticcheck // DEPRECATED return []byte(attr.Value), nil } } @@ -137,7 +137,7 @@ func ParseAckFromEvents(events []abci.Event) ([]byte, error) { // AssertEvents asserts that expected events are present in the actual events. // Expected map needs to be a subset of actual events to pass. func AssertEvents( - suite *suite.Suite, + suite *testifysuite.Suite, expected EventsMap, actual []abci.Event, ) { diff --git a/testing/mock/ack.go b/testing/mock/ack.go index 280e848b3be..619ac098d44 100644 --- a/testing/mock/ack.go +++ b/testing/mock/ack.go @@ -13,11 +13,11 @@ func NewEmptyAcknowledgement() EmptyAcknowledgement { } // Success implements the Acknowledgement interface -func (ack EmptyAcknowledgement) Success() bool { +func (EmptyAcknowledgement) Success() bool { return true } // Acknowledgement implements the Acknowledgement interface -func (ack EmptyAcknowledgement) Acknowledgement() []byte { +func (EmptyAcknowledgement) Acknowledgement() []byte { return []byte{} } diff --git a/testing/mock/ibc_module.go b/testing/mock/ibc_module.go index 1cbbfe47fa7..a53dce74122 100644 --- a/testing/mock/ibc_module.go +++ b/testing/mock/ibc_module.go @@ -3,6 +3,7 @@ package mock import ( "bytes" "fmt" + "reflect" "strconv" "strings" @@ -10,14 +11,20 @@ import ( capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" 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" "github.com/cosmos/ibc-go/v7/modules/core/exported" ) +var ( + _ porttypes.IBCModule = (*IBCModule)(nil) + _ porttypes.PacketDataUnmarshaler = (*IBCModule)(nil) +) + // applicationCallbackError is a custom error type that will be unique for testing purposes. type applicationCallbackError struct{} -func (e applicationCallbackError) Error() string { +func (applicationCallbackError) Error() string { return "mock application callback failed" } @@ -169,6 +176,15 @@ func (im IBCModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, return nil } +// UnmarshalPacketData returns the MockPacketData. This function implements the optional +// PacketDataUnmarshaler interface required for ADR 008 support. +func (IBCModule) UnmarshalPacketData(bz []byte) (interface{}, error) { + if reflect.DeepEqual(bz, MockPacketData) { + return MockPacketData, nil + } + return nil, MockApplicationCallbackError +} + // GetMockRecvCanaryCapabilityName generates a capability name for testing OnRecvPacket functionality. func GetMockRecvCanaryCapabilityName(packet channeltypes.Packet) string { return fmt.Sprintf("%s%s%s%s", MockRecvCanaryCapabilityName, packet.GetDestPort(), packet.GetDestChannel(), strconv.Itoa(int(packet.GetSequence()))) diff --git a/testing/mock/mock.go b/testing/mock/mock.go index 20c2641512c..88c46c1bfb7 100644 --- a/testing/mock/mock.go +++ b/testing/mock/mock.go @@ -46,7 +46,7 @@ var ( MockApplicationCallbackError error = &applicationCallbackError{} ) -var _ porttypes.IBCModule = IBCModule{} +var _ porttypes.IBCModule = (*IBCModule)(nil) // Expected Interface // PortKeeper defines the expected IBC port keeper @@ -80,7 +80,7 @@ func (AppModuleBasic) ValidateGenesis(codec.JSONCodec, client.TxEncodingConfig, } // RegisterGRPCGatewayRoutes implements AppModuleBasic interface. -func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} +func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) {} // GetTxCmd implements AppModuleBasic interface. func (AppModuleBasic) GetTxCmd() *cobra.Command { @@ -110,7 +110,7 @@ func NewAppModule(pk PortKeeper) AppModule { func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} // RegisterServices implements the AppModule interface. -func (am AppModule) RegisterServices(module.Configurator) {} +func (AppModule) RegisterServices(module.Configurator) {} // InitGenesis implements the AppModule interface. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -129,7 +129,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. } // ExportGenesis implements the AppModule interface. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { +func (AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { return nil } @@ -137,11 +137,11 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { +func (AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { } // EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } diff --git a/testing/path.go b/testing/path.go index 38ccc93214d..5a671928b4d 100644 --- a/testing/path.go +++ b/testing/path.go @@ -66,7 +66,6 @@ func (path *Path) RelayPacket(packet channeltypes.Packet) error { 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 nil, nil, err diff --git a/testing/simapp/app.go b/testing/simapp/app.go index 6faeb65a698..5a601bd23f5 100644 --- a/testing/simapp/app.go +++ b/testing/simapp/app.go @@ -567,7 +567,7 @@ func NewSimApp( // Create Interchain Accounts Stack // SendPacket, since it is originating from the application to core IBC: - // icaAuthModuleKeeper.SendTx -> icaController.SendPacket -> fee.SendPacket -> channel.SendPacket + // icaControllerKeeper.SendTx -> fee.SendPacket -> channel.SendPacket // initialize ICA module with mock module as the authentication module on the controller side var icaControllerStack porttypes.IBCModule @@ -593,8 +593,7 @@ func NewSimApp( AddRoute(ibcmock.ModuleName+icacontrollertypes.SubModuleName, icaControllerStack) // ica with mock auth module stack route to ica (top level of middleware stack) // Create Mock IBC Fee module stack for testing - // SendPacket, since it is originating from the application to core IBC: - // mockModule.SendPacket -> fee.SendPacket -> channel.SendPacket + // SendPacket, mock module cannot send packets // OnRecvPacket, message that originates from core IBC and goes down to app, the flow is the otherway // channel.RecvPacket -> fee.OnRecvPacket -> mockModule.OnRecvPacket @@ -618,7 +617,7 @@ func NewSimApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper - /**** Module Options ****/ + // **** Module Options **** // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. @@ -826,8 +825,8 @@ func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Re } // Configurator returns the configurator for the app -func (a *SimApp) Configurator() module.Configurator { - return a.configurator +func (app *SimApp) Configurator() module.Configurator { + return app.configurator } // InitChainer application update at chain initialization @@ -872,8 +871,8 @@ func (app *SimApp) TxConfig() client.TxConfig { } // DefaultGenesis returns a default genesis from the registered AppModuleBasic's. -func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { - return ModuleBasics.DefaultGenesis(a.appCodec) +func (app *SimApp) DefaultGenesis() map[string]json.RawMessage { + return ModuleBasics.DefaultGenesis(app.appCodec) } // GetKey returns the KVStoreKey for the provided store key. @@ -912,7 +911,7 @@ func (app *SimApp) SimulationManager() *module.SimulationManager { // RegisterAPIRoutes registers all application module routes with the provided // API server. -func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { +func (*SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) diff --git a/testing/simapp/config.go b/testing/simapp/config.go deleted file mode 100644 index 98df982bd30..00000000000 --- a/testing/simapp/config.go +++ /dev/null @@ -1,75 +0,0 @@ -package simapp - -import ( - "flag" - - "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// List of available flags for the simulator -var ( - FlagGenesisFileValue string - FlagParamsFileValue string - FlagExportParamsPathValue string - FlagExportParamsHeightValue int - FlagExportStatePathValue string - FlagExportStatsPathValue string - FlagSeedValue int64 - FlagInitialBlockHeightValue int - FlagNumBlocksValue int - FlagBlockSizeValue int - FlagLeanValue bool - FlagCommitValue bool - FlagOnOperationValue bool // TODO: Remove in favor of binary search for invariant violation - FlagAllInvariantsValue bool - - FlagEnabledValue bool - FlagVerboseValue bool - FlagPeriodValue uint - FlagGenesisTimeValue int64 -) - -// GetSimulatorFlags gets the values of all the available simulation flags -func GetSimulatorFlags() { - // config fields - flag.StringVar(&FlagGenesisFileValue, "Genesis", "", "custom simulation genesis file; cannot be used with params file") - flag.StringVar(&FlagParamsFileValue, "Params", "", "custom simulation params file which overrides any random params; cannot be used with genesis") - flag.StringVar(&FlagExportParamsPathValue, "ExportParamsPath", "", "custom file path to save the exported params JSON") - flag.IntVar(&FlagExportParamsHeightValue, "ExportParamsHeight", 0, "height to which export the randomly generated params") - flag.StringVar(&FlagExportStatePathValue, "ExportStatePath", "", "custom file path to save the exported app state JSON") - flag.StringVar(&FlagExportStatsPathValue, "ExportStatsPath", "", "custom file path to save the exported simulation statistics JSON") - flag.Int64Var(&FlagSeedValue, "Seed", 42, "simulation random seed") - flag.IntVar(&FlagInitialBlockHeightValue, "InitialBlockHeight", 1, "initial block to start the simulation") - flag.IntVar(&FlagNumBlocksValue, "NumBlocks", 500, "number of new blocks to simulate from the initial block height") - flag.IntVar(&FlagBlockSizeValue, "BlockSize", 200, "operations per block") - flag.BoolVar(&FlagLeanValue, "Lean", false, "lean simulation log output") - flag.BoolVar(&FlagCommitValue, "Commit", false, "have the simulation commit") - flag.BoolVar(&FlagOnOperationValue, "SimulateEveryOperation", false, "run slow invariants every operation") - flag.BoolVar(&FlagAllInvariantsValue, "PrintAllInvariants", false, "print all invariants if a broken invariant is found") - - // simulation flags - flag.BoolVar(&FlagEnabledValue, "Enabled", false, "enable the simulation") - flag.BoolVar(&FlagVerboseValue, "Verbose", false, "verbose log output") - flag.UintVar(&FlagPeriodValue, "Period", 0, "run slow invariants only once every period assertions") - flag.Int64Var(&FlagGenesisTimeValue, "GenesisTime", 0, "override genesis UNIX time instead of using a random UNIX time") -} - -// NewConfigFromFlags creates a simulation from the retrieved values of the flags. -func NewConfigFromFlags() simulation.Config { - return simulation.Config{ - GenesisFile: FlagGenesisFileValue, - ParamsFile: FlagParamsFileValue, - ExportParamsPath: FlagExportParamsPathValue, - ExportParamsHeight: FlagExportParamsHeightValue, - ExportStatePath: FlagExportStatePathValue, - ExportStatsPath: FlagExportStatsPathValue, - Seed: FlagSeedValue, - InitialBlockHeight: FlagInitialBlockHeightValue, - NumBlocks: FlagNumBlocksValue, - BlockSize: FlagBlockSizeValue, - Lean: FlagLeanValue, - Commit: FlagCommitValue, - OnOperation: FlagOnOperationValue, - AllInvariants: FlagAllInvariantsValue, - } -} diff --git a/testing/simapp/params/proto.go b/testing/simapp/params/proto.go index 2a38fff0400..4270c2b0dbf 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() - codec := codec.NewProtoCodec(interfaceRegistry) + protoCdc := codec.NewProtoCodec(interfaceRegistry) return EncodingConfig{ InterfaceRegistry: interfaceRegistry, - Codec: codec, - TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), + Codec: protoCdc, + TxConfig: tx.NewTxConfig(protoCdc, tx.DefaultSignModes), Amino: cdc, } } diff --git a/testing/simapp/simd/cmd/root.go b/testing/simapp/simd/cmd/root.go index 8716b617628..2c22eb5c911 100644 --- a/testing/simapp/simd/cmd/root.go +++ b/testing/simapp/simd/cmd/root.go @@ -191,8 +191,8 @@ func addModuleInitFlags(startCmd *cobra.Command) { 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) + for _, subCmd := range cmds { + cmd.AddCommand(subCmd) } return cmd } diff --git a/testing/simapp/test_helpers.go b/testing/simapp/test_helpers.go index d72e9981048..377818f83eb 100644 --- a/testing/simapp/test_helpers.go +++ b/testing/simapp/test_helpers.go @@ -38,7 +38,8 @@ type SetupOptions struct { AppOpts servertypes.AppOptions } -func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { +// initSetup initializes a new SimApp. A Nop logger is set in SimApp. +func initSetup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { db := dbm.NewMemDB() appOptions := make(simtestutil.AppOptionsMap, 0) @@ -84,7 +85,7 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp { func SetupWithGenesisValSet(t *testing.T, valSet *cmttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { t.Helper() - app, genesisState := setup(true, 5) + app, genesisState := initSetup(true, 5) genesisState, err := simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) require.NoError(t, err) diff --git a/testing/solomachine.go b/testing/solomachine.go index 097b47f71a7..8d542eae5fe 100644 --- a/testing/solomachine.go +++ b/testing/solomachine.go @@ -516,11 +516,14 @@ func (solo *Solomachine) GenerateClientStateProof(clientState exported.ClientSta data, err := clienttypes.MarshalClientState(solo.cdc, clientState) require.NoError(solo.t, err) + merklePath := solo.GetClientStatePath(clientIDSolomachine) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetClientStatePath(clientIDSolomachine).String()), + Path: key, Data: data, } @@ -533,11 +536,14 @@ func (solo *Solomachine) GenerateConsensusStateProof(consensusState exported.Con data, err := clienttypes.MarshalConsensusState(solo.cdc, consensusState) require.NoError(solo.t, err) + merklePath := solo.GetConsensusStatePath(clientIDSolomachine, consensusHeight) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetConsensusStatePath(clientIDSolomachine, consensusHeight).String()), + Path: key, Data: data, } @@ -553,11 +559,14 @@ func (solo *Solomachine) GenerateConnOpenTryProof(counterpartyClientID, counterp data, err := solo.cdc.Marshal(&connection) require.NoError(solo.t, err) + merklePath := solo.GetConnectionStatePath(connectionIDSolomachine) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetConnectionStatePath(connectionIDSolomachine).String()), + Path: key, Data: data, } @@ -573,11 +582,14 @@ func (solo *Solomachine) GenerateChanOpenTryProof(portID, version, counterpartyC data, err := solo.cdc.Marshal(&channel) require.NoError(solo.t, err) + merklePath := solo.GetChannelStatePath(portID, channelIDSolomachine) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetChannelStatePath(portID, channelIDSolomachine).String()), + Path: key, Data: data, } @@ -593,11 +605,14 @@ func (solo *Solomachine) GenerateChanClosedProof(portID, version, counterpartyCh data, err := solo.cdc.Marshal(&channel) require.NoError(solo.t, err) + merklePath := solo.GetChannelStatePath(portID, channelIDSolomachine) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetChannelStatePath(portID, channelIDSolomachine).String()), + Path: key, Data: data, } @@ -608,11 +623,14 @@ func (solo *Solomachine) GenerateChanClosedProof(portID, version, counterpartyCh func (solo *Solomachine) GenerateCommitmentProof(packet channeltypes.Packet) []byte { commitment := channeltypes.CommitPacket(solo.cdc, packet) + merklePath := solo.GetPacketCommitmentPath(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetPacketCommitmentPath(packet.GetSourcePort(), packet.GetSourceChannel(), packet.GetSequence()).String()), + Path: key, Data: commitment, } @@ -622,11 +640,15 @@ func (solo *Solomachine) GenerateCommitmentProof(packet channeltypes.Packet) []b // GenerateAcknowledgementProof generates an acknowledgement proof. func (solo *Solomachine) GenerateAcknowledgementProof(packet channeltypes.Packet) []byte { transferAck := channeltypes.NewResultAcknowledgement([]byte{byte(1)}).Acknowledgement() + + merklePath := solo.GetPacketAcknowledgementPath(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetPacketAcknowledgementPath(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()).String()), + Path: key, Data: channeltypes.CommitAcknowledgement(transferAck), } @@ -635,11 +657,14 @@ func (solo *Solomachine) GenerateAcknowledgementProof(packet channeltypes.Packet // GenerateReceiptAbsenceProof generates a receipt absence proof for the provided packet. func (solo *Solomachine) GenerateReceiptAbsenceProof(packet channeltypes.Packet) []byte { + merklePath := solo.GetPacketReceiptPath(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) + key, err := merklePath.GetKey(1) // index 0 is the key for the IBC store in the multistore, index 1 is the key in the IBC store + require.NoError(solo.t, err) signBytes := &solomachine.SignBytes{ Sequence: solo.Sequence, Timestamp: solo.Time, Diversifier: solo.Diversifier, - Path: []byte(solo.GetPacketReceiptPath(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()).String()), + Path: key, Data: nil, } return solo.GenerateProof(signBytes)