diff --git a/e2e/Makefile b/e2e/Makefile deleted file mode 100644 index 34938edb50e..00000000000 --- a/e2e/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -DOCKER := $(shell which docker) -TEST_CONTAINERS=$(shell docker ps --filter "label=ibc-test" -a -q) - -cleanup-ibc-test-containers: - for id in $(TEST_CONTAINERS) ; do \ - $(DOCKER) stop $$id ; \ - $(DOCKER) rm $$id ; \ - done - -init: - ./scripts/init.sh - -e2e-test: init cleanup-ibc-test-containers - ./scripts/run-e2e.sh $(test) $(entrypoint) - -e2e-suite: init cleanup-ibc-test-containers - RUN_SUITE="true" ./scripts/run-e2e.sh "" $(entrypoint) - -compatibility-tests: - ./scripts/run-compatibility-tests.sh $(release_branch) - -.PHONY: cleanup-ibc-test-containers e2e-test compatibility-tests init diff --git a/e2e/README.md b/e2e/README.md deleted file mode 100644 index 7d37307c306..00000000000 --- a/e2e/README.md +++ /dev/null @@ -1,421 +0,0 @@ -# Table of Contents - -1. [How to write tests](#how-to-write-tests) - - a. [Adding a new test](#adding-a-new-test) - - b. [Running the tests with custom images](#running-tests-with-custom-images) - - b. [Code samples](#code-samples) - - [Setup](#setup) - - [Creating test users](#creating-test-users) - - [Waiting](#waiting) - - [Query wallet balances](#query-wallet-balances) - - [Broadcasting messages](#broadcasting-messages) - - [Starting the relayer](#starting-the-relayer) - - [Arbitrary commands](#arbitrary-commands) - - [IBC transfer](#ibc-transfer) -2. [Test design](#test-design) - - a. [interchaintest](#interchaintest) - - b. [CI configuration](#ci-configuration) -3. [Github Workflows](#github-workflows) -4. [Running Compatibility Tests](#running-compatibility-tests) -5. [Troubleshooting](#troubleshooting) -6. [Importable Workflow](#importable-workflow) - -# How to write tests - -## Adding a new test - -All tests should go under the [e2e](https://github.com/cosmos/ibc-go/tree/main/e2e) directory. When adding a new test, either add a new test function -to an existing test suite ***in the same file***, or create a new test suite in a new file and add test functions there. -New test files should follow the convention of `module_name_test.go`. - -After creating a new test file, be sure to add a build constraint that ensures this file will **not** be included in the package to be built when -running tests locally via `make test`. For an example of this, see any of the existing test files. - -New test suites should be composed of `testsuite.E2ETestSuite`. This type has lots of useful helper functionality that will -be quite common in most tests. - -> Note: see [here](#how-tests-are-run) for details about these requirements. - -## Running tests with custom images - -Tests can be run using a Makefile target under the e2e directory. `e2e/Makefile` - -The tests can be configured using a configuration file or environment variables. - -See [the example](./sample.config.yaml) to get started. The default location the tests look is `~/.ibc-go-e2e-config.yaml` -But this can be specified directly using the `E2E_CONFIG_PATH` environment variable. - -There are several environment variables that alter the behaviour of the make target which will override any -options specified in your config file. - -| Environment Variable | Description | Default Value | -|----------------------|-------------------------------------------|---------------| -| CHAIN_IMAGE | The image that will be used for the chain | ibc-go-simd | -| CHAIN_A_TAG | The tag used for chain A | latest | -| CHAIN_B_TAG | The tag used for chain B | latest | -| CHAIN_BINARY | The binary used in the container | simd | -| RELAYER_TAG | The tag used for the relayer | main | -| RELAYER_ID | The type of relayer to use (rly/hermes) | hermes | - -> Note: when running tests locally, **no images are pushed** to the `ghcr.io/cosmos/ibc-go-simd` registry. -The images which are used only exist on your machine. - -These environment variables allow us to run tests with arbitrary versions (from branches or released) of simd -and the go relayer. - -Every time changes are pushed to a branch or to `main`, a new `simd` image is built and pushed [here](https://github.com/orgs/cosmos/packages?repo_name=ibc-go). - -### Example Command - -```sh -export CHAIN_IMAGE="ghcr.io/cosmos/ibc-go-simd" -export CHAIN_A_TAG="main" -export CHAIN_BINARY="simd" - -# We can also specify different values for the chains if needed. -# they will default to the same as chain a. -# export CHAIN_B_TAG="main" - -export RELAYER_TAG="v2.0.0" -make e2e-test entrypoint=TestInterchainAccountsTestSuite test=TestMsgSubmitTx_SuccessfulTransfer -``` - -If `jq` is installed, you only need to specify the `test`. - -If `fzf` is also installed, you only need to run `make e2e-test` and you will be prompted with interactive test selection. - -```sh -make e2e-test test=TestMsgSubmitTx_SuccessfulTransfer -``` - -> Note: sometimes it can be useful to make changes to [ibctest](https://github.com/strangelove-ventures/interchaintest) when running tests locally. In order to do this, add the following line to -e2e/go.mod - -`replace github.com/strangelove-ventures/interchaintest => ../ibctest` - -Or point it to any local checkout you have. - -### Running tests in CI - -To run tests in CI, you can checkout the ibc-go repo and provide these environment variables -to the CI task. - -[This repo](https://github.com/chatton/ibc-go-e2e-demo) contains an example of how to do this with Github Actions. - -## Code samples - -### Setup - -Every standard test will start with this. This creates two chains and a relayer, -initializes relayer accounts on both chains, establishes a connection and a channel -between the chains. - -Both chains have started, but the relayer is not yet started. - -The relayer should be started as part of the test if required. See [Starting the Relayer](#starting-the-relayer) - -```go -relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, s.FeeMiddlewareChannelOptions()) -chainA, chainB := s.GetChains() -``` - -### Creating test users - -There are helper functions to easily create users on both chains. - -```go -chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) -chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) -``` - -### Waiting - -We can wait for some number of blocks on the specified chains if required. - -```go -chainA, chainB := s.GetChains() -err := test.WaitForBlocks(ctx, 1, chainA, chainB) -s.Require().NoError(err) -``` - -### Query wallet balances - -We can fetch balances of wallets on specific chains. - -```go -chainABalance, err := s.GetChainANativeBalance(ctx, chainAWallet) -s.Require().NoError(err) -``` - -### Broadcasting messages - -We can broadcast arbitrary messages which are signed on behalf of users created in the test. - -This example shows a multi message transaction being broadcast on chainA and signed on behalf of chainAWallet. - -```go -relayer, channelA := s.SetupChainsRelayerAndChannel(ctx, s.FeeMiddlewareChannelOptions()) -chainA, chainB := s.GetChains() - -chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) -chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - -t.Run("broadcast multi message transaction", func(t *testing.T){ - msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) - msgTransfer := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), clienttypes.NewHeight(1, 1000), 0) - resp, err := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer) - - s.AssertValidTxResponse(resp) - s.Require().NoError(err) -}) -``` - -### Starting the relayer - -The relayer can be started with the following. - -```go -t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer) -}) -``` - -### Arbitrary commands - -Arbitrary commands can be executed on a given chain. - -> Note: these commands will be fully configured to run on the chain executed on (home directory, ports configured etc.) - -However, it is preferable to [broadcast messages](#broadcasting-messages) or use a gRPC query if possible. - -```go -stdout, stderr, err := chainA.Exec(ctx, []string{"tx", "..."}, nil) -``` - -### IBC transfer - -It is possible to send an IBC transfer in two ways. - -Use the ibctest `Chain` interface (this ultimately does a docker exec) - -```go -t.Run("send IBC transfer", func(t *testing.T) { - chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName, walletAmount, nil) - s.Require().NoError(err) - s.Require().NoError(chainATx.Validate(), "chain-a ibc transfer tx is invalid") -}) -``` - -Broadcast a `MsgTransfer`. - -```go -t.Run("send IBC transfer", func(t *testing.T){ - transferMsg := transfertypes.NewMsgTransfer(channelA.PortID, channelA.ChannelID, transferAmount, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), chainBWallet.Bech32Address(chainB.Config().Bech32Prefix), clienttypes.NewHeight(1, 1000), 0) - resp, err := s.BroadcastMessages(ctx, chainA, chainAWallet, transferMsg) - s.AssertValidTxResponse(resp) - s.Require().NoError(err) -}) -``` - -## Test design - -### interchaintest - -These E2E tests use the [interchaintest framework](https://github.com/strangelove-ventures/interchaintest). This framework creates chains and relayers in containers and allows for arbitrary commands to be executed in the chain containers, -as well as allowing us to broadcast arbitrary messages which are signed on behalf of a user created in the test. - -### CI configuration - -There are two main github actions for e2e tests. - -[e2e.yaml](https://github.com/cosmos/ibc-go/blob/main/.github/workflows/e2e.yaml) which runs when collaborators create branches. - -[e2e-fork.yaml](https://github.com/cosmos/ibc-go/blob/main/.github/workflows/e2e-fork.yml) which runs when forks are created. - -In `e2e.yaml`, the `simd` image is built and pushed to [a registry](https://github.com/orgs/cosmos/packages?repo_name=ibc-go) and every test -that is run uses the image that was built. - -In `e2e-fork.yaml`, images are not pushed to this registry, but instead remain local to the host runner. - -## How tests are run - -The tests use the `matrix` feature of Github Actions. The matrix is -dynamically generated using [this command](https://github.com/cosmos/ibc-go/blob/main/cmd/build_test_matrix/main.go). - -> Note: there is currently a limitation that all tests belonging to a test suite must be in the same file. -In order to support test functions spread in different files, we would either need to manually maintain a matrix -or update the script to account for this. The script assumes there is a single test suite per test file to avoid an overly complex -generation process. - -Which looks under the `e2e` directory, and creates a task for each test suite function. - -### Example - -```go -// e2e/file_one_test.go -package e2e - -func TestFeeMiddlewareTestSuite(t *testing.T) { - suite.Run(t, new(FeeMiddlewareTestSuite)) -} - -type FeeMiddlewareTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *FeeMiddlewareTestSuite) TestA() {} -func (s *FeeMiddlewareTestSuite) TestB() {} -func (s *FeeMiddlewareTestSuite) TestC() {} - -``` - -```go -// e2e/file_two_test.go -package e2e - -func TestTransferTestSuite(t *testing.T) { - suite.Run(t, new(TransferTestSuite)) -} - -type TransferTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *TransferTestSuite) TestD() {} -func (s *TransferTestSuite) TestE() {} -func (s *TransferTestSuite) TestF() {} - -``` - -In the above example, the following would be generated. - -```json -{ - "include": [ - { - "entrypoint": "TestFeeMiddlewareTestSuite", - "test": "TestA" - }, - { - "entrypoint": "TestFeeMiddlewareTestSuite", - "test": "TestB" - }, - { - "entrypoint": "TestFeeMiddlewareTestSuite", - "test": "TestC" - }, - { - "entrypoint": "TestTransferTestSuite", - "test": "TestD" - }, - { - "entrypoint": "TestTransferTestSuite", - "test": "TestE" - }, - { - "entrypoint": "TestTransferTestSuite", - "test": "TestF" - } - ] -} -``` - -This string is used to generate a test matrix in the Github Action that runs the E2E tests. - -All tests will be run on different hosts. - -### Misceleneous - -## GitHub Workflows - -### Building and pushing a `simd` image - -If we ever need to manually build and push an image, we can do so with the [Build Simd Image](../.github/workflows/build-simd-image-from-tag.yml) GitHub workflow. - -This can be triggered manually from the UI by navigating to - -`Actions` -> `Build Simd Image` -> `Run Workflow` - -And providing the git tag. - -Alternatively, the [gh](https://cli.github.com/) CLI tool can be used to trigger this workflow. - -```bash -gh workflow run "Build Simd Image" -f tag=v3.0.0 -``` - -## Running Compatibility Tests - -To trigger the compatibility tests for a release branch, you can use the following command. - -```bash -make compatibility-tests release_branch=release/v5.0.x -``` - -This will build an image from the tip of the release branch and run all tests specified in the corresponding -json matrix files under .github/compatibility-test-matrices and is equivalent to going to the Github UI and navigating to - -`Actions` -> `Compatibility E2E` -> `Run Workflow` -> `release/v5.0.x` - -## Troubleshooting - -- On Mac, after running a lot of tests, it can happen that containers start failing. To fix this, you can try clearing existing containers and restarting the docker daemon. - - This generally manifests itself as relayer or simd containers timing out during setup stages of the test. This doesn't happen in CI. - - ```bash - # delete all images - docker system prune -af - ``` - - This issue doesn't seem to occur on other operating systems. - -### Accessing Logs - -- When a test fails in GitHub. The logs of the test will be uploaded (viewable in the summary page of the workflow). Note: There - may be some discrepancy in the logs collected and the output of interchain test. The containers may run for a some - time after the logs are collected, resulting in the displayed logs to differ slightly. - -## Importable Workflow - -This repository contains an [importable workflow](https://github.com/cosmos/ibc-go/blob/185a220244663457372185992cfc85ed9e458bf1/.github/workflows/e2e-compatibility-workflow-call.yaml) that can be used from any other repository to test chain upgrades. The workflow -can be used to test both non-IBC chains, and also IBC-enabled chains. - -### Prerequisites - -- In order to run this workflow, a docker container is required with tags for the versions you want to test. - -- Have an upgrade handler in the chain binary which is being upgraded to. - -> It's worth noting that all github repositories come with a built-in docker registry that makes it convenient to build and push images to. - -[This workflow](https://github.com/cosmos/ibc-go/blob/1da651e5e117872499e3558c2a92f887369ae262/.github/workflows/release.yml#L35-L61) can be used as a reference for how to build a docker image -whenever a git tag is pushed. - -### How to import the workflow - -You can refer to [this example](https://github.com/cosmos/ibc-go/blob/2933906d1ed25ae6dce7b7d93aa429dfa94c5a23/.github/workflows/e2e-upgrade.yaml#L9-L19) when including this workflow in your repo. - -The referenced job will do the following: - -- Create two chains using the image found at `ghcr.io/cosmos/ibc-go-simd:v4.3.0`. -- Perform IBC transfers verifying core functionality. -- Upgrade chain A to `ghcr.io/cosmos/ibc-go-simd:v5.1.0` by executing a governance proposal and using the plan name `normal upgrade`. -- Perform additional IBC transfers and verifies the upgrade and migrations ran successfully. - -> Note: The plan name will always be specific to your chain. In this instance `normal upgrade` is referring to [this upgrade handler](https://github.com/cosmos/ibc-go/blob/e9bc0bac38e84e1380ec08552cae15821143a6b6/testing/simapp/app.go#L923) - -### Workflow Options - -| Workflow Field | Purpose | -|-------------------|---------------------------------------------------| -| chain-image | The docker image to use for the test | -| chain-a-tag | The tag of chain A to use | -| chain-b-tag | The tag of chain B to use | -| chain-upgrade-tag | The tag chain A should be upgraded to | -| chain-binary | The chain binary name | -| upgrade-plan-name | The name of the upgrade plan to execute | -| test-entry-point | Always TestUpgradeTestSuite | -| test | Should be TestIBCChainUpgrade or TestChainUpgrade | - -> TestIBCChainUpgrade should be used for ibc tests, while TestChainUpgrade should be used for single chain tests. diff --git a/e2e/dockerutil/dockerutil.go b/e2e/dockerutil/dockerutil.go deleted file mode 100644 index 48fb97055d3..00000000000 --- a/e2e/dockerutil/dockerutil.go +++ /dev/null @@ -1,70 +0,0 @@ -package dockerutil - -import ( - "archive/tar" - "context" - "fmt" - "io" - "path" - - dockertypes "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - dockerclient "github.com/docker/docker/client" -) - -const testLabel = "ibc-test" - -// GetTestContainers returns all docker containers that have been created by interchain test. -// note: the test suite name must be passed as the chains are created in SetupSuite which will label -// them with the name of the test suite rather than the test. -func GetTestContainers(ctx context.Context, suiteName string, dc *dockerclient.Client) ([]dockertypes.Container, error) { - testContainers, err := dc.ContainerList(ctx, dockertypes.ContainerListOptions{ - All: true, - Filters: filters.NewArgs( - // see: https://github.com/strangelove-ventures/interchaintest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36 - // for the suiteName needed to identify test containers. - filters.Arg("label", testLabel+"="+suiteName), - ), - }) - if err != nil { - return nil, fmt.Errorf("failed listing containers: %s", err) - } - - return testContainers, nil -} - -// GetContainerLogs returns the logs of a container as a byte array. -func GetContainerLogs(ctx context.Context, dc *dockerclient.Client, containerName string) ([]byte, error) { - readCloser, err := dc.ContainerLogs(ctx, containerName, dockertypes.ContainerLogsOptions{ - ShowStdout: true, - ShowStderr: true, - }) - if err != nil { - return nil, fmt.Errorf("failed reading logs in test cleanup: %s", err) - } - return io.ReadAll(readCloser) -} - -// GetFileContentsFromContainer reads the contents of a specific file from a container. -func GetFileContentsFromContainer(ctx context.Context, dc *dockerclient.Client, containerID, absolutePath string) ([]byte, error) { - readCloser, _, err := dc.CopyFromContainer(ctx, containerID, absolutePath) - if err != nil { - return nil, fmt.Errorf("copying from container: %w", err) - } - - defer readCloser.Close() - - fileName := path.Base(absolutePath) - tr := tar.NewReader(readCloser) - - hdr, err := tr.Next() - if err != nil { - return nil, err - } - - if hdr.Name != fileName { - return nil, fmt.Errorf("expected to find %s but found %s", fileName, hdr.Name) - } - - return io.ReadAll(tr) -} diff --git a/e2e/go.mod b/e2e/go.mod deleted file mode 100644 index 00a3d222c21..00000000000 --- a/e2e/go.mod +++ /dev/null @@ -1,287 +0,0 @@ -module github.com/cosmos/ibc-go/e2e - -go 1.22.2 - -toolchain go1.22.3 - -// needed temporarily for v9. -replace ( - github.com/misko9/go-substrate-rpc-client/v4 => github.com/DimitrisJim/go-substrate-rpc-client/v4 v4.0.0-20240717100841-406da076c1d5 - github.com/strangelove-ventures/interchaintest/v8 => github.com/DimitrisJim/interchaintest/v8 v8.0.0-20240717102845-beba523a47ff -) - -require ( - cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.3.0 - cosmossdk.io/x/upgrade v0.1.3 - github.com/cometbft/cometbft v0.38.10 - github.com/cosmos/cosmos-sdk v0.50.7 - github.com/cosmos/gogoproto v1.5.0 - github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-00010101000000-000000000000 - github.com/cosmos/ibc-go/v9 v9.0.0 - github.com/docker/docker v24.0.7+incompatible - github.com/pelletier/go-toml v1.9.5 - github.com/strangelove-ventures/interchaintest/v8 v8.2.1-0.20240419152858-c8b741617cd8 - github.com/stretchr/testify v1.9.0 - go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 - golang.org/x/mod v0.19.0 - google.golang.org/grpc v1.65.0 - gopkg.in/yaml.v2 v2.4.0 -) - -require ( - cloud.google.com/go v0.115.0 // indirect - cloud.google.com/go/auth v0.6.0 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect - cloud.google.com/go/iam v1.1.9 // indirect - cloud.google.com/go/storage v1.41.0 // indirect - cosmossdk.io/api v0.7.5 // indirect - cosmossdk.io/client/v2 v2.0.0-beta.2 // indirect - cosmossdk.io/collections v0.4.0 // indirect - cosmossdk.io/core v0.11.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/store v1.1.0 // indirect - cosmossdk.io/x/feegrant v0.1.1 // indirect - cosmossdk.io/x/tx v0.13.3 // indirect - filippo.io/edwards25519 v1.1.0 // indirect - github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.2 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/ChainSafe/go-schnorrkel v1.1.0 // indirect - github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 // indirect - github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect - github.com/CosmWasm/wasmvm/v2 v2.1.0 // indirect - github.com/DataDog/datadog-go v4.8.3+incompatible // indirect - github.com/DataDog/zstd v1.5.5 // indirect - github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect - github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect - github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/StirlingMarketingGroup/go-namecase v1.0.0 // indirect - github.com/avast/retry-go/v4 v4.5.1 // indirect - github.com/aws/aws-sdk-go v1.49.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.2.0 // indirect - github.com/bits-and-blooms/bitset v1.12.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.11.3 // indirect - github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v1.1.1 // indirect - github.com/cockroachdb/redact v1.1.5 // indirect - github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.12.0 // indirect - github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.2 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect - github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.2.0 // indirect - github.com/cosmos/ibc-go/modules/capability v1.0.1 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/danieljoos/wincred v1.2.1 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/base58 v1.0.5 // 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.3.0 // indirect - github.com/desertbit/timer v1.0.1 // indirect - github.com/dgraph-io/badger/v4 v4.2.0 // indirect - github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/go-connections v0.5.0 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.7.0 // indirect - github.com/emicklei/dot v1.6.2 // indirect - github.com/ethereum/go-ethereum v1.13.14 // indirect - github.com/fatih/color v1.17.0 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.28.1 // indirect - github.com/go-kit/kit v0.13.0 // indirect - github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // 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.2.1 // 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.4 // indirect - github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/btree v1.1.2 // indirect - github.com/google/flatbuffers v24.3.25+incompatible // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.5 // indirect - github.com/gorilla/handlers v1.5.2 // indirect - github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.3 // 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.4 // indirect - github.com/hashicorp/go-hclog v1.6.3 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.3 // indirect - github.com/hashicorp/go-plugin v1.6.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 v1.0.2 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/hdevalence/ed25519consensus v0.2.0 // indirect - github.com/holiman/uint256 v1.2.4 // indirect - github.com/huandu/skiplist v1.2.0 // indirect - github.com/iancoleman/strcase v0.3.0 // indirect - github.com/icza/dyno v0.0.0-20230330125955-09f820a8d9c0 // 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.4.1 // indirect - github.com/jmespath/go-jmespath v0.4.0 // 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.17.9 // indirect - github.com/klauspost/cpuid/v2 v2.2.6 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.9 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.32.1 // indirect - github.com/linxGnu/grocksdb v1.9.2 // 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.20 // indirect - github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect - github.com/minio/highwayhash v1.0.2 // indirect - github.com/minio/sha256-simd v1.0.1 // indirect - github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2 // 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.12.0 // indirect - github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.9.0 // indirect - github.com/multiformats/go-multihash v0.2.3 // indirect - github.com/multiformats/go-varint v0.0.7 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect - github.com/oklog/run v1.1.0 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/petermattis/goid v0.0.0-20240607163614-bb94eb51e7a7 // indirect - github.com/pierrec/xxHash v0.1.5 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect - github.com/prometheus/procfs v0.15.1 // 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.12.0 // indirect - github.com/rs/cors v1.11.0 // indirect - github.com/rs/zerolog v1.33.0 // indirect - github.com/sagikazarmark/locafero v0.6.0 // indirect - github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/shamaton/msgpack/v2 v2.2.0 // indirect - github.com/sourcegraph/conc v0.3.0 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.1 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.19.0 // indirect - github.com/subosito/gotenv v1.6.0 // 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.7.0 // 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.2 // indirect - github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.4.0-alpha.1 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect - go.opentelemetry.io/otel v1.24.0 // indirect - go.opentelemetry.io/otel/metric v1.24.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.22.0 // indirect - google.golang.org/api v0.186.0 // indirect - google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.1 // indirect - lukechampine.com/blake3 v1.2.1 // indirect - lukechampine.com/uint128 v1.3.0 // indirect - modernc.org/cc/v3 v3.41.0 // indirect - modernc.org/ccgo/v3 v3.16.15 // indirect - modernc.org/libc v1.37.1 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.7.2 // indirect - modernc.org/opt v0.1.3 // indirect - modernc.org/sqlite v1.28.0 // indirect - modernc.org/strutil v1.2.0 // indirect - modernc.org/token v1.1.0 // indirect - nhooyr.io/websocket v1.8.11 // indirect - pgregory.net/rapid v1.1.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect -) - -// TODO: using version v1.0.0 causes a build failure. This is the previous version which compiles successfully. -replace ( - github.com/ChainSafe/go-schnorrkel => github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d - github.com/ChainSafe/go-schnorrkel/1 => github.com/ChainSafe/go-schnorrkel v1.0.0 - github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 -) - -// uncomment to use the local version of ibc-go, you will need to run `go mod tidy` in e2e directory. -replace github.com/cosmos/ibc-go/v9 => ../ - -replace github.com/cosmos/ibc-go/modules/light-clients/08-wasm => ../modules/light-clients/08-wasm - -replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 - -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/e2e/go.sum b/e2e/go.sum deleted file mode 100644 index 946031aaf67..00000000000 --- a/e2e/go.sum +++ /dev/null @@ -1,1825 +0,0 @@ -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.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.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.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -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/auth v0.6.0 h1:5x+d6b5zdezZ7gmLWD1m/xNjnaQ2YDhmIz/HH3doy1g= -cloud.google.com/go/auth v0.6.0/go.mod h1:b4acV+jLQDyjwm4OXHYjNvRi4jvGBzHWJRtJcy+2P4g= -cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4= -cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q= -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/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -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.9 h1:oSkYLVtVme29uGYrOcKcvJRht7cHJpYD09GM9JaR0TE= -cloud.google.com/go/iam v1.1.9/go.mod h1:Nt1eDWNYH9nGQg3d/mY7U1hvfGmsaG9o/kLGoLoLXjQ= -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.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.41.0 h1:RusiwatSu6lHeEXe3kglxakAmAbfV+rhtPqA6i8RBx0= -cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= -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.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= -cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= -cosmossdk.io/client/v2 v2.0.0-beta.2 h1:jnTKB0PLb7qunQibijAftwmNjUbsIAf1sPjF5HaCW/E= -cosmossdk.io/client/v2 v2.0.0-beta.2/go.mod h1:8QAyewD7rDWeJGqedFBpeqJ9XLIJAkt1TDhCf1gsN9o= -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.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= -cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -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.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= -cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= -cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= -cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= -cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= -cosmossdk.io/x/circuit v0.1.1 h1:KPJCnLChWrxD4jLwUiuQaf5mFD/1m7Omyo7oooefBVQ= -cosmossdk.io/x/circuit v0.1.1/go.mod h1:B6f/urRuQH8gjt4eLIXfZJucrbreuYrKh5CSjaOxr+Q= -cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= -cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= -cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= -cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= -cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g= -cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys= -cosmossdk.io/x/upgrade v0.1.3 h1:q4XpXc6zp0dX6x74uBtfN6+J7ikaQev5Bla6Q0ADLK8= -cosmossdk.io/x/upgrade v0.1.3/go.mod h1:jOdQhnaY5B8CDUoUbed23/Lre0Dk+r6BMQE40iKlVVQ= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -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.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-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/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= -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/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= -github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 h1:oknQF/iIhf5lVjbwjsVDzDByupRhga8nhA3NAmwyHDA= -github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420/go.mod h1:KYkiMX5AbOlXXYfxkrYPrRPV6EbVUALTQh5ptUOJzu8= -github.com/CosmWasm/wasmvm/v2 v2.1.0 h1:bleLhNA36hM8iPjFJsNRi9RjrQW6MtXafw2+wVjAWAE= -github.com/CosmWasm/wasmvm/v2 v2.1.0/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= -github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= -github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/DimitrisJim/go-substrate-rpc-client/v4 v4.0.0-20240717100841-406da076c1d5 h1:u0DTEVAbtD6ZecV9gAgzC6f7sfW+vi+BgdHivIb43Bk= -github.com/DimitrisJim/go-substrate-rpc-client/v4 v4.0.0-20240717100841-406da076c1d5/go.mod h1:vJqS/VE2+iAiQlp0O2l+wW9QkHDotcaSQWaU4Ako6Ss= -github.com/DimitrisJim/interchaintest/v8 v8.0.0-20240717102845-beba523a47ff h1:ITEAJekoSKe5kVo2vUwf37XxnuPwTTzqfd4wLaR2bkk= -github.com/DimitrisJim/interchaintest/v8 v8.0.0-20240717102845-beba523a47ff/go.mod h1:5AnXR5CAbB/Q0syC0akZR4pyPov4nOaB8eifZPz6Pds= -github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= -github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= -github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc= -github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= -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/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 v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -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/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/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -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.5.1 h1:AxIx0HGi4VZ3I02jr78j5lZ3M6x1E0Ivxa6b0pUUh7o= -github.com/avast/retry-go/v4 v4.5.1/go.mod h1:/sipNsvNB3RRuT5iNcb6h73nw3IBmXJ/H3XrCQYSOpc= -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.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= -github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -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/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.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= -github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= -github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ensb7o3sC0= -github.com/btcsuite/btcd/btcec/v2 v2.3.3/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/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.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= -github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= -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.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.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/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= -github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= -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/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.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= -github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= -github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a h1:f52TdbU4D5nozMAhO9TvTJ2ZMCXtN4VIAmfrrZ0JXQ4= -github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= -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 v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= -github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= -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-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.10 h1:2ePuglchT+j0Iao+cfmt/nw5U7K2lnGDzXSUPGVdXaU= -github.com/cometbft/cometbft v0.38.10/go.mod h1:jHPx9vQpWzPHEAiYI/7EDKaB1NXhK6o3SArrrY8ExKc= -github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= -github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= -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/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-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= -github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= -github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= -github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.50.7 h1:LsBGKxifENR/DN4E1RZaitsyL93HU44x0p8EnMHp4V4= -github.com/cosmos/cosmos-sdk v0.50.7/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= -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.5.0 h1:SDVwzEqZDDBoslaeZg+dGE55hdzHfgUA40pEanMh52o= -github.com/cosmos/gogoproto v1.5.0/go.mod h1:iUM31aofn3ymidYG6bUR5ZFrk+Om8p5s754eMUcyp8I= -github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= -github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= -github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= -github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E= -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.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -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.4/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/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= -github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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.5 h1:hwcieUM3pfPnE/6p3J100zoRfGkQxBulZHo7GZfOqic= -github.com/decred/base58 v1.0.5/go.mod h1:s/8lukEHFA6bUQQb/v3rjUySJ2hu+RioCzLukAVkrfw= -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/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.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/desertbit/timer v1.0.1 h1:yRpYNn5Vaaj6QXecdLMPMJsW81JLiI1eokUft5nBmeo= -github.com/desertbit/timer v1.0.1/go.mod h1:htRrYeY5V/t4iu1xCJ5XsQvp4xve8QulXXctAzxqcwE= -github.com/dgraph-io/badger/v4 v4.2.0 h1:kJrlajbXXL9DFTNuhhu9yCx7JJa4qpYWxtE8BzuWsEs= -github.com/dgraph-io/badger/v4 v4.2.0/go.mod h1:qfCqhPoWDFJRx1gp5QwwyGo8xk1lbHUxvK9nK0OGAak= -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/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= -github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= -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.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= -github.com/dvsekhvalnov/jose2go v1.7.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/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= -github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -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/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= -github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/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.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/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.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= -github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -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/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.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= -github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= -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= -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-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -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/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -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/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -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/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -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.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -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/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/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/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= -github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/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.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= -github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= -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-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/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= -github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -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/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.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.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -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.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= -github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -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.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= -github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= -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.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= -github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -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.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= -github.com/gorilla/websocket v1.5.3/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.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= -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.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= -github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= -github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= -github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -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-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= -github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= -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-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= -github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= -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/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= -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 v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= -github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= -github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -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/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= -github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -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/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= -github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -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/icza/dyno v0.0.0-20230330125955-09f820a8d9c0 h1:nHoRIX8iXob3Y2kdt9KsjyIb7iApSvb3vgsd93xb5Ow= -github.com/icza/dyno v0.0.0-20230330125955-09f820a8d9c0/go.mod h1:c1tRKs5Tx7E2+uHGSyyncziFjvGpgv4H2HrqXeUQ/Uk= -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/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.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= -github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= -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/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/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -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.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= -github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -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/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/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= -github.com/lib/pq v1.10.9/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.32.1 h1:wy1J4kZIZxOaej6NveTWCZmHiJ/kY7GoAqXgqNCnPps= -github.com/libp2p/go-libp2p v0.32.1/go.mod h1:hXXC3kXPlBZ1eu8Q2hptGrMB4mZ3048JUoS4EKaHW5c= -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.9.2 h1:O3mzvO0wuzQ9mtlHbDrShixyVjVbmuqTjFrzlf43wZ8= -github.com/linxGnu/grocksdb v1.9.2/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -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= -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/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/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/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/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-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= -github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= -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/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= -github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -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/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -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/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= -github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= -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.12.0 h1:1QlibTFkoXJuDjjYsMHhE73TnzJQl8FSWatk/0gxGzE= -github.com/multiformats/go-multiaddr v0.12.0/go.mod h1:WmZXgObOQOYp9r3cslLlppkrz1FYSHmE834dfz/lWu8= -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.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= -github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= -github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= -github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= -github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= -github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -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.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= -github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= -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/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -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.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= -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-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -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.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.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= -github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -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-20240607163614-bb94eb51e7a7 h1:CtBLeckhC0zAXgp5V8uR30CNYH0JgCJoxCg5+6i2zQk= -github.com/petermattis/goid v0.0.0-20240607163614-bb94eb51e7a7/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= -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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/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.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= -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.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -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.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -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/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-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -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.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.11.0 h1:0B9GE/r9Bc2UxRMMtymBkHTenPkHDv0CW4Y98GBY+po= -github.com/rs/cors v1.11.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -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/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk= -github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= -github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= -github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -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/shamaton/msgpack/v2 v2.2.0 h1:IP1m01pHwCrMa6ZccP9B3bqxEMKMSmMVAVKk54g3L/Y= -github.com/shamaton/msgpack/v2 v2.2.0/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI= -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.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/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/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= -github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= -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.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= -github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.1/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.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= -github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= -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/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.1.5-0.20170601210322-f6abca593680/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -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.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -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.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= -github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -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.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= -github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -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= -github.com/tyler-smith/go-bip32 v1.0.0/go.mod h1:onot+eHknzV4BVPwrzqY5OoVpyCvnwD7lMawL5aQupE= -github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -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/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.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= -github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= -github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= -go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= -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/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= -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/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.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -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.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -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= -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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -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-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= -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.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -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-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-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.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -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.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -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.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -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-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-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-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-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-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= -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-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -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.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= -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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -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.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -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= -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-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= -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.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.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= -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/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -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.186.0 h1:n2OPp+PPXX0Axh4GuSsL5QL8xQCTb2oDwyzPnQvqUug= -google.golang.org/api v0.186.0/go.mod h1:hvRbBmgoje49RV3xqVXrmP6w93n6ehGgIVPYrGtBFFc= -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/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-20200324203455-a04cca1dde73/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-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-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-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= -google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= -google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -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.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -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/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -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/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/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= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= -lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= -lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= -lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q= -modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= -modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= -modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= -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/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v1.37.1 h1:Wi3qhejztgB3hOYQGMc8NwePETHAWXmlU+GQnBNTrw8= -modernc.org/libc v1.37.1/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= -modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= -modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= -modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= -modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= -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.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= -nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= -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= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/e2e/internal/directories/directories.go b/e2e/internal/directories/directories.go deleted file mode 100644 index d4724ec280e..00000000000 --- a/e2e/internal/directories/directories.go +++ /dev/null @@ -1,40 +0,0 @@ -package directories - -import ( - "fmt" - "os" - "path" - "strings" - "testing" -) - -const ( - e2eDir = "e2e" - - // DefaultGenesisExportPath is the default path to which Genesis debug files will be exported to. - DefaultGenesisExportPath = "diagnostics/genesis.json" -) - -// E2E finds the e2e directory above the test. -func E2E(t *testing.T) (string, error) { - t.Helper() - - wd, err := os.Getwd() - if err != nil { - return "", err - } - - const maxAttempts = 100 - count := 0 - for ; !strings.HasSuffix(wd, e2eDir) && count < maxAttempts; wd = path.Dir(wd) { - count++ - } - - // arbitrary value to avoid getting stuck in an infinite loop if this is called - // in a context where the e2e directory does not exist. - if count > maxAttempts { - return "", fmt.Errorf("unable to find e2e directory after %d tries", maxAttempts) - } - - return wd, nil -} diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go deleted file mode 100644 index cd959428690..00000000000 --- a/e2e/relayer/relayer.go +++ /dev/null @@ -1,197 +0,0 @@ -package relayer - -import ( - "context" - "fmt" - "testing" - - dockerclient "github.com/docker/docker/client" - "github.com/pelletier/go-toml" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "github.com/strangelove-ventures/interchaintest/v8/relayer" - "github.com/strangelove-ventures/interchaintest/v8/relayer/hermes" - "go.uber.org/zap" -) - -const ( - Rly = "rly" - Hermes = "hermes" - Hyperspace = "hyperspace" - - HermesRelayerRepository = "ghcr.io/informalsystems/hermes" - hermesRelayerUser = "2000:2000" - RlyRelayerRepository = "ghcr.io/cosmos/relayer" - rlyRelayerUser = "100:1000" - - // TODO: https://github.com/cosmos/ibc-go/issues/4965 - HyperspaceRelayerRepository = "ghcr.io/misko9/hyperspace" - hyperspaceRelayerUser = "1000:1000" - - // relativeHermesConfigFilePath is the path to the hermes config file relative to the home directory within the container. - relativeHermesConfigFilePath = ".hermes/config.toml" -) - -// Config holds configuration values for the relayer used in the tests. -type Config struct { - // Tag is the tag used for the relayer image. - Tag string `yaml:"tag"` - // ID specifies the type of relayer that this is. - ID string `yaml:"id"` - // Image is the image that should be used for the relayer. - Image string `yaml:"image"` -} - -// 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.ID { - case Rly: - return newCosmosRelayer(t, cfg.Tag, logger, dockerClient, network, cfg.Image) - case Hermes: - return newHermesRelayer(t, cfg.Tag, logger, dockerClient, network, cfg.Image) - case Hyperspace: - return newHyperspaceRelayer(t, cfg.Tag, logger, dockerClient, network, cfg.Image) - default: - panic(fmt.Errorf("unknown relayer specified: %s", cfg.ID)) - } -} - -// ApplyPacketFilter applies a packet filter to the hermes config file, which specifies a complete set of channels -// to watch for packets. -func ApplyPacketFilter(ctx context.Context, t *testing.T, r ibc.Relayer, chainID string, channels []ibc.ChannelOutput) error { - t.Helper() - - h, ok := r.(*hermes.Relayer) - if !ok { - t.Logf("relayer %T does not support packet filtering, or it has not been implemented yet.", r) - return nil - } - - return modifyHermesConfigFile(ctx, h, func(config map[string]interface{}) error { - chains, ok := config["chains"].([]map[string]interface{}) - if !ok { - return fmt.Errorf("failed to get chains from hermes config") - } - var chain map[string]interface{} - for _, c := range chains { - if c["id"] == chainID { - chain = c - break - } - } - - if chain == nil { - return fmt.Errorf("failed to find chain with id %s", chainID) - } - - var channelEndpoints [][]string - for _, c := range channels { - channelEndpoints = append(channelEndpoints, []string{c.PortID, c.ChannelID}) - } - - // [chains.packet_filter] - // # policy = 'allow' - // # list = [ - // # ['ica*', '*'], - // # ['transfer', 'channel-0'], - // # ] - - // TODO(chatton): explicitly enable watching of ICA channels - // this will ensure the ICA tests pass, but this will need to be modified to make sure - // ICA tests will succeed in parallel. - channelEndpoints = append(channelEndpoints, []string{"ica*", "*"}) - - // we explicitly override the full list, this allows this function to provide a complete set of channels to watch. - chain["packet_filter"] = map[string]interface{}{ - "policy": "allow", - "list": channelEndpoints, - } - - return nil - }) -} - -// modifyHermesConfigFile reads the hermes config file, applies a modification function and returns an error if any. -func modifyHermesConfigFile(ctx context.Context, h *hermes.Relayer, modificationFn func(map[string]interface{}) error) error { - bz, err := h.ReadFileFromHomeDir(ctx, relativeHermesConfigFilePath) - if err != nil { - return fmt.Errorf("failed to read hermes config file: %w", err) - } - - var config map[string]interface{} - if err := toml.Unmarshal(bz, &config); err != nil { - return fmt.Errorf("failed to unmarshal hermes config bytes") - } - - if modificationFn != nil { - if err := modificationFn(config); err != nil { - return fmt.Errorf("failed to modify hermes config: %w", err) - } - } - - bz, err = toml.Marshal(config) - if err != nil { - return fmt.Errorf("failed to marshal hermes config bytes") - } - - return h.WriteFileToHomeDir(ctx, relativeHermesConfigFilePath, bz) -} - -// 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, relayerImage string) ibc.Relayer { - t.Helper() - - customImageOption := relayer.CustomDockerImage(relayerImage, tag, rlyRelayerUser) - relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events - - relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) - - return relayerFactory.Build( - t, dockerClient, network, - ) -} - -// newHermesRelayer returns an instance of the hermes relayer. -func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network, relayerImage string) ibc.Relayer { - t.Helper() - - customImageOption := relayer.CustomDockerImage(relayerImage, tag, hermesRelayerUser) - relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.Hermes, logger, customImageOption) - - return relayerFactory.Build( - t, dockerClient, network, - ) -} - -// newHyperspaceRelayer returns an instance of the hyperspace relayer. -func newHyperspaceRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network, relayerImage string) ibc.Relayer { - t.Helper() - - customImageOption := relayer.CustomDockerImage(relayerImage, tag, hyperspaceRelayerUser) - relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.Hyperspace, logger, customImageOption) - - return relayerFactory.Build( - t, dockerClient, network, - ) -} - -// 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 Map) AddRelayer(testName string, ibcrelayer ibc.Wallet) { - if _, ok := r[testName]; !ok { - r[testName] = make(map[ibc.Wallet]bool) - } - r[testName][ibcrelayer] = true -} - -// containsRelayer returns true if the given relayer is in the relayer set for the given test name. -func (r Map) ContainsRelayer(testName string, wallet ibc.Wallet) bool { - if relayerSet, ok := r[testName]; ok { - return relayerSet[wallet] - } - return false -} diff --git a/e2e/sample.config.yaml b/e2e/sample.config.yaml deleted file mode 100644 index c8af5fa1db1..00000000000 --- a/e2e/sample.config.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# This file contains configuration for running e2e tests. -# Many of these fields can be overridden with environment variables. -# All fields that support this have the corresponding environment variable name in a comment beside the field. - ---- -chains: - # the entry at index 0 corresponds to CHAIN_A -- chainId: chainA-1 - numValidators: 1 - numFullNodes: 0 - image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE - tag: main # override with CHAIN_A_TAG - binary: simd # override with CHAIN_BINARY - - # the entry at index 1 corresponds to CHAIN_B -- chainId: chainB-1 - numValidators: 1 - numFullNodes: 0 - image: ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE - tag: main # override with CHAIN_B_TAG - binary: simd # override with CHAIN_BINARY - -activeRelayer: hermes # override with RELAYER_ID -relayers: - - id: hermes - image: ghcr.io/informalsystems/hermes - tag: "1.10.0" - - id: rly - image: ghcr.io/cosmos/relayer - tag: "latest" - - id: hyperspace - image: ghcr.io/misko9/hyperspace - tag: "20231122v39" - -cometbft: - logLevel: info - -debug: - # setting this value to true will force log collection even if the test passes. - dumpLogs: false - # settings this value to true will keep the containers running after the test finishes. - keepContainers: true - -# Required only for upgrade tests. -# Chain A will be upgraded the specified tag. -# The plan name must be registered as an upgrade handler in the given tag. -upgrade: - planName: "" - tag: "" diff --git a/e2e/scripts/init.sh b/e2e/scripts/init.sh deleted file mode 100755 index be4efd994fa..00000000000 --- a/e2e/scripts/init.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -# TODO: when we are using config files for CI we can remove this. -# ref: https://github.com/cosmos/ibc-go/issues/4697 -# if running in CI we just use env vars. -if [[ "${CI:-}" = "true" ]]; then - exit 0 -fi - -# ensure_config_file makes sure there is a config file for the e2e tests either by creating a new one using the sample, -# it is copied to either the default location or the specified env location. -function ensure_config_file(){ - local config_file_path="${HOME}/.ibc-go-e2e-config.yaml" - if [[ ! -z "${E2E_CONFIG_PATH:-}" ]]; then - config_file_path="${E2E_CONFIG_PATH}" - fi - if [[ ! -f "${config_file_path}" ]]; then - echo "creating e2e config file from sample." - echo "copying sample.config.yaml to ${config_file_path}" - cp sample.config.yaml "${config_file_path}" - fi - echo "using config file at ${config_file_path} for e2e test" -} - -ensure_config_file diff --git a/e2e/scripts/run-compatibility-tests.sh b/e2e/scripts/run-compatibility-tests.sh deleted file mode 100755 index 76ef12a5e5d..00000000000 --- a/e2e/scripts/run-compatibility-tests.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -Eeou pipefail - -function run_full_compatibility_suite(){ - local release_branch="${1}" - gh workflow run e2e-compatibility.yaml -f release-branch=${release_branch} - sleep 5 # can take some time for the workflow to appear - run_id="$(gh run list "--workflow=e2e-compatibility.yaml" | grep workflow_dispatch | grep -Eo "[0-9]{9,11}" | head -n 1)" - gh run view ${run_id} --web -} - -RELEASE_BRANCH="${1}" -run_full_compatibility_suite "${RELEASE_BRANCH}" diff --git a/e2e/scripts/run-e2e.sh b/e2e/scripts/run-e2e.sh deleted file mode 100755 index 58c5b3db683..00000000000 --- a/e2e/scripts/run-e2e.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -TEST="${1:-}" -export ENTRY_POINT="${2:-}" - -function _verify_jq() { - if ! command -v jq > /dev/null ; then - echo "jq is required to extract test entrypoint." - exit 1 - fi -} - -function _verify_fzf() { - if ! command -v fzf > /dev/null ; then - echo "fzf is required to interactively select a test." - exit 1 - fi -} - -function _verify_test_dependencies() { - if [ -z "${TEST}" ]; then - # fzf is only required if we are not explicitly specifying a test. - _verify_fzf - fi - # jq is always required to determine the entrypoint of the test. - _verify_jq -} - -function _verify_suite_dependencies() { - if [ -z "${ENTRY_POINT}" ]; then - # fzf is only required if we are not explicitly specifying an entrypoint. - _verify_fzf - fi - # jq is always required to determine the entrypoint of the test. - _verify_jq -} - -# _select_test_config lets you dynamically select a test config for the specific test. -function _select_test_config() { - ls -1 dev-configs | fzf -} - -# _get_test returns the test that should be used in the e2e test. If an argument is provided, that argument -# is returned. Otherwise, fzf is used to interactively choose from all available tests. -function _get_test(){ - # if an argument is provided, it is used directly. This enables the drop down selection with fzf. - if [ -n "${1:-}" ]; then - echo "$1" - return - # if fzf and jq are installed, we can use them to provide an interactive mechanism to select from all available tests. - else - cd .. - go run -mod=readonly cmd/build_test_matrix/main.go | jq -r '.include[] | .test' | fzf - cd - > /dev/null - fi -} - -# run_test runs a single E2E test. -function run_test() { - _verify_test_dependencies - - # if test is set, that is used directly, otherwise the test can be interactively provided if fzf is installed. - TEST="$(_get_test ${TEST})" - - # if jq is installed, we can automatically determine the test entrypoint. - if command -v jq > /dev/null; then - cd .. - ENTRY_POINT="$(go run -mod=readonly cmd/build_test_matrix/main.go | jq -r --arg TEST "${TEST}" '.include[] | select( .test == $TEST) | .entrypoint')" - cd - > /dev/null - fi - - - # find the name of the file that has this test in it. - test_file="$(grep --recursive --files-with-matches './' -e "${TEST}()")" - - # we run the test on the directory as specific files may reference types in other files but within the package. - test_dir="$(dirname $test_file)" - - # run the test file directly, this allows log output to be streamed directly in the terminal sessions - # without needed to wait for the test to finish. - # it shouldn't take 30m, but the wasm test can be quite slow, so we can be generous. - go test -v "${test_dir}" --run ${ENTRY_POINT} -testify.m ^${TEST}$ -timeout 30m -} - -# run_suite runs a full E2E test suite. -function run_suite() { - _verify_suite_dependencies - # if jq is installed, we can automatically determine the test entrypoint. - if [ -z "${ENTRY_POINT}" ]; then - cd .. - ENTRY_POINT="$(go run -mod=readonly cmd/build_test_matrix/main.go | jq -r '.include[] | .entrypoint' | uniq | fzf)" - cd - > /dev/null - fi - - # find the name of the file that has this test in it. - test_file="$(grep --recursive --files-with-matches './tests' -e "${ENTRY_POINT}(")" - test_dir="$(dirname $test_file)" - - go test -v "${test_dir}" --run ^${ENTRY_POINT}$ -timeout 30m -p 10 -} - - -# if the dev configs directory is present, enable fzf completion to select a test config file to use. -if [[ -d "dev-configs" ]]; then - export E2E_CONFIG_PATH="$(pwd)/dev-configs/$(_select_test_config)" - echo "Using configuration file at ${E2E_CONFIG_PATH}" -fi - -if [ "${RUN_SUITE:-}" = "true" ]; then - run_suite -else - run_test -fi - diff --git a/e2e/semverutil/semver.go b/e2e/semverutil/semver.go deleted file mode 100644 index 8c93920b9cc..00000000000 --- a/e2e/semverutil/semver.go +++ /dev/null @@ -1,61 +0,0 @@ -package semverutil - -import ( - "strings" - - "golang.org/x/mod/semver" -) - -// FeatureReleases contains the combination of versions the feature was released in. -type FeatureReleases struct { - // MajorVersion is the major version in the format including the v. E.g. "v6" - MajorVersion string - // MinorVersions contains a slice of versions including the v and excluding the patch version. E.g. v2.5 - MinorVersions []string -} - -// IsSupported returns whether the version contains the feature. -// This is true if the version is greater than or equal to the major version it was released in -// or is greater than or equal to the list of minor releases it was included in. -func (fr FeatureReleases) IsSupported(versionStr string) bool { - // in our compatibility tests, our images are in the format of "release-v1.0.x". We want to actually look at - // the "1.0.x" part but we also need this to be a valid version. We can change it to "1.0.0" - // TODO: change the way we provide the ibc-go version. This should be done in a more flexible way such - // as docker labels/metadata instead of the tag, as this will only work for our versioning scheme. - const releasePrefix = "release-" - if strings.HasPrefix(versionStr, releasePrefix) { - versionStr = versionStr[len(releasePrefix):] - // replace x with 999 so the release version is always larger than the others in the release line. - versionStr = strings.ReplaceAll(versionStr, "x", "999") - } - - // assume any non-semantic version formatted version supports the feature - // this will be useful during development of the e2e test with the new feature - if !semver.IsValid(versionStr) { - return true - } - - if fr.MajorVersion != "" && GTE(versionStr, fr.MajorVersion) { - return true - } - - for _, mv := range fr.MinorVersions { - mvMajor, versionStrMajor := semver.Major(mv), semver.Major(versionStr) - - if semverEqual(mvMajor, versionStrMajor) { - return GTE(versionStr, mv) - } - } - - return false -} - -// GTE returns true if versionA is greater than or equal to versionB. -func GTE(versionA, versionB string) bool { - return semver.Compare(versionA, versionB) >= 0 -} - -// semverEqual returns true if versionA is equal to versionB. -func semverEqual(versionA, versionB string) bool { - return semver.Compare(versionA, versionB) == 0 -} diff --git a/e2e/semverutil/semver_test.go b/e2e/semverutil/semver_test.go deleted file mode 100644 index b90c2832da8..00000000000 --- a/e2e/semverutil/semver_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package semverutil_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/ibc-go/e2e/semverutil" -) - -func TestIsSupported(t *testing.T) { - releases := semverutil.FeatureReleases{ - MajorVersion: "v6", - MinorVersions: []string{ - "v2.5", - "v3.4", - "v4.2", - "v5.1", - }, - } - - testCases := []struct { - name string - version string - expSupported bool - }{ - {"non semantic version", "main", true}, - {"non semantic version starts with v", "v", true}, - {"non semantic version", "pr-155", true}, - {"non semantic version", "major.5.1", true}, - {"non semantic version", "1.minor.1", true}, - {"supported semantic version", "v2.5.0", true}, - {"supported semantic version", "v3.4.0", true}, - {"supported semantic version", "v4.2.0", true}, - {"supported semantic version", "v5.1.0", true}, - {"supported semantic version", "v6.0.0", true}, - {"supported semantic version", "v6.1.0", true}, - {"supported semantic version", "v7.1.0", true}, - {"supported semantic version", "v22.5.1", true}, - {"supported semantic version pre-release", "v6.0.0-rc.0", false}, - {"supported semantic version without v", "2.5.0", true}, - {"unsupported semantic version", "v1.5.0", false}, - {"unsupported semantic version", "v2.4.5", false}, - {"unsupported semantic version", "v3.1.0", false}, - {"unsupported semantic version", "v4.1.0", false}, - {"unsupported semantic version", "v5.0.0", false}, - {"unsupported semantic version on partially supported major line", "v2.4.0", false}, - } - - for _, tc := range testCases { - supported := releases.IsSupported(tc.version) - require.Equal(t, tc.expSupported, supported, tc.name) - } -} diff --git a/e2e/tests/core/02-client/client_test.go b/e2e/tests/core/02-client/client_test.go deleted file mode 100644 index 36931d8df92..00000000000 --- a/e2e/tests/core/02-client/client_test.go +++ /dev/null @@ -1,489 +0,0 @@ -//go:build !test_e2e - -package client - -import ( - "context" - "fmt" - "slices" - "sort" - "strings" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - upgradetypes "cosmossdk.io/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - 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" - cmtjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/privval" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" - cmtprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" - cmttypes "github.com/cometbft/cometbft/types" - cmtversion "github.com/cometbft/cometbft/version" - - "github.com/cosmos/ibc-go/e2e/dockerutil" - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - wasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" - ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -const ( - invalidHashValue = "invalid_hash" -) - -func TestClientTestSuite(t *testing.T) { - testifysuite.Run(t, new(ClientTestSuite)) -} - -type ClientTestSuite struct { - testsuite.E2ETestSuite -} - -// QueryAllowedClients queries the on-chain AllowedClients parameter for 02-client -func (s *ClientTestSuite) QueryAllowedClients(ctx context.Context, chain ibc.Chain) []string { - res, err := query.GRPCQuery[clienttypes.QueryClientParamsResponse](ctx, chain, &clienttypes.QueryClientParamsRequest{}) - s.Require().NoError(err) - - return res.Params.AllowedClients -} - -// TestScheduleIBCUpgrade_Succeeds tests that a governance proposal to schedule an IBC software upgrade is successful. -func (s *ClientTestSuite) TestScheduleIBCUpgrade_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - const planHeight = int64(300) - var newChainID string - - t.Run("execute proposal for MsgIBCSoftwareUpgrade", func(t *testing.T) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(authority) - - clientState, err := query.ClientState(ctx, chainB, ibctesting.FirstClientID) - s.Require().NoError(err) - - originalChainID := clientState.(*ibctm.ClientState).ChainId - revisionNumber := clienttypes.ParseChainID(originalChainID) - // increment revision number even with new chain ID to prevent loss of misbehaviour detection support - newChainID, err = clienttypes.SetRevisionNumber(originalChainID, revisionNumber+1) - s.Require().NoError(err) - s.Require().NotEqual(originalChainID, newChainID) - - upgradedClientState, ok := clientState.(*ibctm.ClientState) - s.Require().True(ok) - upgradedClientState.ChainId = newChainID - - scheduleUpgradeMsg, err := clienttypes.NewMsgIBCSoftwareUpgrade( - authority.String(), - upgradetypes.Plan{ - Name: "upgrade-client", - Height: planHeight, - }, - upgradedClientState, - ) - s.Require().NoError(err) - s.ExecuteAndPassGovV1Proposal(ctx, scheduleUpgradeMsg, chainA, chainAWallet) - }) - - t.Run("check that IBC software upgrade has been scheduled successfully on chainA", func(t *testing.T) { - // checks there is an upgraded client state stored - upgradedCsResp, err := query.GRPCQuery[clienttypes.QueryUpgradedClientStateResponse](ctx, chainA, &clienttypes.QueryUpgradedClientStateRequest{}) - s.Require().NoError(err) - - clientStateAny := upgradedCsResp.UpgradedClientState - - cfg := chainA.Config().EncodingConfig - var cs ibcexported.ClientState - err = cfg.InterfaceRegistry.UnpackAny(clientStateAny, &cs) - s.Require().NoError(err) - - upgradedClientState, ok := cs.(*ibctm.ClientState) - s.Require().True(ok) - s.Require().Equal(upgradedClientState.ChainId, newChainID) - - planResponse, err := query.GRPCQuery[upgradetypes.QueryCurrentPlanResponse](ctx, chainA, &upgradetypes.QueryCurrentPlanRequest{}) - s.Require().NoError(err) - - plan := planResponse.Plan - - s.Require().Equal("upgrade-client", plan.Name) - s.Require().Equal(planHeight, plan.Height) - }) -} - -// TestRecoverClient_Succeeds tests that a governance proposal to recover a client using a MsgRecoverClient is successful. -func (s *ClientTestSuite) TestRecoverClient_Succeeds() { - t := s.T() - ctx := context.TODO() - - var ( - pathName string - 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.Second * 10 - ) - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - t.Run("create substitute client with correct trusting period", func(t *testing.T) { - // TODO: update when client identifier created is accessible - // currently assumes first client is 07-tendermint-0 - substituteClientID = clienttypes.FormatClientIdentifier(ibcexported.Tendermint, 0) - - pathName = s.GetPaths(testName)[0] - }) - - chainA, chainB := s.GetChains() - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - t.Run("create subject client with bad trusting period", func(t *testing.T) { - createClientOptions := ibc.CreateClientOptions{ - TrustingPeriod: badTrustingPeriod.String(), - } - - s.SetupClients(ctx, relayer, createClientOptions) - - // TODO: update when client identifier created is accessible - // currently assumes second client is 07-tendermint-1 - subjectClientID = clienttypes.FormatClientIdentifier(ibcexported.Tendermint, 1) - }) - - time.Sleep(badTrustingPeriod) - - t.Run("update substitute client", func(t *testing.T) { - s.UpdateClients(ctx, relayer, pathName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("check status of each client", func(t *testing.T) { - t.Run("substitute should be active", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, substituteClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status) - }) - - t.Run("subject should be expired", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, subjectClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Expired.String(), status) - }) - }) - - t.Run("execute proposal for MsgRecoverClient", func(t *testing.T) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - recoverClientMsg := clienttypes.NewMsgRecoverClient(authority.String(), subjectClientID, substituteClientID) - s.Require().NotNil(recoverClientMsg) - s.ExecuteAndPassGovV1Proposal(ctx, recoverClientMsg, chainA, chainAWallet) - }) - - t.Run("check status of each client", func(t *testing.T) { - t.Run("substitute should be active", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, substituteClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status) - }) - - t.Run("subject should be active", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, subjectClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status) - }) - }) -} - -func (s *ClientTestSuite) TestClient_Update_Misbehaviour() { - t := s.T() - ctx := context.TODO() - - var ( - trustedHeight clienttypes.Height - latestHeight clienttypes.Height - clientState ibcexported.ClientState - header *cmtservice.Header - signers []cmttypes.PrivValidator - validatorSet []*cmttypes.Validator - maliciousHeader *ibctm.Header - err error - ) - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - - t.Run("update clients", func(t *testing.T) { - err := relayer.UpdateClients(ctx, s.GetRelayerExecReporter(), s.GetPaths(testName)[0]) - s.Require().NoError(err) - - clientState, err = query.ClientState(ctx, chainA, ibctesting.FirstClientID) - s.Require().NoError(err) - }) - - t.Run("fetch trusted height", func(t *testing.T) { - tmClientState, ok := clientState.(*ibctm.ClientState) - s.Require().True(ok) - - trustedHeight = tmClientState.LatestHeight - s.Require().True(trustedHeight.GT(clienttypes.ZeroHeight())) - }) - - t.Run("update clients", func(t *testing.T) { - err := relayer.UpdateClients(ctx, s.GetRelayerExecReporter(), s.GetPaths(testName)[0]) - s.Require().NoError(err) - - clientState, err = query.ClientState(ctx, chainA, ibctesting.FirstClientID) - s.Require().NoError(err) - }) - - t.Run("fetch client state latest height", func(t *testing.T) { - tmClientState, ok := clientState.(*ibctm.ClientState) - s.Require().True(ok) - - latestHeight = tmClientState.LatestHeight - s.Require().True(latestHeight.GT(clienttypes.ZeroHeight())) - }) - - t.Run("create validator set", func(t *testing.T) { - var validators []*cmtservice.Validator - - t.Run("fetch block header at latest client state height", func(t *testing.T) { - headerResp, err := query.GRPCQuery[cmtservice.GetBlockByHeightResponse](ctx, chainB, &cmtservice.GetBlockByHeightRequest{ - Height: int64(latestHeight.GetRevisionHeight()), - }) - s.Require().NoError(err) - - header = &headerResp.SdkBlock.Header - }) - - t.Run("get validators at latest height", func(t *testing.T) { - validators, err = query.GetValidatorSetByHeight(ctx, chainB, latestHeight.GetRevisionHeight()) - s.Require().NoError(err) - }) - - t.Run("extract validator private keys", func(t *testing.T) { - privateKeys := s.extractChainPrivateKeys(ctx, chainB) - s.Require().NotEmpty(privateKeys, "private keys are empty") - - for i, pv := range privateKeys { - pubKey, err := pv.GetPubKey() - s.Require().NoError(err) - - validator := cmttypes.NewValidator(pubKey, validators[i].VotingPower) - err = validator.ValidateBasic() - s.Require().NoError(err, "invalid validator: %s", err) - - validatorSet = append(validatorSet, validator) - signers = append(signers, pv) - } - }) - }) - - s.Require().NotEmpty(validatorSet, "validator set is empty") - - t.Run("create malicious header", func(t *testing.T) { - valSet := cmttypes.NewValidatorSet(validatorSet) - err := valSet.ValidateBasic() - s.Require().NoError(err, "invalid validator set: %s", err) - maliciousHeader, err = createMaliciousTMHeader(chainB.Config().ChainID, int64(latestHeight.GetRevisionHeight()), trustedHeight, - header.GetTime(), valSet, valSet, signers, header) - s.Require().NoError(err) - }) - - t.Run("update client with duplicate misbehaviour header", func(t *testing.T) { - rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - msgUpdateClient, err := clienttypes.NewMsgUpdateClient(ibctesting.FirstClientID, maliciousHeader, rlyWallet.FormattedAddress()) - s.Require().NoError(err) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgUpdateClient) - s.AssertTxSuccess(txResp) - }) - - t.Run("ensure client status is frozen", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, ibctesting.FirstClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Frozen.String(), status) - }) -} - -// TestAllowedClientsParam tests changing the AllowedClients parameter using a governance proposal -func (s *ClientTestSuite) TestAllowedClientsParam() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("ensure allowed clients are set to the default", func(t *testing.T) { - allowedClients := s.QueryAllowedClients(ctx, chainA) - - defaultAllowedClients := clienttypes.DefaultAllowedClients - if !testvalues.AllowAllClientsWildcardFeatureReleases.IsSupported(chainAVersion) { - defaultAllowedClients = []string{ibcexported.Solomachine, ibcexported.Tendermint, ibcexported.Localhost, wasmtypes.Wasm} - } - 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 - t.Run("change the allowed client to only allow solomachine clients", func(t *testing.T) { - if testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(authority) - - msg := clienttypes.NewMsgUpdateParams(authority.String(), clienttypes.NewParams(allowedClient)) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainA, chainAWallet) - } else { - value, err := cmtjson.Marshal([]string{allowedClient}) - s.Require().NoError(err) - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(ibcexported.ModuleName, string(clienttypes.KeyAllowedClients), string(value)), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainA, chainAWallet, proposal) - } - }) - - t.Run("validate the param was successfully changed", func(t *testing.T) { - allowedClients := s.QueryAllowedClients(ctx, chainA) - s.Require().Equal([]string{allowedClient}, allowedClients) - }) - - t.Run("ensure querying non-allowed client's status returns Unauthorized Status", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, ibctesting.FirstClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Unauthorized.String(), status) - - status, err = query.ClientStatus(ctx, chainA, ibcexported.Localhost) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Unauthorized.String(), status) - }) -} - -// extractChainPrivateKeys returns a slice of cmttypes.PrivValidator which hold the private keys for all validator -// nodes for a given chain. -func (s *ClientTestSuite) extractChainPrivateKeys(ctx context.Context, chain ibc.Chain) []cmttypes.PrivValidator { - testContainers, err := dockerutil.GetTestContainers(ctx, s.SuiteName(), s.DockerClient) - s.Require().NoError(err) - s.Require().NotEmpty(testContainers, "no test containers found") - - var filePvs []privval.FilePVKey - var pvs []cmttypes.PrivValidator - for _, container := range testContainers { - isNodeForDifferentChain := !strings.Contains(container.Names[0], chain.Config().ChainID) - isFullNode := strings.Contains(container.Names[0], fmt.Sprintf("%s-fn", chain.Config().ChainID)) - if isNodeForDifferentChain || isFullNode { - s.T().Logf("skipping container %s for chain %s", container.Names[0], chain.Config().ChainID) - continue - } - - validatorPrivKey := fmt.Sprintf("/var/cosmos-chain/%s/config/priv_validator_key.json", chain.Config().Name) - privKeyFileContents, err := dockerutil.GetFileContentsFromContainer(ctx, s.DockerClient, container.ID, validatorPrivKey) - s.Require().NoError(err) - - var filePV privval.FilePVKey - err = cmtjson.Unmarshal(privKeyFileContents, &filePV) - s.Require().NoError(err) - filePvs = append(filePvs, filePV) - } - - // We sort by address as GetValidatorSetByHeight also sorts by address. When iterating over them, the index - // will correspond to the correct ibcmock.PV. - sort.SliceStable(filePvs, func(i, j int) bool { - return filePvs[i].Address.String() < filePvs[j].Address.String() - }) - - for _, filePV := range filePvs { - pvs = append(pvs, cmttypes.NewMockPVWithParams( - filePV.PrivKey, false, false, - )) - } - - return pvs -} - -// createMaliciousTMHeader creates a header with the provided trusted height with an invalid app hash. -func createMaliciousTMHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *cmttypes.ValidatorSet, signers []cmttypes.PrivValidator, oldHeader *cmtservice.Header) (*ibctm.Header, error) { - tmHeader := cmttypes.Header{ - Version: cmtprotoversion.Consensus{Block: cmtversion.BlockProtocol, App: 2}, - ChainID: chainID, - Height: blockHeight, - Time: timestamp, - LastBlockID: ibctesting.MakeBlockID(make([]byte, tmhash.Size), 10_000, make([]byte, tmhash.Size)), - LastCommitHash: oldHeader.GetLastCommitHash(), - ValidatorsHash: tmValSet.Hash(), - NextValidatorsHash: tmValSet.Hash(), - DataHash: tmhash.Sum([]byte(invalidHashValue)), - ConsensusHash: tmhash.Sum([]byte(invalidHashValue)), - AppHash: tmhash.Sum([]byte(invalidHashValue)), - LastResultsHash: tmhash.Sum([]byte(invalidHashValue)), - EvidenceHash: tmhash.Sum([]byte(invalidHashValue)), - ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck - } - - hhash := tmHeader.Hash() - blockID := ibctesting.MakeBlockID(hhash, 3, tmhash.Sum([]byte(invalidHashValue))) - voteSet := cmttypes.NewVoteSet(chainID, blockHeight, 1, cmtproto.PrecommitType, tmValSet) - - extCommit, err := cmttypes.MakeExtCommit(blockID, blockHeight, 1, voteSet, signers, timestamp, false) - if err != nil { - return nil, err - } - - signedHeader := &cmtproto.SignedHeader{ - Header: tmHeader.ToProto(), - Commit: extCommit.ToCommit().ToProto(), - } - - valSet, err := tmValSet.ToProto() - if err != nil { - return nil, err - } - - trustedVals, err := tmTrustedVals.ToProto() - if err != nil { - return nil, err - } - - return &ibctm.Header{ - SignedHeader: signedHeader, - ValidatorSet: valSet, - TrustedHeight: trustedHeight, - TrustedValidators: trustedVals, - }, nil -} diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go deleted file mode 100644 index 0c03555b6e8..00000000000 --- a/e2e/tests/core/03-connection/connection_test.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build !test_e2e - -package connection - -import ( - "context" - "fmt" - "strconv" - "strings" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" - ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestConnectionTestSuite(t *testing.T) { - testifysuite.Run(t, new(ConnectionTestSuite)) -} - -type ConnectionTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *ConnectionTestSuite) CreateConnectionTestPath(testName string) (ibc.Relayer, ibc.ChannelOutput) { - return s.CreatePaths(ibc.DefaultClientOpts(), s.TransferChannelOptions(), testName), s.GetChainAChannelForTest(testName) -} - -// QueryMaxExpectedTimePerBlockParam queries the on-chain max expected time per block param for 03-connection -func (s *ConnectionTestSuite) QueryMaxExpectedTimePerBlockParam(ctx context.Context, chain ibc.Chain) uint64 { - if testvalues.SelfParamsFeatureReleases.IsSupported(chain.Config().Images[0].Version) { - res, err := query.GRPCQuery[connectiontypes.QueryConnectionParamsResponse](ctx, chain, &connectiontypes.QueryConnectionParamsRequest{}) - s.Require().NoError(err) - - return res.Params.MaxExpectedTimePerBlock - } - res, err := query.GRPCQuery[paramsproposaltypes.QueryParamsResponse](ctx, chain, ¶msproposaltypes.QueryParamsRequest{ - Subspace: ibcexported.ModuleName, - Key: string(connectiontypes.KeyMaxExpectedTimePerBlock), - }) - s.Require().NoError(err) - - // removing additional strings that are used for amino - delay := strings.ReplaceAll(res.Param.Value, "\"", "") - // convert to uint64 - uinttime, err := strconv.ParseUint(delay, 10, 64) - s.Require().NoError(err) - - return uinttime -} - -// TestMaxExpectedTimePerBlockParam tests changing the MaxExpectedTimePerBlock param using a governance proposal -func (s *ConnectionTestSuite) TestMaxExpectedTimePerBlockParam() { - t := s.T() - ctx := context.TODO() - testName := t.Name() - relayer, channelA := s.CreateConnectionTestPath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - chainBDenom := chainB.Config().Denom - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - - 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("ensure delay is set to the default of 30 seconds", func(t *testing.T) { - delay := s.QueryMaxExpectedTimePerBlockParam(ctx, chainA) - s.Require().Equal(uint64(connectiontypes.DefaultTimePerBlock), delay) - }) - - t.Run("change the delay to 60 seconds", func(t *testing.T) { - delay := uint64(1 * time.Minute) - if testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(authority) - - msg := connectiontypes.NewMsgUpdateParams(authority.String(), connectiontypes.NewParams(delay)) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainA, chainAWallet) - } else { - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(ibcexported.ModuleName, string(connectiontypes.KeyMaxExpectedTimePerBlock), fmt.Sprintf(`"%d"`, delay)), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainA, chainAWallet, proposal) - } - }) - - t.Run("validate the param was successfully changed", func(t *testing.T) { - expectedDelay := uint64(1 * time.Minute) - delay := s.QueryMaxExpectedTimePerBlockParam(ctx, chainA) - s.Require().Equal(expectedDelay, delay) - }) - - t.Run("ensure packets can be received, send from chainB to chainA", func(t *testing.T) { - t.Run("send tokens from chainB to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBDenom), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - 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, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - }) -} diff --git a/e2e/tests/data/ics10_grandpa_cw.wasm.gz b/e2e/tests/data/ics10_grandpa_cw.wasm.gz deleted file mode 100755 index cccae7aeeaf..00000000000 Binary files a/e2e/tests/data/ics10_grandpa_cw.wasm.gz and /dev/null differ diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go deleted file mode 100644 index 49e0e788e11..00000000000 --- a/e2e/tests/interchain_accounts/base_test.go +++ /dev/null @@ -1,539 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -// orderMapping is a mapping from channel ordering to the string representation of the ordering. -// the representation can be different depending on the relayer implementation. -var orderMapping = map[channeltypes.Order][]string{ - channeltypes.ORDERED: {channeltypes.ORDERED.String(), "Ordered"}, - channeltypes.UNORDERED: {channeltypes.UNORDERED.String(), "Unordered"}, -} - -func TestInterchainAccountsTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsTestSuite)) -} - -type InterchainAccountsTestSuite struct { - testsuite.E2ETestSuite -} - -// RegisterInterchainAccount will attempt to register an interchain account on the counterparty chain. -func (s *InterchainAccountsTestSuite) RegisterInterchainAccount(ctx context.Context, chain ibc.Chain, user ibc.Wallet, msgRegisterAccount *controllertypes.MsgRegisterInterchainAccount) { - txResp := s.BroadcastMessages(ctx, chain, user, msgRegisterAccount) - s.AssertTxSuccess(txResp) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { - s.testMsgSendTxSuccessfulTransfer(channeltypes.ORDERED) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_UnorderedChannel() { - s.testMsgSendTxSuccessfulTransfer(channeltypes.UNORDERED) -} - -func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulTransfer(order channeltypes.Order) { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - var hostAccount string - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, order) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - icaChannel := channels[0] - - s.Require().Contains(orderMapping[order], icaChannel.Ordering) - }) - - t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - _, err = query.Balance(ctx, chainB, hostAccount, chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - }) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientFunds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - var hostAccount string - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - }) - - t.Run("fail to execute bank transfer over ICA", func(t *testing.T) { - t.Run("verify empty host wallet", func(t *testing.T) { - hostAccountBalance, err := query.Balance(ctx, chainB, hostAccount, chainB.Config().Denom) - - s.Require().NoError(err) - s.Require().Zero(hostAccountBalance.Int64()) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - txResp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(txResp) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - - t.Run("verify balance is the same", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - }) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReopeningICA() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - var ( - portID string - hostAccount string - - initialChannelID = "channel-1" - channelIDAfterReopening = "channel-2" - ) - - t.Run("register interchain account", func(t *testing.T) { - var err error - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterInterchainAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - s.RegisterInterchainAccount(ctx, chainA, controllerAccount, msgRegisterInterchainAccount) - portID, err = icatypes.NewControllerPortID(controllerAddress) - s.Require().NoError(err) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - _, err = query.Channel(ctx, chainA, portID, initialChannelID) - s.Require().NoError(err) - }) - - // stop the relayer to let the submit tx message time out - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("submit tx message with bank transfer message times out", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(1), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - // this sleep is to allow the packet to timeout - time.Sleep(1 * time.Second) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify channel is closed due to timeout on ordered channel", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, portID, initialChannelID) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.CLOSED, channel.State, "the channel was not in an expected state") - }) - - t.Run("verify tokens not transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - _, err = query.Balance(ctx, chainB, hostAccount, chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - - // re-register interchain account to reopen the channel now that it has been closed due to timeout - // on an ordered channel - t.Run("register interchain account", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterInterchainAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - s.RegisterInterchainAccount(ctx, chainA, controllerAccount, msgRegisterInterchainAccount) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - - t.Run("verify new channel is now open and interchain account has been reregistered with the same portID", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, portID, channelIDAfterReopening) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.OPEN, channel.State, "the channel was not in an expected state") - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(5*time.Minute), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - // time for the packet to be relayed - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB)) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulSubmitGovProposal() { - s.testMsgSendTxSuccessfulGovProposal(channeltypes.ORDERED) -} - -func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulSubmitGovProposal_UnorderedChannel() { - s.testMsgSendTxSuccessfulGovProposal(channeltypes.UNORDERED) -} - -func (s *InterchainAccountsTestSuite) testMsgSendTxSuccessfulGovProposal(order channeltypes.Order) { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - var hostAccount string - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, order) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - icaChannel := channels[0] - - s.Require().Contains(orderMapping[order], icaChannel.Ordering) - }) - - t.Run("interchain account submits a governance proposal on behalf of the corresponding owner account", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx for MsgSubmitProposal", func(t *testing.T) { - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainB) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - testProposal := &controllertypes.MsgUpdateParams{ - Signer: govModuleAddress.String(), - Params: controllertypes.NewParams(false), - } - - msg, err := govv1.NewMsgSubmitProposal( - []sdk.Msg{testProposal}, - sdk.NewCoins(sdk.NewCoin(chainB.Config().Denom, sdkmath.NewInt(10_000_000))), - hostAccount, "e2e", "e2e", "e2e", false, - ) - s.Require().NoError(err) - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msg}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - - t.Run("verify proposal included", func(t *testing.T) { - proposalResp, err := query.GRPCQuery[govv1.QueryProposalResponse](ctx, chainB, &govv1.QueryProposalRequest{ProposalId: 1}) - s.Require().NoError(err) - - s.Require().Equal("e2e", proposalResp.Proposal.Title) - }) - }) -} diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go deleted file mode 100644 index 9b27d42db2e..00000000000 --- a/e2e/tests/interchain_accounts/gov_test.go +++ /dev/null @@ -1,125 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestInterchainAccountsGovTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsGovTestSuite)) -} - -type InterchainAccountsGovTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBAccount.FormattedAddress() - - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - t.Run("execute proposal for MsgRegisterInterchainAccount", func(t *testing.T) { - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, govModuleAddress.String(), version, channeltypes.ORDERED) - s.ExecuteAndPassGovV1Proposal(ctx, msgRegisterAccount, chainA, controllerAccount) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - - var interchainAccAddr string - t.Run("verify interchain account registration success", func(t *testing.T) { - var err error - interchainAccAddr, err = query.InterchainAccount(ctx, chainA, govModuleAddress.String(), ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotZero(len(interchainAccAddr)) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - }) - - t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account, so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: interchainAccAddr, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("execute proposal for MsgSendTx", func(t *testing.T) { - msgBankSend := &banktypes.MsgSend{ - FromAddress: interchainAccAddr, - ToAddress: chainBAddress, - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(govModuleAddress.String(), ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - s.ExecuteAndPassGovV1Proposal(ctx, msgSendTx, chainA, controllerAccount) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) // wait for the ica tx to be relayed - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - _, err = query.Balance(ctx, chainB, interchainAccAddr, chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - }) -} diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go deleted file mode 100644 index 361d80190da..00000000000 --- a/e2e/tests/interchain_accounts/groups_test.go +++ /dev/null @@ -1,215 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - grouptypes "github.com/cosmos/cosmos-sdk/x/group" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -const ( - // DefaultGroupMemberWeight is the members voting weight. - // A group members weight is used in the sum of `YES` votes required to meet a decision policy threshold. - DefaultGroupMemberWeight = "1" - - // DefaultGroupThreshold is the minimum weighted sum of `YES` votes that must be met or - // exceeded for a proposal to succeed. - DefaultGroupThreshold = "1" - - // DefaultMetadata defines a reusable metadata string for testing purposes - DefaultMetadata = "custom metadata" - - // DefaultMinExecutionPeriod is the minimum duration after the proposal submission - // where members can start sending MsgExec. This means that the window for - // sending a MsgExec transaction is: - // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - // where max_execution_period is a app-specific config, defined in the keeper. - // If not set, min_execution_period will default to 0. - DefaultMinExecutionPeriod = time.Duration(0) - - // DefaultVotingPeriod is the duration from submission of a proposal to the end of voting period - // Within this times votes can be submitted with MsgVote. - DefaultVotingPeriod = time.Minute - - // InitialGroupID is the first group ID generated by x/group - InitialGroupID = 1 - - // InitialProposalID is the first group proposal ID generated by x/group - InitialProposalID = 1 -) - -func TestInterchainAccountsGroupsTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsGroupsTestSuite)) -} - -type InterchainAccountsGroupsTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *InterchainAccountsGroupsTestSuite) QueryGroupPolicyAddress(ctx context.Context, chain ibc.Chain) string { - res, err := query.GRPCQuery[grouptypes.QueryGroupPoliciesByGroupResponse](ctx, chain, &grouptypes.QueryGroupPoliciesByGroupRequest{ - GroupId: InitialGroupID, // always use the initial group id - }) - s.Require().NoError(err) - - return res.GroupPolicies[0].Address -} - -func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegration() { - t := s.T() - ctx := context.TODO() - - var ( - groupPolicyAddr string - interchainAccAddr string - err error - ) - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - t.Run("create group with new threshold decision policy", func(t *testing.T) { - members := []grouptypes.MemberRequest{ - { - Address: chainAAddress, - Weight: DefaultGroupMemberWeight, - }, - } - - decisionPolicy := grouptypes.NewThresholdDecisionPolicy(DefaultGroupThreshold, DefaultVotingPeriod, DefaultMinExecutionPeriod) - msgCreateGroupWithPolicy, err := grouptypes.NewMsgCreateGroupWithPolicy(chainAAddress, members, DefaultMetadata, DefaultMetadata, true, decisionPolicy) - s.Require().NoError(err) - - txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgCreateGroupWithPolicy) - s.AssertTxSuccess(txResp) - }) - - t.Run("submit proposal for MsgRegisterInterchainAccount", func(t *testing.T) { - groupPolicyAddr = s.QueryGroupPolicyAddress(ctx, chainA) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, groupPolicyAddr, icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID), channeltypes.ORDERED) - - msgSubmitProposal, err := grouptypes.NewMsgSubmitProposal(groupPolicyAddr, []string{chainAAddress}, []sdk.Msg{msgRegisterAccount}, DefaultMetadata, grouptypes.Exec_EXEC_UNSPECIFIED, "e2e groups proposal: for MsgRegisterInterchainAccount", "e2e groups proposal: for MsgRegisterInterchainAccount") - s.Require().NoError(err) - - txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgSubmitProposal) - s.AssertTxSuccess(txResp) - }) - - t.Run("vote and exec proposal", func(t *testing.T) { - msgVote := &grouptypes.MsgVote{ - ProposalId: InitialProposalID, - Voter: chainAAddress, - Option: grouptypes.VOTE_OPTION_YES, - Exec: grouptypes.Exec_EXEC_TRY, - } - - txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgVote) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account registration success", func(t *testing.T) { - interchainAccAddr, err = query.InterchainAccount(ctx, chainA, groupPolicyAddr, ibctesting.FirstConnectionID) - s.Require().NotEmpty(interchainAccAddr) - s.Require().NoError(err) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) // 1 transfer (created by default), 1 interchain-accounts - }) - - t.Run("fund interchain account wallet", func(t *testing.T) { - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: interchainAccAddr, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("submit proposal for MsgSendTx", func(t *testing.T) { - msgBankSend := &banktypes.MsgSend{ - FromAddress: interchainAccAddr, - ToAddress: chainBAddress, - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgBankSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSubmitTx := controllertypes.NewMsgSendTx(groupPolicyAddr, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - msgSubmitProposal, err := grouptypes.NewMsgSubmitProposal(groupPolicyAddr, []string{chainAAddress}, []sdk.Msg{msgSubmitTx}, DefaultMetadata, grouptypes.Exec_EXEC_UNSPECIFIED, "e2e groups proposal: for MsgRegisterInterchainAccount", "e2e groups proposal: for MsgRegisterInterchainAccount") - s.Require().NoError(err) - - txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgSubmitProposal) - s.AssertTxSuccess(txResp) - }) - - t.Run("vote and exec proposal", func(t *testing.T) { - msgVote := &grouptypes.MsgVote{ - ProposalId: InitialProposalID + 1, - Voter: chainAAddress, - Option: grouptypes.VOTE_OPTION_YES, - Exec: grouptypes.Exec_EXEC_TRY, - } - - txResp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgVote) - s.AssertTxSuccess(txResp) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - balance, err := query.Balance(ctx, chainB, chainBAddress, chainB.Config().Denom) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - - balance, err = query.Balance(ctx, chainB, interchainAccAddr, chainB.Config().Denom) - s.Require().NoError(err) - - expected = testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - s.Require().Equal(expected, balance.Int64()) - }) -} diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go deleted file mode 100644 index 96d53ad4b86..00000000000 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ /dev/null @@ -1,374 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestIncentivizedInterchainAccountsTestSuite(t *testing.T) { - testifysuite.Run(t, new(IncentivizedInterchainAccountsTestSuite)) -} - -type IncentivizedInterchainAccountsTestSuite struct { - InterchainAccountsTestSuite -} - -func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSend_Incentivized() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - var ( - chainADenom = chainA.Config().Denom - interchainAcc = "" - testFee = testvalues.DefaultFee(chainADenom) - ) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - chainARelayerUser, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - relayerAStartingBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - version := "" // allow version to be specified by the controller chain since both chains should support incentivized channels - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAccount.FormattedAddress(), version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - var channelOutput ibc.ChannelOutput - t.Run("verify interchain account", func(t *testing.T) { - var err error - interchainAcc, err = query.InterchainAccount(ctx, chainA, controllerAccount.FormattedAddress(), ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotZero(len(interchainAcc)) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - - // interchain accounts channel at index: 0 - channelOutput = channels[0] - - s.Require().NoError(test.WaitForBlocks(ctx, 2, chainA, chainB)) - }) - - t.Run("execute interchain account bank send through controller", func(t *testing.T) { - t.Run("fund interchain account wallet on host chainB", func(t *testing.T) { - // fund the interchain account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: interchainAcc, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelOutput.Counterparty.PortID, channelOutput.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelOutput.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("broadcast incentivized MsgSendTx", func(t *testing.T) { - msgPayPacketFee := &feetypes.MsgPayPacketFee{ - Fee: testvalues.DefaultFee(chainADenom), - SourcePortId: channelOutput.PortID, - SourceChannelId: channelOutput.ChannelID, - Signer: controllerAccount.FormattedAddress(), - } - - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAcc, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAccount.FormattedAddress(), ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - resp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgPayPacketFee, msgSendTx) - s.AssertTxSuccess(resp) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB)) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("verify interchain account sent tokens", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - _, err = query.Balance(ctx, chainB, interchainAcc, chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, controllerAccount) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) -} - -func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_Incentivized() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - var ( - chainADenom = chainA.Config().Denom - interchainAcc = "" - testFee = testvalues.DefaultFee(chainADenom) - ) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - chainARelayerUser, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - relayerAStartingBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - version := "" // allow version to be specified by the controller chain since both chains should support incentivized channels - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAccount.FormattedAddress(), version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - var channelOutput ibc.ChannelOutput - t.Run("verify interchain account", func(t *testing.T) { - var err error - interchainAcc, err = query.InterchainAccount(ctx, chainA, controllerAccount.FormattedAddress(), ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotZero(len(interchainAcc)) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - - // interchain accounts channel at index: 0 - channelOutput = channels[0] - - s.Require().NoError(test.WaitForBlocks(ctx, 2, chainA, chainB)) - }) - - t.Run("execute interchain account bank send through controller", func(t *testing.T) { - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelOutput.Counterparty.PortID, channelOutput.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelOutput.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("stop relayer", func(t *testing.T) { - err := relayer.StopRelayer(ctx, s.GetRelayerExecReporter()) - s.Require().NoError(err) - }) - - t.Run("broadcast incentivized MsgSendTx", func(t *testing.T) { - msgPayPacketFee := &feetypes.MsgPayPacketFee{ - Fee: testvalues.DefaultFee(chainADenom), - SourcePortId: channelOutput.PortID, - SourceChannelId: channelOutput.ChannelID, - Signer: controllerAccount.FormattedAddress(), - } - - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAcc, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAccount.FormattedAddress(), ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - resp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgPayPacketFee, msgSendTx) - s.AssertTxSuccess(resp) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB)) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("verify interchain account did not send tokens", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - _, err = query.Balance(ctx, chainB, interchainAcc, chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - 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) { - actualBalance, err := s.GetChainANativeBalance(ctx, controllerAccount) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) -} diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go deleted file mode 100644 index edadfcc7ec9..00000000000 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ /dev/null @@ -1,481 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v9/modules/core/exported" - localhost "github.com/cosmos/ibc-go/v9/modules/light-clients/09-localhost" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestInterchainAccountsLocalhostTestSuite(t *testing.T) { - testifysuite.Run(t, new(LocalhostInterchainAccountsTestSuite)) -} - -type LocalhostInterchainAccountsTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.CreateDefaultPaths(testName) - - chainA, _ := s.GetChains() - - chainADenom := chainA.Config().Denom - - rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userBWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - var ( - msgChanOpenInitRes channeltypes.MsgChannelOpenInitResponse - msgChanOpenTryRes channeltypes.MsgChannelOpenTryResponse - ack []byte - packet channeltypes.Packet - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA), "failed to wait for blocks") - - version := icatypes.NewDefaultMetadataString(exported.LocalhostConnectionID, exported.LocalhostConnectionID) - controllerPortID, err := icatypes.NewControllerPortID(userAWallet.FormattedAddress()) - s.Require().NoError(err) - - t.Run("channel open init localhost - broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(exported.LocalhostConnectionID, userAWallet.FormattedAddress(), version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgRegisterAccount) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenInitRes)) - }) - - t.Run("channel open try localhost", func(t *testing.T) { - msgChanOpenTry := channeltypes.NewMsgChannelOpenTry( - icatypes.HostPortID, icatypes.Version, - channeltypes.ORDERED, []string{exported.LocalhostConnectionID}, - controllerPortID, msgChanOpenInitRes.ChannelId, - version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenTry) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenTryRes)) - }) - - t.Run("channel open ack localhost", func(t *testing.T) { - msgChanOpenAck := channeltypes.NewMsgChannelOpenAck( - controllerPortID, msgChanOpenInitRes.ChannelId, - msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenAck) - s.AssertTxSuccess(txResp) - }) - - t.Run("channel open confirm localhost", func(t *testing.T) { - msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm( - icatypes.HostPortID, msgChanOpenTryRes.ChannelId, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("query localhost interchain accounts channel ends", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndA) - - channelEndB, err := query.Channel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndB) - - s.Require().Equal(channelEndA.ConnectionHops, channelEndB.ConnectionHops) - }) - - t.Run("verify interchain account registration and deposit funds", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - walletAmount := ibc.WalletAmount{ - Address: interchainAccAddress, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainADenom, - } - - s.Require().NoError(chainA.SendFunds(ctx, interchaintest.FaucetAccountKeyName, walletAmount)) - }) - - t.Run("send packet localhost interchain accounts", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAccAddress, - ToAddress: userBWallet.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainADenom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(userAWallet.FormattedAddress(), exported.LocalhostConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) - s.AssertTxSuccess(txResp) - - packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - }) - - t.Run("recv packet localhost interchain accounts", func(t *testing.T) { - msgRecvPacket := channeltypes.NewMsgRecvPacket(packet, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) - s.AssertTxSuccess(txResp) - - ack, err = ibctesting.ParseAckFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(ack) - }) - - t.Run("acknowledge packet localhost interchain accounts", func(t *testing.T) { - msgAcknowledgement := channeltypes.NewMsgAcknowledgement(packet, ack, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgAcknowledgement) - s.AssertTxSuccess(txResp) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainA, userBWallet.FormattedAddress(), chainADenom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) -} - -func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChannel_Localhost() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.CreateDefaultPaths(testName) - - chainA, _ := s.GetChains() - - chainADenom := chainA.Config().Denom - - rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userBWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - var ( - msgChanOpenInitRes channeltypes.MsgChannelOpenInitResponse - msgChanOpenTryRes channeltypes.MsgChannelOpenTryResponse - ack []byte - packet channeltypes.Packet - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA), "failed to wait for blocks") - - version := icatypes.NewDefaultMetadataString(exported.LocalhostConnectionID, exported.LocalhostConnectionID) - controllerPortID, err := icatypes.NewControllerPortID(userAWallet.FormattedAddress()) - s.Require().NoError(err) - - t.Run("channel open init localhost - broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(exported.LocalhostConnectionID, userAWallet.FormattedAddress(), version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgRegisterAccount) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenInitRes)) - }) - - t.Run("channel open try localhost", func(t *testing.T) { - msgChanOpenTry := channeltypes.NewMsgChannelOpenTry( - icatypes.HostPortID, icatypes.Version, - channeltypes.ORDERED, []string{exported.LocalhostConnectionID}, - controllerPortID, msgChanOpenInitRes.ChannelId, - version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenTry) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenTryRes)) - }) - - t.Run("channel open ack localhost", func(t *testing.T) { - msgChanOpenAck := channeltypes.NewMsgChannelOpenAck( - controllerPortID, msgChanOpenInitRes.ChannelId, - msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenAck) - s.AssertTxSuccess(txResp) - }) - - t.Run("channel open confirm localhost", func(t *testing.T) { - msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm( - icatypes.HostPortID, msgChanOpenTryRes.ChannelId, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("query localhost interchain accounts channel ends", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndA) - - channelEndB, err := query.Channel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndB) - - s.Require().Equal(channelEndA.ConnectionHops, channelEndB.ConnectionHops) - }) - - t.Run("verify interchain account registration and deposit funds", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - walletAmount := ibc.WalletAmount{ - Address: interchainAccAddress, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainADenom, - } - - s.Require().NoError(chainA.SendFunds(ctx, interchaintest.FaucetAccountKeyName, walletAmount)) - }) - - t.Run("send localhost interchain accounts packet with timeout", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAccAddress, - ToAddress: userBWallet.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainADenom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(userAWallet.FormattedAddress(), exported.LocalhostConnectionID, uint64(1), packetData) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) - s.AssertTxSuccess(txResp) - - packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - }) - - t.Run("timeout localhost interchain accounts packet", func(t *testing.T) { - msgTimeout := channeltypes.NewMsgTimeout(packet, 1, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgTimeout) - s.AssertTxSuccess(txResp) - }) - - t.Run("close interchain accounts host channel end", func(t *testing.T) { - // Pass in zero for counterpartyUpgradeSequence given that channel has not undergone any upgrades. - msgCloseConfirm := channeltypes.NewMsgChannelCloseConfirm(icatypes.HostPortID, msgChanOpenTryRes.ChannelId, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), 0) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgCloseConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("verify localhost interchain accounts channel is closed", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.CLOSED, channelEndA.State, "the channel was not in an expected state") - - channelEndB, err := query.Channel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.CLOSED, channelEndB.State, "the channel was not in an expected state") - }) - - t.Run("channel open init localhost: create new channel for existing account", func(t *testing.T) { - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(exported.LocalhostConnectionID, userAWallet.FormattedAddress(), version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgRegisterAccount) - s.AssertTxSuccess(txResp) - - // note: response values are updated here in msgChanOpenInitRes - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenInitRes)) - }) - - t.Run("channel open try localhost", func(t *testing.T) { - msgChanOpenTry := channeltypes.NewMsgChannelOpenTry( - icatypes.HostPortID, icatypes.Version, - channeltypes.ORDERED, []string{exported.LocalhostConnectionID}, - controllerPortID, msgChanOpenInitRes.ChannelId, - version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenTry) - s.AssertTxSuccess(txResp) - - // note: response values are updated here in msgChanOpenTryRes - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenTryRes)) - }) - - t.Run("channel open ack localhost", func(t *testing.T) { - msgChanOpenAck := channeltypes.NewMsgChannelOpenAck( - controllerPortID, msgChanOpenInitRes.ChannelId, - msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenAck) - s.AssertTxSuccess(txResp) - }) - - t.Run("channel open confirm localhost", func(t *testing.T) { - msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm( - icatypes.HostPortID, msgChanOpenTryRes.ChannelId, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("query localhost interchain accounts channel ends", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndA) - - channelEndB, err := query.Channel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndB) - - s.Require().Equal(channelEndA.ConnectionHops, channelEndB.ConnectionHops) - }) - - t.Run("verify interchain account and existing balance", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - balance, err := query.Balance(ctx, chainA, interchainAccAddress, chainADenom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - - t.Run("send packet localhost interchain accounts", func(t *testing.T) { - interchainAccAddress, err := query.InterchainAccount(ctx, chainA, userAWallet.FormattedAddress(), exported.LocalhostConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(interchainAccAddress) - - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAccAddress, - ToAddress: userBWallet.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainADenom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(userAWallet.FormattedAddress(), exported.LocalhostConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - txResp := s.BroadcastMessages(ctx, chainA, userAWallet, msgSendTx) - s.AssertTxSuccess(txResp) - - packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - }) - - t.Run("recv packet localhost interchain accounts", func(t *testing.T) { - msgRecvPacket := channeltypes.NewMsgRecvPacket(packet, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) - s.AssertTxSuccess(txResp) - - ack, err = ibctesting.ParseAckFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(ack) - }) - - t.Run("acknowledge packet localhost interchain accounts", func(t *testing.T) { - msgAcknowledgement := channeltypes.NewMsgAcknowledgement(packet, ack, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgAcknowledgement) - s.AssertTxSuccess(txResp) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId, 1) - - balance, err := query.Balance(ctx, chainA, userBWallet.FormattedAddress(), chainADenom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) -} diff --git a/e2e/tests/interchain_accounts/params_test.go b/e2e/tests/interchain_accounts/params_test.go deleted file mode 100644 index f2e3ef05cb6..00000000000 --- a/e2e/tests/interchain_accounts/params_test.go +++ /dev/null @@ -1,271 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - hosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - coretypes "github.com/cosmos/ibc-go/v9/modules/core/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestInterchainAccountsParamsTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsParamsTestSuite)) -} - -type InterchainAccountsParamsTestSuite struct { - testsuite.E2ETestSuite -} - -// QueryControllerParams queries the params for the controller -func (s *InterchainAccountsParamsTestSuite) QueryControllerParams(ctx context.Context, chain ibc.Chain) controllertypes.Params { - res, err := query.GRPCQuery[controllertypes.QueryParamsResponse](ctx, chain, &controllertypes.QueryParamsRequest{}) - s.Require().NoError(err) - - return *res.Params -} - -// QueryHostParams queries the host chain for the params -func (s *InterchainAccountsParamsTestSuite) QueryHostParams(ctx context.Context, chain ibc.Chain) hosttypes.Params { - res, err := query.GRPCQuery[hosttypes.QueryParamsResponse](ctx, chain, &hosttypes.QueryParamsRequest{}) - s.Require().NoError(err) - - return *res.Params -} - -// TestControllerEnabledParam tests that changing the ControllerEnabled param works as expected -func (s *InterchainAccountsParamsTestSuite) TestControllerEnabledParam() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.CreateDefaultPaths(testName) - - chainA, _ := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - // setup controller account on chainA - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - - t.Run("ensure the controller is enabled", func(t *testing.T) { - params := s.QueryControllerParams(ctx, chainA) - s.Require().True(params.ControllerEnabled) - }) - - t.Run("disable the controller", func(t *testing.T) { - if testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(authority) - - msg := controllertypes.MsgUpdateParams{ - Signer: authority.String(), - Params: controllertypes.NewParams(false), - } - s.ExecuteAndPassGovV1Proposal(ctx, &msg, chainA, controllerAccount) - } else { - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(controllertypes.StoreKey, string(controllertypes.KeyControllerEnabled), "false"), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainA, controllerAccount, proposal) - } - }) - - t.Run("ensure controller is disabled", func(t *testing.T) { - params := s.QueryControllerParams(ctx, chainA) - s.Require().False(params.ControllerEnabled) - }) - - t.Run("ensure that broadcasting a MsgRegisterInterchainAccount fails", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxFailure(txResp, controllertypes.ErrControllerSubModuleDisabled) - }) -} - -func (s *InterchainAccountsParamsTestSuite) TestHostEnabledParam() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - chainBVersion := chainB.Config().Images[0].Version - - // setup 2 accounts: controller account on chain A, a second chain B account (to do the disable host gov proposal) - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBAccount.FormattedAddress() - var hostAccount string - - // Assert that default value for enabled is true. - t.Run("ensure the host is enabled", func(t *testing.T) { - params := s.QueryHostParams(ctx, chainB) - s.Require().True(params.HostEnabled) - s.Require().Equal([]string{hosttypes.AllowAllHostMsgs}, params.AllowMessages) - }) - - t.Run("ensure ica packets are flowing before disabling the host", func(t *testing.T) { - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - }) - - t.Run("disable the host", func(t *testing.T) { - if testvalues.SelfParamsFeatureReleases.IsSupported(chainBVersion) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainB) - s.Require().NoError(err) - s.Require().NotNil(authority) - - msg := hosttypes.MsgUpdateParams{ - Signer: authority.String(), - Params: hosttypes.NewParams(false, []string{hosttypes.AllowAllHostMsgs}), - } - s.ExecuteAndPassGovV1Proposal(ctx, &msg, chainB, chainBAccount) - } else { - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(hosttypes.StoreKey, string(hosttypes.KeyHostEnabled), "false"), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainB, chainBAccount, proposal) - } - }) - - t.Run("ensure the host is disabled", func(t *testing.T) { - params := s.QueryHostParams(ctx, chainB) - s.Require().False(params.HostEnabled) - }) - - t.Run("ensure that ica packets are not flowing", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAddress, - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - - t.Run("verify no tokens were transferred", func(t *testing.T) { - chainBAccountBalance, err := query.Balance(ctx, chainB, chainBAddress, chainB.Config().Denom) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, chainBAccountBalance.Int64()) - - hostAccountBalance, err := query.Balance(ctx, chainB, hostAccount, chainB.Config().Denom) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, hostAccountBalance.Int64()) - }) - - t.Run("verify acknowledgement error in ack transaction", func(t *testing.T) { - cmd := "message.action=/ibc.core.channel.v1.MsgRecvPacket" - if testvalues.TransactionEventQueryFeatureReleases.IsSupported(chainBVersion) { - cmd = "message.action='/ibc.core.channel.v1.MsgRecvPacket'" - } - txSearchRes, err := s.QueryTxsByEvents(ctx, chainB, 1, 1, cmd, "") - s.Require().NoError(err) - s.Require().Len(txSearchRes.Txs, 1) - - errorMessage, isFound := s.ExtractValueFromEvents( - txSearchRes.Txs[0].Events, - coretypes.ErrorAttributeKeyPrefix+icatypes.EventTypePacket, - coretypes.ErrorAttributeKeyPrefix+icatypes.AttributeKeyAckError, - ) - - s.Require().True(isFound) - s.Require().Equal(errorMessage, hosttypes.ErrHostSubModuleDisabled.Error()) - }) - }) -} diff --git a/e2e/tests/interchain_accounts/query_test.go b/e2e/tests/interchain_accounts/query_test.go deleted file mode 100644 index 0c9c6417d9d..00000000000 --- a/e2e/tests/interchain_accounts/query_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "encoding/hex" - "encoding/json" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestInterchainAccountsQueryTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsQueryTestSuite)) -} - -type InterchainAccountsQueryTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *InterchainAccountsQueryTestSuite) TestInterchainAccountsQuery() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - chainBVersion := chainB.Config().Images[0].Version - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - var hostAccount string - - t.Run("broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.UNORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Len(channels, 2) - }) - - t.Run("query via interchain account", func(t *testing.T) { - // the host account need not be funded - t.Run("broadcast query packet", func(t *testing.T) { - balanceQuery := banktypes.NewQueryBalanceRequest(chainBAccount.Address(), chainB.Config().Denom) - queryBz, err := balanceQuery.Marshal() - s.Require().NoError(err) - - queryMsg := icahosttypes.NewMsgModuleQuerySafe(hostAccount, []icahosttypes.QueryRequest{ - { - Path: "/cosmos.bank.v1beta1.Query/Balance", - Data: queryBz, - }, - }) - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{queryMsg}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - icaQueryMsg := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, icaQueryMsg) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testutil.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - - t.Run("verify query response", func(t *testing.T) { - var expQueryHeight uint64 - - ack := &channeltypes.Acknowledgement_Result{} - t.Run("retrieve acknowledgement", func(t *testing.T) { - cmd := "message.action=/ibc.core.channel.v1.MsgRecvPacket" - if testvalues.TransactionEventQueryFeatureReleases.IsSupported(chainBVersion) { - cmd = "message.action='/ibc.core.channel.v1.MsgRecvPacket'" - } - txSearchRes, err := s.QueryTxsByEvents(ctx, chainB, 1, 1, cmd, "") - s.Require().NoError(err) - s.Require().Len(txSearchRes.Txs, 1) - - expQueryHeight = uint64(txSearchRes.Txs[0].Height) - - ackHexValue, isFound := s.ExtractValueFromEvents( - txSearchRes.Txs[0].Events, - channeltypes.EventTypeWriteAck, - channeltypes.AttributeKeyAckHex, - ) - s.Require().True(isFound) - s.Require().NotEmpty(ackHexValue) - - ackBz, err := hex.DecodeString(ackHexValue) - s.Require().NoError(err) - - err = json.Unmarshal(ackBz, ack) - s.Require().NoError(err) - }) - - icaAck := &sdk.TxMsgData{} - t.Run("unmarshal ica response", func(t *testing.T) { - err := proto.Unmarshal(ack.Result, icaAck) - s.Require().NoError(err) - s.Require().Len(icaAck.GetMsgResponses(), 1) - }) - - queryTxResp := &icahosttypes.MsgModuleQuerySafeResponse{} - t.Run("unmarshal MsgModuleQuerySafeResponse", func(t *testing.T) { - err := proto.Unmarshal(icaAck.MsgResponses[0].Value, queryTxResp) - s.Require().NoError(err) - s.Require().Len(queryTxResp.Responses, 1) - s.Require().Equal(expQueryHeight, queryTxResp.Height) - }) - - balanceResp := &banktypes.QueryBalanceResponse{} - t.Run("unmarshal and verify bank query response", func(t *testing.T) { - err := proto.Unmarshal(queryTxResp.Responses[0], balanceResp) - s.Require().NoError(err) - s.Require().Equal(chainB.Config().Denom, balanceResp.Balance.Denom) - s.Require().Equal(testvalues.StartingTokenAmount, balanceResp.Balance.Amount.Int64()) - }) - }) - }) -} diff --git a/e2e/tests/interchain_accounts/upgrades_test.go b/e2e/tests/interchain_accounts/upgrades_test.go deleted file mode 100644 index 96cdd27f6fa..00000000000 --- a/e2e/tests/interchain_accounts/upgrades_test.go +++ /dev/null @@ -1,382 +0,0 @@ -//go:build !test_e2e - -package interchainaccounts - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestInterchainAccountsChannelUpgradesTestSuite(t *testing.T) { - testifysuite.Run(t, new(InterchainAccountsChannelUpgradesTestSuite)) -} - -type InterchainAccountsChannelUpgradesTestSuite struct { - testsuite.E2ETestSuite -} - -// TestMsgSendTx_SuccessfulTransfer_AfterUpgradingOrdertoUnordered tests upgrading an ICA channel to -// unordered and sends a message to the host afterwards. -func (s *InterchainAccountsChannelUpgradesTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterUpgradingOrdertoUnordered() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - var ( - portID string - hostAccount string - - initialChannelID = "channel-1" - ) - - t.Run("register interchain account", func(t *testing.T) { - var err error - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterInterchainAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterInterchainAccount) - s.AssertTxSuccess(txResp) - portID, err = icatypes.NewControllerPortID(controllerAddress) - s.Require().NoError(err) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - hostAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotEmpty(hostAccount) - - _, err = query.Channel(ctx, chainA, portID, initialChannelID) - s.Require().NoError(err) - }) - - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(5*time.Minute), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - s.AssertPacketRelayed(ctx, chainA, portID, initialChannelID, 1) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) - - channel, err := query.Channel(ctx, chainA, portID, initialChannelID) - s.Require().NoError(err) - - // upgrade the channel ordering to UNORDERED - upgradeFields := channeltypes.NewUpgradeFields(channeltypes.UNORDERED, channel.ConnectionHops, channel.Version) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - msg := channeltypes.NewMsgChannelUpgradeInit(portID, initialChannelID, upgradeFields, govModuleAddress.String()) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainA, controllerAccount) - }) - - t.Run("verify channel A upgraded and is now unordered", func(t *testing.T) { - var channel channeltypes.Channel - waitErr := test.WaitForCondition(time.Minute*2, time.Second*5, func() (bool, error) { - channel, err = query.Channel(ctx, chainA, portID, initialChannelID) - if err != nil { - return false, err - } - return channel.Ordering == channeltypes.UNORDERED, nil - }) - s.Require().NoErrorf(waitErr, "channel was not upgraded: expected %s got %s", channeltypes.UNORDERED, channel.Ordering) - }) - - t.Run("verify channel B upgraded and is now unordered", func(t *testing.T) { - var channel channeltypes.Channel - waitErr := test.WaitForCondition(time.Minute*2, time.Second*5, func() (bool, error) { - channel, err = query.Channel(ctx, chainB, icatypes.HostPortID, initialChannelID) - if err != nil { - return false, err - } - return channel.Ordering == channeltypes.UNORDERED, nil - }) - s.Require().NoErrorf(waitErr, "channel was not upgraded: expected %s got %s", channeltypes.UNORDERED, channel.Ordering) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, uint64(5*time.Minute), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - s.AssertPacketRelayed(ctx, chainA, portID, initialChannelID, 2) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - balance, err := query.Balance(ctx, chainB, chainBAccount.FormattedAddress(), chainB.Config().Denom) - s.Require().NoError(err) - - expected := 2*testvalues.IBCTransferAmount + testvalues.StartingTokenAmount - s.Require().Equal(expected, balance.Int64()) - }) -} - -// TestChannelUpgrade_ICAChannelClosesAfterTimeout_Succeeds tests upgrading an ICA channel to -// wire up fee middleware and then forces it to close it by timing out a packet. -func (s *InterchainAccountsChannelUpgradesTestSuite) TestChannelUpgrade_ICAChannelClosesAfterTimeout_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - - relayer := s.CreateDefaultPaths(testName) - - chainA, chainB := s.GetChains() - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - chainBDenom := chainB.Config().Denom - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - var ( - channelID = "channel-1" - controllerPortID string - hostPortID = icatypes.HostPortID - interchainAccount string - channelA channeltypes.Channel - ) - - t.Run("register interchain account", func(t *testing.T) { - var err error - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterInterchainAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterInterchainAccount) - s.AssertTxSuccess(txResp) - - controllerPortID, err = icatypes.NewControllerPortID(controllerAddress) - s.Require().NoError(err) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify interchain account", func(t *testing.T) { - var err error - interchainAccount, err = query.InterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) - s.Require().NoError(err) - s.Require().NotZero(len(interchainAccount)) - - channelA, err = query.Channel(ctx, chainA, controllerPortID, channelID) - s.Require().NoError(err) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, controllerPortID, channelID, s.CreateUpgradeFields(channelA)) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, controllerPortID, channelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainA, controllerPortID, channelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("verify channel B upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, hostPortID, channelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainB, hostPortID, channelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - // stop the relayer to let the submit tx message time out - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("submit tx message with bank transfer message that times out", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: interchainAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainBDenom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: interchainAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainBDenom)), - } - - cdc := testsuite.Codec() - - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - timeout := uint64(1) - msgSendTx := controllertypes.NewMsgSendTx(controllerAddress, ibctesting.FirstConnectionID, timeout, packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - // this sleep is to allow the packet to timeout - time.Sleep(1 * time.Second) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("verify channel A is closed due to timeout on ordered channel", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, controllerPortID, channelID) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.CLOSED, channel.State, "the channel was not in an expected state") - }) - - t.Run("verify channel B is closed due to timeout on ordered channel", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, hostPortID, channelID) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.CLOSED, channel.State, "the channel was not in an expected state") - }) -} diff --git a/e2e/tests/transfer/authz_test.go b/e2e/tests/transfer/authz_test.go deleted file mode 100644 index 5014bc891ab..00000000000 --- a/e2e/tests/transfer/authz_test.go +++ /dev/null @@ -1,377 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/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" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - ibcerrors "github.com/cosmos/ibc-go/v9/modules/core/errors" -) - -func TestAuthzTransferTestSuite(t *testing.T) { - testifysuite.Run(t, new(AuthzTransferTestSuite)) -} - -type AuthzTransferTestSuite struct { - testsuite.E2ETestSuite -} - -func (suite *AuthzTransferTestSuite) CreateAuthzTestPath(testName string) (ibc.Relayer, ibc.ChannelOutput) { - return suite.CreatePaths(ibc.DefaultClientOpts(), suite.TransferChannelOptions(), testName), suite.GetChainAChannelForTest(testName) -} - -// QueryGranterGrants returns all GrantAuthorizations for the given granterAddress. -func (*AuthzTransferTestSuite) QueryGranterGrants(ctx context.Context, chain ibc.Chain, granterAddress string) ([]*authz.GrantAuthorization, error) { - res, err := query.GRPCQuery[authz.QueryGranterGrantsResponse](ctx, chain, &authz.QueryGranterGrantsRequest{ - Granter: granterAddress, - }) - if err != nil { - return nil, err - } - - return res.Grants, nil -} - -func (suite *AuthzTransferTestSuite) TestAuthz_MsgTransfer_Succeeds() { - t := suite.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := suite.CreateAuthzTestPath(testName) - - chainA, chainB := suite.GetChains() - chainADenom := chainA.Config().Denom - - granterWallet := suite.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - granterAddress := granterWallet.FormattedAddress() - - granteeWallet := suite.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - granteeAddress := granteeWallet.FormattedAddress() - - receiverWallet := suite.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - receiverWalletAddress := receiverWallet.FormattedAddress() - - t.Run("start relayer", func(t *testing.T) { - suite.StartRelayer(relayer, testName) - }) - - // createMsgGrantFn initializes a TransferAuthorization and broadcasts a MsgGrant message. - createMsgGrantFn := func(t *testing.T) { - t.Helper() - transferAuth := transfertypes.TransferAuthorization{ - Allocations: []transfertypes.Allocation{ - { - SourcePort: channelA.PortID, - SourceChannel: channelA.ChannelID, - SpendLimit: sdk.NewCoins(sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.StartingTokenAmount))), - AllowList: []string{receiverWalletAddress}, - }, - }, - } - - protoAny, err := codectypes.NewAnyWithValue(&transferAuth) - suite.Require().NoError(err) - - msgGrant := &authz.MsgGrant{ - Granter: granterAddress, - Grantee: granteeAddress, - Grant: authz.Grant{ - Authorization: protoAny, - // no expiration - Expiration: nil, - }, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granterWallet, msgGrant) - suite.AssertTxSuccess(resp) - } - - // 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) - suite.Require().Len(grantAuths, 1) - grantAuthorization := grantAuths[0] - - transferAuth := suite.extractTransferAuthorizationFromGrantAuthorization(grantAuthorization) - expectedSpendLimit := sdk.NewCoins(sdk.NewCoin(chainADenom, sdkmath.NewInt(expectedLimit))) - suite.Require().Equal(expectedSpendLimit, transferAuth.Allocations[0].SpendLimit) - } - } - - t.Run("broadcast MsgGrant", createMsgGrantFn) - - t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) { - transferMsg := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, - testvalues.DefaultTransferCoins(chainADenom), - granterAddress, - receiverWalletAddress, - suite.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - - protoAny, err := codectypes.NewAnyWithValue(transferMsg) - suite.Require().NoError(err) - - msgExec := &authz.MsgExec{ - Grantee: granteeAddress, - Msgs: []*codectypes.Any{protoAny}, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granteeWallet, msgExec) - suite.AssertTxSuccess(resp) - }) - - t.Run("verify granter wallet amount", func(t *testing.T) { - actualBalance, err := suite.GetChainANativeBalance(ctx, granterWallet) - suite.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - suite.Require().Equal(expected, actualBalance) - }) - - suite.Require().NoError(test.WaitForBlocks(context.TODO(), 10, chainB)) - - t.Run("verify receiver wallet amount", func(t *testing.T) { - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - actualBalance, err := query.Balance(ctx, chainB, receiverWalletAddress, chainBIBCToken.IBCDenom()) - - suite.Require().NoError(err) - suite.Require().Equal(testvalues.IBCTransferAmount, actualBalance.Int64()) - }) - - t.Run("granter grant spend limit reduced", verifyGrantFn(testvalues.StartingTokenAmount-testvalues.IBCTransferAmount)) - - t.Run("re-initialize MsgGrant", createMsgGrantFn) - - t.Run("granter grant was reinitialized", verifyGrantFn(testvalues.StartingTokenAmount)) - - t.Run("revoke access", func(t *testing.T) { - msgRevoke := authz.MsgRevoke{ - Granter: granterAddress, - Grantee: granteeAddress, - MsgTypeUrl: transfertypes.TransferAuthorization{}.MsgTypeURL(), - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granterWallet, &msgRevoke) - suite.AssertTxSuccess(resp) - }) - - t.Run("exec unauthorized MsgTransfer", func(t *testing.T) { - transferMsg := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, - testvalues.DefaultTransferCoins(chainADenom), - granterAddress, - receiverWalletAddress, - suite.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - - protoAny, err := codectypes.NewAnyWithValue(transferMsg) - suite.Require().NoError(err) - - msgExec := &authz.MsgExec{ - Grantee: granteeAddress, - Msgs: []*codectypes.Any{protoAny}, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granteeWallet, msgExec) - suite.AssertTxFailure(resp, authz.ErrNoAuthorizationFound) - }) -} - -func (suite *AuthzTransferTestSuite) TestAuthz_InvalidTransferAuthorizations() { - t := suite.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := suite.CreateAuthzTestPath(testName) - - chainA, chainB := suite.GetChains() - chainADenom := chainA.Config().Denom - chainAVersion := chainA.Config().Images[0].Version - - granterWallet := suite.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - granterAddress := granterWallet.FormattedAddress() - - granteeWallet := suite.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - granteeAddress := granteeWallet.FormattedAddress() - - receiverWallet := suite.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - receiverWalletAddress := receiverWallet.FormattedAddress() - - t.Run("start relayer", func(t *testing.T) { - suite.StartRelayer(relayer, testName) - }) - - const spendLimit = 1000 - - t.Run("broadcast MsgGrant", func(t *testing.T) { - transferAuth := transfertypes.TransferAuthorization{ - Allocations: []transfertypes.Allocation{ - { - SourcePort: channelA.PortID, - SourceChannel: channelA.ChannelID, - SpendLimit: sdk.NewCoins(sdk.NewCoin(chainADenom, sdkmath.NewInt(spendLimit))), - AllowList: []string{receiverWalletAddress}, - }, - }, - } - - protoAny, err := codectypes.NewAnyWithValue(&transferAuth) - suite.Require().NoError(err) - - msgGrant := &authz.MsgGrant{ - Granter: granterAddress, - Grantee: granteeAddress, - Grant: authz.Grant{ - Authorization: protoAny, - // no expiration - Expiration: nil, - }, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granterWallet, msgGrant) - suite.AssertTxSuccess(resp) - }) - - t.Run("exceed spend limit", func(t *testing.T) { - const invalidSpendAmount = spendLimit + 1 - - t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) { - transferMsg := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, - sdk.NewCoins(sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(invalidSpendAmount)}), - granterAddress, - receiverWalletAddress, - suite.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - - protoAny, err := codectypes.NewAnyWithValue(transferMsg) - suite.Require().NoError(err) - - msgExec := &authz.MsgExec{ - Grantee: granteeAddress, - Msgs: []*codectypes.Any{protoAny}, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granteeWallet, msgExec) - if testvalues.IbcErrorsFeatureReleases.IsSupported(chainAVersion) { - suite.AssertTxFailure(resp, ibcerrors.ErrInsufficientFunds) - } else { - suite.AssertTxFailure(resp, sdkerrors.ErrInsufficientFunds) - } - }) - - t.Run("verify granter wallet amount", func(t *testing.T) { - actualBalance, err := suite.GetChainANativeBalance(ctx, granterWallet) - suite.Require().NoError(err) - suite.Require().Equal(testvalues.StartingTokenAmount, actualBalance) - }) - - t.Run("verify receiver wallet amount", func(t *testing.T) { - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - actualBalance, err := query.Balance(ctx, chainB, receiverWalletAddress, chainBIBCToken.IBCDenom()) - - suite.Require().NoError(err) - suite.Require().Equal(int64(0), actualBalance.Int64()) - }) - - t.Run("granter grant spend limit unchanged", func(t *testing.T) { - grantAuths, err := suite.QueryGranterGrants(ctx, chainA, granterAddress) - - suite.Require().NoError(err) - suite.Require().Len(grantAuths, 1) - grantAuthorization := grantAuths[0] - - transferAuth := suite.extractTransferAuthorizationFromGrantAuthorization(grantAuthorization) - expectedSpendLimit := sdk.NewCoins(sdk.NewCoin(chainADenom, sdkmath.NewInt(spendLimit))) - suite.Require().Equal(expectedSpendLimit, transferAuth.Allocations[0].SpendLimit) - }) - }) - - t.Run("send funds to invalid address", func(t *testing.T) { - invalidWallet := suite.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - invalidWalletAddress := invalidWallet.FormattedAddress() - - t.Run("broadcast MsgExec for ibc MsgTransfer", func(t *testing.T) { - transferMsg := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, - sdk.NewCoins(sdk.Coin{Denom: chainADenom, Amount: sdkmath.NewInt(spendLimit)}), - granterAddress, - invalidWalletAddress, - suite.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - - protoAny, err := codectypes.NewAnyWithValue(transferMsg) - suite.Require().NoError(err) - - msgExec := &authz.MsgExec{ - Grantee: granteeAddress, - Msgs: []*codectypes.Any{protoAny}, - } - - resp := suite.BroadcastMessages(context.TODO(), chainA, granteeWallet, msgExec) - if testvalues.IbcErrorsFeatureReleases.IsSupported(chainAVersion) { - suite.AssertTxFailure(resp, ibcerrors.ErrInvalidAddress) - } else { - suite.AssertTxFailure(resp, sdkerrors.ErrInvalidAddress) - } - }) - }) -} - -// extractTransferAuthorizationFromGrantAuthorization extracts a TransferAuthorization from the given -// GrantAuthorization. -func (suite *AuthzTransferTestSuite) extractTransferAuthorizationFromGrantAuthorization(grantAuth *authz.GrantAuthorization) *transfertypes.TransferAuthorization { - cfg := testsuite.SDKEncodingConfig() - var authorization authz.Authorization - err := cfg.InterfaceRegistry.UnpackAny(grantAuth.Authorization, &authorization) - suite.Require().NoError(err) - - transferAuth, ok := authorization.(*transfertypes.TransferAuthorization) - suite.Require().True(ok) - return transferAuth -} diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go deleted file mode 100644 index 745a0d57f07..00000000000 --- a/e2e/tests/transfer/base_test.go +++ /dev/null @@ -1,644 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" -) - -func TestTransferTestSuite(t *testing.T) { - testifysuite.Run(t, new(TransferTestSuite)) -} - -type TransferTestSuite struct { - transferTester -} - -// transferTester defines some helper functions that can be used in various test suites -// that test transfer functionality. -type transferTester struct { - testsuite.E2ETestSuite -} - -// QueryTransferParams queries the on-chain send enabled param for the transfer module -func (s *transferTester) QueryTransferParams(ctx context.Context, chain ibc.Chain) transfertypes.Params { - res, err := query.GRPCQuery[transfertypes.QueryParamsResponse](ctx, chain, &transfertypes.QueryParamsRequest{}) - s.Require().NoError(err) - return *res.Params -} - -// CreateTransferPath sets up a path between chainA and chainB with a transfer channel and returns the relayer wired -// up to watch the channel and port IDs created. -func (s *transferTester) CreateTransferPath(testName string) (ibc.Relayer, ibc.ChannelOutput) { - relayer, channel := s.CreatePaths(ibc.DefaultClientOpts(), s.TransferChannelOptions(), testName), s.GetChainAChannelForTest(testName) - s.T().Logf("test %s running on portID %s channelID %s", testName, channel.PortID, channel.ChannelID) - return relayer, channel -} - -// TestMsgTransfer_Succeeds_Nonincentivized will test sending successful IBC transfers from chainA to chainB. -// The transfer will occur over a basic transfer channel (non incentivized) and both native and non-native tokens -// will be sent forwards and backwards in the IBC transfer timeline (both chains will act as source and receiver chains). -func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - - // NOTE: t.Parallel() should be called before SetupPath in all tests. - // t.Name() must be stored in a variable before t.Parallel() otherwise t.Name() is not - // deterministic. - t.Parallel() - - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainBVersion := chainB.Config().Images[0].Version - chainADenom := chainA.Config().Denom - - 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") - // TODO: https://github.com/cosmos/ibc-go/issues/6743 - // t.Run("ensure capability module BeginBlock is executed", func(t *testing.T) { - // // by restarting the chain we ensure that the capability module's BeginBlocker is executed. - // s.Require().NoError(chainA.(*cosmos.CosmosChain).StopAllNodes(ctx)) - // s.Require().NoError(chainA.(*cosmos.CosmosChain).StartAllNodes(ctx)) - // s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - 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) - - // TODO: cannot query total escrow if tests in parallel are using the same denom. - // if testvalues.TotalEscrowFeatureReleases.IsSupported(chainAVersion) { - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - // s.Require().NoError(err) - // - // expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - // s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) - // } - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - if testvalues.TokenMetadataFeatureReleases.IsSupported(chainBVersion) { - t.Run("metadata for IBC denomination exists on chainB", func(t *testing.T) { - s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) - }) - } - - t.Run("non-native IBC token transfer from chainB to chainA, receiver is source of tokens", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBIBCToken.IBCDenom()), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - s.Require().Equal(sdkmath.ZeroInt(), actualBalance) - - // https://github.com/cosmos/ibc-go/issues/6742 - // if testvalues.TotalEscrowFeatureReleases.IsSupported(chainBVersion) { - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainB, chainBIBCToken.IBCDenom()) - // s.Require().NoError(err) - // s.Require().Equal(sdk.NewCoin(chainBIBCToken.IBCDenom(), sdkmath.NewInt(0)), actualTotalEscrow) // total escrow is zero because sending chain is not source for tokens - // } - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainB, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) - - // https://github.com/cosmos/ibc-go/issues/6742 - // if testvalues.TotalEscrowFeatureReleases.IsSupported(chainAVersion) { - // t.Run("tokens are un-escrowed", func(t *testing.T) { - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - // s.Require().NoError(err) - // s.Require().Equal(sdk.NewCoin(chainADenom, sdkmath.NewInt(0)), actualTotalEscrow) // total escrow is zero because tokens have come back - // }) - // } -} - -// TestMsgTransfer_Succeeds_MultiDenom will test sending successful IBC transfers from chainA to chainB. -// A multidenom transfer with native chainB tokens and IBC tokens from chainA is executed from chainB to chainA. -func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized_MultiDenom() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - - 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, sdk.NewCoins(testvalues.DefaultTransferAmount(chainADenom)), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("native chainA 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) - - // https://github.com/cosmos/ibc-go/issues/6742 - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - // s.Require().NoError(err) - // - // expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - // s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("metadata for IBC denomination exists on chainB", func(t *testing.T) { - s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) - }) - - // send the native chainB denom and also the ibc token from chainA - transferCoins := []sdk.Coin{ - testvalues.DefaultTransferAmount(chainBIBCToken.IBCDenom()), - testvalues.DefaultTransferAmount(chainBDenom), - } - - t.Run("native token from chain B and non-native IBC token from chainA, both to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainB, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - t.Run("chain A native denom", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("chain B IBC denom", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - }) - - // https://github.com/cosmos/ibc-go/issues/6742 - // t.Run("native chainA tokens are un-escrowed", func(t *testing.T) { - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - // s.Require().NoError(err) - // s.Require().Equal(sdk.NewCoin(chainADenom, sdkmath.NewInt(0)), actualTotalEscrow) // total escrow is zero because tokens have come back - // }) -} - -// TestMsgTransfer_Fails_InvalidAddress_MultiDenom attempts to send a multidenom IBC transfer -// to an invalid address and ensures that the tokens on the sending chain are returned to the sender. -func (s *TransferTestSuite) TestMsgTransfer_Fails_InvalidAddress_MultiDenom() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - 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, sdk.NewCoins(testvalues.DefaultTransferAmount(chainADenom)), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("native chainA 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) - - // https://github.com/cosmos/ibc-go/issues/6742 - // actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - // s.Require().NoError(err) - // - // expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - // s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("metadata for IBC denomination exists on chainB", func(t *testing.T) { - s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) - }) - - // send the native chainB denom and also the ibc token from chainA - transferCoins := []sdk.Coin{ - testvalues.DefaultTransferAmount(chainBIBCToken.IBCDenom()), - testvalues.DefaultTransferAmount(chainBDenom), - } - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("native token from chain B and non-native IBC token from chainA, both to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, testvalues.InvalidAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("tokens are sent from chain B", func(t *testing.T) { - t.Run("native chainB tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("non-native chainA IBC denom are burned", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - s.Require().Equal(int64(0), actualBalance.Int64()) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainB, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - }) - - t.Run("tokens are returned to sender on chainB", func(t *testing.T) { - t.Run("native chainB denom", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("non-native chainA IBC denom", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - }) -} - -// TestMsgTransfer_Fails_InvalidAddress attempts to send an IBC transfer to an invalid address and ensures -// that the tokens on the sending chain are unescrowed. -func (s *TransferTestSuite) TestMsgTransfer_Fails_InvalidAddress() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("native IBC token transfer from chainA to invalid address", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, testvalues.InvalidAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - 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, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - }) - - t.Run("token transfer amount unescrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) -} - -func (s *TransferTestSuite) TestMsgTransfer_Timeout_Nonincentivized() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, _ := s.GetChains() - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainA.Config().Denom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - t.Run("IBC transfer packet timesout", func(t *testing.T) { - tx, err := chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{Timeout: testvalues.ImmediatelyTimeout()}) - s.Require().NoError(err) - s.Require().NoError(tx.Validate(), "source ibc transfer tx is invalid") - time.Sleep(time.Nanosecond * 1) // want it to timeout immediately - }) - - 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, testName) - }) - - t.Run("ensure escrowed tokens have been refunded to sender due to timeout", func(t *testing.T) { - // ensure destination address did not receive any tokens - bal, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, bal) - - // ensure that the sender address has been successfully refunded the full amount - bal, err = s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, bal) - }) -} - -// This can be used to test sending with a transfer packet with a memo given different combinations of -// ibc-go versions. -// -// TestMsgTransfer_WithMemo will test sending IBC transfers from chainA to chainB -// If the chains contain a version of FungibleTokenPacketData with memo, both send and receive should succeed. -// If one of the chains contains a version of FungibleTokenPacketData without memo, then receiving a packet with -// memo should fail in that chain -func (s *TransferTestSuite) TestMsgTransfer_WithMemo() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - - 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("IBC token transfer with memo from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "memo", nil) - 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, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packets relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - - s.Require().NoError(err) - s.Require().Equal(testvalues.IBCTransferAmount, actualBalance.Int64()) - }) -} - -// TestMsgTransfer_EntireBalance tests that it is possible to transfer the entire balance -// of a given denom by using types.UnboundedSpendLimit as the amount. -func (s *TransferTestSuite) TestMsgTransfer_EntireBalance() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - coinFromA := testvalues.DefaultTransferAmount(chainADenom) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("IBC token transfer from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, sdk.NewCoins(coinFromA), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - s.Require().Equal(testvalues.StartingTokenAmount-coinFromA.Amount.Int64(), actualBalance) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packets relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - - s.Require().NoError(err) - s.Require().Equal(coinFromA.Amount.Int64(), actualBalance.Int64()) - - actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainADenom) - - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount-coinFromA.Amount.Int64(), actualBalance.Int64()) - }) - - t.Run("send entire balance from B to A", func(t *testing.T) { - transferCoins := sdk.NewCoins((sdk.NewCoin(chainBIBCToken.IBCDenom(), transfertypes.UnboundedSpendLimit())), sdk.NewCoin(chainB.Config().Denom, transfertypes.UnboundedSpendLimit())) - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - chainAIBCToken := testsuite.GetIBCToken(chainB.Config().Denom, channelA.PortID, channelA.ChannelID) - t.Run("packets relayed", func(t *testing.T) { - // test that chainA has the entire balance back of its native token. - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainADenom) - - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) - - // test that chainA has the entirety of chainB's token IBC denom. - actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) - - // Tests that chainB has a zero balance for both. - actualBalance, err = query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - - s.Require().NoError(err) - s.Require().Zero(actualBalance.Int64()) - - actualBalance, err = query.Balance(ctx, chainB, chainBAddress, chainB.Config().Denom) - - s.Require().NoError(err) - s.Require().Zero(actualBalance.Int64()) - }) -} diff --git a/e2e/tests/transfer/forwarding_test.go b/e2e/tests/transfer/forwarding_test.go deleted file mode 100644 index f7a2c33c15f..00000000000 --- a/e2e/tests/transfer/forwarding_test.go +++ /dev/null @@ -1,291 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -func TestTransferForwardingTestSuite(t *testing.T) { - testifysuite.Run(t, new(TransferForwardingTestSuite)) -} - -type TransferForwardingTestSuite struct { - testsuite.E2ETestSuite -} - -// SetupSuite explicitly sets up three chains for this test suite. -func (s *TransferForwardingTestSuite) SetupSuite() { - s.SetupChains(context.TODO(), nil, testsuite.ThreeChainSetup()) -} - -// TestForwarding_WithLastChainBeingICS20v1_Succeeds tests the case where a token is forwarded and successfully -// received on a destination chain that is on ics20-v1 version. -func (s *TransferForwardingTestSuite) TestForwarding_WithLastChainBeingICS20v1_Succeeds() { - s.testForwardingThreeChains(transfertypes.V1) -} - -// TestForwarding_Succeeds tests the case where a token is forwarded and successfully -// received on a destination chain. -func (s *TransferForwardingTestSuite) TestForwarding_Succeeds() { - s.testForwardingThreeChains(transfertypes.V2) -} - -func (s *TransferForwardingTestSuite) testForwardingThreeChains(lastChainVersion string) { - ctx := context.TODO() - t := s.T() - - testName := t.Name() - t.Parallel() - relayer := s.CreateDefaultPaths(testName) - - chains := s.GetAllChains() - - chainA, chainB, chainC := chains[0], chains[1], chains[2] - - channelAtoB := s.GetChainAChannelForTest(testName) - - s.Require().Len(s.GetChannelsForTest(chainA, testName), 1, "expected one channel on chain A") - s.Require().Len(s.GetChannelsForTest(chainB, testName), 2, "expected two channels on chain B") - s.Require().Len(s.GetChannelsForTest(chainC, testName), 1, "expected one channel on chain C") - - var channelBtoC ibc.ChannelOutput - if lastChainVersion == transfertypes.V2 { - channelBtoC = s.GetChannelsForTest(chainB, testName)[1] - s.Require().Equal(transfertypes.V2, channelBtoC.Version, "the channel version is not ics20-2") - } else { - opts := s.TransferChannelOptions() - opts.Version = transfertypes.V1 - channelBtoC, _ = s.CreatePath(ctx, relayer, chainB, chainC, ibc.DefaultClientOpts(), opts, testName) - s.Require().Equal(transfertypes.V1, channelBtoC.Version, "the channel version is not ics20-1") - } - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - chainADenom := chainA.Config().Denom - - chainCWallet := s.CreateUserOnChainC(ctx, testvalues.StartingTokenAmount) - chainCAddress := chainCWallet.FormattedAddress() - - t.Run("IBC transfer from A to C with forwarding through B", func(t *testing.T) { - inFiveMinutes := time.Now().Add(5 * time.Minute).UnixNano() - forwarding := transfertypes.NewForwarding(false, transfertypes.NewHop(channelBtoC.PortID, channelBtoC.ChannelID)) - resp := s.Transfer(ctx, chainA, chainAWallet, channelAtoB.PortID, channelAtoB.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainCAddress, clienttypes.ZeroHeight(), uint64(inFiveMinutes), "", forwarding) - s.AssertTxSuccess(resp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed from A to B to C", func(t *testing.T) { - chainCDenom := transfertypes.NewDenom(chainADenom, - transfertypes.NewHop(channelBtoC.Counterparty.PortID, channelBtoC.Counterparty.ChannelID), - transfertypes.NewHop(channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID), - ) - - s.AssertPacketRelayed(ctx, chainA, channelAtoB.PortID, channelAtoB.ChannelID, 1) - s.AssertPacketRelayed(ctx, chainB, channelBtoC.PortID, channelBtoC.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainC, chainCAddress, chainCDenom.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - - // packet from B to C is acknowledged on chain C - s.AssertPacketAcknowledged(ctx, chainC, channelBtoC.Counterparty.PortID, channelBtoC.Counterparty.ChannelID, 1) - // packet from A to B is acknowledged on chain B - s.AssertPacketAcknowledged(ctx, chainB, channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID, 1) - }) -} - -// TestForwardingWithUnwindSucceeds tests the forwarding scenario in which -// a packet is sent from A to B, then unwound back to A and forwarded to C -// The overall flow of the packet is: -// A ---> B -// B --(unwind)-->A --(forward)-->B --(forward)--> C -func (s *TransferForwardingTestSuite) TestForwardingWithUnwindSucceeds() { - t := s.T() - ctx := context.TODO() - t.Parallel() - testName := t.Name() - relayer := s.CreateDefaultPaths(testName) - - chains := s.GetAllChains() - - chainA, chainB, chainC := chains[0], chains[1], chains[2] - - channelAtoB := s.GetChainAChannelForTest(testName) - channelBtoC := s.GetChannelsForTest(chainB, testName)[1] - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - chainADenom := chainA.Config().Denom - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - chainCWallet := s.CreateUserOnChainC(ctx, testvalues.StartingTokenAmount) - chainCAddress := chainCWallet.FormattedAddress() - - t.Run("IBC transfer from A to B", func(t *testing.T) { - inFiveMinutes := time.Now().Add(5 * time.Minute).UnixNano() - resp := s.Transfer(ctx, chainA, chainAWallet, channelAtoB.PortID, channelAtoB.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, clienttypes.ZeroHeight(), uint64(inFiveMinutes), "", nil) - s.AssertTxSuccess(resp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - chainBDenom := transfertypes.NewDenom(chainADenom, transfertypes.NewHop(channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID)) - t.Run("packet has reached B", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelAtoB.PortID, channelAtoB.ChannelID, 1) - s.AssertPacketAcknowledged(ctx, chainB, channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID, 1) - - balance, err := query.Balance(ctx, chainB, chainBAddress, chainBDenom.IBCDenom()) - s.Require().NoError(err) - - s.Require().Equal(testvalues.IBCTransferAmount, balance.Int64()) - }) - - t.Run("IBC transfer from B (unwind) to A and forwarded to C through B", func(t *testing.T) { - inFiveMinutes := time.Now().Add(5 * time.Minute).UnixNano() - - forwarding := transfertypes.NewForwarding( - true, - transfertypes.NewHop(channelAtoB.PortID, channelAtoB.ChannelID), - transfertypes.NewHop(channelBtoC.PortID, channelBtoC.ChannelID), - ) - msgTransfer := testsuite.GetMsgTransfer( - "", - "", - transfertypes.V2, - testvalues.DefaultTransferCoins(chainBDenom.IBCDenom()), - chainBAddress, - chainCAddress, - clienttypes.ZeroHeight(), - uint64(inFiveMinutes), - "", - forwarding) - resp := s.BroadcastMessages(ctx, chainB, chainBWallet, msgTransfer) - s.AssertTxSuccess(resp) - }) - - t.Run("packet has reached C", func(t *testing.T) { - chainCDenom := transfertypes.NewDenom(chainADenom, - transfertypes.NewHop(channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID), - transfertypes.NewHop(channelBtoC.Counterparty.PortID, channelBtoC.Counterparty.ChannelID), - ) - - err := test.WaitForCondition(time.Minute*10, time.Second*30, func() (bool, error) { - balance, err := query.Balance(ctx, chainC, chainCAddress, chainCDenom.IBCDenom()) - if err != nil { - return false, err - } - return balance.Int64() == testvalues.IBCTransferAmount, nil - }) - s.Require().NoError(err) - // packet from B to C is relayed - s.AssertPacketRelayed(ctx, chainB, channelBtoC.PortID, channelBtoC.ChannelID, 1) - // packet from B to C is acknowledged on chain C - s.AssertPacketAcknowledged(ctx, chainC, channelBtoC.Counterparty.PortID, channelBtoC.Counterparty.ChannelID, 1) - // packet from A to B is acknowledged on chain B - s.AssertPacketAcknowledged(ctx, chainB, channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID, 2) - }) -} - -func (s *TransferForwardingTestSuite) TestChannelUpgradeForwarding_Succeeds() { - ctx := context.TODO() - t := s.T() - testName := t.Name() - t.Parallel() - - relayer := s.CreateDefaultPaths(testName) - chains := s.GetAllChains() - - chainA, chainB, chainC := chains[0], chains[1], chains[2] - - opts := s.TransferChannelOptions() - opts.Version = transfertypes.V1 - - channelAtoB, _ := s.CreatePath(ctx, relayer, chains[0], chains[1], ibc.DefaultClientOpts(), opts, testName) - s.Require().Equal(transfertypes.V1, channelAtoB.Version, "the channel version is not ics20-1") - - channelBtoC, _ := s.CreatePath(ctx, relayer, chains[1], chains[2], ibc.DefaultClientOpts(), opts, testName) - s.Require().Equal(transfertypes.V1, channelBtoC.Version, "the channel version is not ics20-1") - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - chainADenom := chainA.Config().Denom - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - chainCWallet := s.CreateUserOnChainC(ctx, testvalues.StartingTokenAmount) - chainCAddress := chainCWallet.FormattedAddress() - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelAtoB.PortID, channelAtoB.ChannelID) - s.Require().NoError(err) - - upgradeFields := channeltypes.NewUpgradeFields(chA.Ordering, chA.ConnectionHops, transfertypes.V2) - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelAtoB.PortID, channelAtoB.ChannelID, upgradeFields) - - chB, err := query.Channel(ctx, chainB, channelBtoC.PortID, channelBtoC.ChannelID) - s.Require().NoError(err) - - upgradeFields = channeltypes.NewUpgradeFields(chB.Ordering, chB.ConnectionHops, transfertypes.V2) - s.InitiateChannelUpgrade(ctx, chainB, chainBWallet, channelBtoC.PortID, channelBtoC.ChannelID, upgradeFields) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A upgraded and transfer version is ics20-2", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelAtoB.PortID, channelAtoB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V2, channel.Version, "the channel version is not ics20-2") - }) - - t.Run("verify channel B upgraded and transfer version is ics20-2", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelBtoC.PortID, channelBtoC.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V2, channel.Version, "the channel version is not ics20-2") - }) - - t.Run("IBC transfer from A to C with forwarding through B", func(t *testing.T) { - inFiveMinutes := time.Now().Add(5 * time.Minute).UnixNano() - forwarding := transfertypes.NewForwarding(false, transfertypes.NewHop(channelBtoC.PortID, channelBtoC.ChannelID)) - resp := s.Transfer(ctx, chainA, chainAWallet, channelAtoB.PortID, channelAtoB.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainCAddress, clienttypes.ZeroHeight(), uint64(inFiveMinutes), "", forwarding) - s.AssertTxSuccess(resp) - }) - - t.Run("packets are relayed from A to B to C", func(t *testing.T) { - chainCDenom := transfertypes.NewDenom(chainADenom, - transfertypes.NewHop(channelBtoC.Counterparty.PortID, channelBtoC.Counterparty.ChannelID), - transfertypes.NewHop(channelAtoB.Counterparty.PortID, channelAtoB.Counterparty.ChannelID), - ) - - actualBalance, err := query.Balance(ctx, chainC, chainCAddress, chainCDenom.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) -} diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go deleted file mode 100644 index eab38d18de1..00000000000 --- a/e2e/tests/transfer/incentivized_test.go +++ /dev/null @@ -1,770 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -const ( - legacyMessage = "balance should be lowered by sum of recv_fee, ack_fee and timeout_fee" - capitalEfficientMessage = "balance should be lowered by max(recv_fee + ack_fee, timeout_fee)" -) - -type IncentivizedTransferTestSuite struct { - transferTester -} - -func TestIncentivizedTransferTestSuite(t *testing.T) { - testifysuite.Run(t, new(IncentivizedTransferTestSuite)) -} - -// CreateTransferFeePath explicitly enables fee middleware in the channel options. -func (s *IncentivizedTransferTestSuite) CreateTransferFeePath(testName string) (ibc.Relayer, ibc.ChannelOutput) { - return s.CreatePaths(ibc.DefaultClientOpts(), s.FeeTransferChannelOptions(), testName), s.GetChainAChannelForTest(testName) -} - -func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - chainATx ibc.Tx - payPacketFeeTxResp sdk.TxResponse - ) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - walletAmount := ibc.WalletAmount{ - Address: chainAWallet.FormattedAddress(), // destination address - Denom: chainADenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - t.Run("send IBC transfer", func(t *testing.T) { - chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), walletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(chainATx.Validate(), "chain-a ibc transfer tx is invalid") - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("pay packet fee", func(t *testing.T) { - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - 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) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - msg, escrowTotalFee := getMessageAndFee(testFee, chainAVersion) - t.Run(msg, func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - expected := testvalues.StartingTokenAmount - walletAmount.Amount.Int64() - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) -} - -func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_InvalidReceiverAccount() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - payPacketFeeTxResp sdk.TxResponse - ) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - transferAmount := testvalues.DefaultTransferAmount(chainADenom) - - t.Run("send IBC transfer", func(t *testing.T) { - resp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, sdk.NewCoins(transferAmount), chainAWallet.FormattedAddress(), testvalues.InvalidAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - // this message should be successful, as receiver account is not validated on the sending chain. - s.AssertTxSuccess(resp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - transferAmount.Amount.Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("pay packet fee", func(t *testing.T) { - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - 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) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - msg, escrowTotalFee := getMessageAndFee(testFee, chainAVersion) - t.Run(msg, func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - transferAmount.Amount.Int64() - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - t.Run("timeout fee and transfer amount refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - // the address was invalid so the amount sent should be unescrowed. - expected := testvalues.StartingTokenAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance, "the amount sent and timeout fee should have been refunded as there was an invalid receiver address provided") - }) -} - -func (s *IncentivizedTransferTestSuite) TestMultiMsg_MsgPayPacketFeeSingleSender() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - multiMsgTxResponse sdk.TxResponse - ) - - transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - chainARelayerUser, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - - relayerAStartingBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - - t.Run("register counterparty payee", func(t *testing.T) { - multiMsgTxResponse = s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(multiMsgTxResponse) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - version, err := feetypes.MetadataFromVersion(channelA.Version) - s.Require().NoError(err) - - msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil) - msgTransfer := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - version.AppVersion, - sdk.NewCoins(transferAmount), - chainAWallet.FormattedAddress(), - chainBWallet.FormattedAddress(), - s.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer) - s.AssertTxSuccess(resp) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - msg, escrowTotalFee := getMessageAndFee(testFee, chainAVersion) - t.Run(msg, func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerUser) - s.Require().NoError(err) - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) -} - -func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_SingleSender_TimesOut() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - chainATx ibc.Tx - payPacketFeeTxResp sdk.TxResponse - ) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainA.Config().Denom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - t.Run("Send IBC transfer", func(t *testing.T) { - chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{Timeout: testvalues.ImmediatelyTimeout()}) - s.Require().NoError(err) - s.Require().NoError(chainATx.Validate(), "source ibc transfer tx is invalid") - time.Sleep(time.Nanosecond * 1) // want it to timeout immediately - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - 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) - packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) - - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - msg, escrowTotalFee := getMessageAndFee(testFee, chainAVersion) - t.Run(msg, func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("recv and ack should be refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testFee.TimeoutFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) -} - -func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, _ := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - chainATx ibc.Tx - payPacketFeeTxResp sdk.TxResponse - ) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - _, _, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - chainBWalletAmount := ibc.WalletAmount{ - Address: chainAWallet.FormattedAddress(), // destination address - Denom: chainADenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - t.Run("send IBC transfer", func(t *testing.T) { - var err error - chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(chainATx.Validate(), "source ibc transfer tx is invalid") - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("pay packet fee", func(t *testing.T) { - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - 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) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - - t.Run("should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - }) - - msg, escrowTotalFee := getMessageAndFee(testFee, chainAVersion) - t.Run(msg, func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("with no counterparty address", func(t *testing.T) { - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("timeout and recv fee are refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout and recv fee should be refunded. - expected := testvalues.StartingTokenAmount - chainBWalletAmount.Amount.Int64() - testFee.AckFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - }) -} - -func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - t.Parallel() - relayer, channelA := s.CreateTransferFeePath(testName) - - chainA, chainB := s.GetChains() - chainAVersion := chainA.Config().Images[0].Version - - var ( - chainADenom = chainA.Config().Denom - testFee = testvalues.DefaultFee(chainADenom) - chainATx ibc.Tx - payPacketFeeTxResp sdk.TxResponse - ) - - chainAWallet1 := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAWallet2 := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - chainARelayerWallet, chainBRelayerWallet, err := s.RecoverRelayerWallets(ctx, relayer, testName) - t.Run("relayer wallets recovered", func(t *testing.T) { - s.Require().NoError(err) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - - t.Run("register counterparty payee", func(t *testing.T) { - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - }) - - t.Run("verify counterparty payee", func(t *testing.T) { - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - walletAmount1 := ibc.WalletAmount{ - Address: chainAWallet1.FormattedAddress(), // destination address - Denom: chainADenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - t.Run("send IBC transfer", func(t *testing.T) { - chainATx, err = chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet1.KeyName(), walletAmount1, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(chainATx.Validate(), "chain-a ibc transfer tx is invalid") - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet1) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - walletAmount1.Amount.Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("pay packet fee", func(t *testing.T) { - t.Run("no incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - 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) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - t.Run("paying packetFee2 should succeed", func(t *testing.T) { - payPacketFeeTxResp = s.PayPacketFeeAsync(ctx, chainA, chainAWallet2, packetID, packetFee2) - s.AssertTxSuccess(payPacketFeeTxResp) - }) - - t.Run("there should be incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee1 := packets[0].PacketFees[0].Fee - actualFee2 := packets[0].PacketFees[1].Fee - s.Require().Len(packets[0].PacketFees, 2) - - s.Require().True(actualFee1.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee1.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee1.TimeoutFee.Equal(testFee.TimeoutFee)) - - s.Require().True(actualFee2.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee2.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee2.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - - msgFn := func(wallet string) string { - return fmt.Sprintf("balance of %s should be lowered by max(recv_fee + ack_fee, timeout_fee)", wallet) - } - escrowTotalFee := testFee.Total() - if !testvalues.CapitalEfficientFeeEscrowFeatureReleases.IsSupported(chainAVersion) { - msgFn = func(wallet string) string { - return fmt.Sprintf("balance of %s should be lowered by sum of recv_fee, ack_fee and timeout_fee", wallet) - } - escrowTotalFee = testFee.RecvFee.Add(testFee.AckFee...).Add(testFee.TimeoutFee...) - } - t.Run(msgFn("chainAWallet1"), func(t *testing.T) { - actualBalance1, err := s.GetChainANativeBalance(ctx, chainAWallet1) - s.Require().NoError(err) - - expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount.Int64() - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected1, actualBalance1) - }) - - t.Run(msgFn("chainAWallet2"), func(t *testing.T) { - actualBalance2, err := s.GetChainANativeBalance(ctx, chainAWallet2) - s.Require().NoError(err) - - expected2 := testvalues.StartingTokenAmount - escrowTotalFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected2, actualBalance2) - }) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance1, err := s.GetChainANativeBalance(ctx, chainAWallet1) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - 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) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - expected2 := testvalues.StartingTokenAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected2, actualBalance2) - }) -} - -// getMessageAndFee returns the message that should be used for t.Run as well as the expected fee based on -// whether or not capital efficient fee escrow is supported. -func getMessageAndFee(fee feetypes.Fee, chainVersion string) (string, sdk.Coins) { - msg := capitalEfficientMessage - escrowTotalFee := fee.Total() - if !testvalues.CapitalEfficientFeeEscrowFeatureReleases.IsSupported(chainVersion) { - msg = legacyMessage - escrowTotalFee = fee.RecvFee.Add(fee.AckFee...).Add(fee.TimeoutFee...) - } - return msg, escrowTotalFee -} diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go deleted file mode 100644 index dac73910e4b..00000000000 --- a/e2e/tests/transfer/localhost_test.go +++ /dev/null @@ -1,167 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v9/modules/core/exported" - localhost "github.com/cosmos/ibc-go/v9/modules/light-clients/09-localhost" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestTransferLocalhostTestSuite(t *testing.T) { - testifysuite.Run(t, new(LocalhostTransferTestSuite)) -} - -type LocalhostTransferTestSuite struct { - testsuite.E2ETestSuite -} - -// TestMsgTransfer_Localhost creates two wallets on a single chain and performs MsgTransfers back and forth -// to ensure ibc functions as expected on localhost. This test is largely the same as TestMsgTransfer_Succeeds_Nonincentivized -// except that chain B is replaced with an additional wallet on chainA. -func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() { - t := s.T() - ctx := context.TODO() - - chainA, _ := s.GetChains() - - channelVersion := transfertypes.V2 - - chainADenom := chainA.Config().Denom - - rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userBWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - var ( - msgChanOpenInitRes channeltypes.MsgChannelOpenInitResponse - msgChanOpenTryRes channeltypes.MsgChannelOpenTryResponse - ack []byte - packet channeltypes.Packet - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA), "failed to wait for blocks") - - t.Run("channel open init localhost", func(t *testing.T) { - msgChanOpenInit := channeltypes.NewMsgChannelOpenInit( - transfertypes.PortID, channelVersion, - channeltypes.UNORDERED, []string{exported.LocalhostConnectionID}, - transfertypes.PortID, rlyWallet.FormattedAddress(), - ) - - s.Require().NoError(msgChanOpenInit.ValidateBasic()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenInit) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenInitRes)) - }) - - t.Run("channel open try localhost", func(t *testing.T) { - msgChanOpenTry := channeltypes.NewMsgChannelOpenTry( - transfertypes.PortID, channelVersion, - channeltypes.UNORDERED, []string{exported.LocalhostConnectionID}, - transfertypes.PortID, msgChanOpenInitRes.ChannelId, - channelVersion, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenTry) - s.AssertTxSuccess(txResp) - - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenTryRes)) - }) - - t.Run("channel open ack localhost", func(t *testing.T) { - msgChanOpenAck := channeltypes.NewMsgChannelOpenAck( - transfertypes.PortID, msgChanOpenInitRes.ChannelId, - msgChanOpenTryRes.ChannelId, channelVersion, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenAck) - s.AssertTxSuccess(txResp) - }) - - t.Run("channel open confirm localhost", func(t *testing.T) { - msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm( - transfertypes.PortID, msgChanOpenTryRes.ChannelId, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("query localhost transfer channel ends", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndA) - - channelEndB, err := query.Channel(ctx, chainA, transfertypes.PortID, msgChanOpenTryRes.ChannelId) - s.Require().NoError(err) - s.Require().NotNil(channelEndB) - - s.Require().Equal(channelEndA.ConnectionHops, channelEndB.ConnectionHops) - }) - - t.Run("send packet localhost ibc transfer", func(t *testing.T) { - var err error - txResp := s.Transfer(ctx, chainA, userAWallet, transfertypes.PortID, msgChanOpenInitRes.ChannelId, testvalues.DefaultTransferCoins(chainADenom), userAWallet.FormattedAddress(), userBWallet.FormattedAddress(), clienttypes.NewHeight(1, 500), 0, "", nil) - s.AssertTxSuccess(txResp) - - packet, err = ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, userAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("recv packet localhost ibc transfer", func(t *testing.T) { - var err error - msgRecvPacket := channeltypes.NewMsgRecvPacket(packet, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) - s.AssertTxSuccess(txResp) - - ack, err = ibctesting.ParseAckFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(ack) - }) - - t.Run("acknowledge packet localhost ibc transfer", func(t *testing.T) { - msgAcknowledgement := channeltypes.NewMsgAcknowledgement(packet, ack, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgAcknowledgement) - s.AssertTxSuccess(txResp) - }) - - t.Run("verify tokens transferred", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.ChannelId, 1) - - ibcToken := testsuite.GetIBCToken(chainADenom, transfertypes.PortID, msgChanOpenTryRes.ChannelId) - actualBalance, err := query.Balance(ctx, chainA, userBWallet.FormattedAddress(), ibcToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) -} diff --git a/e2e/tests/transfer/send_enabled_test.go b/e2e/tests/transfer/send_enabled_test.go deleted file mode 100644 index f3bee515a77..00000000000 --- a/e2e/tests/transfer/send_enabled_test.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestTransferTestSuiteSendEnabled(t *testing.T) { - testifysuite.Run(t, new(TransferTestSuiteSendEnabled)) -} - -type TransferTestSuiteSendEnabled struct { - transferTester -} - -func (s *TransferTestSuiteSendEnabled) SetupSuite() { - s.SetupChains(context.TODO(), nil, func(options *testsuite.ChainOptions) { - options.RelayerCount = 1 - }) -} - -// TestSendEnabledParam tests changing ics20 SendEnabled parameter -func (s *TransferTestSuiteSendEnabled) TestSendEnabledParam() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - // Note: explicitly not using t.Parallel() in this test as it makes chain wide changes - s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - channelA := s.GetChainAChannelForTest(testName) - chainAVersion := chainA.Config().Images[0].Version - chainADenom := chainA.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - isSelfManagingParams := testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) - - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("ensure transfer sending is enabled", func(t *testing.T) { - enabled := s.QueryTransferParams(ctx, chainA).SendEnabled - s.Require().True(enabled) - }) - - t.Run("ensure packets can be sent", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("change send enabled parameter to disabled", func(t *testing.T) { - if isSelfManagingParams { - msg := transfertypes.NewMsgUpdateParams(govModuleAddress.String(), transfertypes.NewParams(false, true)) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainA, chainAWallet) - } else { - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(transfertypes.StoreKey, string(transfertypes.KeySendEnabled), "false"), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainA, chainAWallet, proposal) - } - }) - - t.Run("ensure transfer params are disabled", func(t *testing.T) { - enabled := s.QueryTransferParams(ctx, chainA).SendEnabled - s.Require().False(enabled) - }) - - t.Run("ensure ics20 transfer fails", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxFailure(transferTxResp, transfertypes.ErrSendDisabled) - }) -} diff --git a/e2e/tests/transfer/send_receive_test.go b/e2e/tests/transfer/send_receive_test.go deleted file mode 100644 index d9f7b51ce2c..00000000000 --- a/e2e/tests/transfer/send_receive_test.go +++ /dev/null @@ -1,154 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestTransferTestSuiteSendReceive(t *testing.T) { - testifysuite.Run(t, new(TransferTestSuiteSendReceive)) -} - -type TransferTestSuiteSendReceive struct { - transferTester -} - -func (s *TransferTestSuiteSendReceive) SetupSuite() { - s.SetupChains(context.TODO(), nil, func(options *testsuite.ChainOptions) { - options.RelayerCount = 1 - }) -} - -// TestReceiveEnabledParam tests changing ics20 ReceiveEnabled parameter -func (s *TransferTestSuiteSendReceive) TestReceiveEnabledParam() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - // Note: explicitly not using t.Parallel() in this test as it makes chain wide changes - s.CreateTransferPath(testName) - - chainA, chainB := s.GetChains() - - relayer := s.GetRelayerForTest(testName) - channelA := s.GetChainAChannelForTest(testName) - - chainAVersion := chainA.Config().Images[0].Version - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - var ( - chainBDenom = chainB.Config().Denom - chainAIBCToken = testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) // IBC token sent to chainA - - chainAAddress = chainAWallet.FormattedAddress() - chainBAddress = chainBWallet.FormattedAddress() - ) - - isSelfManagingParams := testvalues.SelfParamsFeatureReleases.IsSupported(chainAVersion) - - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainA) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("ensure transfer receive is enabled", func(t *testing.T) { - enabled := s.QueryTransferParams(ctx, chainA).ReceiveEnabled - s.Require().True(enabled) - }) - - t.Run("ensure packets can be received, send from chainB to chainA", func(t *testing.T) { - t.Run("send from chainB to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBDenom), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - 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, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - }) - - t.Run("change receive enabled parameter to disabled ", func(t *testing.T) { - if isSelfManagingParams { - msg := transfertypes.NewMsgUpdateParams(govModuleAddress.String(), transfertypes.NewParams(false, false)) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainA, chainAWallet) - } else { - changes := []paramsproposaltypes.ParamChange{ - paramsproposaltypes.NewParamChange(transfertypes.StoreKey, string(transfertypes.KeyReceiveEnabled), "false"), - } - - proposal := paramsproposaltypes.NewParameterChangeProposal(ibctesting.Title, ibctesting.Description, changes) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chainA, chainAWallet, proposal) - } - }) - - t.Run("ensure transfer params are disabled", func(t *testing.T) { - enabled := s.QueryTransferParams(ctx, chainA).ReceiveEnabled - s.Require().False(enabled) - }) - - t.Run("ensure ics20 transfer fails", func(t *testing.T) { - t.Run("send from chainB to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBDenom), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("tokens are escrowed", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - (testvalues.IBCTransferAmount * 2) // second send - s.Require().Equal(expected, actualBalance) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("tokens are unescrowed in failed acknowledgement", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount // only first send marked - s.Require().Equal(expected, actualBalance) - }) - }) -} diff --git a/e2e/tests/transfer/upgradesv1_test.go b/e2e/tests/transfer/upgradesv1_test.go deleted file mode 100644 index 2850e14b4ec..00000000000 --- a/e2e/tests/transfer/upgradesv1_test.go +++ /dev/null @@ -1,363 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "testing" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -func TestTransferChannelUpgradesV1TestSuite(t *testing.T) { - testifysuite.Run(t, new(TransferChannelUpgradesV1TestSuite)) -} - -type TransferChannelUpgradesV1TestSuite struct { - testsuite.E2ETestSuite -} - -func (s *TransferChannelUpgradesV1TestSuite) SetupChannelUpgradesV1Test(testName string) { - opts := s.TransferChannelOptions() - opts.Version = transfertypes.V1 - s.CreatePaths(ibc.DefaultClientOpts(), opts, testName) -} - -// TestChannelUpgrade_WithICS20v2_Succeeds tests upgrading a transfer channel to ICS20 v2. -func (s *TransferChannelUpgradesV1TestSuite) TestChannelUpgrade_WithICS20v2_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesV1Test(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - channelB := channelA.Counterparty - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelB.PortID, channelB.ChannelID) - - 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("verify transfer version of channel A is ics20-1", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V1, channel.Version, "the channel version is not ics20-1") - }) - - t.Run("native token transfer from chainA to chainB, sender is source of tokens", func(t *testing.T) { - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainA.Config().Denom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err := chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-a ibc transfer tx is invalid") - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - 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) - - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - s.Require().NoError(err) - - expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - upgradeFields := channeltypes.NewUpgradeFields(chA.Ordering, chA.ConnectionHops, transfertypes.V2) - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, upgradeFields) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A upgraded and transfer version is ics20-2", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V2, channel.Version, "the channel version is not ics20-2") - }) - - t.Run("verify channel B upgraded and transfer version is ics20-2", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V2, channel.Version, "the channel version is not ics20-2") - }) - - // send the native chainB denom and also the ibc token from chainA - transferCoins := []sdk.Coin{ - testvalues.DefaultTransferAmount(chainBIBCToken.IBCDenom()), - testvalues.DefaultTransferAmount(chainBDenom), - } - - t.Run("native token from chain B and non-native IBC token from chainA, both to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainB, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - t.Run("chain A native denom", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("chain B IBC denom", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - }) - - t.Run("tokens are un-escrowed", func(t *testing.T) { - t.Run("chain A escrow", func(t *testing.T) { - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - s.Require().NoError(err) - s.Require().Equal(sdk.NewCoin(chainADenom, sdkmath.NewInt(0)), actualTotalEscrow) // total escrow is zero because tokens have come back - }) - - t.Run("chain B escrow", func(t *testing.T) { - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainB, chainBDenom) - s.Require().NoError(err) - s.Require().Equal(sdk.NewCoin(chainBDenom, sdkmath.NewInt(testvalues.IBCTransferAmount)), actualTotalEscrow) - }) - }) -} - -// TestChannelUpgrade_WithFeeMiddlewareAndICS20v2_Succeeds tests upgrading a transfer channel to wire up fee middleware and upgrade to ICS20 v2. -func (s *TransferChannelUpgradesV1TestSuite) TestChannelUpgrade_WithFeeMiddlewareAndICS20v2_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesV1Test(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - channelB := channelA.Counterparty - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelB.PortID, channelB.ChannelID) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - var ( - err error - channel channeltypes.Channel - ) - - t.Run("verify transfer version of channel A is ics20-1", func(t *testing.T) { - channel, err = query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V1, channel.Version, "the channel version is not ics20-1") - }) - - t.Run("native token transfer from chainB to chainA, sender is source of tokens", func(t *testing.T) { - chainAwalletAmount := ibc.WalletAmount{ - Address: chainAWallet.FormattedAddress(), // destination address - Denom: chainBDenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err := chainB.SendIBCTransfer(ctx, channelB.ChannelID, chainBWallet.KeyName(), chainAwalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-b ibc transfer tx is invalid") - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - channel.Version = transfertypes.V2 // change version to ics20-2 - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, s.CreateUpgradeFields(channel)) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A upgraded and channel version is {ics29-1,ics20-2}", func(t *testing.T) { - channel, err = query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - s.Require().Equal(transfertypes.V2, version.AppVersion, "the channel version is not ics20-2") - }) - - t.Run("verify channel B upgraded and channel version is {ics29-1,ics20-2}", func(t *testing.T) { - channel, err = query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - s.Require().Equal(transfertypes.V2, version.AppVersion, "the channel version is not ics20-2") - }) - - var ( - chainARelayerWallet, chainBRelayerWallet ibc.Wallet - relayerAStartingBalance int64 - testFee = testvalues.DefaultFee(chainADenom) - ) - - t.Run("recover relayer wallets", func(t *testing.T) { - _, _, err := s.RecoverRelayerWallets(ctx, relayer, testName) - s.Require().NoError(err) - - chainARelayerWallet, chainBRelayerWallet, err = s.GetRelayerWallets(relayer) - s.Require().NoError(err) - - relayerAStartingBalance, err = s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - }) - - t.Run("register and verify counterparty payee", func(t *testing.T) { - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - // send the native chainA denom and also the ibc token from chainB - denoms := []string{chainAIBCToken.IBCDenom(), chainADenom} - var transferCoins []sdk.Coin - for _, denom := range denoms { - transferCoins = append(transferCoins, testvalues.DefaultTransferAmount(denom)) - } - - t.Run("send incentivized transfer packet to chain B with native token from chain A and non-native IBC token from chainB", func(t *testing.T) { - // before adding fees for the packet, there should not be incentivized packets - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - - msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil) - msgTransfer := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - transfertypes.V2, - transferCoins, - chainAWallet.FormattedAddress(), - chainBWallet.FormattedAddress(), - s.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer) - s.AssertTxSuccess(resp) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - t.Run("chain B native denom", func(t *testing.T) { - actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualBalance) - }) - - t.Run("chain A IBC denom", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("tokens are un-escrowed", func(t *testing.T) { - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainB, chainADenom) - s.Require().NoError(err) - s.Require().Equal(sdk.NewCoin(chainADenom, sdkmath.NewInt(0)), actualTotalEscrow) // total escrow is zero because tokens have come back - }) -} diff --git a/e2e/tests/transfer/upgradesv2_test.go b/e2e/tests/transfer/upgradesv2_test.go deleted file mode 100644 index 7b2b53559d8..00000000000 --- a/e2e/tests/transfer/upgradesv2_test.go +++ /dev/null @@ -1,508 +0,0 @@ -//go:build !test_e2e - -package transfer - -import ( - "context" - "sync" - "testing" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -func TestTransferChannelUpgradesTestSuite(t *testing.T) { - testifysuite.Run(t, new(TransferChannelUpgradesTestSuite)) -} - -type TransferChannelUpgradesTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *TransferChannelUpgradesTestSuite) SetupChannelUpgradesPath(testName string) { - s.CreatePaths(ibc.DefaultClientOpts(), s.TransferChannelOptions(), testName) -} - -// TestChannelUpgrade_WithFeeMiddleware_Succeeds tests upgrading a transfer channel to wire up fee middleware -func (s *TransferChannelUpgradesTestSuite) TestChannelUpgrade_WithFeeMiddleware_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesPath(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - channelB := channelA.Counterparty - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelB.PortID, channelB.ChannelID) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - var ( - chainARelayerWallet, chainBRelayerWallet ibc.Wallet - relayerAStartingBalance int64 - testFee = testvalues.DefaultFee(chainADenom) - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - // trying to create some inflight packets, although they might get relayed before the upgrade starts - t.Run("create inflight transfer packets between chain A and chain B", func(t *testing.T) { - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainADenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err := chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-a ibc transfer tx is invalid") - - chainAwalletAmount := ibc.WalletAmount{ - Address: chainAWallet.FormattedAddress(), // destination address - Denom: chainBDenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err = chainB.SendIBCTransfer(ctx, channelB.ChannelID, chainBWallet.KeyName(), chainAwalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-b ibc transfer tx is invalid") - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, s.CreateUpgradeFields(chA)) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed between chain A and chain B", func(t *testing.T) { - // packet from chain A to chain B - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - - // packet from chain B to chain A - s.AssertPacketRelayed(ctx, chainB, channelB.PortID, channelB.ChannelID, 1) - actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - expected = testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("verify channel A upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("verify channel B upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("prune packet acknowledgements", func(t *testing.T) { - // there should be one ack for the packet that we sent before the upgrade - acks, err := query.PacketAcknowledgements(ctx, chainA, channelA.PortID, channelA.ChannelID, []uint64{}) - s.Require().NoError(err) - s.Require().Len(acks, 1) - s.Require().Equal(uint64(1), acks[0].Sequence) - - pruneAcksTxResponse := s.PruneAcknowledgements(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, uint64(1)) - s.AssertTxSuccess(pruneAcksTxResponse) - - // after pruning there should not be any acks - acks, err = query.PacketAcknowledgements(ctx, chainA, channelA.PortID, channelA.ChannelID, []uint64{}) - s.Require().NoError(err) - s.Require().Empty(acks) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("recover relayer wallets", func(t *testing.T) { - _, _, err := s.RecoverRelayerWallets(ctx, relayer, testName) - s.Require().NoError(err) - - chainARelayerWallet, chainBRelayerWallet, err = s.GetRelayerWallets(relayer) - s.Require().NoError(err) - - relayerAStartingBalance, err = s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("register and verify counterparty payee", func(t *testing.T) { - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("send incentivized transfer packet", func(t *testing.T) { - // before adding fees for the packet, there should not be incentivized packets - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - - transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom) - - msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil) - msgTransfer := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, // upgrade adds fee middleware, but keeps transfer version - sdk.NewCoins(transferAmount), - chainAWallet.FormattedAddress(), - chainBWallet.FormattedAddress(), - s.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer) - s.AssertTxSuccess(resp) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("tokens are received by walletB", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - // walletB has received two IBC transfers of value testvalues.IBCTransferAmount since the start of the test. - expected := 2 * testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("timeout fee is refunded", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // once the relayer has relayed the packets, the timeout fee should be refunded. - // walletA has done two IBC transfers of value testvalues.IBCTransferAmount since the start of the test. - expected := testvalues.StartingTokenAmount - (2 * testvalues.IBCTransferAmount) - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) -} - -// TestChannelDowngrade_WithICS20v1_Succeeds tests downgrading a transfer channel from ICS20 v2 to ICS20 v1. -func (s *TransferChannelUpgradesTestSuite) TestChannelDowngrade_WithICS20v1_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesPath(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - channelB := channelA.Counterparty - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelB.PortID, channelB.ChannelID) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - var ( - err error - channel channeltypes.Channel - ) - - t.Run("verify transfer version of channel A is ics20-2", func(t *testing.T) { - channel, err = query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V2, channel.Version, "the channel version is not ics20-2") - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - upgradeFields := channeltypes.NewUpgradeFields(channel.Ordering, channel.ConnectionHops, transfertypes.V1) - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, upgradeFields) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A downgraded and transfer version is ics20-1", func(t *testing.T) { - channel, err = query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V1, channel.Version, "the channel version is not ics20-1") - }) - - t.Run("verify channel B downgraded and transfer version is ics20-1", func(t *testing.T) { - channel, err = query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V1, channel.Version, "the channel version is not ics20-1") - }) - - t.Run("native IBC token transfer from chainA to chainB, sender is source of tokens", func(t *testing.T) { - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainA.Config().Denom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err := chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-a ibc transfer tx is invalid") - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - 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) - - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - s.Require().NoError(err) - - expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) -} - -// TestChannelUpgrade_WithFeeMiddleware_CrossingHello_Succeeds tests upgrading a transfer channel to wire up fee middleware under crossing hello -func (s *TransferChannelUpgradesTestSuite) TestChannelUpgrade_WithFeeMiddleware_CrossingHello_Succeeds() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesPath(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - channelB := channelA.Counterparty - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - - 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") - - // trying to create some inflight packets, although they might get relayed before the upgrade starts - t.Run("create inflight transfer packets between chain A and chain B", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("execute gov proposals to initiate channel upgrade on chain A and chain B", func(t *testing.T) { - var wg sync.WaitGroup - - wg.Add(1) - go func() { - defer wg.Done() - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, s.CreateUpgradeFields(chA)) - }() - - wg.Add(1) - go func() { - defer wg.Done() - chB, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.InitiateChannelUpgrade(ctx, chainB, chainBWallet, channelB.PortID, channelB.ChannelID, s.CreateUpgradeFields(chB)) - }() - - wg.Wait() - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("packets are relayed between chain A and chain B", func(t *testing.T) { - // packet from chain A to chain B - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - }) - - t.Run("verify channel A upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("verify channel B upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) -} - -// TestChannelUpgrade_WithFeeMiddleware_FailsWithTimeoutOnAck tests upgrading a transfer channel to wire up fee middleware but fails on ACK because of timeout -func (s *TransferChannelUpgradesTestSuite) TestChannelUpgrade_WithFeeMiddleware_FailsWithTimeoutOnAck() { - t := s.T() - ctx := context.TODO() - - testName := t.Name() - s.SetupChannelUpgradesPath(testName) - - relayer, channelA := s.GetRelayerForTest(testName), s.GetChainAChannelForTest(testName) - - chainA, chainB := s.GetChains() - - channelB := channelA.Counterparty - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("execute gov proposal to set upgrade timeout", func(t *testing.T) { - s.SetUpgradeTimeoutParam(ctx, chainB, chainBWallet) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, s.CreateUpgradeFields(chA)) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("verify channel A did not upgrade", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.OPEN, channel.State, "the channel state is not OPEN") - s.Require().Equal(channelA.Version, channel.Version, "the channel version is not "+channelA.Version) - - errorReceipt, err := query.UpgradeError(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(uint64(1), errorReceipt.Sequence) - s.Require().Contains(errorReceipt.Message, "restored channel to pre-upgrade state") - }) - - t.Run("verify channel B did not upgrade", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - - s.Require().Equal(channeltypes.OPEN, channel.State, "the channel state is not OPEN") - s.Require().Equal(channelA.Version, channel.Version, "the channel version is not "+channelA.Version) - - errorReceipt, err := query.UpgradeError(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(uint64(1), errorReceipt.Sequence) - s.Require().Contains(errorReceipt.Message, "restored channel to pre-upgrade state") - }) -} diff --git a/e2e/tests/upgrades/genesis_test.go b/e2e/tests/upgrades/genesis_test.go deleted file mode 100644 index bb36879774e..00000000000 --- a/e2e/tests/upgrades/genesis_test.go +++ /dev/null @@ -1,261 +0,0 @@ -//go:build !test_e2e - -package upgrades - -import ( - "context" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - "github.com/stretchr/testify/suite" - "go.uber.org/zap" - - 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/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -func TestGenesisTestSuite(t *testing.T) { - suite.Run(t, new(GenesisTestSuite)) -} - -type GenesisTestSuite struct { - testsuite.E2ETestSuite -} - -// TODO: this configuration was originally being applied to `GetChains` in the test body, but it is not -// actually being propagated correctly. If we want to apply the configuration, we can uncomment this code -// however the test actually fails when this is done. -// func (s *GenesisTestSuite) SetupSuite() { -// configFileOverrides := make(map[string]any) -// appTomlOverrides := make(test.Toml) -// -// appTomlOverrides["halt-height"] = haltHeight -// configFileOverrides["config/app.toml"] = appTomlOverrides -// -// s.SetupChains(context.TODO(), nil, func(options *testsuite.ChainOptions) { -// // create chains with specified chain configuration options -// options.ChainSpecs[0].ConfigFileOverrides = configFileOverrides -// }) -// } - -func (s *GenesisTestSuite) TestIBCGenesis() { - t := s.T() - - haltHeight := int64(100) - - chainA, chainB := s.GetChains() - - ctx := context.Background() - testName := t.Name() - - relayer := s.CreateDefaultPaths(testName) - channelA := s.GetChainAChannelForTest(testName) - - 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("ics20: 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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("ics20: 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) - }) - - // setup 2 accounts: controller account on chain A, a second chain B account. - // host account will be created when the ICA is registered - controllerAccount := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - controllerAddress := controllerAccount.FormattedAddress() - chainBAccount := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - var hostAccount string - - t.Run("ics27: broadcast MsgRegisterInterchainAccount", func(t *testing.T) { - // explicitly set the version string because we don't want to use incentivized channels. - version := icatypes.NewDefaultMetadataString(ibctesting.FirstConnectionID, ibctesting.FirstConnectionID) - msgRegisterAccount := controllertypes.NewMsgRegisterInterchainAccount(ibctesting.FirstConnectionID, controllerAddress, version, channeltypes.ORDERED) - - txResp := s.BroadcastMessages(ctx, chainA, controllerAccount, msgRegisterAccount) - s.AssertTxSuccess(txResp) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("ics20: packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, 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("ics27: verify interchain account", func(t *testing.T) { - res, err := query.GRPCQuery[controllertypes.QueryInterchainAccountResponse](ctx, chainA, &controllertypes.QueryInterchainAccountRequest{ - Owner: controllerAddress, - ConnectionId: ibctesting.FirstConnectionID, - }) - s.Require().NoError(err) - s.Require().NotZero(len(res.Address)) - - hostAccount = res.Address - s.Require().NotEmpty(hostAccount) - - channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) - s.Require().NoError(err) - s.Require().Equal(len(channels), 2) - }) - - 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.(*cosmos.CosmosChain), haltHeight) - }) - - t.Run("ics20: 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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("ics20: 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) - }) - - t.Run("ics27: interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { - t.Run("fund interchain account wallet", func(t *testing.T) { - // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: hostAccount, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chainB.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("broadcast MsgSendTx", func(t *testing.T) { - // assemble bank transfer message from host account to user account on host chain - msgSend := &banktypes.MsgSend{ - FromAddress: hostAccount, - ToAddress: chainBAccount.FormattedAddress(), - Amount: sdk.NewCoins(testvalues.DefaultTransferAmount(chainB.Config().Denom)), - } - - cdc := testsuite.Codec() - bz, err := icatypes.SerializeCosmosTx(cdc, []proto.Message{msgSend}, icatypes.EncodingProtobuf) - s.Require().NoError(err) - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: bz, - Memo: "e2e", - } - - msgSendTx := controllertypes.NewMsgSendTx(controllerAccount.FormattedAddress(), ibctesting.FirstConnectionID, uint64(time.Hour.Nanoseconds()), packetData) - - resp := s.BroadcastMessages( - ctx, - chainA, - controllerAccount, - msgSendTx, - ) - - s.AssertTxSuccess(resp) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB)) - }) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") -} - -func (s *GenesisTestSuite) HaltChainAndExportGenesis(ctx context.Context, chain *cosmos.CosmosChain, 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, haltHeight) - s.Require().NoError(err) - - 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 = node.ExecBin(ctx, "comet", "unsafe-reset-all") - s.Require().NoError(err) - } - - err = chain.StartAllNodes(ctx) - s.Require().NoError(err) - - 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(height, haltHeight, "height did not increment after halt") -} diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go deleted file mode 100644 index b2fc69cff28..00000000000 --- a/e2e/tests/upgrades/upgrade_test.go +++ /dev/null @@ -1,1393 +0,0 @@ -//go:build !test_e2e - -package upgrades - -import ( - "context" - "fmt" - "sync" - "testing" - "time" - - "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - upgradetypes "cosmossdk.io/x/upgrade/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - e2erelayer "github.com/cosmos/ibc-go/e2e/relayer" - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - v7migrations "github.com/cosmos/ibc-go/v9/modules/core/02-client/migrations/v7" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v9/modules/core/exported" - solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" - localhost "github.com/cosmos/ibc-go/v9/modules/light-clients/09-localhost" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -const ( - haltHeightOffset = int64(30) - blocksAfterUpgrade = uint64(10) -) - -func TestUpgradeTestSuite(t *testing.T) { - testCfg := testsuite.LoadConfig() - if testCfg.UpgradeConfig.Tag == "" || testCfg.UpgradeConfig.PlanName == "" { - t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv) - } - - testifysuite.Run(t, new(UpgradeTestSuite)) -} - -type UpgradeTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *UpgradeTestSuite) CreateUpgradeTestPath(testName string) (ibc.Relayer, ibc.ChannelOutput) { - return s.CreatePaths(ibc.DefaultClientOpts(), s.TransferChannelOptions(), testName), s.GetChainAChannelForTest(testName) -} - -// UpgradeChain upgrades a chain to a specific version using the planName provided. -// The software upgrade proposal is broadcast by the provided wallet. -func (s *UpgradeTestSuite) UpgradeChain(ctx context.Context, chain *cosmos.CosmosChain, wallet ibc.Wallet, planName, currentVersion, upgradeVersion string) { - height, err := chain.GetNode().Height(ctx) - s.Require().NoError(err, "error fetching height before upgrade") - - haltHeight := height + haltHeightOffset - plan := upgradetypes.Plan{ - Name: planName, - Height: haltHeight, - Info: fmt.Sprintf("upgrade version test from %s to %s", currentVersion, upgradeVersion), - } - - if testvalues.GovV1MessagesFeatureReleases.IsSupported(chain.Config().Images[0].Version) { - msgSoftwareUpgrade := &upgradetypes.MsgSoftwareUpgrade{ - Plan: plan, - Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), - } - - s.ExecuteAndPassGovV1Proposal(ctx, msgSoftwareUpgrade, chain, wallet) - } else { - upgradeProposal := upgradetypes.NewSoftwareUpgradeProposal(fmt.Sprintf("upgrade from %s to %s", currentVersion, upgradeVersion), "upgrade chain E2E test", plan) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chain, wallet, upgradeProposal) - } - - err = test.WaitForCondition(time.Minute*2, time.Second*2, func() (bool, error) { - status, err := chain.GetNode().Client.Status(ctx) - if err != nil { - return false, err - } - return status.SyncInfo.LatestBlockHeight >= haltHeight, nil - }) - s.Require().NoError(err, "failed to wait for chain to halt") - - var allNodes []test.ChainHeighter - for _, node := range chain.Nodes() { - allNodes = append(allNodes, node) - } - - err = test.WaitForInSync(ctx, chain, allNodes...) - s.Require().NoError(err, "error waiting for node(s) to sync") - - err = chain.StopAllNodes(ctx) - s.Require().NoError(err, "error stopping node(s)") - - repository := chain.Nodes()[0].Image.Repository - chain.UpgradeVersion(ctx, s.DockerClient, repository, upgradeVersion) - - err = chain.StartAllNodes(ctx) - s.Require().NoError(err, "error starting upgraded node(s)") - - 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 upgrade") - - height, err = chain.Height(ctx) - s.Require().NoError(err, "error fetching height after upgrade") - - s.Require().Greater(height, haltHeight, "height did not increment after upgrade") -} - -func (s *UpgradeTestSuite) TestIBCChainUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - - ctx := context.Background() - testName := t.Name() - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - - var ( - chainADenom = chainA.Config().Denom - chainBIBCToken = testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) // IBC token sent to chainB - - chainBDenom = chainB.Config().Denom - chainAIBCToken = testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) // IBC token sent to chainA - ) - - // create separate user specifically for the upgrade proposal to more easily verify starting - // and end balances of the chainA users. - chainAUpgradeProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - 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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - 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, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("upgrade chainA", func(t *testing.T) { - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("restart relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - s.StartRelayer(relayer, testName) - }) - - 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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 2) - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("ensure packets can be received, send from chainB to chainA", func(t *testing.T) { - t.Run("send from chainB to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBDenom), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - }) -} - -func (s *UpgradeTestSuite) TestChainUpgrade() { - t := s.T() - - ctx := context.Background() - - testName := t.Name() - s.CreateUpgradeTestPath(testName) - - // TODO(chatton): this test is still creating a relayer and a channel, but it is not using them. - chain := s.GetAllChains()[0] - - userWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userWalletAddr := userWallet.FormattedAddress() - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chain), "failed to wait for blocks") - - t.Run("send funds to test wallet", func(t *testing.T) { - err := chain.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: userWalletAddr, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chain.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("verify tokens sent", func(t *testing.T) { - balance, err := query.Balance(ctx, chain, userWalletAddr, chain.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount * 2 - s.Require().Equal(expected, balance) - }) - - t.Run("upgrade chain", func(t *testing.T) { - testCfg := testsuite.LoadConfig() - proposerWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), proposerWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("send funds to test wallet", func(t *testing.T) { - err := chain.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ - Address: userWalletAddr, - Amount: sdkmath.NewInt(testvalues.StartingTokenAmount), - Denom: chain.Config().Denom, - }) - s.Require().NoError(err) - }) - - t.Run("verify tokens sent", func(t *testing.T) { - balance, err := query.Balance(ctx, chain, userWalletAddr, chain.Config().Denom) - s.Require().NoError(err) - - expected := testvalues.StartingTokenAmount * 3 - s.Require().Equal(expected, balance) - }) -} - -// TestV6ToV7ChainUpgrade will test that an upgrade from a v6 ibc-go binary to a v7 ibc-go binary is successful -// and that the automatic migrations associated with the 02-client module are performed. Namely that the solo machine -// proto definition is migrated in state from the v2 to v3 definition. This is checked by creating a solo machine client -// before the upgrade and asserting that its TypeURL has been changed after the upgrade. The test also ensure packets -// can be sent before and after the upgrade without issue -func (s *UpgradeTestSuite) TestV6ToV7ChainUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - - ctx := context.Background() - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - - 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() - - // create second tendermint client - createClientOptions := ibc.CreateClientOptions{ - TrustingPeriod: ibctesting.TrustingPeriod.String(), - } - - s.SetupClients(ctx, relayer, createClientOptions) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("check that both tendermint clients are active", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, testvalues.TendermintClientID(0)) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - status, err = query.ClientStatus(ctx, chainA, testvalues.TendermintClientID(1)) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - }) - - // create solo machine client using the solomachine implementation from ibctesting - // TODO: the solomachine clientID should be updated when after fix of this issue: https://github.com/cosmos/ibc-go/issues/2907 - solo := ibctesting.NewSolomachine(t, testsuite.Codec(), "solomachine", "testing", 1) - - legacyConsensusState := &v7migrations.ConsensusState{ - PublicKey: solo.ConsensusState().PublicKey, - Diversifier: solo.ConsensusState().Diversifier, - Timestamp: solo.ConsensusState().Timestamp, - } - - legacyClientState := &v7migrations.ClientState{ - Sequence: solo.ClientState().Sequence, - IsFrozen: solo.ClientState().IsFrozen, - ConsensusState: legacyConsensusState, - AllowUpdateAfterProposal: true, - } - - msgCreateSoloMachineClient, err := clienttypes.NewMsgCreateClient(legacyClientState, legacyConsensusState, chainAAddress) - s.Require().NoError(err) - - resp := s.BroadcastMessages( - ctx, - chainA.(*cosmos.CosmosChain), - chainAWallet, - msgCreateSoloMachineClient, - ) - - s.AssertTxSuccess(resp) - - t.Run("check that the solomachine is now active and that the clientstate is a pre-upgrade v2 solomachine clientstate", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, testvalues.SolomachineClientID(2)) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - res, err := s.ClientState(ctx, chainA, testvalues.SolomachineClientID(2)) - s.Require().NoError(err) - s.Require().Equal(fmt.Sprint("/", proto.MessageName(&v7migrations.ClientState{})), res.ClientState.TypeUrl) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("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.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - 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, testName) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - // create separate user specifically for the upgrade proposal to more easily verify starting - // and end balances of the chainA users. - chainAUpgradeProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - t.Run("upgrade chainA", func(t *testing.T) { - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), chainAUpgradeProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - // see this issue https://github.com/informalsystems/hermes/issues/3579 - // this restart is a temporary workaround to a limitation in hermes requiring a restart - // in some cases after an upgrade. - tc := testsuite.LoadConfig() - if tc.GetActiveRelayerConfig().ID == e2erelayer.Hermes { - s.RestartRelayer(ctx, relayer, testName) - } - - t.Run("check that the tendermint clients are active again after upgrade", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, testvalues.TendermintClientID(0)) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - status, err = query.ClientStatus(ctx, chainA, testvalues.TendermintClientID(1)) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - }) - - t.Run("IBC token transfer from chainA to chainB, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB.(*cosmos.CosmosChain)), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - t.Run("packets are relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("check that the v2 solo machine clientstate has been updated to the v3 solo machine clientstate", func(t *testing.T) { - res, err := s.ClientState(ctx, chainA, testvalues.SolomachineClientID(2)) - s.Require().NoError(err) - s.Require().Equal(fmt.Sprint("/", proto.MessageName(&solomachine.ClientState{})), res.ClientState.TypeUrl) - }) -} - -func (s *UpgradeTestSuite) TestV7ToV7_1ChainUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - - ctx := context.Background() - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - - 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("transfer native tokens from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB.(*cosmos.CosmosChain)), 0, "", nil) - 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, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packet is relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - - t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("ensure the localhost client is active and sentinel connection is stored in state", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, exported.LocalhostClientID) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - connectionResp, err := query.GRPCQuery[connectiontypes.QueryConnectionResponse](ctx, chainA, &connectiontypes.QueryConnectionRequest{ConnectionId: exported.LocalhostConnectionID}) - s.Require().NoError(err) - s.Require().Equal(connectiontypes.OPEN, connectionResp.Connection.State) - s.Require().Equal(exported.LocalhostClientID, connectionResp.Connection.ClientId) - s.Require().Equal(exported.LocalhostClientID, connectionResp.Connection.Counterparty.ClientId) - s.Require().Equal(exported.LocalhostConnectionID, connectionResp.Connection.Counterparty.ConnectionId) - }) - - t.Run("ensure escrow amount for native denom is stored in state", func(t *testing.T) { - actualTotalEscrow, err := query.TotalEscrowForDenom(ctx, chainA, chainADenom) - s.Require().NoError(err) - - expectedTotalEscrow := sdk.NewCoin(chainADenom, sdkmath.NewInt(testvalues.IBCTransferAmount)) - s.Require().Equal(expectedTotalEscrow, actualTotalEscrow) // migration has run and total escrow amount has been set - }) - - t.Run("IBC token transfer from chainA to chainB, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - 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 * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) -} - -func (s *UpgradeTestSuite) TestV7ToV8ChainUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - - ctx := context.Background() - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - - chainADenom := chainA.Config().Denom - - 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("transfer native tokens from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - 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, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packet is relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - - t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("update params", func(t *testing.T) { - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chainB) - s.Require().NoError(err) - s.Require().NotNil(authority) - - msg := clienttypes.NewMsgUpdateParams(authority.String(), clienttypes.NewParams(exported.Tendermint, "some-client")) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chainB, chainBWallet) - }) - - t.Run("query params", func(t *testing.T) { - clientParamsResp, err := query.GRPCQuery[clienttypes.QueryClientParamsResponse](ctx, chainB, &clienttypes.QueryClientParamsRequest{}) - s.Require().NoError(err) - - allowedClients := clientParamsResp.Params.AllowedClients - - s.Require().Len(allowedClients, 2) - s.Require().Contains(allowedClients, exported.Tendermint) - s.Require().Contains(allowedClients, "some-client") - }) - - t.Run("query human readable ibc denom", func(t *testing.T) { - s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) - }) - - t.Run("IBC token transfer from chainA to chainB, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - 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 * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) -} - -func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade() { - t := s.T() - ctx := context.Background() - - testName := t.Name() - relayer := s.CreatePaths(ibc.DefaultClientOpts(), s.FeeTransferChannelOptions(), testName) - - channelA := s.GetChainAChannelForTest(testName) - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - - 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("transfer native tokens from chainA to chainB", func(t *testing.T) { - txResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(txResp) - }) - - 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("pay packet fee", func(t *testing.T) { - t.Run("no packet fees in escrow", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - testFee := testvalues.DefaultFee(chainADenom) - packetID := channeltypes.NewPacketID(channelA.PortID, channelA.ChannelID, 1) - packetFee := feetypes.NewPacketFee(testFee, chainAWallet.FormattedAddress(), nil) - - t.Run("pay packet fee", func(t *testing.T) { - txResp := s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetID, packetFee) - s.AssertTxSuccess(txResp) - }) - - t.Run("query incentivized packets", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - }) - }) - - t.Run("upgrade chain", func(t *testing.T) { - testCfg := testsuite.LoadConfig() - proposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), proposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("29-fee migration partially refunds escrowed tokens", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - testFee := testvalues.DefaultFee(chainADenom) - legacyTotal := testFee.RecvFee.Add(testFee.AckFee...).Add(testFee.TimeoutFee...) - refundCoins := legacyTotal.Sub(testFee.Total()...) // Total() returns the denomwise max of (recvFee + ackFee, timeoutFee) - - expected := testvalues.StartingTokenAmount - testvalues.IBCTransferAmount - legacyTotal.AmountOf(chainADenom).Int64() + refundCoins.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - - // query incentivised packets and assert calculated values are correct - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Len(packets, 1) - actualFee := packets[0].PacketFees[0].Fee - - s.Require().True(actualFee.RecvFee.Equal(testFee.RecvFee)) - s.Require().True(actualFee.AckFee.Equal(testFee.AckFee)) - s.Require().True(actualFee.TimeoutFee.Equal(testFee.TimeoutFee)) - - escrowBalance, err := query.Balance(ctx, chainA, authtypes.NewModuleAddress(feetypes.ModuleName).String(), chainADenom) - s.Require().NoError(err) - - expected = testFee.Total().AmountOf(chainADenom).Int64() - s.Require().Equal(expected, escrowBalance.Int64()) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - t.Run("packet is relayed", func(t *testing.T) { - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - - t.Run("IBC token transfer from chainA to chainB, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - }) - - 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 * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) -} - -func (s *UpgradeTestSuite) TestV8ToV8_1ChainUpgrade_FeeMiddlewareChannelUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - ctx := context.Background() - - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - channelB := channelA.Counterparty - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - _ = chainAIBCToken - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelB.PortID, channelB.ChannelID) - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - var ( - chainARelayerWallet, chainBRelayerWallet ibc.Wallet - relayerAStartingBalance int64 - testFee = testvalues.DefaultFee(chainADenom) - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - // trying to create some inflight packets, although they might get relayed before the upgrade starts - t.Run("create inflight transfer packets between chain A and chain B", func(t *testing.T) { - chainBWalletAmount := ibc.WalletAmount{ - Address: chainBWallet.FormattedAddress(), // destination address - Denom: chainADenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err := chainA.SendIBCTransfer(ctx, channelA.ChannelID, chainAWallet.KeyName(), chainBWalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-a ibc transfer tx is invalid") - - chainAwalletAmount := ibc.WalletAmount{ - Address: chainAWallet.FormattedAddress(), // destination address - Denom: chainBDenom, - Amount: sdkmath.NewInt(testvalues.IBCTransferAmount), - } - - transferTxResp, err = chainB.SendIBCTransfer(ctx, channelB.ChannelID, chainBWallet.KeyName(), chainAwalletAmount, ibc.TransferOptions{}) - s.Require().NoError(err) - s.Require().NoError(transferTxResp.Validate(), "chain-b ibc transfer tx is invalid") - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - - t.Run("upgrade chains", func(t *testing.T) { - var wg sync.WaitGroup - - wg.Add(1) - go func() { - defer wg.Done() - - t.Run("chain A", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - }() - - wg.Add(1) - go func() { - defer wg.Done() - - t.Run("chain B", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainB.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[1].Tag, testCfg.UpgradeConfig.Tag) - }) - }() - - wg.Wait() - }) - - t.Run("query params", func(t *testing.T) { - t.Run("on chain A", func(t *testing.T) { - channelParamsResp, err := query.GRPCQuery[channeltypes.QueryChannelParamsResponse](ctx, chainA, &channeltypes.QueryChannelParamsRequest{}) - s.Require().NoError(err) - - upgradeTimeout := channelParamsResp.Params.UpgradeTimeout - s.Require().Equal(clienttypes.ZeroHeight(), upgradeTimeout.Height) - s.Require().Equal(uint64(time.Minute*10), upgradeTimeout.Timestamp) - }) - - t.Run("on chain B", func(t *testing.T) { - channelParamsResp, err := query.GRPCQuery[channeltypes.QueryChannelParamsResponse](ctx, chainB, &channeltypes.QueryChannelParamsRequest{}) - s.Require().NoError(err) - - upgradeTimeout := channelParamsResp.Params.UpgradeTimeout - s.Require().Equal(clienttypes.ZeroHeight(), upgradeTimeout.Height) - s.Require().Equal(uint64(time.Minute*10), upgradeTimeout.Timestamp) - }) - }) - - t.Run("execute gov proposal to initiate channel upgrade", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, s.CreateUpgradeFields(chA)) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") - - t.Run("packets are relayed between chain A and chain B", func(t *testing.T) { - // packet from chain A to chain B - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - - // packet from chain B to chain A - actualBalance, err = query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - expected = testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("verify channel A upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("verify channel B upgraded and is fee enabled", func(t *testing.T) { - channel, err := query.Channel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - - // check the channel version include the fee version - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - s.Require().Equal(feetypes.Version, version.FeeVersion, "the channel version did not include ics29") - - // extra check - feeEnabled, err := query.FeeEnabledChannel(ctx, chainB, channelB.PortID, channelB.ChannelID) - s.Require().NoError(err) - s.Require().Equal(true, feeEnabled) - }) - - t.Run("prune packet acknowledgements", func(t *testing.T) { - // there should be one ack for the packet that we sent before the upgrade - acks, err := query.PacketAcknowledgements(ctx, chainA, channelA.PortID, channelA.ChannelID, []uint64{}) - s.Require().NoError(err) - s.Require().Len(acks, 1) - s.Require().Equal(uint64(1), acks[0].Sequence) - - pruneAcksTxResponse := s.PruneAcknowledgements(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, uint64(1)) - s.AssertTxSuccess(pruneAcksTxResponse) - - // after pruning there should not be any acks - acks, err = query.PacketAcknowledgements(ctx, chainA, channelA.PortID, channelA.ChannelID, []uint64{}) - s.Require().NoError(err) - s.Require().Empty(acks) - }) - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("recover relayer wallets", func(t *testing.T) { - _, _, err := s.RecoverRelayerWallets(ctx, relayer, testName) - s.Require().NoError(err) - - chainARelayerWallet, chainBRelayerWallet, err = s.GetRelayerWallets(relayer) - s.Require().NoError(err) - - relayerAStartingBalance, err = s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - t.Logf("relayer A user starting with balance: %d", relayerAStartingBalance) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("register and verify counterparty payee", func(t *testing.T) { - _, chainBRelayerUser := s.GetRelayerUsers(ctx, testName) - resp := s.RegisterCounterPartyPayee(ctx, chainB, chainBRelayerUser, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, chainBRelayerWallet.FormattedAddress(), chainARelayerWallet.FormattedAddress()) - s.AssertTxSuccess(resp) - - address, err := query.CounterPartyPayee(ctx, chainB, chainBRelayerWallet.FormattedAddress(), channelA.Counterparty.ChannelID) - s.Require().NoError(err) - s.Require().Equal(chainARelayerWallet.FormattedAddress(), address) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("send incentivized transfer packet", func(t *testing.T) { - // before adding fees for the packet, there should not be incentivized packets - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - - transferAmount := testvalues.DefaultTransferAmount(chainA.Config().Denom) - - msgPayPacketFee := feetypes.NewMsgPayPacketFee(testFee, channelA.PortID, channelA.ChannelID, chainAWallet.FormattedAddress(), nil) - msgTransfer := testsuite.GetMsgTransfer( - channelA.PortID, - channelA.ChannelID, - channelA.Version, // upgrade adds fee middleware, but keeps transfer version - sdk.NewCoins(transferAmount), - chainAWallet.FormattedAddress(), - chainBWallet.FormattedAddress(), - s.GetTimeoutHeight(ctx, chainB), - 0, - "", - nil, - ) - resp := s.BroadcastMessages(ctx, chainA, chainAWallet, msgPayPacketFee, msgTransfer) - s.AssertTxSuccess(resp) - }) - - t.Run("escrow fees equal (ack fee + recv fee)", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainAWallet) - s.Require().NoError(err) - - // walletA has done two IBC transfers of value testvalues.IBCTransferAmount since the start of the test. - expected := testvalues.StartingTokenAmount - (2 * testvalues.IBCTransferAmount) - testFee.AckFee.AmountOf(chainADenom).Int64() - testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) - - t.Run("packets are relayed", func(t *testing.T) { - packets, err := query.IncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Empty(packets) - }) - - t.Run("tokens are received by walletB", func(t *testing.T) { - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - // walletB has received two IBC transfers of value testvalues.IBCTransferAmount since the start of the test. - expected := 2 * testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("relayerA is paid ack and recv fee", func(t *testing.T) { - actualBalance, err := s.GetChainANativeBalance(ctx, chainARelayerWallet) - s.Require().NoError(err) - - expected := relayerAStartingBalance + testFee.AckFee.AmountOf(chainADenom).Int64() + testFee.RecvFee.AmountOf(chainADenom).Int64() - s.Require().Equal(expected, actualBalance) - }) -} - -func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - ctx := context.Background() - - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("transfer native tokens from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("transfer native tokens from chainB to chainA", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, testvalues.DefaultTransferCoins(chainBDenom), chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA.(*cosmos.CosmosChain)), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - - s.AssertPacketRelayed(ctx, chainA, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - - t.Run("stop relayer", func(t *testing.T) { - s.StopRelayer(ctx, relayer) - }) - - t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("query denoms after upgrade", func(t *testing.T) { - resp, err := query.TransferDenoms(ctx, chainA) - s.Require().NoError(err) - s.Require().Len(resp.Denoms, 1) - s.Require().Equal(chainAIBCToken, resp.Denoms[0]) - }) - - t.Run("IBC token transfer from chainA to chainB, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 2) - - actualBalance, err := chainB.GetBalance(ctx, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount * 2 - s.Require().Equal(expected, actualBalance.Int64()) - }) -} - -func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade_Localhost() { - t := s.T() - testCfg := testsuite.LoadConfig() - ctx := context.Background() - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - - rlyWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - userBWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - - var ( - srcChannelID string - dstChannelID string - ) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("open localhost channel", func(t *testing.T) { - var ( - msgChanOpenInitRes channeltypes.MsgChannelOpenInitResponse - msgChanOpenTryRes channeltypes.MsgChannelOpenTryResponse - ) - - msgChanOpenInit := channeltypes.NewMsgChannelOpenInit( - transfertypes.PortID, transfertypes.V1, - channeltypes.UNORDERED, []string{exported.LocalhostConnectionID}, - transfertypes.PortID, rlyWallet.FormattedAddress(), - ) - txResp := s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenInit) - s.AssertTxSuccess(txResp) - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenInitRes)) - srcChannelID = msgChanOpenInitRes.ChannelId - - msgChanOpenTry := channeltypes.NewMsgChannelOpenTry( - transfertypes.PortID, transfertypes.V1, - channeltypes.UNORDERED, []string{exported.LocalhostConnectionID}, - transfertypes.PortID, srcChannelID, - transfertypes.V1, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenTry) - s.AssertTxSuccess(txResp) - s.Require().NoError(testsuite.UnmarshalMsgResponses(txResp, &msgChanOpenTryRes)) - dstChannelID = msgChanOpenTryRes.ChannelId - - msgChanOpenAck := channeltypes.NewMsgChannelOpenAck( - transfertypes.PortID, srcChannelID, - dstChannelID, transfertypes.V1, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenAck) - s.AssertTxSuccess(txResp) - - msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm( - transfertypes.PortID, dstChannelID, - localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(), - ) - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgChanOpenConfirm) - s.AssertTxSuccess(txResp) - }) - - t.Run("ibc transfer over localhost", func(t *testing.T) { - txResp := s.Transfer(ctx, chainA, userAWallet, transfertypes.PortID, srcChannelID, testvalues.DefaultTransferCoins(chainADenom), userAWallet.FormattedAddress(), userBWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(txResp) - - packet, err := ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - - msgRecvPacket := channeltypes.NewMsgRecvPacket(packet, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) - s.AssertTxSuccess(txResp) - - ack, err := ibctesting.ParseAckFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(ack) - - msgAcknowledgement := channeltypes.NewMsgAcknowledgement(packet, ack, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgAcknowledgement) - s.AssertTxSuccess(txResp) - - s.AssertPacketRelayed(ctx, chainA, transfertypes.PortID, srcChannelID, 1) - ibcToken := testsuite.GetIBCToken(chainADenom, transfertypes.PortID, dstChannelID) - actualBalance, err := query.Balance(ctx, chainA, userBWallet.FormattedAddress(), ibcToken.IBCDenom()) - s.Require().NoError(err) - s.Require().Equal(testvalues.IBCTransferAmount, actualBalance.Int64()) - }) - - t.Run("localhost exists in state before upgrade", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, exported.LocalhostClientID) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - state, err := s.ClientState(ctx, chainA, exported.LocalhostClientID) - s.Require().NoError(err) - s.Require().NotNil(state) - }) - - t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("localhost does not exist in state after upgrade", func(t *testing.T) { - status, err := query.ClientStatus(ctx, chainA, exported.LocalhostClientID) - s.Require().NoError(err) - s.Require().Equal(exported.Active.String(), status) - - state, err := s.ClientState(ctx, chainA, exported.LocalhostClientID) - s.Require().Error(err) - s.Require().Nil(state) - }) - - t.Run("query localhost transfer channel ends after upgrade", func(t *testing.T) { - channelEndA, err := query.Channel(ctx, chainA, transfertypes.PortID, srcChannelID) - s.Require().NoError(err) - s.Require().NotNil(channelEndA) - - channelEndB, err := query.Channel(ctx, chainA, transfertypes.PortID, dstChannelID) - s.Require().NoError(err) - s.Require().NotNil(channelEndB) - - s.Require().Equal(channelEndA.ConnectionHops, channelEndB.ConnectionHops) - }) - - t.Run("ibc transfer back over localhost after upgrade", func(t *testing.T) { - ibcToken := testsuite.GetIBCToken(chainADenom, transfertypes.PortID, dstChannelID) - transferCoins := testvalues.DefaultTransferCoins(ibcToken.IBCDenom()) - txResp := s.Transfer(ctx, chainA, userBWallet, transfertypes.PortID, dstChannelID, transferCoins, userBWallet.FormattedAddress(), userAWallet.FormattedAddress(), s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(txResp) - - packet, err := ibctesting.ParsePacketFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(packet) - - msgRecvPacket := channeltypes.NewMsgRecvPacket(packet, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgRecvPacket) - s.AssertTxSuccess(txResp) - - ack, err := ibctesting.ParseAckFromEvents(txResp.Events) - s.Require().NoError(err) - s.Require().NotNil(ack) - - msgAcknowledgement := channeltypes.NewMsgAcknowledgement(packet, ack, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress()) - txResp = s.BroadcastMessages(ctx, chainA, rlyWallet, msgAcknowledgement) - s.AssertTxSuccess(txResp) - - s.AssertPacketRelayed(ctx, chainA, transfertypes.PortID, dstChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainA, userAWallet.FormattedAddress(), chainADenom) - s.Require().NoError(err) - s.Require().Equal(testvalues.StartingTokenAmount, actualBalance.Int64()) - }) -} - -func (s *UpgradeTestSuite) TestV8ToV9ChainUpgrade_ICS20v2ChannelUpgrade() { - t := s.T() - testCfg := testsuite.LoadConfig() - ctx := context.Background() - - testName := t.Name() - - relayer, channelA := s.CreateUpgradeTestPath(testName) - - chainA, chainB := s.GetChains() - chainADenom := chainA.Config().Denom - chainBDenom := chainB.Config().Denom - - chainAWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - chainAAddress := chainAWallet.FormattedAddress() - - chainBWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - chainBAddress := chainBWallet.FormattedAddress() - - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) - - s.Require().NoError(test.WaitForBlocks(ctx, 1, chainA, chainB), "failed to wait for blocks") - - t.Run("start relayer", func(t *testing.T) { - s.StartRelayer(relayer, testName) - }) - - t.Run("transfer native tokens from chainA to chainB", func(t *testing.T) { - transferTxResp := s.Transfer(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, testvalues.DefaultTransferCoins(chainADenom), chainAAddress, chainBAddress, s.GetTimeoutHeight(ctx, chainB), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - - s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) - - actualBalance, err := query.Balance(ctx, chainB, chainBAddress, chainBIBCToken.IBCDenom()) - s.Require().NoError(err) - - expected := testvalues.IBCTransferAmount - s.Require().Equal(expected, actualBalance.Int64()) - }) - - t.Run("verify channel version before upgrade", func(t *testing.T) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - s.Require().Equal(transfertypes.V1, channel.Version, "the channel version is not ics20-1") - }) - - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - - t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA.(*cosmos.CosmosChain), govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("upgrade channel to ics20-2", func(t *testing.T) { - chA, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - s.Require().NoError(err) - - upgradeFields := channeltypes.NewUpgradeFields(chA.Ordering, chA.ConnectionHops, transfertypes.V2) - s.InitiateChannelUpgrade(ctx, chainA, chainAWallet, channelA.PortID, channelA.ChannelID, upgradeFields) - }) - - t.Run("verify channel A upgraded and transfer version is ics20-2", func(t *testing.T) { - err := test.WaitForCondition(time.Minute*2, time.Second*2, func() (bool, error) { - channel, err := query.Channel(ctx, chainA, channelA.PortID, channelA.ChannelID) - if err != nil { - return false, err - } - - return channel.Version == transfertypes.V2, nil - }) - s.Require().NoError(err, "failed to wait for channel to be upgraded to ics20-2") - }) - - t.Run("multi-denom IBC token transfer from chainB to chainA, to make sure the upgrade did not break the packet flow", func(t *testing.T) { - transferCoins := []sdk.Coin{ - testvalues.DefaultTransferAmount(chainBIBCToken.IBCDenom()), - testvalues.DefaultTransferAmount(chainBDenom), - } - - transferTxResp := s.Transfer(ctx, chainB, chainBWallet, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, transferCoins, chainBAddress, chainAAddress, s.GetTimeoutHeight(ctx, chainA), 0, "", nil) - s.AssertTxSuccess(transferTxResp) - - s.AssertPacketRelayed(ctx, chainB, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID, 2) - - actualNativeBalance, err := chainA.GetBalance(ctx, chainAAddress, chainADenom) - s.Require().NoError(err) - expected := testvalues.StartingTokenAmount - s.Require().Equal(expected, actualNativeBalance.Int64()) - - chainAIBCToken := testsuite.GetIBCToken(chainBDenom, channelA.PortID, channelA.ChannelID) - actualIBCTokenBalance, err := query.Balance(ctx, chainA, chainAAddress, chainAIBCToken.IBCDenom()) - s.Require().NoError(err) - expected = testvalues.IBCTransferAmount - s.Require().Equal(expected, actualIBCTokenBalance.Int64()) - }) -} - -// ClientState queries the current ClientState by clientID -func (*UpgradeTestSuite) ClientState(ctx context.Context, chain ibc.Chain, clientID string) (*clienttypes.QueryClientStateResponse, error) { - res, err := query.GRPCQuery[clienttypes.QueryClientStateResponse](ctx, chain, &clienttypes.QueryClientStateRequest{ClientId: clientID}) - if err != nil { - return res, err - } - - return res, nil -} diff --git a/e2e/tests/wasm/contracts/ics10_grandpa_cw.wasm.gz b/e2e/tests/wasm/contracts/ics10_grandpa_cw.wasm.gz deleted file mode 100644 index 4fce8dbe2e1..00000000000 Binary files a/e2e/tests/wasm/contracts/ics10_grandpa_cw.wasm.gz and /dev/null differ diff --git a/e2e/tests/wasm/contracts/ics10_grandpa_cw_expiry.wasm.gz b/e2e/tests/wasm/contracts/ics10_grandpa_cw_expiry.wasm.gz deleted file mode 100644 index 0bb1e39a2b2..00000000000 Binary files a/e2e/tests/wasm/contracts/ics10_grandpa_cw_expiry.wasm.gz and /dev/null differ diff --git a/e2e/tests/wasm/contracts/migrate_error.wasm.gz b/e2e/tests/wasm/contracts/migrate_error.wasm.gz deleted file mode 100644 index 4a6e92a4456..00000000000 Binary files a/e2e/tests/wasm/contracts/migrate_error.wasm.gz and /dev/null differ diff --git a/e2e/tests/wasm/contracts/migrate_success.wasm.gz b/e2e/tests/wasm/contracts/migrate_success.wasm.gz deleted file mode 100644 index 621eb77ccda..00000000000 Binary files a/e2e/tests/wasm/contracts/migrate_success.wasm.gz and /dev/null differ diff --git a/e2e/tests/wasm/feature_releases.go b/e2e/tests/wasm/feature_releases.go deleted file mode 100644 index 3972369999a..00000000000 --- a/e2e/tests/wasm/feature_releases.go +++ /dev/null @@ -1,7 +0,0 @@ -package wasm - -import "github.com/cosmos/ibc-go/e2e/semverutil" - -var govV1FailedReasonFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} diff --git a/e2e/tests/wasm/grandpa_test.go b/e2e/tests/wasm/grandpa_test.go deleted file mode 100644 index 15cbeba95f2..00000000000 --- a/e2e/tests/wasm/grandpa_test.go +++ /dev/null @@ -1,650 +0,0 @@ -//go:build !test_e2e - -package wasm - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "os" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - sdkmath "cosmossdk.io/math" - - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - wasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" -) - -const ( - composable = "composable" - simd = "simd" - wasmSimdImage = "ghcr.io/cosmos/ibc-go-wasm-simd" - - defaultWasmClientID = "08-wasm-0" -) - -func TestGrandpaTestSuite(t *testing.T) { - // this test suite only works with the hyperspace relayer, for now hard code this here. - // this will enforce that the hyperspace relayer is used in CI. - t.Setenv(testsuite.RelayerIDEnv, "hyperspace") - - // TODO: this value should be passed in via the config file / CI, not hard coded in the test. - // This configuration can be handled in https://github.com/cosmos/ibc-go/issues/4697 - if testsuite.IsCI() && !testsuite.IsFork() { - t.Setenv(testsuite.ChainImageEnv, wasmSimdImage) - } - - // wasm tests require a longer voting period to account for the time it takes to upload a contract. - testvalues.VotingPeriod = time.Minute * 5 - - validateTestConfig() - testifysuite.Run(t, new(GrandpaTestSuite)) -} - -type GrandpaTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *GrandpaTestSuite) SetupSuite() { - s.SetupChains(context.Background(), nil, func(options *testsuite.ChainOptions) { - // configure chain A (polkadot) - options.ChainSpecs[0].ChainName = composable - options.ChainSpecs[0].Type = "polkadot" - options.ChainSpecs[0].ChainID = "rococo-local" - options.ChainSpecs[0].Name = "composable" - options.ChainSpecs[0].Images = []ibc.DockerImage{ - // TODO: https://github.com/cosmos/ibc-go/issues/4965 - { - Repository: "ghcr.io/misko9/polkadot-node", - Version: "v39", - UidGid: "1000:1000", - }, - { - Repository: "ghcr.io/misko9/parachain-node", - Version: "20231122v39", - UidGid: "1000:1000", - }, - } - options.ChainSpecs[0].Bin = "polkadot" - options.ChainSpecs[0].Bech32Prefix = composable - options.ChainSpecs[0].Denom = "uDOT" - options.ChainSpecs[0].GasPrices = "" - options.ChainSpecs[0].GasAdjustment = 0 - options.ChainSpecs[0].TrustingPeriod = "" - options.ChainSpecs[0].CoinType = "354" - - // these values are set by default for our cosmos chains, we need to explicitly remove them here. - options.ChainSpecs[0].ModifyGenesis = nil - options.ChainSpecs[0].ConfigFileOverrides = nil - options.ChainSpecs[0].EncodingConfig = nil - - // configure chain B (cosmos) - options.ChainSpecs[1].ChainName = simd // Set chain name so that a suffix with a "dash" is not appended (required for hyperspace) - options.ChainSpecs[1].Type = "cosmos" - options.ChainSpecs[1].Name = "simd" - options.ChainSpecs[1].ChainID = simd - options.ChainSpecs[1].Bin = simd - options.ChainSpecs[1].Bech32Prefix = "cosmos" - - // TODO: hyperspace relayer assumes a denom of "stake", hard code this here right now. - // https://github.com/cosmos/ibc-go/issues/4964 - options.ChainSpecs[1].Denom = "stake" - options.ChainSpecs[1].GasPrices = "0.00stake" - options.ChainSpecs[1].GasAdjustment = 1 - options.ChainSpecs[1].TrustingPeriod = "504h" - options.ChainSpecs[1].CoinType = "118" - - options.ChainSpecs[1].ChainConfig.NoHostMount = false - options.ChainSpecs[1].ConfigFileOverrides = getConfigOverrides() - options.ChainSpecs[1].EncodingConfig = testsuite.SDKEncodingConfig() - }) -} - -func (s *GrandpaTestSuite) SetupGrandpaPath(testName string) { - ctx := context.TODO() - chainA, chainB := s.GetChains() - - polkadotChain, ok := chainA.(*polkadot.PolkadotChain) - s.Require().True(ok) - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - file, err := os.Open("contracts/ics10_grandpa_cw.wasm.gz") - s.Require().NoError(err) - - cosmosWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - err = testutil.WaitForBlocks(ctx, 1, cosmosChain) - s.Require().NoError(err, "cosmos chain failed to make blocks") - - s.T().Logf("waited for blocks cosmos wallet") - - checksum := s.PushNewWasmClientProposal(ctx, cosmosChain, cosmosWallet, file) - s.Require().NotEmpty(checksum, "checksum was empty but should not have been") - s.T().Log("pushed wasm client proposal") - - r := s.GetRelayerForTest(testName) - - err = r.SetClientContractHash(ctx, s.GetRelayerExecReporter(), cosmosChain.Config(), checksum) - s.Require().NoError(err) - s.T().Logf("set contract hash %s", checksum) - - err = testutil.WaitForBlocks(ctx, 1, polkadotChain) - s.Require().NoError(err, "polkadot chain failed to make blocks") - - channelOpts := ibc.DefaultChannelOpts() - channelOpts.Version = transfertypes.V1 - s.CreatePaths(ibc.DefaultClientOpts(), channelOpts, testName) -} - -// TestMsgTransfer_Succeeds_GrandpaContract features -// * sets up a Polkadot parachain -// * sets up a Cosmos chain -// * sets up the Hyperspace relayer -// * Funds a user wallet on both chains -// * Pushes a wasm client contract to the Cosmos chain -// * create client, connection, and channel in relayer -// * start relayer -// * send transfer over ibc -func (s *GrandpaTestSuite) TestMsgTransfer_Succeeds_GrandpaContract() { - ctx := context.Background() - t := s.T() - - testName := t.Name() - s.SetupGrandpaPath(testName) - - chainA, chainB := s.GetChains() - - polkadotChain, ok := chainA.(*polkadot.PolkadotChain) - s.Require().True(ok) - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - r := s.GetRelayerForTest(testName) - - eRep := s.GetRelayerExecReporter() - - // Fund users on both cosmos and parachain, mints Asset 1 for Alice - fundAmount := int64(12_333_000_000_000) - polkadotUser, cosmosUser := s.fundUsers(ctx, fundAmount, polkadotChain, cosmosChain) - - // TODO: this can be refactored to broadcast a MsgTransfer instead of CLI. - // https://github.com/cosmos/ibc-go/issues/4963 - amountToSend := int64(1_770_000) - transfer := ibc.WalletAmount{ - Address: polkadotUser.FormattedAddress(), - Denom: cosmosChain.Config().Denom, - Amount: sdkmath.NewInt(amountToSend), - } - - // Start relayer - s.Require().NoError(r.StartRelayer(ctx, eRep, s.GetPaths(testName)...)) - - t.Run("send successful IBC transfer from Cosmos to Polkadot parachain", func(t *testing.T) { - // Send 1.77 stake from cosmosUser to parachainUser - tx, err := cosmosChain.SendIBCTransfer(ctx, "channel-0", cosmosUser.KeyName(), transfer, ibc.TransferOptions{}) - s.Require().NoError(tx.Validate(), "source ibc transfer tx is invalid") - s.Require().NoError(err) - // verify token balance for cosmos user has decreased - balance, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - s.Require().NoError(err) - s.Require().Equal(balance, sdkmath.NewInt(fundAmount-amountToSend), "unexpected cosmos user balance after first tx") - err = testutil.WaitForBlocks(ctx, 15, cosmosChain, polkadotChain) - s.Require().NoError(err) - - // Verify tokens arrived on parachain user - parachainUserStake, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 2) - s.Require().NoError(err) - s.Require().Equal(amountToSend, parachainUserStake.Amount.Int64(), "unexpected parachain user balance after first tx") - }) - - t.Run("send two successful IBC transfers from Polkadot parachain to Cosmos, first with ibc denom, second with parachain denom", func(t *testing.T) { - // Send 1.16 stake from parachainUser to cosmosUser - amountToReflect := int64(1_160_000) - reflectTransfer := ibc.WalletAmount{ - Address: cosmosUser.FormattedAddress(), - Denom: "2", // stake - Amount: sdkmath.NewInt(amountToReflect), - } - _, err := polkadotChain.SendIBCTransfer(ctx, "channel-0", polkadotUser.KeyName(), reflectTransfer, ibc.TransferOptions{}) - s.Require().NoError(err) - - // Send 1.88 "UNIT" from Alice to cosmosUser - amountUnits := sdkmath.NewInt(1_880_000_000_000) - unitTransfer := ibc.WalletAmount{ - Address: cosmosUser.FormattedAddress(), - Denom: "1", // UNIT - Amount: amountUnits, - } - _, err = polkadotChain.SendIBCTransfer(ctx, "channel-0", "alice", unitTransfer, ibc.TransferOptions{}) - s.Require().NoError(err) - - // Wait for MsgRecvPacket on cosmos chain - finalStakeBal := sdkmath.NewInt(fundAmount - amountToSend + amountToReflect) - err = cosmos.PollForBalance(ctx, cosmosChain, 20, ibc.WalletAmount{ - Address: cosmosUser.FormattedAddress(), - Denom: cosmosChain.Config().Denom, - Amount: finalStakeBal, - }) - s.Require().NoError(err) - - // Wait for a new update state - err = testutil.WaitForBlocks(ctx, 5, cosmosChain, polkadotChain) - s.Require().NoError(err) - - // Verify cosmos user's final "stake" balance - cosmosUserStakeBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - s.Require().NoError(err) - s.Require().True(cosmosUserStakeBal.Equal(finalStakeBal)) - - // Verify cosmos user's final "unit" balance - denom := transfertypes.NewDenom("UNIT", transfertypes.NewHop("transfer", "channel-0")) - cosmosUserUnitBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), denom.IBCDenom()) - s.Require().NoError(err) - s.Require().True(cosmosUserUnitBal.Equal(amountUnits)) - - // Verify parachain user's final "unit" balance (will be less than expected due gas costs for stake tx) - parachainUserUnits, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 1) - s.Require().NoError(err) - s.Require().True(parachainUserUnits.Amount.LTE(sdkmath.NewInt(fundAmount)), "parachain user's final unit amount not expected") - - // Verify parachain user's final "stake" balance - parachainUserStake, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 2) - s.Require().NoError(err) - s.Require().True(parachainUserStake.Amount.Equal(sdkmath.NewInt(amountToSend-amountToReflect)), "parachain user's final stake amount not expected") - }) -} - -// TestMsgTransfer_TimesOut_GrandpaContract -// sets up cosmos and polkadot chains, hyperspace relayer, and funds users on both chains -// * sends transfer over ibc channel, this transfer should timeout -func (s *GrandpaTestSuite) TestMsgTransfer_TimesOut_GrandpaContract() { - ctx := context.Background() - t := s.T() - - testName := t.Name() - s.SetupGrandpaPath(testName) - - chainA, chainB := s.GetChains() - - polkadotChain, ok := chainA.(*polkadot.PolkadotChain) - s.Require().True(ok) - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - r := s.GetRelayerForTest(testName) - - eRep := s.GetRelayerExecReporter() - - // Fund users on both cosmos and parachain, mints Asset 1 for Alice - fundAmount := int64(12_333_000_000_000) - polkadotUser, cosmosUser := s.fundUsers(ctx, fundAmount, polkadotChain, cosmosChain) - - // TODO: this can be refactored to broadcast a MsgTransfer instead of CLI. - // https://github.com/cosmos/ibc-go/issues/4963 - amountToSend := int64(1_770_000) - transfer := ibc.WalletAmount{ - Address: polkadotUser.FormattedAddress(), - Denom: cosmosChain.Config().Denom, - Amount: sdkmath.NewInt(amountToSend), - } - - pathName := testsuite.GetPathName(0) - - // Start relayer - s.Require().NoError(r.StartRelayer(ctx, eRep, pathName)) - - t.Run("IBC transfer from Cosmos chain to Polkadot parachain times out", func(t *testing.T) { - // Stop relayer - s.Require().NoError(r.StopRelayer(ctx, s.GetRelayerExecReporter())) - - tx, err := cosmosChain.SendIBCTransfer(ctx, "channel-0", cosmosUser.KeyName(), transfer, ibc.TransferOptions{Timeout: testvalues.ImmediatelyTimeout()}) - s.Require().NoError(err) - s.Require().NoError(tx.Validate(), "source ibc transfer tx is invalid") - time.Sleep(time.Nanosecond * 1) // want it to timeout immediately - - // check that tokens are escrowed - actualBalance, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - s.Require().NoError(err) - expected := fundAmount - amountToSend - s.Require().Equal(expected, actualBalance.Int64()) - - // start relayer - s.Require().NoError(r.StartRelayer(ctx, s.GetRelayerExecReporter(), testsuite.GetPathName(0))) - err = testutil.WaitForBlocks(ctx, 15, polkadotChain, cosmosChain) - s.Require().NoError(err) - - // ensure that receiver on parachain did not receive any tokens - receiverBalance, err := polkadotChain.GetIbcBalance(ctx, polkadotUser.FormattedAddress(), 2) - s.Require().NoError(err) - s.Require().Equal(int64(0), receiverBalance.Amount.Int64()) - - // check that tokens have been refunded to sender address - senderBalance, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - s.Require().NoError(err) - s.Require().Equal(fundAmount, senderBalance.Int64()) - }) -} - -// TestMsgMigrateContract_Success_GrandpaContract features -// * sets up a Polkadot parachain -// * sets up a Cosmos chain -// * sets up the Hyperspace relayer -// * Funds a user wallet on both chains -// * Pushes a wasm client contract to the Cosmos chain -// * create client in relayer -// * Pushes a new wasm client contract to the Cosmos chain -// * Migrates the wasm client contract -func (s *GrandpaTestSuite) TestMsgMigrateContract_Success_GrandpaContract() { - t := s.T() - ctx := context.Background() - - testName := t.Name() - s.SetupGrandpaPath(testName) - - _, chainB := s.GetChains() - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - cosmosWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - // Do not start relayer - - // This contract is a dummy contract that will always succeed migration. - // Other entry points are unimplemented. - migrateFile, err := os.Open("contracts/migrate_success.wasm.gz") - s.Require().NoError(err) - - // First Store the code - newChecksum := s.PushNewWasmClientProposal(ctx, cosmosChain, cosmosWallet, migrateFile) - s.Require().NotEmpty(newChecksum, "checksum was empty but should not have been") - - newChecksumBz, err := hex.DecodeString(newChecksum) - s.Require().NoError(err) - - // Attempt to migrate the contract - message := wasmtypes.NewMsgMigrateContract( - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - defaultWasmClientID, - newChecksumBz, - []byte("{}"), - ) - - s.ExecuteAndPassGovV1Proposal(ctx, message, cosmosChain, cosmosWallet) - - clientState, err := query.ClientState(ctx, cosmosChain, defaultWasmClientID) - s.Require().NoError(err) - - wasmClientState, ok := clientState.(*wasmtypes.ClientState) - s.Require().True(ok) - - s.Require().Equal(newChecksumBz, wasmClientState.Checksum) -} - -// TestMsgMigrateContract_ContractError_GrandpaContract features -// * sets up a Polkadot parachain -// * sets up a Cosmos chain -// * sets up the Hyperspace relayer -// * Funds a user wallet on both chains -// * Pushes a wasm client contract to the Cosmos chain -// * create client in relayer -// * Pushes a new wasm client contract to the Cosmos chain -// * Migrates the wasm client contract with a contract that will always fail migration -func (s *GrandpaTestSuite) TestMsgMigrateContract_ContractError_GrandpaContract() { - t := s.T() - ctx := context.Background() - - testName := t.Name() - s.SetupGrandpaPath(testName) - - _, chainB := s.GetChains() - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - cosmosWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - // Do not start the relayer - - // This contract is a dummy contract that will always fail migration. - // Other entry points are unimplemented. - migrateFile, err := os.Open("contracts/migrate_error.wasm.gz") - s.Require().NoError(err) - - // First Store the code - newChecksum := s.PushNewWasmClientProposal(ctx, cosmosChain, cosmosWallet, migrateFile) - s.Require().NotEmpty(newChecksum, "checksum was empty but should not have been") - - newChecksumBz, err := hex.DecodeString(newChecksum) - s.Require().NoError(err) - - // Attempt to migrate the contract - message := wasmtypes.NewMsgMigrateContract( - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - defaultWasmClientID, - newChecksumBz, - []byte("{}"), - ) - - err = s.ExecuteGovV1Proposal(ctx, message, cosmosChain, cosmosWallet) - s.Require().Error(err) - - version := cosmosChain.Nodes()[0].Image.Version - if govV1FailedReasonFeatureReleases.IsSupported(version) { - // This is the error string that is returned from the contract - s.Require().ErrorContains(err, "migration not supported") - } -} - -// TestRecoverClient_Succeeds_GrandpaContract features: -// * setup cosmos and polkadot substrates nodes -// * funds test user wallets on both chains -// * stores a wasm client contract on the cosmos chain -// * creates a subject client using the hyperspace relayer -// * waits the expiry period and asserts the subject client status has expired -// * creates a substitute client using the hyperspace relayer -// * executes a gov proposal to recover the expired client -// * asserts the status of the subject client has been restored to active -// NOTE: The testcase features a modified grandpa client contract compiled as: -// - ics10_grandpa_cw_expiry.wasm.gz -// This contract modifies the unbonding period to 1600s with the trusting period being calculated as (unbonding period / 3). -func (s *GrandpaTestSuite) TestRecoverClient_Succeeds_GrandpaContract() { - t := s.T() - - ctx := context.Background() - - testName := t.Name() - s.SetupGrandpaPath(testName) - - // set the trusting period to a value which will still be valid upon client creation, but invalid before the first update - // the contract uses 1600s as the unbonding period with the trusting period evaluating to (unbonding period / 3) - modifiedTrustingPeriod := (1600 * time.Second) / 3 - - chainA, chainB := s.GetChains() - - polkadotChain, ok := chainA.(*polkadot.PolkadotChain) - s.Require().True(ok) - - cosmosChain, ok := chainB.(*cosmos.CosmosChain) - s.Require().True(ok) - - r := s.GetRelayerForTest(testName) - - cosmosWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) - - file, err := os.Open("contracts/ics10_grandpa_cw_expiry.wasm.gz") - s.Require().NoError(err) - - codeHash := s.PushNewWasmClientProposal(ctx, cosmosChain, cosmosWallet, file) - s.Require().NotEmpty(codeHash, "codehash was empty but should not have been") - - eRep := s.GetRelayerExecReporter() - - // Set client contract hash in cosmos chain config - err = r.SetClientContractHash(ctx, eRep, cosmosChain.Config(), codeHash) - s.Require().NoError(err) - - // Ensure parachain has started (starts 1 session/epoch after relay chain) - err = testutil.WaitForBlocks(ctx, 1, polkadotChain) - s.Require().NoError(err, "polkadot chain failed to make blocks") - - // Fund users on both cosmos and parachain, mints Asset 1 for Alice - fundAmount := int64(12_333_000_000_000) - _, cosmosUser := s.fundUsers(ctx, fundAmount, polkadotChain, cosmosChain) - - // create client pair with subject (bad trusting period) - subjectClientID := clienttypes.FormatClientIdentifier(wasmtypes.Wasm, 0) - // TODO: The hyperspace relayer makes no use of create client opts - // https://github.com/strangelove-ventures/interchaintest/blob/main/relayer/hyperspace/hyperspace_commander.go#L83 - s.SetupClients(ctx, r, ibc.CreateClientOptions{ - TrustingPeriod: modifiedTrustingPeriod.String(), // NOTE: this is hardcoded within the cw contract: ics10_grapnda_cw_expiry.wasm - }) - - // wait for block - err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) - s.Require().NoError(err) - - // wait the bad trusting period - time.Sleep(modifiedTrustingPeriod) - - // create client pair with substitute - substituteClientID := clienttypes.FormatClientIdentifier(wasmtypes.Wasm, 1) - s.SetupClients(ctx, r, ibc.DefaultClientOpts()) - - // wait for block - err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) - s.Require().NoError(err) - - // ensure subject client is expired - status, err := query.ClientStatus(ctx, cosmosChain, subjectClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Expired.String(), status, "unexpected subject client status") - - // ensure substitute client is active - status, err = query.ClientStatus(ctx, cosmosChain, substituteClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status, "unexpected substitute client status") - - // create and execute a client recovery proposal - authority, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, cosmosChain) - s.Require().NoError(err) - - msgRecoverClient := clienttypes.NewMsgRecoverClient(authority.String(), subjectClientID, substituteClientID) - s.Require().NotNil(msgRecoverClient) - s.ExecuteAndPassGovV1Proposal(ctx, msgRecoverClient, cosmosChain, cosmosUser) - - // ensure subject client is active - status, err = query.ClientStatus(ctx, cosmosChain, subjectClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status) - - // ensure substitute client is active - status, err = query.ClientStatus(ctx, cosmosChain, substituteClientID) - s.Require().NoError(err) - s.Require().Equal(ibcexported.Active.String(), status) -} - -// extractChecksumFromGzippedContent takes a gzipped wasm contract and returns the checksum. -func (s *GrandpaTestSuite) extractChecksumFromGzippedContent(zippedContent []byte) string { - content, err := wasmtypes.Uncompress(zippedContent, wasmtypes.MaxWasmSize) - s.Require().NoError(err) - - checksum32 := sha256.Sum256(content) - return hex.EncodeToString(checksum32[:]) -} - -// PushNewWasmClientProposal submits a new wasm client governance proposal to the chain. -func (s *GrandpaTestSuite) PushNewWasmClientProposal(ctx context.Context, chain *cosmos.CosmosChain, wallet ibc.Wallet, proposalContentReader io.Reader) string { - zippedContent, err := io.ReadAll(proposalContentReader) - s.Require().NoError(err) - - computedChecksum := s.extractChecksumFromGzippedContent(zippedContent) - - s.Require().NoError(err) - message := wasmtypes.MsgStoreCode{ - Signer: authtypes.NewModuleAddress(govtypes.ModuleName).String(), - WasmByteCode: zippedContent, - } - - s.ExecuteAndPassGovV1Proposal(ctx, &message, chain, wallet) - - codeResp, err := query.GRPCQuery[wasmtypes.QueryCodeResponse](ctx, chain, &wasmtypes.QueryCodeRequest{Checksum: computedChecksum}) - s.Require().NoError(err) - - checksumBz := codeResp.Data - checksum32 := sha256.Sum256(checksumBz) - actualChecksum := hex.EncodeToString(checksum32[:]) - s.Require().Equal(computedChecksum, actualChecksum, "checksum returned from query did not match the computed checksum") - - return actualChecksum -} - -func (s *GrandpaTestSuite) fundUsers(ctx context.Context, fundAmount int64, polkadotChain ibc.Chain, cosmosChain ibc.Chain) (ibc.Wallet, ibc.Wallet) { - users := interchaintest.GetAndFundTestUsers(s.T(), ctx, "user", sdkmath.NewInt(fundAmount), polkadotChain, cosmosChain) - polkadotUser, cosmosUser := users[0], users[1] - err := testutil.WaitForBlocks(ctx, 2, polkadotChain, cosmosChain) // Only waiting 1 block is flaky for parachain - s.Require().NoError(err, "cosmos or polkadot chain failed to make blocks") - - // Check balances are correct - amount := sdkmath.NewInt(fundAmount) - polkadotUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), polkadotChain.Config().Denom) - s.Require().NoError(err) - s.Require().True(polkadotUserAmount.Equal(amount), "Initial polkadot user amount not expected") - - parachainUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), "") - s.Require().NoError(err) - s.Require().True(parachainUserAmount.Equal(amount), "Initial parachain user amount not expected") - - cosmosUserAmount, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - s.Require().NoError(err) - s.Require().True(cosmosUserAmount.Equal(amount), "Initial cosmos user amount not expected") - - return polkadotUser, cosmosUser -} - -// validateTestConfig ensures that the given test config is valid for this test suite. -func validateTestConfig() { - tc := testsuite.LoadConfig() - if tc.ActiveRelayer != "hyperspace" { - panic(fmt.Errorf("hyperspace relayer must be specified")) - } -} - -// getConfigOverrides returns configuration overrides that will be applied to the simapp. -func getConfigOverrides() map[string]any { - consensusOverrides := make(testutil.Toml) - blockTime := 5 - blockT := (time.Duration(blockTime) * time.Second).String() - consensusOverrides["timeout_commit"] = blockT - consensusOverrides["timeout_propose"] = blockT - - configTomlOverrides := make(testutil.Toml) - configTomlOverrides["consensus"] = consensusOverrides - configTomlOverrides["log_level"] = "info" - - configFileOverrides := make(map[string]any) - configFileOverrides["config/config.toml"] = configTomlOverrides - return configFileOverrides -} diff --git a/e2e/tests/wasm/upgrade_test.go b/e2e/tests/wasm/upgrade_test.go deleted file mode 100644 index 3b683158d63..00000000000 --- a/e2e/tests/wasm/upgrade_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build !test_e2e - -package wasm - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "os" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - - upgradetypes "cosmossdk.io/x/upgrade/types" - - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/cosmos/ibc-go/e2e/testsuite" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - wasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" -) - -const ( - haltHeight = int64(325) - blocksAfterUpgrade = uint64(10) -) - -func TestIBCWasmUpgradeTestSuite(t *testing.T) { - testCfg := testsuite.LoadConfig() - if testCfg.UpgradeConfig.Tag == "" || testCfg.UpgradeConfig.PlanName == "" { - t.Fatalf("%s and %s must be set when running an upgrade test", testsuite.ChainUpgradeTagEnv, testsuite.ChainUpgradePlanEnv) - } - - // wasm tests require a longer voting period to account for the time it takes to upload a contract. - testvalues.VotingPeriod = time.Minute * 5 - - testifysuite.Run(t, new(IBCWasmUpgradeTestSuite)) -} - -type IBCWasmUpgradeTestSuite struct { - testsuite.E2ETestSuite -} - -func (s *IBCWasmUpgradeTestSuite) TestIBCWasmChainUpgrade() { - t := s.T() - - ctx := context.Background() - // TODO(chatton): this test is still creating a relayer and a channel, but it is not using them. - chain := s.GetAllChains()[0] - checksum := "" - - userWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.Require().NoError(testutil.WaitForBlocks(ctx, 1, chain), "failed to wait for blocks") - - t.Run("create and exec store code proposal", func(t *testing.T) { - file, err := os.Open("contracts/ics10_grandpa_cw.wasm.gz") - s.Require().NoError(err) - - checksum = s.ExecStoreCodeProposal(ctx, chain.(*cosmos.CosmosChain), userWallet, file) - s.Require().NotEmpty(checksum, "checksum must not be empty") - }) - - t.Run("upgrade chain", func(t *testing.T) { - testCfg := testsuite.LoadConfig() - s.UpgradeChain(ctx, chain.(*cosmos.CosmosChain), userWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) - }) - - t.Run("query wasm checksums", func(t *testing.T) { - checksumsResp, err := query.GRPCQuery[wasmtypes.QueryChecksumsResponse](ctx, chain, &wasmtypes.QueryChecksumsRequest{}) - s.Require().NoError(err) - s.Require().Contains(checksumsResp.Checksums, checksum) - }) -} - -// UpgradeChain upgrades a chain to a specific version using the planName provided. -// The software upgrade proposal is broadcast by the provided wallet. -func (s *IBCWasmUpgradeTestSuite) UpgradeChain(ctx context.Context, chain *cosmos.CosmosChain, wallet ibc.Wallet, planName, currentVersion, upgradeVersion string) { - plan := upgradetypes.Plan{ - Name: planName, - Height: haltHeight, - Info: fmt.Sprintf("upgrade version test from %s to %s", currentVersion, upgradeVersion), - } - - upgradeProposal := upgradetypes.NewSoftwareUpgradeProposal(fmt.Sprintf("upgrade from %s to %s", currentVersion, upgradeVersion), "upgrade chain E2E test", plan) - s.ExecuteAndPassGovV1Beta1Proposal(ctx, chain, wallet, upgradeProposal) - - height, err := chain.Height(ctx) - s.Require().NoError(err, "error fetching height before upgrade") - - timeoutCtx, timeoutCtxCancel := context.WithTimeout(ctx, time.Minute*2) - defer timeoutCtxCancel() - - err = testutil.WaitForBlocks(timeoutCtx, int(haltHeight-height)+1, chain) - s.Require().Error(err, "chain did not halt at halt height") - - var allNodes []testutil.ChainHeighter - for _, node := range chain.Nodes() { - allNodes = append(allNodes, node) - } - - err = testutil.WaitForInSync(ctx, chain, allNodes...) - s.Require().NoError(err, "error waiting for node(s) to sync") - - err = chain.StopAllNodes(ctx) - s.Require().NoError(err, "error stopping node(s)") - - repository := chain.Nodes()[0].Image.Repository - chain.UpgradeVersion(ctx, s.DockerClient, repository, upgradeVersion) - - err = chain.StartAllNodes(ctx) - s.Require().NoError(err, "error starting upgraded node(s)") - - timeoutCtx, timeoutCtxCancel = context.WithTimeout(ctx, time.Minute*2) - defer timeoutCtxCancel() - - err = testutil.WaitForBlocks(timeoutCtx, int(blocksAfterUpgrade), chain) - s.Require().NoError(err, "chain did not produce blocks after upgrade") - - height, err = chain.Height(ctx) - s.Require().NoError(err, "error fetching height after upgrade") - - s.Require().Greater(height, haltHeight, "height did not increment after upgrade") -} - -func (s *IBCWasmUpgradeTestSuite) ExecStoreCodeProposal(ctx context.Context, chain *cosmos.CosmosChain, wallet ibc.Wallet, proposalContentReader io.Reader) string { - zippedContent, err := io.ReadAll(proposalContentReader) - s.Require().NoError(err) - - computedChecksum := s.extractChecksumFromGzippedContent(zippedContent) - - msgStoreCode := wasmtypes.MsgStoreCode{ - Signer: authtypes.NewModuleAddress(govtypes.ModuleName).String(), - WasmByteCode: zippedContent, - } - - s.ExecuteAndPassGovV1Proposal(ctx, &msgStoreCode, chain, wallet) - - codeResp, err := query.GRPCQuery[wasmtypes.QueryCodeResponse](ctx, chain, &wasmtypes.QueryCodeRequest{Checksum: computedChecksum}) - s.Require().NoError(err) - - checksumBz := codeResp.Data - checksum32 := sha256.Sum256(checksumBz) - actualChecksum := hex.EncodeToString(checksum32[:]) - s.Require().Equal(computedChecksum, actualChecksum, "checksum returned from query did not match the computed checksum") - - return actualChecksum -} - -// extractChecksumFromGzippedContent takes a gzipped wasm contract and returns the checksum. -func (s *IBCWasmUpgradeTestSuite) extractChecksumFromGzippedContent(zippedContent []byte) string { - content, err := wasmtypes.Uncompress(zippedContent, wasmtypes.MaxWasmSize) - s.Require().NoError(err) - - checksum32 := sha256.Sum256(content) - return hex.EncodeToString(checksum32[:]) -} diff --git a/e2e/testsuite/codec.go b/e2e/testsuite/codec.go deleted file mode 100644 index adcd74c67e5..00000000000 --- a/e2e/testsuite/codec.go +++ /dev/null @@ -1,127 +0,0 @@ -package testsuite - -import ( - "bytes" - "encoding/hex" - - "github.com/cosmos/gogoproto/jsonpb" - "github.com/cosmos/gogoproto/proto" - - upgradetypes "cosmossdk.io/x/upgrade/types" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module/testutil" - txtypes "github.com/cosmos/cosmos-sdk/types/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/authz" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - grouptypes "github.com/cosmos/cosmos-sdk/x/group" - proposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - - wasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - icacontrollertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/host/types" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - v7migrations "github.com/cosmos/ibc-go/v9/modules/core/02-client/migrations/v7" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v9/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" - ibctmtypes "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" - ibctesting "github.com/cosmos/ibc-go/v9/testing" -) - -// Codec returns the global E2E protobuf codec. -func Codec() *codec.ProtoCodec { - cdc, _ := codecAndEncodingConfig() - return cdc -} - -// SDKEncodingConfig returns the global E2E encoding config. -func SDKEncodingConfig() *testutil.TestEncodingConfig { - _, cfg := codecAndEncodingConfig() - return &testutil.TestEncodingConfig{ - InterfaceRegistry: cfg.InterfaceRegistry, - Codec: cfg.Codec, - TxConfig: cfg.TxConfig, - Amino: cfg.Amino, - } -} - -func codecAndEncodingConfig() (*codec.ProtoCodec, testutil.TestEncodingConfig) { - cfg := testutil.MakeTestEncodingConfig() - - // ibc types - icacontrollertypes.RegisterInterfaces(cfg.InterfaceRegistry) - icahosttypes.RegisterInterfaces(cfg.InterfaceRegistry) - feetypes.RegisterInterfaces(cfg.InterfaceRegistry) - solomachine.RegisterInterfaces(cfg.InterfaceRegistry) - v7migrations.RegisterInterfaces(cfg.InterfaceRegistry) - transfertypes.RegisterInterfaces(cfg.InterfaceRegistry) - clienttypes.RegisterInterfaces(cfg.InterfaceRegistry) - channeltypes.RegisterInterfaces(cfg.InterfaceRegistry) - connectiontypes.RegisterInterfaces(cfg.InterfaceRegistry) - ibctmtypes.RegisterInterfaces(cfg.InterfaceRegistry) - wasmtypes.RegisterInterfaces(cfg.InterfaceRegistry) - - // all other types - upgradetypes.RegisterInterfaces(cfg.InterfaceRegistry) - banktypes.RegisterInterfaces(cfg.InterfaceRegistry) - govv1beta1.RegisterInterfaces(cfg.InterfaceRegistry) - govv1.RegisterInterfaces(cfg.InterfaceRegistry) - authtypes.RegisterInterfaces(cfg.InterfaceRegistry) - cryptocodec.RegisterInterfaces(cfg.InterfaceRegistry) - grouptypes.RegisterInterfaces(cfg.InterfaceRegistry) - proposaltypes.RegisterInterfaces(cfg.InterfaceRegistry) - authz.RegisterInterfaces(cfg.InterfaceRegistry) - txtypes.RegisterInterfaces(cfg.InterfaceRegistry) - - cdc := codec.NewProtoCodec(cfg.InterfaceRegistry) - return cdc, cfg -} - -// UnmarshalMsgResponses attempts to unmarshal the tx msg responses into the provided message types. -func UnmarshalMsgResponses(txResp sdk.TxResponse, msgs ...codec.ProtoMarshaler) error { - cdc := Codec() - bz, err := hex.DecodeString(txResp.Data) - if err != nil { - return err - } - - return ibctesting.UnmarshalMsgResponses(cdc, bz, msgs...) -} - -// MustProtoMarshalJSON provides an auxiliary function to return Proto3 JSON encoded -// bytes of a message. This function should be used when marshalling a proto.Message -// from the e2e tests. This function strips out unknown fields. This is useful for -// backwards compatibility tests where the types imported by the e2e package have -// new fields that older versions do not recognize. -func MustProtoMarshalJSON(msg proto.Message) []byte { - anyResolver := codectypes.NewInterfaceRegistry() - - // EmitDefaults is set to false to prevent marshalling of unpopulated fields (memo) - // OrigName and the anyResovler match the fields the original SDK function would expect - // in order to minimize changes. - - // OrigName is true since there is no particular reason to use camel case - // The any resolver is empty, but provided anyways. - jm := &jsonpb.Marshaler{OrigName: true, EmitDefaults: false, AnyResolver: anyResolver} - - err := codectypes.UnpackInterfaces(msg, codectypes.ProtoJSONPacker{JSONPBMarshaler: jm}) - if err != nil { - panic(err) - } - - buf := new(bytes.Buffer) - if err := jm.Marshal(buf, msg); err != nil { - panic(err) - } - - return buf.Bytes() -} diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go deleted file mode 100644 index 6619b844979..00000000000 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ /dev/null @@ -1,163 +0,0 @@ -package diagnostics - -import ( - "context" - "encoding/json" - "fmt" - "os" - ospath "path" - "strings" - "testing" - - dockertypes "github.com/docker/docker/api/types" - dockerclient "github.com/docker/docker/client" - - "github.com/cosmos/ibc-go/e2e/dockerutil" - "github.com/cosmos/ibc-go/e2e/internal/directories" -) - -const ( - dockerInspectFileName = "docker-inspect.json" - defaultFilePerm = 0o750 -) - -// Collect can be used in `t.Cleanup` and will copy all the of the container logs and relevant files -// into e2e//.log. These log files will be uploaded to GH upon test failure. -func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, suiteName string, chainNames ...string) { - t.Helper() - - if !debugModeEnabled { - // when we are not forcing log collection, we only upload upon test failing. - if !t.Failed() { - t.Logf("test passed, not uploading logs") - return - } - } - - t.Logf("writing logs for test: %s", t.Name()) - - ctx := context.TODO() - e2eDir, err := directories.E2E(t) - if err != nil { - t.Logf("failed finding log directory: %s", err) - return - } - - logsDir := fmt.Sprintf("%s/diagnostics", e2eDir) - - if err := os.MkdirAll(fmt.Sprintf("%s/%s", logsDir, t.Name()), defaultFilePerm); err != nil { - t.Logf("failed creating logs directory in test cleanup: %s", err) - return - } - - testContainers, err := dockerutil.GetTestContainers(ctx, suiteName, dc) - if err != nil { - t.Logf("failed listing containers during test cleanup: %s", err) - return - } - - for _, container := range testContainers { - containerName := getContainerName(t, container) - containerDir := fmt.Sprintf("%s/%s/%s", logsDir, t.Name(), containerName) - if err := os.MkdirAll(containerDir, defaultFilePerm); err != nil { - t.Logf("failed creating logs directory for container %s: %s", containerDir, err) - continue - } - - logsBz, err := dockerutil.GetContainerLogs(ctx, dc, container.ID) - if err != nil { - t.Logf("failed reading logs in test cleanup: %s", err) - continue - } - - logFile := fmt.Sprintf("%s/%s.log", containerDir, containerName) - if err := os.WriteFile(logFile, logsBz, defaultFilePerm); err != nil { - continue - } - - t.Logf("successfully wrote log file %s", logFile) - - var diagnosticFiles []string - for _, chainName := range chainNames { - diagnosticFiles = append(diagnosticFiles, chainDiagnosticAbsoluteFilePaths(chainName)...) - } - diagnosticFiles = append(diagnosticFiles, relayerDiagnosticAbsoluteFilePaths()...) - - for _, absoluteFilePathInContainer := range diagnosticFiles { - localFilePath := ospath.Join(containerDir, ospath.Base(absoluteFilePathInContainer)) - if err := fetchAndWriteDiagnosticsFile(ctx, dc, container.ID, localFilePath, absoluteFilePathInContainer); err != nil { - continue - } - t.Logf("successfully wrote diagnostics file %s", absoluteFilePathInContainer) - } - - localFilePath := ospath.Join(containerDir, dockerInspectFileName) - if err := fetchAndWriteDockerInspectOutput(ctx, dc, container.ID, localFilePath); err != nil { - continue - } - t.Logf("successfully wrote docker inspect output") - } -} - -// getContainerName returns a either the ID of the container or stripped down human-readable -// version of the name if the name is non-empty. -// -// Note: You should still always use the ID when interacting with the docker client. -func getContainerName(t *testing.T, container dockertypes.Container) string { - t.Helper() - // container will always have an id, by may not have a name. - containerName := container.ID - if len(container.Names) > 0 { - containerName = container.Names[0] - // remove the test name from the container as the folder structure will provide this - // information already. - containerName = strings.TrimRight(containerName, "-"+t.Name()) - containerName = strings.TrimLeft(containerName, "/") - } - return containerName -} - -// fetchAndWriteDiagnosticsFile fetches the contents of a single file from the given container id and writes -// the contents of the file to a local path provided. -func fetchAndWriteDiagnosticsFile(ctx context.Context, dc *dockerclient.Client, containerID, localPath, absoluteFilePathInContainer string) error { - fileBz, err := dockerutil.GetFileContentsFromContainer(ctx, dc, containerID, absoluteFilePathInContainer) - if err != nil { - return err - } - - return os.WriteFile(localPath, fileBz, defaultFilePerm) -} - -// fetchAndWriteDockerInspectOutput writes the contents of docker inspect to the specified file. -func fetchAndWriteDockerInspectOutput(ctx context.Context, dc *dockerclient.Client, containerID, localPath string) error { - containerJSON, err := dc.ContainerInspect(ctx, containerID) - if err != nil { - return err - } - - fileBz, err := json.MarshalIndent(containerJSON, "", "\t") - if err != nil { - return err - } - - return os.WriteFile(localPath, fileBz, defaultFilePerm) -} - -// chainDiagnosticAbsoluteFilePaths returns a slice of absolute file paths (in the containers) which are the files that should be -// copied locally when fetching diagnostics. -func chainDiagnosticAbsoluteFilePaths(chainName string) []string { - return []string{ - fmt.Sprintf("/var/cosmos-chain/%s/config/genesis.json", chainName), - fmt.Sprintf("/var/cosmos-chain/%s/config/app.toml", chainName), - fmt.Sprintf("/var/cosmos-chain/%s/config/config.toml", chainName), - fmt.Sprintf("/var/cosmos-chain/%s/config/client.toml", chainName), - } -} - -// relayerDiagnosticAbsoluteFilePaths returns a slice of absolute file paths (in the containers) which are the files that should be -// copied locally when fetching diagnostics. -func relayerDiagnosticAbsoluteFilePaths() []string { - return []string{ - "/home/hermes/.hermes/config.toml", - } -} diff --git a/e2e/testsuite/events.go b/e2e/testsuite/events.go deleted file mode 100644 index cd0fd104706..00000000000 --- a/e2e/testsuite/events.go +++ /dev/null @@ -1,22 +0,0 @@ -package testsuite - -import ( - 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. -func ABCIToSDKEvents(abciEvents []abci.Event) sdk.Events { - var events sdk.Events - for _, evt := range abciEvents { - var attributes []sdk.Attribute - for _, attr := range evt.GetAttributes() { - attributes = append(attributes, sdk.NewAttribute(attr.Key, attr.Value)) - } - - events = events.AppendEvent(sdk.NewEvent(evt.GetType(), attributes...)) - } - - return events -} diff --git a/e2e/testsuite/query/grpc_query.go b/e2e/testsuite/query/grpc_query.go deleted file mode 100644 index 4e64c206fff..00000000000 --- a/e2e/testsuite/query/grpc_query.go +++ /dev/null @@ -1,90 +0,0 @@ -package query - -import ( - "context" - "fmt" - "strings" - - "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -// GRPCQuery queries the chain with a query request and deserializes the response to T -func GRPCQuery[T any](ctx context.Context, chain ibc.Chain, req proto.Message, opts ...grpc.CallOption) (*T, error) { - path, err := getProtoPath(req) - if err != nil { - return nil, err - } - - return grpcQueryWithMethod[T](ctx, chain, req, path, opts...) -} - -// grpcQueryWithMethod queries the chain with a query request with a specific method (grpc path) and deserializes the response to T -func grpcQueryWithMethod[T any](ctx context.Context, chain ibc.Chain, req proto.Message, method string, opts ...grpc.CallOption) (*T, error) { - // Create a connection to the gRPC server. - grpcConn, err := grpc.Dial( - chain.GetHostGRPCAddress(), - grpc.WithTransportCredentials(insecure.NewCredentials()), - ) - if err != nil { - return nil, err - } - - defer grpcConn.Close() - - resp := new(T) - err = grpcConn.Invoke(ctx, method, req, resp, opts...) - if err != nil { - return nil, err - } - - return resp, nil -} - -func getProtoPath(req proto.Message) (string, error) { - typeURL := "/" + proto.MessageName(req) - - switch { - case strings.Contains(typeURL, "Query"): - return getQueryProtoPath(typeURL) - case strings.Contains(typeURL, "cosmos.base.tendermint"): - return getCmtProtoPath(typeURL) - default: - return "", fmt.Errorf("unsupported typeURL: %s", typeURL) - } -} - -func getQueryProtoPath(queryTypeURL string) (string, error) { - queryIndex := strings.Index(queryTypeURL, "Query") - if queryIndex == -1 { - return "", fmt.Errorf("invalid typeURL: %s", queryTypeURL) - } - - // Add to the index to account for the length of "Query" - queryIndex += len("Query") - - // Add a slash before the query - urlWithSlash := queryTypeURL[:queryIndex] + "/" + queryTypeURL[queryIndex:] - if !strings.HasSuffix(urlWithSlash, "Request") { - return "", fmt.Errorf("invalid typeURL: %s", queryTypeURL) - } - - return strings.TrimSuffix(urlWithSlash, "Request"), nil -} - -func getCmtProtoPath(cmtTypeURL string) (string, error) { - cmtIndex := strings.Index(cmtTypeURL, "Get") - if cmtIndex == -1 { - return "", fmt.Errorf("invalid typeURL: %s", cmtTypeURL) - } - - // Add a slash before the commitment - urlWithSlash := cmtTypeURL[:cmtIndex] + "Service/" + cmtTypeURL[cmtIndex:] - if !strings.HasSuffix(urlWithSlash, "Request") { - return "", fmt.Errorf("invalid typeURL: %s", cmtTypeURL) - } - - return strings.TrimSuffix(urlWithSlash, "Request"), nil -} diff --git a/e2e/testsuite/query/queries.go b/e2e/testsuite/query/queries.go deleted file mode 100644 index 250533967e8..00000000000 --- a/e2e/testsuite/query/queries.go +++ /dev/null @@ -1,219 +0,0 @@ -package query - -import ( - "context" - "fmt" - "sort" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - - "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - controllertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" -) - -const queryPathTransferDenoms = "/ibc.applications.transfer.v2.QueryV2/Denoms" - -// ModuleAccountAddress returns the address of the given module on the given chain. -// Added because interchaintest's method doesn't work. -func ModuleAccountAddress(ctx context.Context, moduleName string, chain ibc.Chain) (sdk.AccAddress, error) { - modAccResp, err := GRPCQuery[authtypes.QueryModuleAccountByNameResponse]( - ctx, chain, &authtypes.QueryModuleAccountByNameRequest{Name: moduleName}, - ) - if err != nil { - return nil, err - } - - cfg := chain.Config().EncodingConfig - var account sdk.AccountI - err = cfg.InterfaceRegistry.UnpackAny(modAccResp.Account, &account) - if err != nil { - return nil, err - } - - govAccount, ok := account.(sdk.ModuleAccountI) - if !ok { - return nil, fmt.Errorf("account is not a module account") - } - if govAccount.GetAddress().String() == "" { - return nil, fmt.Errorf("module account address is empty") - } - - return govAccount.GetAddress(), nil -} - -// ClientState queries the client state on the given chain for the provided clientID. -func ClientState(ctx context.Context, chain ibc.Chain, clientID string) (ibcexported.ClientState, error) { - clientStateResp, err := GRPCQuery[clienttypes.QueryClientStateResponse](ctx, chain, &clienttypes.QueryClientStateRequest{ - ClientId: clientID, - }) - if err != nil { - return nil, err - } - - clientStateAny := clientStateResp.ClientState - - cfg := chain.Config().EncodingConfig - var clientState ibcexported.ClientState - err = cfg.InterfaceRegistry.UnpackAny(clientStateAny, &clientState) - if err != nil { - return nil, err - } - - return clientState, nil -} - -// ClientStatus queries the status of the client by clientID -func ClientStatus(ctx context.Context, chain ibc.Chain, clientID string) (string, error) { - clientStatusResp, err := GRPCQuery[clienttypes.QueryClientStatusResponse](ctx, chain, &clienttypes.QueryClientStatusRequest{ - ClientId: clientID, - }) - if err != nil { - return "", err - } - return clientStatusResp.Status, nil -} - -// GetValidatorSetByHeight returns the validators of the given chain at the specified height. The returned validators -// are sorted by address. -func GetValidatorSetByHeight(ctx context.Context, chain ibc.Chain, height uint64) ([]*cmtservice.Validator, error) { - res, err := GRPCQuery[cmtservice.GetValidatorSetByHeightResponse](ctx, chain, &cmtservice.GetValidatorSetByHeightRequest{ - Height: int64(height), - }) - if err != nil { - return nil, err - } - - sort.SliceStable(res.Validators, func(i, j int) bool { - return res.Validators[i].Address < res.Validators[j].Address - }) - - return res.Validators, nil -} - -// Balance returns the balance of a specific denomination for a given account by address. -func Balance(ctx context.Context, chain ibc.Chain, address string, denom string) (math.Int, error) { - res, err := GRPCQuery[banktypes.QueryBalanceResponse](ctx, chain, &banktypes.QueryBalanceRequest{ - Address: address, - Denom: denom, - }) - if err != nil { - return math.Int{}, err - } - return res.Balance.Amount, nil -} - -// Channel queries the channel on a given chain for the provided portID and channelID -func Channel(ctx context.Context, chain ibc.Chain, portID, channelID string) (channeltypes.Channel, error) { - res, err := GRPCQuery[channeltypes.QueryChannelResponse](ctx, chain, &channeltypes.QueryChannelRequest{ - PortId: portID, - ChannelId: channelID, - }) - if err != nil { - return channeltypes.Channel{}, err - } - return *res.Channel, nil -} - -// CounterPartyPayee queries the counterparty payee of the given chain and relayer address on the specified channel. -func CounterPartyPayee(ctx context.Context, chain ibc.Chain, relayerAddress, channelID string) (string, error) { - res, err := GRPCQuery[feetypes.QueryCounterpartyPayeeResponse](ctx, chain, &feetypes.QueryCounterpartyPayeeRequest{ - ChannelId: channelID, - Relayer: relayerAddress, - }) - if err != nil { - return "", err - } - return res.CounterpartyPayee, nil -} - -// IncentivizedPacketsForChannel queries the incentivized packets on the specified channel. -func IncentivizedPacketsForChannel( - ctx context.Context, - chain ibc.Chain, - portID, - channelID string, -) ([]*feetypes.IdentifiedPacketFees, error) { - res, err := GRPCQuery[feetypes.QueryIncentivizedPacketsForChannelResponse](ctx, chain, &feetypes.QueryIncentivizedPacketsForChannelRequest{ - PortId: portID, - ChannelId: channelID, - }) - if err != nil { - return nil, err - } - return res.IncentivizedPackets, err -} - -// FeeEnabledChannel queries the fee-enabled status of a channel. -func FeeEnabledChannel(ctx context.Context, chain ibc.Chain, portID, channelID string) (bool, error) { - res, err := GRPCQuery[feetypes.QueryFeeEnabledChannelResponse](ctx, chain, &feetypes.QueryFeeEnabledChannelRequest{ - PortId: portID, - ChannelId: channelID, - }) - if err != nil { - return false, err - } - return res.FeeEnabled, nil -} - -// TotalEscrowForDenom queries the total amount of tokens in escrow for a denom -func TotalEscrowForDenom(ctx context.Context, chain ibc.Chain, denom string) (sdk.Coin, error) { - res, err := GRPCQuery[transfertypes.QueryTotalEscrowForDenomResponse](ctx, chain, &transfertypes.QueryTotalEscrowForDenomRequest{ - Denom: denom, - }) - if err != nil { - return sdk.Coin{}, err - } - return res.Amount, nil -} - -// PacketAcknowledgements queries the packet acknowledgements on the given chain for the provided channel (optional) list of packet commitment sequences. -func PacketAcknowledgements(ctx context.Context, chain ibc.Chain, portID, channelID string, packetCommitmentSequences []uint64) ([]*channeltypes.PacketState, error) { - res, err := GRPCQuery[channeltypes.QueryPacketAcknowledgementsResponse](ctx, chain, &channeltypes.QueryPacketAcknowledgementsRequest{ - PortId: portID, - ChannelId: channelID, - PacketCommitmentSequences: packetCommitmentSequences, - }) - if err != nil { - return nil, err - } - return res.Acknowledgements, nil -} - -// UpgradeError queries the upgrade error on the given chain for the provided channel. -func UpgradeError(ctx context.Context, chain ibc.Chain, portID, channelID string) (channeltypes.ErrorReceipt, error) { - res, err := GRPCQuery[channeltypes.QueryUpgradeErrorResponse](ctx, chain, &channeltypes.QueryUpgradeErrorRequest{ - PortId: portID, - ChannelId: channelID, - }) - if err != nil { - return channeltypes.ErrorReceipt{}, err - } - return res.ErrorReceipt, nil -} - -// InterchainAccount queries the interchain account for the given owner and connectionID. -func InterchainAccount(ctx context.Context, chain ibc.Chain, address, connectionID string) (string, error) { - res, err := GRPCQuery[controllertypes.QueryInterchainAccountResponse](ctx, chain, &controllertypes.QueryInterchainAccountRequest{ - Owner: address, - ConnectionId: connectionID, - }) - if err != nil { - return "", err - } - return res.Address, nil -} - -func TransferDenoms(ctx context.Context, chain ibc.Chain) (*transfertypes.QueryDenomsResponse, error) { - return grpcQueryWithMethod[transfertypes.QueryDenomsResponse](ctx, chain, &transfertypes.QueryDenomsRequest{}, queryPathTransferDenoms) -} diff --git a/e2e/testsuite/sanitize/messages.go b/e2e/testsuite/sanitize/messages.go deleted file mode 100644 index f74643cec37..00000000000 --- a/e2e/testsuite/sanitize/messages.go +++ /dev/null @@ -1,82 +0,0 @@ -package sanitize - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - grouptypes "github.com/cosmos/cosmos-sdk/x/group" - - "github.com/cosmos/ibc-go/e2e/semverutil" - icacontrollertypes "github.com/cosmos/ibc-go/v9/modules/apps/27-interchain-accounts/controller/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -var ( - // groupsv1ProposalTitleAndSummary represents the releases that support the new title and summary fields. - groupsv1ProposalTitleAndSummary = semverutil.FeatureReleases{ - MajorVersion: "v7", - } - // govv1ProposalTitleAndSummary represents the releases that support the new title and summary fields. - govv1ProposalTitleAndSummary = semverutil.FeatureReleases{ - MajorVersion: "v7", - } - // icaUnorderedChannelFeatureReleases represents the releasees that support the new ordering field. - icaUnorderedChannelFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v9", - MinorVersions: []string{ - "v7.5", - "v8.1", - }, - } -) - -// Messages removes any fields that are not supported by the chain version. -// For example, any fields that have been added in later sdk releases. -func Messages(tag string, msgs ...sdk.Msg) []sdk.Msg { - sanitizedMsgs := make([]sdk.Msg, len(msgs)) - for i := range msgs { - sanitizedMsgs[i] = removeUnknownFields(tag, msgs[i]) - } - return sanitizedMsgs -} - -// removeUnknownFields removes any fields that are not supported by the chain version. -// The input message is returned if no changes are made. -func removeUnknownFields(tag string, msg sdk.Msg) sdk.Msg { - switch msg := msg.(type) { - case *govtypesv1.MsgSubmitProposal: - if !govv1ProposalTitleAndSummary.IsSupported(tag) { - msg.Title = "" - msg.Summary = "" - } - // sanitize messages contained in the x/gov proposal - msgs, err := msg.GetMsgs() - if err != nil { - panic(err) - } - sanitizedMsgs := Messages(tag, msgs...) - if err := msg.SetMsgs(sanitizedMsgs); err != nil { - panic(err) - } - return msg - case *grouptypes.MsgSubmitProposal: - if !groupsv1ProposalTitleAndSummary.IsSupported(tag) { - msg.Title = "" - msg.Summary = "" - } - // sanitize messages contained in the x/group proposal - msgs, err := msg.GetMsgs() - if err != nil { - panic(err) - } - sanitizedMsgs := Messages(tag, msgs...) - if err := msg.SetMsgs(sanitizedMsgs); err != nil { - panic(err) - } - return msg - case *icacontrollertypes.MsgRegisterInterchainAccount: - if !icaUnorderedChannelFeatureReleases.IsSupported(tag) { - msg.Ordering = channeltypes.NONE - } - } - return msg -} diff --git a/e2e/testsuite/testconfig.go b/e2e/testsuite/testconfig.go deleted file mode 100644 index ad4b4592a8d..00000000000 --- a/e2e/testsuite/testconfig.go +++ /dev/null @@ -1,842 +0,0 @@ -package testsuite - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "path" - "strings" - "time" - - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - interchaintestutil "github.com/strangelove-ventures/interchaintest/v8/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" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - 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" - - cmtjson "github.com/cometbft/cometbft/libs/json" - - "github.com/cosmos/ibc-go/e2e/relayer" - "github.com/cosmos/ibc-go/e2e/semverutil" - "github.com/cosmos/ibc-go/e2e/testvalues" - wasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" - ibctypes "github.com/cosmos/ibc-go/v9/modules/core/types" -) - -const ( - // ChainImageEnv specifies the image that the chains will use. If left unspecified, it will - // default to being determined based on the specified binary. E.g. ghcr.io/cosmos/ibc-go-simd - ChainImageEnv = "CHAIN_IMAGE" - // ChainATagEnv specifies the tag that Chain A will use. - ChainATagEnv = "CHAIN_A_TAG" - // ChainBTagEnv specifies the tag that Chain B will use. If unspecified - // the value will default to the same value as Chain A. - ChainBTagEnv = "CHAIN_B_TAG" - // RelayerIDEnv specifies the ID of the relayer to use. - RelayerIDEnv = "RELAYER_ID" - // ChainBinaryEnv binary is the binary that will be used for both chains. - ChainBinaryEnv = "CHAIN_BINARY" - // ChainUpgradeTagEnv specifies the upgrade version tag - ChainUpgradeTagEnv = "CHAIN_UPGRADE_TAG" - // ChainUpgradePlanEnv specifies the upgrade plan name - ChainUpgradePlanEnv = "CHAIN_UPGRADE_PLAN" - // E2EConfigFilePathEnv allows you to specify a custom path for the config file to be used. - E2EConfigFilePathEnv = "E2E_CONFIG_PATH" - // KeepContainersEnv instructs interchaintest to not delete the containers after a test has run. - // this ensures that chain containers are not deleted after a test suite is run if other tests - // depend on those chains. - KeepContainersEnv = "KEEP_CONTAINERS" - - // defaultBinary is the default binary that will be used by the chains. - defaultBinary = "simd" - // defaultRlyTag is the tag that will be used if no relayer tag is specified. - // all images are here https://github.com/cosmos/relayer/pkgs/container/relayer/versions - defaultRlyTag = "latest" - - // TODO: https://github.com/cosmos/ibc-go/issues/4965 - defaultHyperspaceTag = "20231122v39" - // defaultHermesTag is the tag that will be used if no relayer tag is specified for hermes. - defaultHermesTag = "1.10.0" - // defaultChainTag is the tag that will be used for the chains if none is specified. - defaultChainTag = "main" - // defaultConfigFileName is the default filename for the config file that can be used to configure - // e2e tests. See sample.config.yaml as an example for what this should look like. - defaultConfigFileName = ".ibc-go-e2e-config.yaml" -) - -// defaultChainNames contains the default name for chainA and chainB. -var defaultChainNames = []string{"simapp-a", "simapp-b", "simapp-c"} - -func getChainImage(binary string) string { - if binary == "" { - binary = defaultBinary - } - return fmt.Sprintf("ghcr.io/cosmos/ibc-go-%s", binary) -} - -// TestConfig holds configuration used throughout the different e2e tests. -type TestConfig struct { - // ChainConfigs holds configuration values related to the chains used in the tests. - ChainConfigs []ChainConfig `yaml:"chains"` - // RelayerConfig holds all known relayer configurations that can be used in the tests. - RelayerConfigs []relayer.Config `yaml:"relayers"` - // ActiveRelayer specifies the relayer that will be used. It must match the ID of one of the entries in RelayerConfigs. - ActiveRelayer string `yaml:"activeRelayer"` - // UpgradeConfig holds values used only for the upgrade tests. - UpgradeConfig UpgradeConfig `yaml:"upgrade"` - // CometBFTConfig holds values for configuring CometBFT. - CometBFTConfig CometBFTConfig `yaml:"cometbft"` - // DebugConfig holds configuration for miscellaneous options. - DebugConfig DebugConfig `yaml:"debug"` -} - -// Validate validates the test configuration is valid for use within the tests. -// this should be called before using the configuration. -func (tc TestConfig) Validate() error { - if err := tc.validateChains(); err != nil { - return fmt.Errorf("invalid chain configuration: %w", err) - } - - if err := tc.validateRelayers(); err != nil { - return fmt.Errorf("invalid relayer configuration: %w", err) - } - - if err := tc.validateGenesisDebugConfig(); err != nil { - return fmt.Errorf("invalid Genesis debug configuration: %w", err) - } - return nil -} - -// validateChains validates the chain configurations. -func (tc TestConfig) validateChains() error { - for _, cfg := range tc.ChainConfigs { - if cfg.Binary == "" { - return fmt.Errorf("chain config missing binary: %+v", cfg) - } - if cfg.Image == "" { - return fmt.Errorf("chain config missing image: %+v", cfg) - } - if cfg.Tag == "" { - return fmt.Errorf("chain config missing tag: %+v", cfg) - } - - // TODO: validate chainID in https://github.com/cosmos/ibc-go/issues/4697 - // these are not passed in the CI at the moment. Defaults are used. - if !IsCI() { - if cfg.ChainID == "" { - return fmt.Errorf("chain config missing chainID: %+v", cfg) - } - } - - // TODO: validate number of nodes in https://github.com/cosmos/ibc-go/issues/4697 - // these are not passed in the CI at the moment. - if !IsCI() { - if cfg.NumValidators == 0 && cfg.NumFullNodes == 0 { - return fmt.Errorf("chain config missing number of validators or full nodes: %+v", cfg) - } - } - } - return nil -} - -// validateRelayers validates relayer configuration. -func (tc TestConfig) validateRelayers() error { - if len(tc.RelayerConfigs) < 1 { - return fmt.Errorf("no relayer configurations specified") - } - - for _, r := range tc.RelayerConfigs { - if r.ID == "" { - return fmt.Errorf("relayer config missing ID: %+v", r) - } - if r.Image == "" { - return fmt.Errorf("relayer config missing image: %+v", r) - } - if r.Tag == "" { - return fmt.Errorf("relayer config missing tag: %+v", r) - } - } - - if tc.GetActiveRelayerConfig() == nil { - return fmt.Errorf("active relayer %s not found in relayer configs: %+v", tc.ActiveRelayer, tc.RelayerConfigs) - } - - return nil -} - -// GetChainIndex returns the index of the chain with the given name, if it -// exists. -func (tc TestConfig) GetChainIndex(name string) (int, error) { - for i := range tc.ChainConfigs { - chainName := tc.GetChainName(i) - if chainName == name { - return i, nil - } - } - return -1, fmt.Errorf("chain %s not found in chain configs", name) -} - -// validateGenesisDebugConfig validates configuration of Genesis debug options/ -func (tc TestConfig) validateGenesisDebugConfig() error { - cfg := tc.DebugConfig.GenesisDebug - if !cfg.DumpGenesisDebugInfo { - return nil - } - - // Verify that the provided chain exists in our config - _, err := tc.GetChainIndex(tc.GetGenesisChainName()) - - return err -} - -// GetActiveRelayerConfig returns the currently specified relayer config. -func (tc TestConfig) GetActiveRelayerConfig() *relayer.Config { - for _, r := range tc.RelayerConfigs { - if r.ID == tc.ActiveRelayer { - return &r - } - } - return nil -} - -// GetChainNumValidators returns the number of validators for the specific chain index. -// default 1 -func (tc TestConfig) GetChainNumValidators(idx int) int { - if tc.ChainConfigs[idx].NumValidators > 0 { - return tc.ChainConfigs[idx].NumValidators - } - return 1 -} - -// GetChainNumFullNodes returns the number of full nodes for the specific chain index. -// default 0 -func (tc TestConfig) GetChainNumFullNodes(idx int) int { - if tc.ChainConfigs[idx].NumFullNodes > 0 { - return tc.ChainConfigs[idx].NumFullNodes - } - return 0 -} - -// GetChainAID returns the chain-id for chain A. -func (tc TestConfig) GetChainAID() string { - if tc.ChainConfigs[0].ChainID != "" { - return tc.ChainConfigs[0].ChainID - } - return "chainA-1" -} - -// GetChainBID returns the chain-id for chain B. -func (tc TestConfig) GetChainBID() string { - if tc.ChainConfigs[1].ChainID != "" { - return tc.ChainConfigs[1].ChainID - } - return "chainB-1" -} - -// GetChainName returns the name of the chain given an index. -func (tc TestConfig) GetChainName(idx int) string { - // Assumes that only valid indices are provided. We do the same in several other places. - chainName := tc.ChainConfigs[idx].Name - if chainName == "" { - chainName = defaultChainNames[idx] - } - return chainName -} - -// GetGenesisChainName returns the name of the chain for which to dump Genesis files. -// If no chain is provided, it uses the default one (chainA). -func (tc TestConfig) GetGenesisChainName() string { - name := tc.DebugConfig.GenesisDebug.ChainName - if name == "" { - return tc.GetChainName(0) - } - return name -} - -// UpgradeConfig holds values relevant to upgrade tests. -type UpgradeConfig struct { - PlanName string `yaml:"planName"` - Tag string `yaml:"tag"` -} - -// ChainConfig holds information about an individual chain used in the tests. -type ChainConfig struct { - ChainID string `yaml:"chainId"` - Name string `yaml:"name"` - Image string `yaml:"image"` - Tag string `yaml:"tag"` - Binary string `yaml:"binary"` - NumValidators int `yaml:"numValidators"` - NumFullNodes int `yaml:"numFullNodes"` -} - -type CometBFTConfig struct { - LogLevel string `yaml:"logLevel"` -} - -type GenesisDebugConfig struct { - // DumpGenesisDebugInfo enables the output of Genesis debug files. - DumpGenesisDebugInfo bool `yaml:"dumpGenesisDebugInfo"` - - // ExportFilePath specifies which path to export Genesis debug files to. - ExportFilePath string `yaml:"filePath"` - - // ChainName represent which chain to get Genesis debug info for. - ChainName string `yaml:"chainName"` -} - -type DebugConfig struct { - // DumpLogs forces the logs to be collected before removing test containers. - DumpLogs bool `yaml:"dumpLogs"` - - // GenesisDebug contains debug information specific to Genesis. - GenesisDebug GenesisDebugConfig `yaml:"genesis"` - - // KeepContainers specifies if the containers should be kept after the test suite is done. - // NOTE: when running a full test suite, this value should be set to true in order to preserve - // shared resources. - KeepContainers bool `yaml:"keepContainers"` -} - -// LoadConfig attempts to load a test configuration from the default file path. -// if any environment variables are specified, they will take precedence over the individual configuration -// options. -func LoadConfig() TestConfig { - tc := getConfig() - if err := tc.Validate(); err != nil { - panic(err) - } - return tc -} - -// getConfig returns the TestConfig with any environment variable overrides. -func getConfig() TestConfig { - fileTc, foundFile := fromFile() - if !foundFile { - return fromEnv() - } - - return applyEnvironmentVariableOverrides(fileTc) -} - -// fromFile returns a TestConfig from a json file and a boolean indicating if the file was found. -func fromFile() (TestConfig, bool) { - var tc TestConfig - bz, err := os.ReadFile(getConfigFilePath()) - if err != nil { - return TestConfig{}, false - } - - if err := yaml.Unmarshal(bz, &tc); err != nil { - panic(err) - } - - return tc, true -} - -// applyEnvironmentVariableOverrides applies all environment variable changes to the config -// loaded from a file. -func applyEnvironmentVariableOverrides(fromFile TestConfig) TestConfig { - envTc := fromEnv() - - if os.Getenv(ChainATagEnv) != "" { - fromFile.ChainConfigs[0].Tag = envTc.ChainConfigs[0].Tag - } - - if os.Getenv(ChainBTagEnv) != "" { - fromFile.ChainConfigs[1].Tag = envTc.ChainConfigs[1].Tag - } - - if os.Getenv(ChainBinaryEnv) != "" { - for i := range fromFile.ChainConfigs { - fromFile.ChainConfigs[i].Binary = envTc.ChainConfigs[i].Binary - } - } - - if os.Getenv(ChainImageEnv) != "" { - for i := range fromFile.ChainConfigs { - fromFile.ChainConfigs[i].Image = envTc.ChainConfigs[i].Image - } - } - - if os.Getenv(RelayerIDEnv) != "" { - fromFile.ActiveRelayer = envTc.ActiveRelayer - } - - if os.Getenv(ChainUpgradePlanEnv) != "" { - fromFile.UpgradeConfig.PlanName = envTc.UpgradeConfig.PlanName - } - - if os.Getenv(ChainUpgradeTagEnv) != "" { - fromFile.UpgradeConfig.Tag = envTc.UpgradeConfig.Tag - } - - if isEnvTrue(KeepContainersEnv) { - fromFile.DebugConfig.KeepContainers = true - } - - return fromFile -} - -// fromEnv returns a TestConfig constructed from environment variables. -func fromEnv() TestConfig { - return TestConfig{ - ChainConfigs: getChainConfigsFromEnv(), - UpgradeConfig: getUpgradePlanConfigFromEnv(), - ActiveRelayer: os.Getenv(RelayerIDEnv), - - // TODO: we can remove this, and specify these values in a config file for the CI - // in https://github.com/cosmos/ibc-go/issues/4697 - RelayerConfigs: []relayer.Config{ - getDefaultRlyRelayerConfig(), - getDefaultHermesRelayerConfig(), - getDefaultHyperspaceRelayerConfig(), - }, - CometBFTConfig: CometBFTConfig{LogLevel: "info"}, - } -} - -// getChainConfigsFromEnv returns the chain configs from environment variables. -func getChainConfigsFromEnv() []ChainConfig { - chainBinary, ok := os.LookupEnv(ChainBinaryEnv) - if !ok { - chainBinary = defaultBinary - } - - chainATag, ok := os.LookupEnv(ChainATagEnv) - if !ok { - chainATag = defaultChainTag - } - - chainBTag, ok := os.LookupEnv(ChainBTagEnv) - if !ok { - chainBTag = chainATag - } - - chainAImage := getChainImage(chainBinary) - specifiedChainImage, ok := os.LookupEnv(ChainImageEnv) - if ok { - chainAImage = specifiedChainImage - } - - numValidators := 4 - numFullNodes := 1 - - chainBImage := chainAImage - return []ChainConfig{ - { - Image: chainAImage, - Tag: chainATag, - Binary: chainBinary, - NumValidators: numValidators, - NumFullNodes: numFullNodes, - }, - { - Image: chainBImage, - Tag: chainBTag, - Binary: chainBinary, - NumValidators: numValidators, - NumFullNodes: numFullNodes, - }, - } -} - -// getConfigFilePath returns the absolute path where the e2e config file should be. -func getConfigFilePath() string { - if absoluteConfigPath := os.Getenv(E2EConfigFilePathEnv); absoluteConfigPath != "" { - return absoluteConfigPath - } - - homeDir, err := os.UserHomeDir() - if err != nil { - panic(err) - } - return path.Join(homeDir, defaultConfigFileName) -} - -// TODO: remove in https://github.com/cosmos/ibc-go/issues/4697 -// getDefaultHermesRelayerConfig returns the default config for the hermes relayer. -func getDefaultHermesRelayerConfig() relayer.Config { - return relayer.Config{ - Tag: defaultHermesTag, - ID: relayer.Hermes, - Image: relayer.HermesRelayerRepository, - } -} - -// TODO: remove in https://github.com/cosmos/ibc-go/issues/4697 -// getDefaultRlyRelayerConfig returns the default config for the golang relayer. -func getDefaultRlyRelayerConfig() relayer.Config { - return relayer.Config{ - Tag: defaultRlyTag, - ID: relayer.Rly, - Image: relayer.RlyRelayerRepository, - } -} - -// TODO: remove in https://github.com/cosmos/ibc-go/issues/4697 -// getDefaultHyperspaceRelayerConfig returns the default config for the hyperspace relayer. -func getDefaultHyperspaceRelayerConfig() relayer.Config { - return relayer.Config{ - Tag: defaultHyperspaceTag, - ID: relayer.Hyperspace, - Image: relayer.HyperspaceRelayerRepository, - } -} - -// getUpgradePlanConfigFromEnv returns the upgrade config from environment variables. -func getUpgradePlanConfigFromEnv() UpgradeConfig { - upgradeTag, ok := os.LookupEnv(ChainUpgradeTagEnv) - if !ok { - upgradeTag = "" - } - - upgradePlan, ok := os.LookupEnv(ChainUpgradePlanEnv) - if !ok { - upgradePlan = "" - } - return UpgradeConfig{ - PlanName: upgradePlan, - Tag: upgradeTag, - } -} - -func GetChainATag() string { - return LoadConfig().ChainConfigs[0].Tag -} - -func GetChainBTag() string { - if chainBTag := LoadConfig().ChainConfigs[1].Tag; chainBTag != "" { - return chainBTag - } - return GetChainATag() -} - -// IsCI returns true if the tests are running in CI, false is returned -// if the tests are running locally. -// Note: github actions passes a CI env value of true by default to all runners. -func IsCI() bool { - return isEnvTrue("CI") -} - -// IsFork returns true if the tests are running in fork mode, false is returned otherwise. -func IsFork() bool { - return isEnvTrue("FORK") -} - -func isEnvTrue(env string) bool { - return strings.ToLower(os.Getenv(env)) == "true" -} - -// ChainOptions stores chain configurations for the chains that will be -// created for the tests. They can be modified by passing ChainOptionConfiguration -// to E2ETestSuite.GetChains. -type ChainOptions struct { - ChainSpecs []*interchaintest.ChainSpec - SkipPathCreation bool - RelayerCount int -} - -// ChainOptionConfiguration enables arbitrary configuration of ChainOptions. -type ChainOptionConfiguration func(options *ChainOptions) - -// DefaultChainOptions returns the default configuration for the chains. -// These options can be configured by passing configuration functions to E2ETestSuite.GetChains. -func DefaultChainOptions() ChainOptions { - tc := LoadConfig() - - chainACfg := newDefaultSimappConfig(tc.ChainConfigs[0], tc.GetChainName(0), tc.GetChainAID(), "atoma", tc.CometBFTConfig) - chainBCfg := newDefaultSimappConfig(tc.ChainConfigs[1], tc.GetChainName(1), tc.GetChainBID(), "atomb", tc.CometBFTConfig) - - chainAVal, chainAFn := getValidatorsAndFullNodes(0) - chainBVal, chainBFn := getValidatorsAndFullNodes(1) - - chainASpec := &interchaintest.ChainSpec{ - ChainConfig: chainACfg, - NumFullNodes: &chainAFn, - NumValidators: &chainAVal, - } - - chainBSpec := &interchaintest.ChainSpec{ - ChainConfig: chainBCfg, - NumFullNodes: &chainBFn, - NumValidators: &chainBVal, - } - - return ChainOptions{ - ChainSpecs: []*interchaintest.ChainSpec{chainASpec, chainBSpec}, - // arbitrary number that will not be required if https://github.com/strangelove-ventures/interchaintest/issues/1153 is resolved. - // It can be overridden in individual test suites in SetupSuite if required. - RelayerCount: 10, - } -} - -// newDefaultSimappConfig creates an ibc configuration for simd. -func newDefaultSimappConfig(cc ChainConfig, name, chainID, denom string, cometCfg CometBFTConfig) ibc.ChainConfig { - configFileOverrides := make(map[string]any) - tmTomlOverrides := make(interchaintestutil.Toml) - - tmTomlOverrides["log_level"] = cometCfg.LogLevel // change to debug in ~/.ibc-go-e2e-config.json to increase cometbft logging. - configFileOverrides["config/config.toml"] = tmTomlOverrides - - return ibc.ChainConfig{ - Type: "cosmos", - Name: name, - ChainID: chainID, - Images: []ibc.DockerImage{ - { - Repository: cc.Image, - Version: cc.Tag, - UidGid: "1000:1000", - }, - }, - Bin: cc.Binary, - Bech32Prefix: "cosmos", - CoinType: fmt.Sprint(sdk.GetConfig().GetCoinType()), - Denom: denom, - EncodingConfig: SDKEncodingConfig(), - GasPrices: fmt.Sprintf("0.00%s", denom), - GasAdjustment: 1.3, - TrustingPeriod: "508h", - NoHostMount: false, - ModifyGenesis: getGenesisModificationFunction(cc), - ConfigFileOverrides: configFileOverrides, - } -} - -// getGenesisModificationFunction returns a genesis modification function that handles the GenesisState type -// correctly depending on if the govv1beta1 gov module is used or if govv1 is being used. -func getGenesisModificationFunction(cc ChainConfig) func(ibc.ChainConfig, []byte) ([]byte, error) { - binary := cc.Binary - version := cc.Tag - - simdSupportsGovV1Genesis := binary == defaultBinary && testvalues.GovGenesisFeatureReleases.IsSupported(version) - - if simdSupportsGovV1Genesis { - return defaultGovv1ModifyGenesis(version) - } - - return defaultGovv1Beta1ModifyGenesis(version) -} - -// defaultGovv1ModifyGenesis will only modify governance params to ensure the voting period and minimum deposit -// are functional for e2e testing purposes. -func defaultGovv1ModifyGenesis(version string) func(ibc.ChainConfig, []byte) ([]byte, error) { - stdlibJSONMarshalling := semverutil.FeatureReleases{MajorVersion: "v8"} - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - appGenesis, err := genutiltypes.AppGenesisFromReader(bytes.NewReader(genbz)) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into genesis doc: %w", err) - } - - var appState genutiltypes.AppMap - if err := json.Unmarshal(appGenesis.AppState, &appState); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into app state: %w", err) - } - - govGenBz, err := modifyGovV1AppState(chainConfig, appState[govtypes.ModuleName]) - if err != nil { - return nil, err - } - appState[govtypes.ModuleName] = govGenBz - - if !testvalues.AllowAllClientsWildcardFeatureReleases.IsSupported(version) { - ibcGenBz, err := modifyClientGenesisAppState(appState[ibcexported.ModuleName]) - if err != nil { - return nil, err - } - appState[ibcexported.ModuleName] = ibcGenBz - } - - if !testvalues.ChannelParamsFeatureReleases.IsSupported(version) { - ibcGenBz, err := modifyChannelGenesisAppState(appState[ibcexported.ModuleName]) - if err != nil { - return nil, err - } - appState[ibcexported.ModuleName] = ibcGenBz - } - - appGenesis.AppState, err = json.Marshal(appState) - if err != nil { - return nil, err - } - - // in older version < v8, tmjson marshal must be used. - // regular json marshalling must be used for v8 and above as the - // sdk is de-coupled from comet. - marshalIndentFn := cmtjson.MarshalIndent - if stdlibJSONMarshalling.IsSupported(version) { - marshalIndentFn = json.MarshalIndent - } - - bz, err := marshalIndentFn(appGenesis, "", " ") - if err != nil { - return nil, err - } - - return bz, nil - } -} - -// defaultGovv1Beta1ModifyGenesis will only modify governance params to ensure the voting period and minimum deposit -// // are functional for e2e testing purposes. -func defaultGovv1Beta1ModifyGenesis(version string) func(ibc.ChainConfig, []byte) ([]byte, error) { - const appStateKey = "app_state" - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - genesisDocMap := map[string]interface{}{} - err := json.Unmarshal(genbz, &genesisDocMap) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into genesis doc: %w", err) - } - - appStateMap, ok := genesisDocMap[appStateKey].(map[string]interface{}) - if !ok { - return nil, fmt.Errorf("failed to extract to app_state") - } - - govModuleBytes, err := json.Marshal(appStateMap[govtypes.ModuleName]) - if err != nil { - return nil, fmt.Errorf("failed to extract gov genesis bytes: %s", err) - } - - govModuleGenesisBytes, err := modifyGovv1Beta1AppState(chainConfig, govModuleBytes) - if err != nil { - return nil, err - } - - govModuleGenesisMap := map[string]interface{}{} - err = json.Unmarshal(govModuleGenesisBytes, &govModuleGenesisMap) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal gov genesis bytes into map: %w", err) - } - - if !testvalues.AllowAllClientsWildcardFeatureReleases.IsSupported(version) { - ibcModuleBytes, err := json.Marshal(appStateMap[ibcexported.ModuleName]) - if err != nil { - return nil, fmt.Errorf("failed to extract ibc genesis bytes: %s", err) - } - - ibcGenesisBytes, err := modifyClientGenesisAppState(ibcModuleBytes) - if err != nil { - return nil, err - } - - ibcModuleGenesisMap := map[string]interface{}{} - err = json.Unmarshal(ibcGenesisBytes, &ibcModuleGenesisMap) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal gov genesis bytes into map: %w", err) - } - } - - appStateMap[govtypes.ModuleName] = govModuleGenesisMap - genesisDocMap[appStateKey] = appStateMap - - finalGenesisDocBytes, err := json.MarshalIndent(genesisDocMap, "", " ") - if err != nil { - return nil, err - } - - return finalGenesisDocBytes, nil - } -} - -// modifyGovV1AppState takes the existing gov app state and marshals it to a govv1 GenesisState. -func modifyGovV1AppState(chainConfig ibc.ChainConfig, govAppState []byte) ([]byte, error) { - cfg := testutil.MakeTestEncodingConfig() - - cdc := codec.NewProtoCodec(cfg.InterfaceRegistry) - govv1.RegisterInterfaces(cfg.InterfaceRegistry) - - govGenesisState := &govv1.GenesisState{} - - if err := cdc.UnmarshalJSON(govAppState, govGenesisState); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into gov genesis state: %w", err) - } - - if govGenesisState.Params == nil { - govGenesisState.Params = &govv1.Params{} - } - - govGenesisState.Params.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens)) - maxDep := time.Second * 10 - govGenesisState.Params.MaxDepositPeriod = &maxDep - vp := testvalues.VotingPeriod - govGenesisState.Params.VotingPeriod = &vp - - govGenBz := MustProtoMarshalJSON(govGenesisState) - - return govGenBz, nil -} - -// modifyGovv1Beta1AppState takes the existing gov app state and marshals it to a govv1beta1 GenesisState. -func modifyGovv1Beta1AppState(chainConfig ibc.ChainConfig, govAppState []byte) ([]byte, error) { - cfg := testutil.MakeTestEncodingConfig() - - cdc := codec.NewProtoCodec(cfg.InterfaceRegistry) - govv1beta1.RegisterInterfaces(cfg.InterfaceRegistry) - - govGenesisState := &govv1beta1.GenesisState{} - if err := cdc.UnmarshalJSON(govAppState, govGenesisState); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into govv1beta1 genesis state: %w", err) - } - - govGenesisState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens)) - govGenesisState.VotingParams.VotingPeriod = testvalues.VotingPeriod - - govGenBz, err := cdc.MarshalJSON(govGenesisState) - if err != nil { - return nil, fmt.Errorf("failed to marshal gov genesis state: %w", err) - } - - return govGenBz, nil -} - -// modifyClientGenesisAppState takes the existing ibc app state and marshals it to an ibc GenesisState. -func modifyClientGenesisAppState(ibcAppState []byte) ([]byte, error) { - cfg := testutil.MakeTestEncodingConfig() - - cdc := codec.NewProtoCodec(cfg.InterfaceRegistry) - clienttypes.RegisterInterfaces(cfg.InterfaceRegistry) - - ibcGenesisState := &ibctypes.GenesisState{} - if err := cdc.UnmarshalJSON(ibcAppState, ibcGenesisState); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis bytes into client genesis state: %w", err) - } - - ibcGenesisState.ClientGenesis.Params.AllowedClients = append(ibcGenesisState.ClientGenesis.Params.AllowedClients, wasmtypes.Wasm) - ibcGenBz, err := cdc.MarshalJSON(ibcGenesisState) - if err != nil { - return nil, fmt.Errorf("failed to marshal gov genesis state: %w", err) - } - - return ibcGenBz, nil -} - -// modifyChannelGenesisAppState takes the existing ibc app state, unmarshals it to a map and removes the `params` entry from ibc channel genesis. -// It marshals and returns the ibc GenesisState JSON map as bytes. -func modifyChannelGenesisAppState(ibcAppState []byte) ([]byte, error) { - var ibcGenesisMap map[string]interface{} - if err := json.Unmarshal(ibcAppState, &ibcGenesisMap); err != nil { - return nil, err - } - - var channelGenesis map[string]interface{} - // be ashamed, be very ashamed - channelGenesis, ok := ibcGenesisMap["channel_genesis"].(map[string]interface{}) - if !ok { - return nil, fmt.Errorf("can't convert IBC genesis map entry into type %T", &channelGenesis) - } - delete(channelGenesis, "params") - - return json.Marshal(ibcGenesisMap) -} diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go deleted file mode 100644 index d3c9c24c188..00000000000 --- a/e2e/testsuite/testsuite.go +++ /dev/null @@ -1,814 +0,0 @@ -package testsuite - -import ( - "context" - "errors" - "fmt" - "os" - "path" - "strings" - "sync" - - dockerclient "github.com/docker/docker/client" - interchaintest "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "github.com/strangelove-ventures/interchaintest/v8/testreporter" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - testifysuite "github.com/stretchr/testify/suite" - "go.uber.org/zap" - "golang.org/x/exp/slices" - - 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/internal/directories" - "github.com/cosmos/ibc-go/e2e/relayer" - "github.com/cosmos/ibc-go/e2e/testsuite/diagnostics" - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -const ( - // ChainARelayerName is the name given to the relayer wallet on ChainA - ChainARelayerName = "rlyA" - // ChainBRelayerName is the name given to the relayer wallet on ChainB - ChainBRelayerName = "rlyB" - // DefaultGasValue is the default gas value used to configure tx.Factory - DefaultGasValue = 500_000_0000 -) - -// E2ETestSuite has methods and functionality which can be shared among all test suites. -type E2ETestSuite struct { - testifysuite.Suite - - // proposalIDs keeps track of the active proposal ID for each chain. - proposalIDs map[string]uint64 - - // chains is a list of chains that are created for the test suite. - // each test suite has a single slice of chains that are used for all individual test - // cases. - chains []ibc.Chain - relayerWallets relayer.Map - logger *zap.Logger - DockerClient *dockerclient.Client - network string - - // pathNameIndex is the latest index to be used for generating chains - pathNameIndex int64 - - // testSuiteName is the name of the test suite, used to store chains under the test suite name. - testSuiteName string - testPaths map[string][]string - channels map[string]map[ibc.Chain][]ibc.ChannelOutput - - // channelLock ensures concurrent tests are not creating and accessing channels as the same time. - channelLock sync.Mutex - // relayerLock ensures concurrent tests are not accessing the pool of relayers as the same time. - relayerLock sync.Mutex - // relayerPool is a pool of relayers that can be used in tests. - relayerPool []ibc.Relayer - // testRelayerMap is a map of test suite names to relayers that are used in the test suite. - // this is used as a cache after a relayer has been assigned to a test suite. - testRelayerMap map[string]ibc.Relayer -} - -// initState populates variables that are used across the test suite. -// note: this should be called only from SetupSuite. -func (s *E2ETestSuite) initState() { - s.initDockerClient() - s.proposalIDs = map[string]uint64{} - s.testPaths = make(map[string][]string) - s.channels = make(map[string]map[ibc.Chain][]ibc.ChannelOutput) - s.relayerPool = []ibc.Relayer{} - s.testRelayerMap = make(map[string]ibc.Relayer) - s.relayerWallets = make(relayer.Map) - - // testSuiteName gets populated in the context of SetupSuite and stored as s.T().Name() - // will return the name of the suite and test when called from SetupTest or within the body of tests. - // the chains will be stored under the test suite name, so we need to store this for future use. - s.testSuiteName = s.T().Name() -} - -// initDockerClient creates a docker client and populates the network to be used for the test. -func (s *E2ETestSuite) initDockerClient() { - client, network := interchaintest.DockerSetup(s.T()) - s.logger = zap.NewExample() - s.DockerClient = client - s.network = network -} - -// SetupSuite will by default create chains with no additional options. If additional options are required, -// the test suite must define the SetupSuite function and provide the required options. -func (s *E2ETestSuite) SetupSuite() { - s.SetupChains(context.TODO(), nil) -} - -// configureGenesisDebugExport sets, if needed, env variables to enable exporting of Genesis debug files. -func (s *E2ETestSuite) configureGenesisDebugExport() { - tc := LoadConfig() - t := s.T() - cfg := tc.DebugConfig.GenesisDebug - if !cfg.DumpGenesisDebugInfo { - return - } - - // Set the export path. - exportPath := cfg.ExportFilePath - - // If no path is provided, use the default (e2e/diagnostics/genesis.json). - if exportPath == "" { - e2eDir, err := directories.E2E(t) - s.Require().NoError(err, "can't get e2edir") - exportPath = path.Join(e2eDir, directories.DefaultGenesisExportPath) - } - - if !path.IsAbs(exportPath) { - wd, err := os.Getwd() - s.Require().NoError(err, "can't get working directory") - exportPath = path.Join(wd, exportPath) - } - - // This env variables are set by the interchain test code: - // https://github.com/strangelove-ventures/interchaintest/blob/7aa0fd6487f76238ab44231fdaebc34627bc5990/chain/cosmos/cosmos_chain.go#L1007-L1008 - t.Setenv("EXPORT_GENESIS_FILE_PATH", exportPath) - - chainName := tc.GetGenesisChainName() - chainIdx, err := tc.GetChainIndex(chainName) - s.Require().NoError(err) - - // Interchaintest adds a suffix (https://github.com/strangelove-ventures/interchaintest/blob/a3f4c7bcccf1925ffa6dc793a298f15497919a38/chainspec.go#L125) - // to the chain name, so we need to do the same. - genesisChainName := fmt.Sprintf("%s-%d", chainName, chainIdx+1) - t.Setenv("EXPORT_GENESIS_CHAIN", genesisChainName) -} - -// initalizeRelayerPool pre-loads the relayer pool with n relayers. -// this is a workaround due to the restriction on relayer creation during the test -// ref: https://github.com/strangelove-ventures/interchaintest/issues/1153 -// if the above issue is resolved, it should be possible to lazily create relayers in each test. -func (s *E2ETestSuite) initalizeRelayerPool(n int) []ibc.Relayer { - var relayers []ibc.Relayer - for i := 0; i < n; i++ { - relayers = append(relayers, relayer.New(s.T(), *LoadConfig().GetActiveRelayerConfig(), s.logger, s.DockerClient, s.network)) - } - return relayers -} - -// SetupChains creates the chains for the test suite, and also a relayer that is wired up to establish -// connections and channels between the chains. -func (s *E2ETestSuite) SetupChains(ctx context.Context, channelOptionsModifier ChainOptionModifier, chainSpecOpts ...ChainOptionConfiguration) { - s.T().Logf("Setting up chains: %s", s.T().Name()) - - if LoadConfig().DebugConfig.KeepContainers { - s.Require().NoError(os.Setenv(KeepContainersEnv, "true")) - } - - s.initState() - s.configureGenesisDebugExport() - - chainOptions := DefaultChainOptions() - for _, opt := range chainSpecOpts { - opt(&chainOptions) - } - - s.chains = s.createChains(chainOptions) - - s.relayerPool = s.initalizeRelayerPool(chainOptions.RelayerCount) - - ic := s.newInterchain(s.relayerPool, s.chains, channelOptionsModifier) - - buildOpts := interchaintest.InterchainBuildOptions{ - TestName: s.T().Name(), - Client: s.DockerClient, - NetworkID: s.network, - // we skip path creation because we are just creating the chains and not connections/channels - SkipPathCreation: true, - } - - s.Require().NoError(ic.Build(ctx, s.GetRelayerExecReporter(), buildOpts)) -} - -// CreateDefaultPaths creates a path between the chains using the default client and channel options. -// this should be called as the setup function in most tests if no additional options are required. -func (s *E2ETestSuite) CreateDefaultPaths(testName string) ibc.Relayer { - return s.CreatePaths(ibc.DefaultClientOpts(), DefaultChannelOpts(s.GetAllChains()), testName) -} - -// CreatePaths creates paths between the chains using the provided client and channel options. -// The paths are created such that ChainA is connected to ChainB, ChainB is connected to ChainC etc. -func (s *E2ETestSuite) CreatePaths(clientOpts ibc.CreateClientOptions, channelOpts ibc.CreateChannelOptions, testName string) ibc.Relayer { - s.T().Logf("Setting up path for: %s", testName) - - if s.channels[testName] == nil { - s.channels[testName] = make(map[ibc.Chain][]ibc.ChannelOutput) - } - - r := s.GetRelayerForTest(testName) - - ctx := context.TODO() - allChains := s.GetAllChains() - for i := 0; i < len(allChains)-1; i++ { - chainA, chainB := allChains[i], allChains[i+1] - s.CreatePath(ctx, r, chainA, chainB, clientOpts, channelOpts, testName) - } - - return r -} - -// CreatePath creates a path between chainA and chainB using the provided client and channel options. -func (s *E2ETestSuite) CreatePath( - ctx context.Context, - r ibc.Relayer, - chainA ibc.Chain, - chainB ibc.Chain, - clientOpts ibc.CreateClientOptions, - channelOpts ibc.CreateChannelOptions, - testName string, -) (chainAChannel ibc.ChannelOutput, chainBChannel ibc.ChannelOutput) { - pathName := s.generatePathName() - s.testPaths[testName] = append(s.testPaths[testName], pathName) - - s.T().Logf("establishing path between %s and %s on path %s", chainA.Config().ChainID, chainB.Config().ChainID, pathName) - - err := r.GeneratePath(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID, chainB.Config().ChainID, pathName) - s.Require().NoError(err) - - // Create new clients - err = r.CreateClients(ctx, s.GetRelayerExecReporter(), pathName, clientOpts) - s.Require().NoError(err) - err = test.WaitForBlocks(ctx, 1, chainA, chainB) - s.Require().NoError(err) - - err = r.CreateConnections(ctx, s.GetRelayerExecReporter(), pathName) - s.Require().NoError(err) - err = test.WaitForBlocks(ctx, 1, chainA, chainB) - s.Require().NoError(err) - - s.createChannelWithLock(ctx, r, pathName, testName, channelOpts, chainA, chainB) - - aChannels := s.channels[testName][chainA] - bChannels := s.channels[testName][chainB] - - return aChannels[len(aChannels)-1], bChannels[len(bChannels)-1] -} - -// createChannelWithLock creates a channel between the two provided chains for the given test name. This applies a lock -// to ensure that the channels that are created are correctly mapped to the test that created them. -func (s *E2ETestSuite) createChannelWithLock(ctx context.Context, r ibc.Relayer, pathName, testName string, channelOpts ibc.CreateChannelOptions, chainA, chainB ibc.Chain) { - // NOTE: we need to lock the creation of channels and applying of packet filters, as if we don't, the result - // of `r.GetChannels` may return channels created by other relayers in different tests. - s.channelLock.Lock() - defer s.channelLock.Unlock() - - err := r.CreateChannel(ctx, s.GetRelayerExecReporter(), pathName, channelOpts) - s.Require().NoError(err) - err = test.WaitForBlocks(ctx, 1, chainA, chainB) - s.Require().NoError(err) - - for _, c := range []ibc.Chain{chainA, chainB} { - channels, err := r.GetChannels(ctx, s.GetRelayerExecReporter(), c.Config().ChainID) - s.Require().NoError(err) - - if _, ok := s.channels[testName][c]; !ok { - s.channels[testName][c] = []ibc.ChannelOutput{} - } - - // keep track of channels associated with a given chain for access within the tests. - // only the most recent channel is relevant. - s.channels[testName][c] = append(s.channels[testName][c], getLatestChannel(channels)) - - err = relayer.ApplyPacketFilter(ctx, s.T(), r, c.Config().ChainID, s.channels[testName][c]) - s.Require().NoError(err, "failed to watch port and channel on chain: %s", c.Config().ChainID) - } -} - -// getLatestChannel returns the latest channel from the list of channels. -func getLatestChannel(channels []ibc.ChannelOutput) ibc.ChannelOutput { - return slices.MaxFunc(channels, func(a, b ibc.ChannelOutput) int { - seqA, _ := channeltypes.ParseChannelSequence(a.ChannelID) - seqB, _ := channeltypes.ParseChannelSequence(b.ChannelID) - return int(seqA - seqB) - }) -} - -// GetChainAChannelForTest returns the ibc.ChannelOutput for the current test. -// this defaults to the first entry in the list, and will be what is needed in the case of -// a single channel test. -func (s *E2ETestSuite) GetChainAChannelForTest(testName string) ibc.ChannelOutput { - return s.GetChannelsForTest(s.GetAllChains()[0], testName)[0] -} - -// GetChannelsForTest returns all channels for the specified test. -func (s *E2ETestSuite) GetChannelsForTest(chain ibc.Chain, testName string) []ibc.ChannelOutput { - channels, ok := s.channels[testName][chain] - s.Require().True(ok, "channel not found for test %s", testName) - return channels -} - -// GetRelayerForTest returns the relayer for the current test from the available pool of relayers. -// once a relayer has been returned to a test, it is cached and will be reused for the duration of the test. -func (s *E2ETestSuite) GetRelayerForTest(testName string) ibc.Relayer { - s.relayerLock.Lock() - defer s.relayerLock.Unlock() - - if r, ok := s.testRelayerMap[testName]; ok { - s.T().Logf("relayer already created for test: %s", testName) - return r - } - - if len(s.relayerPool) == 0 { - panic(errors.New("relayer pool is empty")) - } - - r := s.relayerPool[0] - - // remove the relayer from the pool - s.relayerPool = s.relayerPool[1:] - - s.testRelayerMap[testName] = r - - return r -} - -// GetRelayerUsers returns two ibc.Wallet instances which can be used for the relayer users -// on the two chains. -func (s *E2ETestSuite) GetRelayerUsers(ctx context.Context, testName string) (ibc.Wallet, ibc.Wallet) { - chains := s.GetAllChains() - chainA, chainB := chains[0], chains[1] - - rlyAName := fmt.Sprintf("%s-%s", ChainARelayerName, testName) - rlyBName := fmt.Sprintf("%s-%s", ChainBRelayerName, testName) - - chainAAccountBytes, err := chainA.GetAddress(ctx, rlyAName) - s.Require().NoError(err) - - chainBAccountBytes, err := chainB.GetAddress(ctx, rlyBName) - s.Require().NoError(err) - - chainARelayerUser := cosmos.NewWallet(rlyAName, chainAAccountBytes, "", chainA.Config()) - chainBRelayerUser := cosmos.NewWallet(rlyBName, chainBAccountBytes, "", chainB.Config()) - - s.relayerWallets.AddRelayer(testName, chainARelayerUser) - s.relayerWallets.AddRelayer(testName, chainBRelayerUser) - - return chainARelayerUser, chainBRelayerUser -} - -// ChainOptionModifier is a function which accepts 2 chains as inputs, and returns a channel creation modifier function -// in order to conditionally modify the channel options based on the chains being used. -type ChainOptionModifier func(chainA, chainB ibc.Chain) func(options *ibc.CreateChannelOptions) - -// newInterchain constructs a new interchain instance that creates channels between the chains. -func (s *E2ETestSuite) newInterchain(relayers []ibc.Relayer, chains []ibc.Chain, modificationProvider ChainOptionModifier) *interchaintest.Interchain { - ic := interchaintest.NewInterchain() - for _, chain := range chains { - ic.AddChain(chain) - } - - for i, r := range relayers { - ic.AddRelayer(r, fmt.Sprintf("r-%d", i)) - } - - // iterate through all chains, and create links such that there is a channel between - // - chainA and chainB - // - chainB and chainC - // - chainC and chainD etc - for i := 0; i < len(chains)-1; i++ { - pathName := s.generatePathName() - channelOpts := DefaultChannelOpts(chains) - chain1, chain2 := chains[i], chains[i+1] - - if modificationProvider != nil { - // make a modification to the channel options based on the chains which are being used. - modificationFn := modificationProvider(chain1, chain2) - modificationFn(&channelOpts) - } - - for _, r := range relayers { - ic.AddLink(interchaintest.InterchainLink{ - Chain1: chains[i], - Chain2: chains[i+1], - Relayer: r, - Path: pathName, - CreateChannelOpts: channelOpts, - }) - } - } - - return ic -} - -// generatePathName generates the path name using the test suites name -func (s *E2ETestSuite) generatePathName() string { - pathName := GetPathName(s.pathNameIndex) - s.pathNameIndex++ - return pathName -} - -func (s *E2ETestSuite) GetPaths(testName string) []string { - paths, ok := s.testPaths[testName] - s.Require().True(ok, "paths not found for test %s", testName) - return paths -} - -// GetPathName returns the name of a path at a specific index. This can be used in tests -// when the path name is required. -func GetPathName(idx int64) string { - pathName := fmt.Sprintf("path-%d", idx) - return strings.ReplaceAll(pathName, "/", "-") -} - -// generatePath generates the path name using the test suites name. The indices provided specify which chains should be -// used. E.g. to generate a path between chain A and B, you would use 0 and 1, to specify between A and C, you would -// use 0 and 2 etc. -func (s *E2ETestSuite) generatePath(ctx context.Context, ibcrelayer ibc.Relayer, chainAIdx, chainBIdx int) string { - chains := s.GetAllChains() - chainA, chainB := chains[chainAIdx], chains[chainBIdx] - chainAID := chainA.Config().ChainID - chainBID := chainB.Config().ChainID - - pathName := s.generatePathName() - - 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, ibcrelayer ibc.Relayer, opts ibc.CreateClientOptions) { - pathName := s.generatePath(ctx, ibcrelayer, 0, 1) - 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, ibcrelayer ibc.Relayer, pathName string) { - err := ibcrelayer.UpdateClients(ctx, s.GetRelayerExecReporter(), pathName) - s.Require().NoError(err) -} - -// GetChains returns two chains that can be used in a test. The pair returned -// is unique to the current test being run. Note: this function does not create containers. -func (s *E2ETestSuite) GetChains() (ibc.Chain, ibc.Chain) { - chains := s.GetAllChains() - return chains[0], chains[1] -} - -// GetAllChains returns all chains that can be used in a test. The chains returned -// are unique to the current test being run. Note: this function does not create containers. -func (s *E2ETestSuite) GetAllChains() []ibc.Chain { - // chains are stored on a per test suite level - chains := s.chains - s.Require().NotEmpty(chains, "chains not found for test %s", s.testSuiteName) - return chains -} - -// GetRelayerWallets returns the ibcrelayer wallets associated with the chains. -func (s *E2ETestSuite) GetRelayerWallets(ibcrelayer ibc.Relayer) (ibc.Wallet, ibc.Wallet, error) { - chains := s.GetAllChains() - chainA, chainB := chains[0], chains[1] - chainARelayerWallet, ok := ibcrelayer.GetWallet(chainA.Config().ChainID) - if !ok { - return nil, nil, fmt.Errorf("unable to find chain A relayer wallet") - } - - 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 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, ibcrelayer ibc.Relayer, testName string) (ibc.Wallet, ibc.Wallet, error) { - chainARelayerWallet, chainBRelayerWallet, err := s.GetRelayerWallets(ibcrelayer) - if err != nil { - return nil, nil, err - } - - chains := s.GetAllChains() - chainA, chainB := chains[0], chains[1] - - rlyAName := fmt.Sprintf("%s-%s", ChainARelayerName, testName) - rlyBName := fmt.Sprintf("%s-%s", ChainBRelayerName, testName) - - if err := chainA.RecoverKey(ctx, rlyAName, chainARelayerWallet.Mnemonic()); err != nil { - return nil, nil, fmt.Errorf("could not recover relayer wallet on chain A: %s", err) - } - if err := chainB.RecoverKey(ctx, rlyBName, chainBRelayerWallet.Mnemonic()); err != nil { - return nil, nil, fmt.Errorf("could not recover relayer wallet on chain B: %s", err) - } - return chainARelayerWallet, chainBRelayerWallet, nil -} - -// StartRelayer starts the given ibcrelayer. -func (s *E2ETestSuite) StartRelayer(r ibc.Relayer, testName string) { - s.Require().NoError(r.StartRelayer(context.TODO(), s.GetRelayerExecReporter(), s.GetPaths(testName)...), "failed to start relayer") - - chains := s.GetAllChains() - var chainHeighters []test.ChainHeighter - for _, c := range chains { - chainHeighters = append(chainHeighters, c) - } - - // wait for every chain to produce some blocks before using the relayer. - s.Require().NoError(test.WaitForBlocks(context.TODO(), 10, chainHeighters...), "failed to wait for blocks") -} - -// 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) -} - -// RestartRelayer restarts the given relayer. -func (s *E2ETestSuite) RestartRelayer(ctx context.Context, ibcrelayer ibc.Relayer, testName string) { - s.StopRelayer(ctx, ibcrelayer) - s.StartRelayer(ibcrelayer, testName) -} - -// CreateUserOnChainA creates a user with the given amount of funds on chain A. -func (s *E2ETestSuite) CreateUserOnChainA(ctx context.Context, amount int64) ibc.Wallet { - return s.createWalletOnChainIndex(ctx, amount, 0) -} - -// CreateUserOnChainB creates a user with the given amount of funds on chain B. -func (s *E2ETestSuite) CreateUserOnChainB(ctx context.Context, amount int64) ibc.Wallet { - return s.createWalletOnChainIndex(ctx, amount, 1) -} - -// CreateUserOnChainC creates a user with the given amount of funds on chain C. -func (s *E2ETestSuite) CreateUserOnChainC(ctx context.Context, amount int64) ibc.Wallet { - return s.createWalletOnChainIndex(ctx, amount, 2) -} - -// createWalletOnChainIndex creates a wallet with the given amount of funds on the chain of the given index. -func (s *E2ETestSuite) createWalletOnChainIndex(ctx context.Context, amount, chainIndex int64) ibc.Wallet { - chain := s.GetAllChains()[chainIndex] - wallet := interchaintest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), sdkmath.NewInt(amount), chain)[0] - // note the GetAndFundTestUsers requires the caller to wait for some blocks before the funds are accessible. - s.Require().NoError(test.WaitForBlocks(ctx, 2, chain)) - return wallet -} - -// GetChainANativeBalance gets the balance of a given user on chain A. -func (s *E2ETestSuite) GetChainANativeBalance(ctx context.Context, user ibc.Wallet) (int64, error) { - chainA := s.GetAllChains()[0] - - balanceResp, err := query.GRPCQuery[banktypes.QueryBalanceResponse](ctx, chainA, &banktypes.QueryBalanceRequest{ - Address: user.FormattedAddress(), - Denom: chainA.Config().Denom, - }) - if err != nil { - return 0, err - } - - return balanceResp.Balance.Amount.Int64(), nil -} - -// GetChainBNativeBalance gets the balance of a given user on chain B. -func (s *E2ETestSuite) GetChainBNativeBalance(ctx context.Context, user ibc.Wallet) (int64, error) { - chainB := s.GetAllChains()[1] - - balanceResp, err := query.GRPCQuery[banktypes.QueryBalanceResponse](ctx, chainB, &banktypes.QueryBalanceRequest{ - Address: user.FormattedAddress(), - Denom: chainB.Config().Denom, - }) - if err != nil { - return 0, err - } - - return balanceResp.Balance.Amount.Int64(), nil -} - -// AssertPacketRelayed asserts that the packet commitment does not exist on the sending chain. -// The packet commitment will be deleted upon a packet acknowledgement or timeout. -func (s *E2ETestSuite) AssertPacketRelayed(ctx context.Context, chain ibc.Chain, portID, channelID string, sequence uint64) { - _, err := query.GRPCQuery[channeltypes.QueryPacketCommitmentResponse](ctx, chain, &channeltypes.QueryPacketCommitmentRequest{ - PortId: portID, - ChannelId: channelID, - Sequence: sequence, - }) - s.Require().ErrorContains(err, "packet commitment hash not found") -} - -// AssertPacketAcknowledged asserts that the packet has been acknowledged on the specified chain. -func (s *E2ETestSuite) AssertPacketAcknowledged(ctx context.Context, chain ibc.Chain, portID, channelID string, sequence uint64) { - _, err := query.GRPCQuery[channeltypes.QueryPacketAcknowledgementResponse](ctx, chain, &channeltypes.QueryPacketAcknowledgementRequest{ - PortId: portID, - ChannelId: channelID, - Sequence: sequence, - }) - s.Require().NoError(err) -} - -// AssertHumanReadableDenom asserts that a human readable denom is present for a given chain. -func (s *E2ETestSuite) AssertHumanReadableDenom(ctx context.Context, chain ibc.Chain, counterpartyNativeDenom string, counterpartyChannel ibc.ChannelOutput) { - chainIBCDenom := GetIBCToken(counterpartyNativeDenom, counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID) - - denomMetadataResp, err := query.GRPCQuery[banktypes.QueryDenomMetadataResponse](ctx, chain, &banktypes.QueryDenomMetadataRequest{ - Denom: chainIBCDenom.IBCDenom(), - }) - s.Require().NoError(err) - - denomMetadata := denomMetadataResp.Metadata - - s.Require().Equal(chainIBCDenom.IBCDenom(), denomMetadata.Base, "denom metadata base does not match expected %s: got %s", chainIBCDenom.IBCDenom(), denomMetadata.Base) - expectedName := fmt.Sprintf("%s/%s/%s IBC token", counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID, counterpartyNativeDenom) - s.Require().Equal(expectedName, denomMetadata.Name, "denom metadata name does not match expected %s: got %s", expectedName, denomMetadata.Name) - expectedDisplay := fmt.Sprintf("%s/%s/%s", counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID, counterpartyNativeDenom) - s.Require().Equal(expectedDisplay, denomMetadata.Display, "denom metadata display does not match expected %s: got %s", expectedDisplay, denomMetadata.Display) - s.Require().Equal(strings.ToUpper(counterpartyNativeDenom), denomMetadata.Symbol, "denom metadata symbol does not match expected %s: got %s", strings.ToUpper(counterpartyNativeDenom), denomMetadata.Symbol) -} - -// createChains creates two separate chains in docker containers. -// test and can be retrieved with GetChains. -func (s *E2ETestSuite) createChains(chainOptions ChainOptions) []ibc.Chain { - t := s.T() - cf := interchaintest.NewBuiltinChainFactory(s.logger, chainOptions.ChainSpecs) - - // this is intentionally called after the interchaintest.DockerSetup function. The above function registers a - // cleanup task which deletes all containers. By registering a cleanup function afterwards, it is executed first - // this allows us to process the logs before the containers are removed. - t.Cleanup(func() { - dumpLogs := LoadConfig().DebugConfig.DumpLogs - var chainNames []string - for _, chain := range chainOptions.ChainSpecs { - chainNames = append(chainNames, chain.Name) - } - diagnostics.Collect(t, s.DockerClient, dumpLogs, s.testSuiteName, chainNames...) - }) - - chains, err := cf.Chains(t.Name()) - s.Require().NoError(err) - - // initialise proposal ids for all chains. - for _, chain := range chains { - s.proposalIDs[chain.Config().ChainID] = 1 - } - - return chains -} - -// GetRelayerExecReporter returns a testreporter.RelayerExecReporter instances -// using the current test's testing.T. -func (s *E2ETestSuite) GetRelayerExecReporter() *testreporter.RelayerExecReporter { - rep := testreporter.NewNopReporter() - return rep.RelayerExecReporter(s.T()) -} - -// TransferChannelOptions configures both of the chains to have non-incentivized transfer channels. -func (s *E2ETestSuite) TransferChannelOptions() ibc.CreateChannelOptions { - opts := ibc.DefaultChannelOpts() - opts.Version = determineDefaultTransferVersion(s.GetAllChains()) - return opts -} - -// FeeTransferChannelOptions configures both of the chains to have fee middleware enabled. -func (s *E2ETestSuite) FeeTransferChannelOptions() ibc.CreateChannelOptions { - versionMetadata := feetypes.Metadata{ - FeeVersion: feetypes.Version, - AppVersion: determineDefaultTransferVersion(s.GetAllChains()), - } - versionBytes, err := feetypes.ModuleCdc.MarshalJSON(&versionMetadata) - s.Require().NoError(err) - - opts := ibc.DefaultChannelOpts() - opts.Version = string(versionBytes) - return opts -} - -// GetTimeoutHeight returns a timeout height of 1000 blocks above the current block height. -// This function should be used when the timeout is never expected to be reached -func (s *E2ETestSuite) GetTimeoutHeight(ctx context.Context, chain ibc.Chain) clienttypes.Height { - height, err := chain.Height(ctx) - s.Require().NoError(err) - return clienttypes.NewHeight(clienttypes.ParseChainID(chain.Config().ChainID), uint64(height)+1000) -} - -// CreateUpgradeFields creates upgrade fields for channel with fee middleware -func (s *E2ETestSuite) CreateUpgradeFields(channel channeltypes.Channel) channeltypes.UpgradeFields { - versionMetadata := feetypes.Metadata{ - FeeVersion: feetypes.Version, - AppVersion: channel.Version, - } - versionBytes, err := feetypes.ModuleCdc.MarshalJSON(&versionMetadata) - s.Require().NoError(err) - - return channeltypes.NewUpgradeFields(channel.Ordering, channel.ConnectionHops, string(versionBytes)) -} - -// SetUpgradeTimeoutParam creates and submits a governance proposal to execute the message to update 04-channel params with a timeout of 1s -func (s *E2ETestSuite) SetUpgradeTimeoutParam(ctx context.Context, chain ibc.Chain, wallet ibc.Wallet) { - const timeoutDelta = 1000000000 // use 1 second as relative timeout to force upgrade timeout on the counterparty - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chain) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - upgradeTimeout := channeltypes.NewTimeout(channeltypes.DefaultTimeout.Height, timeoutDelta) - msg := channeltypes.NewMsgUpdateChannelParams(govModuleAddress.String(), channeltypes.NewParams(upgradeTimeout)) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chain, wallet) -} - -// InitiateChannelUpgrade creates and submits a governance proposal to execute the message to initiate a channel upgrade -func (s *E2ETestSuite) InitiateChannelUpgrade(ctx context.Context, chain ibc.Chain, wallet ibc.Wallet, portID, channelID string, upgradeFields channeltypes.UpgradeFields) { - govModuleAddress, err := query.ModuleAccountAddress(ctx, govtypes.ModuleName, chain) - s.Require().NoError(err) - s.Require().NotNil(govModuleAddress) - - msg := channeltypes.NewMsgChannelUpgradeInit(portID, channelID, upgradeFields, govModuleAddress.String()) - s.ExecuteAndPassGovV1Proposal(ctx, msg, chain, wallet) -} - -// GetIBCToken returns the denomination of the full token denom sent to the receiving channel -func GetIBCToken(fullTokenDenom string, portID, channelID string) transfertypes.Denom { - return transfertypes.ExtractDenomFromPath(fmt.Sprintf("%s/%s/%s", portID, channelID, fullTokenDenom)) -} - -// getValidatorsAndFullNodes returns the number of validators and full nodes respectively that should be used for -// the test. If the test is running in CI, more nodes are used, when running locally a single node is used by default to -// use less resources and allow the tests to run faster. -// both the number of validators and full nodes can be overwritten in a config file. -func getValidatorsAndFullNodes(chainIdx int) (int, int) { - if IsCI() { - return 4, 1 - } - tc := LoadConfig() - return tc.GetChainNumValidators(chainIdx), tc.GetChainNumFullNodes(chainIdx) -} - -// GetMsgTransfer returns a MsgTransfer that is constructed based on the channel version -func GetMsgTransfer(portID, channelID, version string, tokens sdk.Coins, sender, receiver string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, memo string, forwarding *transfertypes.Forwarding) *transfertypes.MsgTransfer { - if len(tokens) == 0 { - panic(errors.New("tokens cannot be empty")) - } - - var msg *transfertypes.MsgTransfer - switch version { - case transfertypes.V1: - msg = &transfertypes.MsgTransfer{ - SourcePort: portID, - SourceChannel: channelID, - Token: tokens[0], - Sender: sender, - Receiver: receiver, - TimeoutHeight: timeoutHeight, - TimeoutTimestamp: timeoutTimestamp, - Memo: memo, - Tokens: sdk.NewCoins(), - } - case transfertypes.V2: - msg = transfertypes.NewMsgTransfer(portID, channelID, tokens, sender, receiver, timeoutHeight, timeoutTimestamp, memo, forwarding) - default: - panic(fmt.Errorf("unsupported transfer version: %s", version)) - } - - return msg -} - -// SuiteName returns the name of the test suite. -func (s *E2ETestSuite) SuiteName() string { - return s.testSuiteName -} - -// ThreeChainSetup provides the default behaviour to wire up 3 chains in the tests. -func ThreeChainSetup() ChainOptionConfiguration { - // copy all values of existing chains and tweak to make unique to new chain. - return func(options *ChainOptions) { - chainCSpec := *options.ChainSpecs[0] // nolint - - chainCSpec.ChainID = "chainC-1" - chainCSpec.Name = "simapp-c" - - options.ChainSpecs = append(options.ChainSpecs, &chainCSpec) - } -} - -// DefaultChannelOpts returns the default chain options for the test suite based on the provided chains. -func DefaultChannelOpts(chains []ibc.Chain) ibc.CreateChannelOptions { - channelOptions := ibc.DefaultChannelOpts() - channelOptions.Version = determineDefaultTransferVersion(chains) - return channelOptions -} - -// determineDefaultTransferVersion determines the version of transfer that should be used with an arbitrary number of chains. -// the default is V2, but if any chain does not support V2, then V1 is used. -func determineDefaultTransferVersion(chains []ibc.Chain) string { - for _, chain := range chains { - chainVersion := chain.Config().Images[0].Version - if !testvalues.ICS20v2FeatureReleases.IsSupported(chainVersion) { - return transfertypes.V1 - } - } - return transfertypes.V2 -} diff --git a/e2e/testsuite/tx.go b/e2e/testsuite/tx.go deleted file mode 100644 index ec810e62011..00000000000 --- a/e2e/testsuite/tx.go +++ /dev/null @@ -1,405 +0,0 @@ -package testsuite - -import ( - "context" - "fmt" - "slices" - "strconv" - "strings" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - test "github.com/strangelove-ventures/interchaintest/v8/testutil" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - - "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" - signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" - 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" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/ibc-go/e2e/testsuite/query" - "github.com/cosmos/ibc-go/e2e/testsuite/sanitize" - "github.com/cosmos/ibc-go/e2e/testvalues" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" - transfertypes "github.com/cosmos/ibc-go/v9/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v9/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v9/modules/core/04-channel/types" -) - -// BroadcastMessages broadcasts the provided messages to the given chain and signs them on behalf of the provided user. -// Once the broadcast response is returned, we wait for a few blocks to be created on both chain A and chain B. -func (s *E2ETestSuite) BroadcastMessages(ctx context.Context, chain ibc.Chain, user ibc.Wallet, msgs ...sdk.Msg) sdk.TxResponse { - cosmosChain, ok := chain.(*cosmos.CosmosChain) - if !ok { - panic("BroadcastMessages expects a cosmos.CosmosChain") - } - - broadcaster := cosmos.NewBroadcaster(s.T(), cosmosChain) - - // strip out any fields that may not be supported for the given chain version. - msgs = sanitize.Messages(cosmosChain.Nodes()[0].Image.Version, msgs...) - - broadcaster.ConfigureClientContextOptions(func(clientContext client.Context) client.Context { - // use a codec with all the types our tests care about registered. - // BroadcastTx will deserialize the response and will not be able to otherwise. - cdc := Codec() - return clientContext.WithCodec(cdc).WithTxConfig(authtx.NewTxConfig(cdc, []signingtypes.SignMode{signingtypes.SignMode_SIGN_MODE_DIRECT})) - }) - - broadcaster.ConfigureFactoryOptions(func(factory tx.Factory) tx.Factory { - return factory.WithGas(DefaultGasValue) - }) - - // Retry the operation a few times if the user signing the transaction is a relayer. (See issue #3264) - var resp sdk.TxResponse - var err error - broadcastFunc := func() (sdk.TxResponse, error) { - return cosmos.BroadcastTx(ctx, broadcaster, user, msgs...) - } - if s.relayerWallets.ContainsRelayer(s.T().Name(), user) { - // Retry five times, the value of 5 chosen is arbitrary. - resp, err = s.retryNtimes(broadcastFunc, 5) - } else { - resp, err = broadcastFunc() - } - s.Require().NoError(err) - - s.Require().NoError(test.WaitForBlocks(ctx, 2, chain)) - s.T().Logf("blocks created on chain %s", chain.Config().ChainID) - return resp -} - -// retryNtimes retries the provided function up to the provided number of attempts. -func (s *E2ETestSuite) retryNtimes(f func() (sdk.TxResponse, error), attempts int) (sdk.TxResponse, error) { - // Ignore account sequence mismatch errors. - retryMessages := []string{"account sequence mismatch"} - var resp sdk.TxResponse - var err error - // If the response's raw log doesn't contain any of the allowed prefixes we return, else, we retry. - for i := 0; i < attempts; i++ { - resp, err = f() - if err != nil { - return sdk.TxResponse{}, err - } - // If the response's raw log doesn't contain any of the allowed prefixes we return, else, we retry. - if !slices.ContainsFunc(retryMessages, func(s string) bool { return strings.Contains(resp.RawLog, s) }) { - return resp, err - } - s.T().Logf("retrying tx due to non deterministic failure: %+v", resp) - } - return resp, err -} - -// AssertTxFailure verifies that an sdk.TxResponse has failed. -func (s *E2ETestSuite) AssertTxFailure(resp sdk.TxResponse, expectedError *errorsmod.Error) { - errorMsg := fmt.Sprintf("%+v", resp) - // In older versions, the codespace and abci codes were different. So in compatibility tests - // we can not make assertions on them. - if GetChainATag() == GetChainBTag() { - s.Require().Equal(expectedError.ABCICode(), resp.Code, errorMsg) - s.Require().Equal(expectedError.Codespace(), resp.Codespace, errorMsg) - } - s.Require().Contains(resp.RawLog, expectedError.Error(), errorMsg) -} - -// AssertTxSuccess verifies that an sdk.TxResponse has succeeded. -func (s *E2ETestSuite) AssertTxSuccess(resp sdk.TxResponse) { - errorMsg := addDebuggingInformation(fmt.Sprintf("%+v", resp)) - s.Require().Equal(resp.Code, uint32(0), errorMsg) - s.Require().NotEmpty(resp.TxHash, errorMsg) - s.Require().NotEqual(int64(0), resp.GasUsed, errorMsg) - s.Require().NotEqual(int64(0), resp.GasWanted, errorMsg) - s.Require().NotEmpty(resp.Events, errorMsg) - s.Require().NotEmpty(resp.Data, errorMsg) -} - -// addDebuggingInformation adds additional debugging information to the error message -// based on common types of errors that can occur. -func addDebuggingInformation(errorMsg string) string { - if strings.Contains(errorMsg, "errUnknownField") { - errorMsg += ` - -This error is likely due to a new an unrecognized proto field being provided to a chain using an older version of the sdk. -If this is a compatibility test, ensure that the fields are being sanitized in the sanitize.Messages function. - -` - } - return errorMsg -} - -// ExecuteAndPassGovV1Proposal submits a v1 governance proposal using the provided user and message and uses all validators -// to vote yes on the proposal. It ensures the proposal successfully passes. -func (s *E2ETestSuite) ExecuteAndPassGovV1Proposal(ctx context.Context, msg sdk.Msg, chain ibc.Chain, user ibc.Wallet) { - err := s.ExecuteGovV1Proposal(ctx, msg, chain, user) - s.Require().NoError(err) -} - -// ExecuteGovV1Proposal submits a v1 governance proposal using the provided user and message and uses all validators -// to vote yes on the proposal. -func (s *E2ETestSuite) ExecuteGovV1Proposal(ctx context.Context, msg sdk.Msg, chain ibc.Chain, user ibc.Wallet) error { - cosmosChain, ok := chain.(*cosmos.CosmosChain) - if !ok { - panic("ExecuteAndPassGovV1Proposal must be passed a cosmos.CosmosChain") - } - - sender, err := sdk.AccAddressFromBech32(user.FormattedAddress()) - s.Require().NoError(err) - - proposalID := s.proposalIDs[cosmosChain.Config().ChainID] - defer func() { - s.proposalIDs[cosmosChain.Config().ChainID] = proposalID + 1 - }() - - msgs := []sdk.Msg{msg} - - msgSubmitProposal, err := govtypesv1.NewMsgSubmitProposal( - msgs, - sdk.NewCoins(sdk.NewCoin(cosmosChain.Config().Denom, sdkmath.NewInt(testvalues.DefaultGovV1ProposalTokenAmount))), - sender.String(), - "", - fmt.Sprintf("e2e gov proposal: %d", proposalID), - fmt.Sprintf("executing gov proposal %d", proposalID), - false, - ) - s.Require().NoError(err) - - s.T().Logf("submitting proposal with ID: %d", proposalID) - resp := s.BroadcastMessages(ctx, cosmosChain, user, msgSubmitProposal) - s.AssertTxSuccess(resp) - - s.Require().NoError(cosmosChain.VoteOnProposalAllValidators(ctx, strconv.Itoa(int(proposalID)), cosmos.ProposalVoteYes)) - - s.T().Logf("validators voted %s on proposal with ID: %d", cosmos.ProposalVoteYes, proposalID) - return s.waitForGovV1ProposalToPass(ctx, cosmosChain, proposalID) -} - -// waitForGovV1ProposalToPass polls for the entire voting period to see if the proposal has passed. -// if the proposal has not passed within the duration of the voting period, an error is returned. -func (s *E2ETestSuite) waitForGovV1ProposalToPass(ctx context.Context, chain ibc.Chain, proposalID uint64) error { - var govProposal *govtypesv1.Proposal - // poll for the query for the entire voting period to see if the proposal has passed. - err := test.WaitForCondition(testvalues.VotingPeriod, 10*time.Second, func() (bool, error) { - s.T().Logf("waiting for proposal with ID: %d to pass", proposalID) - proposalResp, err := query.GRPCQuery[govtypesv1.QueryProposalResponse](ctx, chain, &govtypesv1.QueryProposalRequest{ - ProposalId: proposalID, - }) - if err != nil { - return false, err - } - - govProposal = proposalResp.Proposal - return govProposal.Status == govtypesv1.StatusPassed, nil - }) - - // in the case of a failed proposal, we wrap the polling error with additional information about why the proposal failed. - if err != nil && govProposal.FailedReason != "" { - err = errorsmod.Wrap(err, govProposal.FailedReason) - } - return err -} - -// ExecuteAndPassGovV1Beta1Proposal submits the given v1beta1 governance proposal using the provided user and uses all validators to vote yes on the proposal. -// It ensures the proposal successfully passes. -func (s *E2ETestSuite) ExecuteAndPassGovV1Beta1Proposal(ctx context.Context, chain ibc.Chain, user ibc.Wallet, content govtypesv1beta1.Content) { - cosmosChain, ok := chain.(*cosmos.CosmosChain) - if !ok { - panic("ExecuteAndPassGovV1Beta1Proposal must be passed a cosmos.CosmosChain") - } - - proposalID := s.proposalIDs[chain.Config().ChainID] - defer func() { - s.proposalIDs[chain.Config().ChainID] = proposalID + 1 - }() - - txResp := s.ExecuteGovV1Beta1Proposal(ctx, cosmosChain, user, content) - s.AssertTxSuccess(txResp) - - // TODO: replace with parsed proposal ID from MsgSubmitProposalResponse - // https://github.com/cosmos/ibc-go/issues/2122 - - proposalResp, err := query.GRPCQuery[govtypesv1beta1.QueryProposalResponse](ctx, cosmosChain, &govtypesv1beta1.QueryProposalRequest{ - ProposalId: proposalID, - }) - s.Require().NoError(err) - - proposal := proposalResp.Proposal - s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposal.Status) - - err = cosmosChain.VoteOnProposalAllValidators(ctx, fmt.Sprintf("%d", proposalID), cosmos.ProposalVoteYes) - s.Require().NoError(err) - - // ensure voting period has not passed before validators finished voting - proposalResp, err = query.GRPCQuery[govtypesv1beta1.QueryProposalResponse](ctx, cosmosChain, &govtypesv1beta1.QueryProposalRequest{ - ProposalId: proposalID, - }) - s.Require().NoError(err) - - proposal = proposalResp.Proposal - s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposal.Status) - - err = s.waitForGovV1Beta1ProposalToPass(ctx, cosmosChain, proposalID) - s.Require().NoError(err) -} - -// waitForGovV1Beta1ProposalToPass polls for the entire voting period to see if the proposal has passed. -// if the proposal has not passed within the duration of the voting period, an error is returned. -func (*E2ETestSuite) waitForGovV1Beta1ProposalToPass(ctx context.Context, chain ibc.Chain, proposalID uint64) error { - // poll for the query for the entire voting period to see if the proposal has passed. - return test.WaitForCondition(testvalues.VotingPeriod, 10*time.Second, func() (bool, error) { - proposalResp, err := query.GRPCQuery[govtypesv1beta1.QueryProposalResponse](ctx, chain, &govtypesv1beta1.QueryProposalRequest{ - ProposalId: proposalID, - }) - if err != nil { - return false, err - } - - proposal := proposalResp.Proposal - return proposal.Status == govtypesv1beta1.StatusPassed, nil - }) -} - -// ExecuteGovV1Beta1Proposal submits a v1beta1 governance proposal using the provided content. -func (s *E2ETestSuite) ExecuteGovV1Beta1Proposal(ctx context.Context, chain ibc.Chain, user ibc.Wallet, content govtypesv1beta1.Content) sdk.TxResponse { - sender, err := sdk.AccAddressFromBech32(user.FormattedAddress()) - s.Require().NoError(err) - - msgSubmitProposal, err := govtypesv1beta1.NewMsgSubmitProposal(content, sdk.NewCoins(sdk.NewCoin(chain.Config().Denom, govtypesv1beta1.DefaultMinDepositTokens)), sender) - s.Require().NoError(err) - - return s.BroadcastMessages(ctx, chain, user, msgSubmitProposal) -} - -// Transfer broadcasts a MsgTransfer message. -func (s *E2ETestSuite) Transfer(ctx context.Context, chain ibc.Chain, user ibc.Wallet, - portID, channelID string, tokens sdk.Coins, sender, receiver string, - timeoutHeight clienttypes.Height, timeoutTimestamp uint64, - memo string, forwarding *transfertypes.Forwarding, -) sdk.TxResponse { - channel, err := query.Channel(ctx, chain, portID, channelID) - s.Require().NoError(err) - s.Require().NotNil(channel) - - feeEnabled := false - if testvalues.FeeMiddlewareFeatureReleases.IsSupported(chain.Config().Images[0].Version) { - feeEnabled, err = query.FeeEnabledChannel(ctx, chain, portID, channelID) - s.Require().NoError(err) - } - - transferVersion := channel.Version - if feeEnabled { - version, err := feetypes.MetadataFromVersion(channel.Version) - s.Require().NoError(err) - - transferVersion = version.AppVersion - } - - msg := GetMsgTransfer(portID, channelID, transferVersion, tokens, sender, receiver, timeoutHeight, timeoutTimestamp, memo, forwarding) - - return s.BroadcastMessages(ctx, chain, user, msg) -} - -// RegisterCounterPartyPayee broadcasts a MsgRegisterCounterpartyPayee message. -func (s *E2ETestSuite) RegisterCounterPartyPayee(ctx context.Context, chain ibc.Chain, - user ibc.Wallet, portID, channelID, relayerAddr, counterpartyPayeeAddr string, -) sdk.TxResponse { - msg := feetypes.NewMsgRegisterCounterpartyPayee(portID, channelID, relayerAddr, counterpartyPayeeAddr) - return s.BroadcastMessages(ctx, chain, user, msg) -} - -// PayPacketFeeAsync broadcasts a MsgPayPacketFeeAsync message. -func (s *E2ETestSuite) PayPacketFeeAsync( - ctx context.Context, - chain ibc.Chain, - user ibc.Wallet, - packetID channeltypes.PacketId, - packetFee feetypes.PacketFee, -) sdk.TxResponse { - msg := feetypes.NewMsgPayPacketFeeAsync(packetID, packetFee) - return s.BroadcastMessages(ctx, chain, user, msg) -} - -// PruneAcknowledgements broadcasts a MsgPruneAcknowledgements message. -func (s *E2ETestSuite) PruneAcknowledgements( - ctx context.Context, - chain ibc.Chain, - user ibc.Wallet, - portID, channelID string, - limit uint64, -) sdk.TxResponse { - msg := channeltypes.NewMsgPruneAcknowledgements(portID, channelID, limit, user.FormattedAddress()) - return s.BroadcastMessages(ctx, chain, user, msg) -} - -// QueryTxsByEvents runs the QueryTxsByEvents command on the given chain. -// https://github.com/cosmos/cosmos-sdk/blob/65ab2530cc654fd9e252b124ed24cbaa18023b2b/x/auth/client/cli/query.go#L33 -func (*E2ETestSuite) QueryTxsByEvents( - ctx context.Context, chain ibc.Chain, - page, limit int, queryReq, orderBy string, -) (*sdk.SearchTxsResult, error) { - cosmosChain, ok := chain.(*cosmos.CosmosChain) - if !ok { - return nil, fmt.Errorf("QueryTxsByEvents must be passed a cosmos.CosmosChain") - } - - cmd := []string{"txs"} - - chainVersion := chain.Config().Images[0].Version - if testvalues.TransactionEventQueryFeatureReleases.IsSupported(chainVersion) { - cmd = append(cmd, "--query", queryReq) - } else { - cmd = append(cmd, "--events", queryReq) - } - - if orderBy != "" { - cmd = append(cmd, "--order_by", orderBy) - } - if page != 0 { - cmd = append(cmd, "--"+flags.FlagPage, strconv.Itoa(page)) - } - if limit != 0 { - cmd = append(cmd, "--"+flags.FlagLimit, strconv.Itoa(limit)) - } - - stdout, _, err := cosmosChain.GetNode().ExecQuery(ctx, cmd...) - if err != nil { - return nil, err - } - - result := &sdk.SearchTxsResult{} - err = Codec().UnmarshalJSON(stdout, result) - if err != nil { - return nil, err - } - - return result, nil -} - -// ExtractValueFromEvents extracts the value of an attribute from a list of events. -// If the attribute is not found, the function returns an empty string and false. -// If the attribute is found, the function returns the value and true. -func (*E2ETestSuite) ExtractValueFromEvents(events []abci.Event, eventType, attrKey string) (string, bool) { - for _, event := range events { - if event.Type != eventType { - continue - } - - for _, attr := range event.Attributes { - if attr.Key != attrKey { - continue - } - - return attr.Value, true - } - } - - return "", false -} diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go deleted file mode 100644 index aab8bbacb5d..00000000000 --- a/e2e/testvalues/values.go +++ /dev/null @@ -1,142 +0,0 @@ -package testvalues - -import ( - "fmt" - "time" - - "github.com/strangelove-ventures/interchaintest/v8/ibc" - - sdkmath "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/ibc-go/e2e/semverutil" - feetypes "github.com/cosmos/ibc-go/v9/modules/apps/29-fee/types" -) - -const ( - StartingTokenAmount int64 = 500_000_000_000 - IBCTransferAmount int64 = 10_000 - InvalidAddress string = "" - DefaultGovV1ProposalTokenAmount = 500_000_000 -) - -// VotingPeriod may differ per test. -var VotingPeriod = time.Second * 30 - -// ImmediatelyTimeout returns an ibc.IBCTimeout which will cause an IBC transfer to timeout immediately. -func ImmediatelyTimeout() *ibc.IBCTimeout { - return &ibc.IBCTimeout{ - NanoSeconds: 1, - } -} - -func DefaultFee(denom string) feetypes.Fee { - return feetypes.Fee{ - RecvFee: sdk.NewCoins(sdk.NewCoin(denom, sdkmath.NewInt(50))), - AckFee: sdk.NewCoins(sdk.NewCoin(denom, sdkmath.NewInt(25))), - TimeoutFee: sdk.NewCoins(sdk.NewCoin(denom, sdkmath.NewInt(10))), - } -} - -func DefaultTransferAmount(denom string) sdk.Coin { - return sdk.Coin{Denom: denom, Amount: sdkmath.NewInt(IBCTransferAmount)} -} - -func DefaultTransferCoins(denom string) sdk.Coins { - return sdk.NewCoins(DefaultTransferAmount(denom)) -} - -func TransferAmount(amount int64, denom string) sdk.Coin { - return sdk.Coin{Denom: denom, Amount: sdkmath.NewInt(amount)} -} - -func TendermintClientID(id int) string { - return fmt.Sprintf("07-tendermint-%d", id) -} - -func SolomachineClientID(id int) string { - return fmt.Sprintf("06-solomachine-%d", id) -} - -// FeeMiddlewareFeatureReleases represents the releases the support for fee middleware was released in. -var FeeMiddlewareFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v4", -} - -// TokenMetadataFeatureReleases represents the releases the token metadata was released in. -var TokenMetadataFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - -// GovGenesisFeatureReleases represents the releases the governance module genesis -// was upgraded from v1beta1 to v1. -var GovGenesisFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v7", -} - -// SelfParamsFeatureReleases represents the releases the transfer module started managing its own params. -var SelfParamsFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - -// TotalEscrowFeatureReleases represents the releases the total escrow state entry was released in. -var TotalEscrowFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", - MinorVersions: []string{ - "v7.1", - }, -} - -// IbcErrorsFeatureReleases represents the releases the IBC module level errors was released in. -var IbcErrorsFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - -// LocalhostClientFeatureReleases represents the releases the localhost client was released in. -var LocalhostClientFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", - MinorVersions: []string{ - "v7.1", - }, -} - -// AllowAllClientsWildcardFeatureReleases represents the releases the allow all clients wildcard was released in. -var AllowAllClientsWildcardFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v9", - MinorVersions: []string{ - "v8.1", - }, -} - -// ChannelParamsFeatureReleases represents the releases the params for 04-channel was released in. -var ChannelParamsFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v9", - MinorVersions: []string{ - "v8.1", - }, -} - -// GovV1MessagesFeatureReleases represents the releases the support for x/gov v1 messages was released in. -var GovV1MessagesFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - -// CapitalEfficientFeeEscrowFeatureReleases represents the releases the support for capital efficient fee escrow was released in. -var CapitalEfficientFeeEscrowFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v9", - MinorVersions: []string{ - "v8.1", - }, -} - -// TransactionEventQueryFeatureReleases represents the releases the support for --query flag -// in "query txs" for searching transactions that match exact events (since Cosmos SDK v0.50) was released in. -var TransactionEventQueryFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - -// ICS20v2FeatureReleases represents the releases the support for ICS20 v2 was released in. -var ICS20v2FeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v9", -}