diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index efd4630d9..759d75461 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -14,10 +14,10 @@ jobs: runs-on: [self-hosted, linux] steps: # Install and setup go - - name: Set up Go 1.19 + - name: Set up Go 1.21 uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.21' - name: checkout interchaintest uses: actions/checkout@v3 @@ -35,10 +35,10 @@ jobs: runs-on: [self-hosted, linux] steps: # Install and setup go - - name: Set up Go 1.19 + - name: Set up Go 1.21 uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.21' cache: false - name: checkout interchaintest @@ -57,10 +57,10 @@ jobs: runs-on: [self-hosted, linux] steps: # Install and setup go - - name: Set up Go 1.19 + - name: Set up Go 1.21 uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.21' cache: false - name: checkout interchaintest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e703eaa3f..9014a18dd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,10 +7,14 @@ jobs: name: lint runs-on: ubuntu-latest steps: + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: latest + version: v1.54 only-new-issues: true args: --timeout=5m diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2339c8601..ac405b781 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,10 +14,10 @@ jobs: runs-on: [self-hosted, linux] steps: # Install and setup go - - name: Set up Go 1.19 + - name: Set up Go 1.21 uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.21' - name: checkout interchaintest uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 6c9a6c720..586e7e4c6 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: ## Print this help message .PHONY: interchaintest interchaintest: gen ## Build interchaintest binary into ./bin - go test -ldflags "-X github.com/strangelove-ventures/interchaintest/v7/internal/version.GitSha=$(shell git describe --always --dirty)" -c -o ./bin/interchaintest ./cmd/interchaintest + go test -ldflags "-X github.com/strangelove-ventures/interchaintest/v8/internal/version.GitSha=$(shell git describe --always --dirty)" -c -o ./bin/interchaintest ./cmd/interchaintest .PHONY: test test: ## Run unit tests diff --git a/chain/cosmos/08-wasm-types/client_state.go b/chain/cosmos/08-wasm-types/client_state.go index eb0a8417f..b186cb0d5 100644 --- a/chain/cosmos/08-wasm-types/client_state.go +++ b/chain/cosmos/08-wasm-types/client_state.go @@ -1,6 +1,7 @@ package types import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -21,11 +22,11 @@ func (c ClientState) Validate() error { return nil } -func (c ClientState) Status(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec) exported.Status { +func (c ClientState) Status(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCodec) exported.Status { return exported.Active } -func (c ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { +func (c ClientState) ExportMetadata(store storetypes.KVStore) []exported.GenesisMetadata { return []exported.GenesisMetadata{} } @@ -35,20 +36,20 @@ func (c ClientState) ZeroCustomFields() exported.ClientState { func (c ClientState) GetTimestampAtHeight( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, ) (uint64, error) { return 0, nil } -func (c ClientState) Initialize(context sdk.Context, marshaler codec.BinaryCodec, store sdk.KVStore, state exported.ConsensusState) error { +func (c ClientState) Initialize(context sdk.Context, marshaler codec.BinaryCodec, store storetypes.KVStore, state exported.ConsensusState) error { return nil } func (c ClientState) VerifyMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, @@ -62,7 +63,7 @@ func (c ClientState) VerifyMembership( func (c ClientState) VerifyNonMembership( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, delayTimePeriod uint64, @@ -77,26 +78,26 @@ func (c ClientState) VerifyNonMembership( // It must handle each type of ClientMessage appropriately. Calls to CheckForMisbehaviour, UpdateState, and UpdateStateOnMisbehaviour // will assume that the content of the ClientMessage has been verified and can be trusted. An error should be returned // if the ClientMessage fails to verify. -func (c ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) error { +func (c ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) error { return nil } -func (c ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, msg exported.ClientMessage) bool { +func (c ClientState) CheckForMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, msg exported.ClientMessage) bool { return true } // UpdateStateOnMisbehaviour should perform appropriate state changes on a client state given that misbehaviour has been detected and verified -func (c ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) { +func (c ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) { } -func (c ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) []exported.Height { +func (c ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, clientMsg exported.ClientMessage) []exported.Height { return []exported.Height{c.LatestHeight} } func (c ClientState) CheckSubstituteAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore, - substituteClientStore sdk.KVStore, substituteClient exported.ClientState, + substituteClientStore storetypes.KVStore, substituteClient exported.ClientState, ) error { return nil } @@ -104,7 +105,7 @@ func (c ClientState) CheckSubstituteAndUpdateState( func (c ClientState) VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, newClient exported.ClientState, newConsState exported.ConsensusState, proofUpgradeClient, diff --git a/chain/cosmos/broadcaster.go b/chain/cosmos/broadcaster.go index fc378dd65..cc3eb9383 100644 --- a/chain/cosmos/broadcaster.go +++ b/chain/cosmos/broadcaster.go @@ -16,8 +16,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" authTx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" ) type ClientContextOpt func(clientContext client.Context) client.Context diff --git a/chain/cosmos/chain_node.go b/chain/cosmos/chain_node.go index ae2841cf4..623f37c77 100644 --- a/chain/cosmos/chain_node.go +++ b/chain/cosmos/chain_node.go @@ -35,10 +35,10 @@ import ( "go.uber.org/zap" "golang.org/x/sync/errgroup" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" ) // ChainNode represents a node in the test network that is being created @@ -417,12 +417,12 @@ func (tn *ChainNode) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, } txs = append(txs, newTx) } - if len(blockRes.BeginBlockEvents) > 0 { - beginBlockTx := blockdb.Tx{ - Data: []byte(`{"data":"begin_block","note":"this is a transaction artificially created for debugging purposes"}`), + if len(blockRes.FinalizeBlockEvents) > 0 { + finalizeBlockTx := blockdb.Tx{ + Data: []byte(`{"data":"finalize_block","note":"this is a transaction artificially created for debugging purposes"}`), } - beginBlockTx.Events = make([]blockdb.Event, len(blockRes.BeginBlockEvents)) - for i, e := range blockRes.BeginBlockEvents { + finalizeBlockTx.Events = make([]blockdb.Event, len(blockRes.FinalizeBlockEvents)) + for i, e := range blockRes.FinalizeBlockEvents { attrs := make([]blockdb.EventAttribute, len(e.Attributes)) for j, attr := range e.Attributes { attrs[j] = blockdb.EventAttribute{ @@ -430,34 +430,13 @@ func (tn *ChainNode) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, Value: string(attr.Value), } } - beginBlockTx.Events[i] = blockdb.Event{ + finalizeBlockTx.Events[i] = blockdb.Event{ Type: e.Type, Attributes: attrs, } } - txs = append(txs, beginBlockTx) + txs = append(txs, finalizeBlockTx) } - if len(blockRes.EndBlockEvents) > 0 { - endBlockTx := blockdb.Tx{ - Data: []byte(`{"data":"end_block","note":"this is a transaction artificially created for debugging purposes"}`), - } - endBlockTx.Events = make([]blockdb.Event, len(blockRes.EndBlockEvents)) - for i, e := range blockRes.EndBlockEvents { - attrs := make([]blockdb.EventAttribute, len(e.Attributes)) - for j, attr := range e.Attributes { - attrs[j] = blockdb.EventAttribute{ - Key: string(attr.Key), - Value: string(attr.Value), - } - } - endBlockTx.Events[i] = blockdb.Event{ - Type: e.Type, - Attributes: attrs, - } - } - txs = append(txs, endBlockTx) - } - return txs, nil } diff --git a/chain/cosmos/codec.go b/chain/cosmos/codec.go index e5887cf62..6af50ecf0 100644 --- a/chain/cosmos/codec.go +++ b/chain/cosmos/codec.go @@ -1,6 +1,7 @@ package cosmos import ( + "cosmossdk.io/x/upgrade" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,14 +20,12 @@ import ( paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/staking" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" "github.com/cosmos/ibc-go/modules/capability" transfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" ibccore "github.com/cosmos/ibc-go/v7/modules/core" ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - ibcwasm "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/08-wasm-types" + ibcwasm "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos/08-wasm-types" ) func DefaultEncoding() testutil.TestEncodingConfig { @@ -41,8 +40,6 @@ func DefaultEncoding() testutil.TestEncodingConfig { gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, }, ), params.AppModuleBasic{}, diff --git a/chain/cosmos/cosmos_chain.go b/chain/cosmos/cosmos_chain.go index 642e93296..71c4ec9dd 100644 --- a/chain/cosmos/cosmos_chain.go +++ b/chain/cosmos/cosmos_chain.go @@ -14,6 +14,7 @@ import ( "sync" "cosmossdk.io/math" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -29,12 +30,12 @@ import ( dockertypes "github.com/docker/docker/api/types" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" - wasmtypes "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/08-wasm-types" - "github.com/strangelove-ventures/interchaintest/v7/chain/internal/tendermint" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + wasmtypes "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos/08-wasm-types" + "github.com/strangelove-ventures/interchaintest/v8/chain/internal/tendermint" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "go.uber.org/zap" "golang.org/x/sync/errgroup" "google.golang.org/grpc" @@ -822,12 +823,12 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene chainCfg := c.Config() genesisAmount := types.Coin{ - Amount: types.NewInt(10_000_000_000_000), + Amount: sdkmath.NewInt(10_000_000_000_000), Denom: chainCfg.Denom, } genesisSelfDelegation := types.Coin{ - Amount: types.NewInt(5_000_000_000_000), + Amount: sdkmath.NewInt(5_000_000_000_000), Denom: chainCfg.Denom, } @@ -936,6 +937,7 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene } for _, wallet := range additionalGenesisWallets { + if err := validator0.AddGenesisAccount(ctx, wallet.Address, []types.Coin{{Denom: wallet.Denom, Amount: wallet.Amount}}); err != nil { return err } diff --git a/chain/cosmos/genesis.go b/chain/cosmos/genesis.go index 75e13dcdb..afe765e9e 100644 --- a/chain/cosmos/genesis.go +++ b/chain/cosmos/genesis.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/icza/dyno" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) type GenesisKV struct { diff --git a/chain/cosmos/node_test.go b/chain/cosmos/node_test.go index d4b4a9b54..e3223dbaf 100644 --- a/chain/cosmos/node_test.go +++ b/chain/cosmos/node_test.go @@ -5,7 +5,7 @@ import ( "testing" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/stretchr/testify/require" ) diff --git a/chain/cosmos/osmosis.go b/chain/cosmos/osmosis.go index 330460af2..4b6546ccc 100644 --- a/chain/cosmos/osmosis.go +++ b/chain/cosmos/osmosis.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" ) // OsmosisPoolParams defines parameters for creating an osmosis gamm liquidity pool diff --git a/chain/cosmos/poll.go b/chain/cosmos/poll.go index a2caa59e7..2f76cf846 100644 --- a/chain/cosmos/poll.go +++ b/chain/cosmos/poll.go @@ -6,8 +6,8 @@ import ( "fmt" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/testutil" ) // PollForProposalStatus attempts to find a proposal with matching ID and status. diff --git a/chain/cosmos/sidecar.go b/chain/cosmos/sidecar.go index c0d044596..3c2059bef 100644 --- a/chain/cosmos/sidecar.go +++ b/chain/cosmos/sidecar.go @@ -9,8 +9,8 @@ import ( "github.com/docker/go-connections/nat" "go.uber.org/zap" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" ) type SidecarProcesses []*SidecarProcess diff --git a/chain/cosmos/wallet.go b/chain/cosmos/wallet.go index d6caf15c8..2ee27bc08 100644 --- a/chain/cosmos/wallet.go +++ b/chain/cosmos/wallet.go @@ -2,7 +2,7 @@ package cosmos import ( "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) var _ ibc.Wallet = &CosmosWallet{} diff --git a/chain/cosmos/wasm/wasm.go b/chain/cosmos/wasm/wasm.go deleted file mode 100644 index 94ed88544..000000000 --- a/chain/cosmos/wasm/wasm.go +++ /dev/null @@ -1,17 +0,0 @@ -package wasm - -import ( - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/cosmos/cosmos-sdk/types/module/testutil" - - // simappparams "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" -) - -func WasmEncoding() *testutil.TestEncodingConfig { - cfg := cosmos.DefaultEncoding() - - wasmtypes.RegisterInterfaces(cfg.InterfaceRegistry) - - return &cfg -} diff --git a/chain/internal/tendermint/tendermint_node.go b/chain/internal/tendermint/tendermint_node.go index fe42b4f7f..0fdae6f9f 100644 --- a/chain/internal/tendermint/tendermint_node.go +++ b/chain/internal/tendermint/tendermint_node.go @@ -17,9 +17,9 @@ import ( dockerclient "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/hashicorp/go-version" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "go.uber.org/zap" ) diff --git a/chain/penumbra/penumbra_app_node.go b/chain/penumbra/penumbra_app_node.go index 5f0d5b9e9..636422f75 100644 --- a/chain/penumbra/penumbra_app_node.go +++ b/chain/penumbra/penumbra_app_node.go @@ -10,8 +10,8 @@ import ( "github.com/docker/docker/client" "github.com/docker/go-connections/nat" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" "go.uber.org/zap" ) diff --git a/chain/penumbra/penumbra_chain.go b/chain/penumbra/penumbra_chain.go index 9939340e3..0a7fd4ada 100644 --- a/chain/penumbra/penumbra_chain.go +++ b/chain/penumbra/penumbra_chain.go @@ -20,10 +20,10 @@ import ( volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" dockerclient "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/chain/internal/tendermint" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/chain/internal/tendermint" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "go.uber.org/zap" "golang.org/x/sync/errgroup" ) diff --git a/chain/penumbra/wallet.go b/chain/penumbra/wallet.go index 4823ed388..fccce97ad 100644 --- a/chain/penumbra/wallet.go +++ b/chain/penumbra/wallet.go @@ -2,7 +2,7 @@ package penumbra import ( "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) var _ ibc.Wallet = &PenumbraWallet{} diff --git a/chain/polkadot/keys.go b/chain/polkadot/keys.go deleted file mode 100644 index 18489ff4c..000000000 --- a/chain/polkadot/keys.go +++ /dev/null @@ -1,106 +0,0 @@ -package polkadot - -import ( - "crypto/ed25519" - "encoding/hex" - "fmt" - - "github.com/decred/dcrd/dcrec/secp256k1/v2" - - schnorrkel "github.com/ChainSafe/go-schnorrkel/1" - "github.com/StirlingMarketingGroup/go-namecase" - p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" - "golang.org/x/crypto/blake2b" -) - -const ( - ss58Ed25519Prefix = "Ed25519HDKD" - ss58Secp256k1Prefix = "Secp256k1HDKD" -) - -var DEV_SEED, _ = hex.DecodeString("fac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e") - -func DeriveEd25519FromName(name string) (*p2pCrypto.Ed25519PrivateKey, error) { - chainCode := make([]byte, 32) - derivePath := []byte{byte(len(name) << 2)} - derivePath = append(derivePath, []byte(namecase.New().NameCase(name))...) - _ = copy(chainCode, []byte(derivePath)) - - hasher, err := blake2b.New256(nil) - if err != nil { - return nil, fmt.Errorf("error constructing hasher: %w", err) - } - - toHash := []byte{byte(len(ss58Ed25519Prefix) << 2)} - toHash = append(toHash, []byte(ss58Ed25519Prefix)...) - toHash = append(toHash, DEV_SEED...) - toHash = append(toHash, chainCode...) - - if _, err := hasher.Write(toHash); err != nil { - return nil, fmt.Errorf("error writing data to hasher: %w", err) - } - - newKey := hasher.Sum(nil) - - if err != nil { - return nil, fmt.Errorf("error deriving: %w", err) - } - privKey := ed25519.NewKeyFromSeed(newKey) - pubKey := privKey.Public().(ed25519.PublicKey) - key := []byte{} - key = append(key, privKey.Seed()...) - key = append(key, pubKey...) - - priv, err := p2pCrypto.UnmarshalEd25519PrivateKey(key) - if err != nil { - return nil, fmt.Errorf("error unmarshaling: %w", err) - } - return priv.(*p2pCrypto.Ed25519PrivateKey), nil -} - -func DeriveSr25519FromName(path []string) (*schnorrkel.MiniSecretKey, error) { - var miniSecretSeed [32]byte - _ = copy(miniSecretSeed[:], DEV_SEED[:32]) - miniSecret, err := schnorrkel.NewMiniSecretKeyFromRaw(miniSecretSeed) - if err != nil { - return nil, fmt.Errorf("error getting mini secret from seed: %w", err) - } - for _, pathItem := range path { - var chainCode [32]byte - derivePath := []byte{byte(len(pathItem) << 2)} - derivePath = append(derivePath, []byte(pathItem)...) - _ = copy(chainCode[:], []byte(derivePath)) - miniSecret, _, err = miniSecret.HardDeriveMiniSecretKey([]byte{}, chainCode) - if err != nil { - return nil, fmt.Errorf("error hard deriving mini secret key") - } - } - - return miniSecret, nil -} - -func DeriveSecp256k1FromName(name string) (*secp256k1.PrivateKey, error) { - chainCode := make([]byte, 32) - derivePath := []byte{byte(len(name) << 2)} - derivePath = append(derivePath, []byte(namecase.New().NameCase(name))...) - _ = copy(chainCode, []byte(derivePath)) - - hasher, err := blake2b.New256(nil) - if err != nil { - return nil, fmt.Errorf("error constructing hasher: %w", err) - } - - toHash := []byte{byte(len(ss58Secp256k1Prefix) << 2)} - toHash = append(toHash, []byte(ss58Secp256k1Prefix)...) - toHash = append(toHash, DEV_SEED...) - toHash = append(toHash, chainCode...) - - if _, err := hasher.Write(toHash); err != nil { - return nil, fmt.Errorf("error writing data to hasher: %w", err) - } - - newKey := hasher.Sum(nil) - privKey, _ := secp256k1.PrivKeyFromBytes(newKey) - - return privKey, nil -} diff --git a/chain/polkadot/keys_test.go b/chain/polkadot/keys_test.go deleted file mode 100644 index f43b043b3..000000000 --- a/chain/polkadot/keys_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package polkadot_test - -import ( - "crypto/ed25519" - "encoding/hex" - "testing" - - p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" - "github.com/libp2p/go-libp2p/core/peer" - "github.com/misko9/go-substrate-rpc-client/v4/signature" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/stretchr/testify/require" -) - -func TestNodeKeyPeerID(t *testing.T) { - nodeKey, err := hex.DecodeString("1b57e31ddf03e39c58207dfcb5445958924b818c08c303a91838e68cfac551b2") - require.NoError(t, err, "error decoding node key from hex string") - - privKeyEd25519 := ed25519.NewKeyFromSeed(nodeKey) - privKey, _, err := p2pCrypto.KeyPairFromStdKey(&privKeyEd25519) - require.NoError(t, err, "error getting private key") - - id, err := peer.IDFromPrivateKey(privKey) - require.NoError(t, err, "error getting peer id from private key") - peerId := id.String() - require.Equal(t, "12D3KooWCqDbuUHRNWPAuHpVnzZGCkkMwgEx7Xd6xgszqtVpH56c", peerId) -} - -func Test_DeriveEd25519FromName(t *testing.T) { - privKey, err := polkadot.DeriveEd25519FromName("Alice") - require.NoError(t, err, "error deriving ed25519 private key") - - pubKey, err := privKey.GetPublic().Raw() - require.NoError(t, err, "error fetching pubkey bytes") - - pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKey) - require.NoError(t, err, "error encoding ed25519 public key to ss58") - - require.Equal(t, "5wfmbM1KN4DCJeTP6jj9TqCAKKNApYNCG4zhwcweWhXZRo1j", pubKeyEncoded) -} - -func Test_DeriveSr25519FromNameAccount(t *testing.T) { - privKeyAccount, err := polkadot.DeriveSr25519FromName([]string{"Alice"}) - require.NoError(t, err, "error deriving account sr25519 private key") - - b := privKeyAccount.Public().Encode() - pubKeyAccount := b[:] - - pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKeyAccount) - require.NoError(t, err, "error encoding account public key to ss58") - - kp, err := signature.KeyringPairFromSecret("//Alice", polkadot.Ss58Format) - require.NoError(t, err, "error signature KeyringPairFromSecret") - - pubKeyDecoded, err := polkadot.DecodeAddressSS58(pubKeyEncoded) - require.NoError(t, err, "error decoding SS58 address to pub key") - - require.Equal(t, pubKeyDecoded, kp.PublicKey) -} - -func Test_DeriveSr25519FromNameStash(t *testing.T) { - privKeyStash, err := polkadot.DeriveSr25519FromName([]string{"Alice", "stash"}) - require.NoError(t, err, "error deriving stash sr25519 private key") - - pubKeyStash := make([]byte, 32) - for i, mkByte := range privKeyStash.Public().Encode() { - pubKeyStash[i] = mkByte - } - pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKeyStash) - require.NoError(t, err, "error encoding stash public key to ss58") - - kp, err := signature.KeyringPairFromSecret("//Alice//stash", polkadot.Ss58Format) - require.NoError(t, err, "error signature KeyringPairFromSecret") - - require.Equal(t, kp.Address, pubKeyEncoded) -} - -func Test_DeriveSecp256k1FromName(t *testing.T) { - privKey, err := polkadot.DeriveSecp256k1FromName("Alice") - require.NoError(t, err, "error deriving secp256k1 private key") - - pubKey := []byte{} - y := privKey.PublicKey.Y.Bytes() - if y[len(y)-1]%2 == 0 { - pubKey = append(pubKey, 0x02) - } else { - pubKey = append(pubKey, 0x03) - } - pubKey = append(pubKey, privKey.PublicKey.X.Bytes()...) - - pubKeyEncoded, err := polkadot.EncodeAddressSS58(pubKey) - require.NoError(t, err, "error encoding secp256k1 public key to ss58") - - require.Equal(t, "NaqsuM2ZDssHFdr7HU8znFsHKpgkCyrCW6aPiLpLTa8Vxi3Q9", pubKeyEncoded) -} diff --git a/chain/polkadot/parachain_node.go b/chain/polkadot/parachain_node.go deleted file mode 100644 index bc8f9c387..000000000 --- a/chain/polkadot/parachain_node.go +++ /dev/null @@ -1,396 +0,0 @@ -package polkadot - -import ( - "context" - "encoding/hex" - "encoding/json" - "fmt" - "path/filepath" - "strings" - - "cosmossdk.io/math" - "github.com/avast/retry-go/v4" - sdktypes "github.com/cosmos/cosmos-sdk/types" - "github.com/docker/docker/client" - "github.com/icza/dyno" - p2pcrypto "github.com/libp2p/go-libp2p/core/crypto" - "github.com/libp2p/go-libp2p/core/peer" - gsrpc "github.com/misko9/go-substrate-rpc-client/v4" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "go.uber.org/zap" -) - -// Increase parachain wallet amount due to their additional precision -const parachainScaling = int64(1_000) - -// ParachainNode defines the properties required for running a polkadot parachain node. -type ParachainNode struct { - log *zap.Logger - TestName string - Index int - - NetworkID string - containerLifecycle *dockerutil.ContainerLifecycle - VolumeName string - DockerClient *client.Client - Image ibc.DockerImage - - Chain ibc.Chain - Bin string - NodeKey p2pcrypto.PrivKey - ChainID string - Flags []string - RelayChainFlags []string - - api *gsrpc.SubstrateAPI - hostWsPort string - hostRpcPort string -} - -type ParachainNodes []*ParachainNode - -// Name returns the name of the test node container. -func (pn *ParachainNode) Name() string { - return fmt.Sprintf("%s-%d-%s-%s", pn.Bin, pn.Index, pn.ChainID, dockerutil.SanitizeContainerName(pn.TestName)) -} - -// HostName returns the docker hostname of the test container. -func (pn *ParachainNode) HostName() string { - return dockerutil.CondenseHostName(pn.Name()) -} - -// Bind returns the home folder bind point for running the node. -func (pn *ParachainNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", pn.VolumeName, pn.NodeHome())} -} - -// NodeHome returns the working directory within the docker image, -// the path where the docker volume is mounted. -func (pn *ParachainNode) NodeHome() string { - return "/home/heighliner" -} - -// ParachainChainSpecFileName returns the relative path to the chain spec file -// within the parachain container. -func (pn *ParachainNode) ParachainChainSpecFileName() string { - return fmt.Sprintf("%s.json", pn.ChainID) -} - -// ParachainChainSpecFilePathFull returns the full path to the chain spec file -// within the parachain container -func (pn *ParachainNode) ParachainChainSpecFilePathFull() string { - return filepath.Join(pn.NodeHome(), pn.ParachainChainSpecFileName()) -} - -// RawRelayChainSpecFilePathFull returns the full path to the raw relay chain spec file -// within the container. -func (pn *ParachainNode) RawRelayChainSpecFilePathFull() string { - return filepath.Join(pn.NodeHome(), fmt.Sprintf("%s-raw.json", pn.Chain.Config().ChainID)) -} - -// RawRelayChainSpecFilePathRelative returns the relative path to the raw relay chain spec file -// within the container. -func (pn *ParachainNode) RawRelayChainSpecFilePathRelative() string { - return fmt.Sprintf("%s-raw.json", pn.Chain.Config().ChainID) -} - -// PeerID returns the public key of the node key for p2p. -func (pn *ParachainNode) PeerID() (string, error) { - id, err := peer.IDFromPrivateKey(pn.NodeKey) - if err != nil { - return "", err - } - return id.String(), nil -} - -// MultiAddress returns the p2p multiaddr of the node. -func (pn *ParachainNode) MultiAddress() (string, error) { - peerId, err := pn.PeerID() - if err != nil { - return "", err - } - return fmt.Sprintf("/dns4/%s/tcp/%s/p2p/%s", pn.HostName(), strings.Split(nodePort, "/")[0], peerId), nil -} - -type GetParachainIDResponse struct { - ParachainID int `json:"para_id"` -} - -// GenerateDefaultChainSpec runs build-spec to get the default chain spec into something malleable -func (pn *ParachainNode) GenerateDefaultChainSpec(ctx context.Context) ([]byte, error) { - cmd := []string{ - pn.Bin, - "build-spec", - fmt.Sprintf("--chain=%s", pn.ChainID), - } - res := pn.Exec(ctx, cmd, nil) - if res.Err != nil { - return nil, res.Err - } - return res.Stdout, nil -} - -// GenerateParachainGenesisFile creates the default chain spec, modifies it and returns it. -// The modified chain spec is then written to each Parachain node -func (pn *ParachainNode) GenerateParachainGenesisFile(ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) ([]byte, error) { - defaultChainSpec, err := pn.GenerateDefaultChainSpec(ctx) - if err != nil { - return nil, fmt.Errorf("error generating default parachain chain spec: %w", err) - } - - var chainSpec interface{} - err = json.Unmarshal(defaultChainSpec, &chainSpec) - if err != nil { - return nil, fmt.Errorf("error unmarshaling parachain chain spec: %w", err) - } - - balances, err := dyno.GetSlice(chainSpec, "genesis", "runtime", "balances", "balances") - if err != nil { - return nil, fmt.Errorf("error getting balances from parachain chain spec: %w", err) - } - - for _, wallet := range additionalGenesisWallets { - balances = append(balances, - []interface{}{wallet.Address, wallet.Amount.MulRaw(parachainScaling)}, - ) - } - if err := dyno.Set(chainSpec, balances, "genesis", "runtime", "balances", "balances"); err != nil { - return nil, fmt.Errorf("error setting parachain balances: %w", err) - } - editedChainSpec, err := json.MarshalIndent(chainSpec, "", " ") - if err != nil { - return nil, fmt.Errorf("error marshaling modified parachain chain spec: %w", err) - } - - return editedChainSpec, nil -} - -// ParachainID retrieves the node parachain ID. -func (pn *ParachainNode) ParachainID(ctx context.Context) (int, error) { - cmd := []string{ - pn.Bin, - "build-spec", - fmt.Sprintf("--chain=%s", pn.ChainID), - } - res := pn.Exec(ctx, cmd, nil) - if res.Err != nil { - return -1, res.Err - } - out := GetParachainIDResponse{} - if err := json.Unmarshal([]byte(res.Stdout), &out); err != nil { - return -1, err - } - return out.ParachainID, nil -} - -// ExportGenesisWasm exports the genesis wasm json for the configured chain ID. -func (pn *ParachainNode) ExportGenesisWasm(ctx context.Context) (string, error) { - cmd := []string{ - pn.Bin, - "export-genesis-wasm", - fmt.Sprintf("--chain=%s", pn.ParachainChainSpecFilePathFull()), - } - res := pn.Exec(ctx, cmd, nil) - if res.Err != nil { - return "", res.Err - } - return string(res.Stdout), nil -} - -// ExportGenesisState exports the genesis state json for the configured chain ID. -func (pn *ParachainNode) ExportGenesisState(ctx context.Context) (string, error) { - cmd := []string{ - pn.Bin, - "export-genesis-state", - fmt.Sprintf("--chain=%s", pn.ParachainChainSpecFilePathFull()), - } - res := pn.Exec(ctx, cmd, nil) - if res.Err != nil { - return "", res.Err - } - return string(res.Stdout), nil -} - -func (pn *ParachainNode) logger() *zap.Logger { - return pn.log.With( - zap.String("chain_id", pn.ChainID), - zap.String("test", pn.TestName), - ) -} - -// CreateNodeContainer assembles a parachain node docker container ready to launch. -func (pn *ParachainNode) CreateNodeContainer(ctx context.Context) error { - nodeKey, err := pn.NodeKey.Raw() - if err != nil { - return fmt.Errorf("error getting ed25519 node key: %w", err) - } - multiAddress, err := pn.MultiAddress() - if err != nil { - return err - } - cmd := []string{ - pn.Bin, - fmt.Sprintf("--ws-port=%s", strings.Split(wsPort, "/")[0]), - "--collator", - fmt.Sprintf("--node-key=%s", hex.EncodeToString(nodeKey[0:32])), - fmt.Sprintf("--%s", IndexedName[pn.Index]), - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--prometheus-external", - "--rpc-cors=all", - "--ws-external", - "--rpc-external", - "--rpc-methods=unsafe", - "--log=ibc_transfer=trace,pallet_ibc=trace,grandpa-verifier=trace,runtime=trace", - "--force-authoring", - "--enable-offchain-indexing=true", - "--pruning=archive", - fmt.Sprintf("--prometheus-port=%s", strings.Split(prometheusPort, "/")[0]), - fmt.Sprintf("--listen-addr=/ip4/0.0.0.0/tcp/%s", strings.Split(nodePort, "/")[0]), - fmt.Sprintf("--public-addr=%s", multiAddress), - "--base-path", pn.NodeHome(), - fmt.Sprintf("--chain=%s", pn.ParachainChainSpecFilePathFull()), - } - cmd = append(cmd, pn.Flags...) - cmd = append(cmd, "--", fmt.Sprintf("--chain=%s", pn.RawRelayChainSpecFilePathFull())) - cmd = append(cmd, pn.RelayChainFlags...) - - return pn.containerLifecycle.CreateContainer(ctx, pn.TestName, pn.NetworkID, pn.Image, exposedPorts, pn.Bind(), pn.HostName(), cmd) -} - -// StopContainer stops the relay chain node container, waiting at most 30 seconds. -func (pn *ParachainNode) StopContainer(ctx context.Context) error { - return pn.containerLifecycle.StopContainer(ctx) -} - -// StartContainer starts the container after it is built by CreateNodeContainer. -func (pn *ParachainNode) StartContainer(ctx context.Context) error { - if err := pn.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := pn.containerLifecycle.GetHostPorts(ctx, wsPort, rpcPort) - if err != nil { - return err - } - - // Set the host ports once since they will not change after the container has started. - pn.hostWsPort, pn.hostRpcPort = hostPorts[0], hostPorts[1] - - explorerUrl := fmt.Sprintf("\033[4;34mhttps://polkadot.js.org/apps?rpc=ws://%s#/explorer\033[0m", - strings.Replace(pn.hostWsPort, "localhost", "127.0.0.1", 1)) - pn.log.Info(explorerUrl, zap.String("container", pn.Name())) - var api *gsrpc.SubstrateAPI - if err = retry.Do(func() error { - var err error - api, err = gsrpc.NewSubstrateAPI("ws://" + pn.hostWsPort) - return err - }, retry.Context(ctx), RtyAtt, RtyDel, RtyErr); err != nil { - return err - } - - pn.api = api - return nil -} - -// Exec run a container for a specific job and block until the container exits. -func (pn *ParachainNode) Exec(ctx context.Context, cmd []string, env []string) dockerutil.ContainerExecResult { - job := dockerutil.NewImage(pn.log, pn.DockerClient, pn.NetworkID, pn.TestName, pn.Image.Repository, pn.Image.Version) - opts := dockerutil.ContainerOptions{ - Binds: pn.Bind(), - Env: env, - User: pn.Image.UidGid, - } - return job.Run(ctx, cmd, opts) -} - -func (pn *ParachainNode) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { - return GetBalance(pn.api, address) -} - -// GetIbcBalance returns the Coins type of ibc coins in account -func (pn *ParachainNode) GetIbcBalance(ctx context.Context, address string, denom uint64) (sdktypes.Coin, error) { - res, err := pn.api.RPC.IBC.QueryBalanceWithAddress(ctx, address, denom) - if err != nil { - return sdktypes.Coin{}, err - } - return res, nil -} - -// SendFunds sends funds to a wallet from a user account. -// Implements Chain interface. -func (pn *ParachainNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - kp, err := pn.Chain.(*PolkadotChain).GetKeyringPair(keyName) - if err != nil { - return err - } - pn.log.Info( - "ParachainNode SendFunds", - zap.String("From", kp.Address), - zap.String("To", amount.Address), - zap.String("Amount", amount.Amount.String()), - ) - hash, err := SendFundsTx(pn.api, kp, amount) - if err != nil { - return err - } - - pn.log.Info("Transfer sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) - return nil -} - -// SendIbcFunds sends funds to a wallet from a user account. -func (pn *ParachainNode) SendIbcFunds( - ctx context.Context, - channelID string, - keyName string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) error { - kp, err := pn.Chain.(*PolkadotChain).GetKeyringPair(keyName) - if err != nil { - return err - } - - pn.log.Info( - "ParachainNode SendIbcFunds", - zap.String("From", kp.Address), - zap.String("To", amount.Address), - zap.String("Amount", amount.Amount.String()), - ) - hash, err := SendIbcFundsTx(pn.api, kp, channelID, amount, options) - if err != nil { - pn.log.Info("IBC Transfer not sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) - return err - } - - pn.log.Info("IBC Transfer sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) - return nil -} - -// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset -func (pn *ParachainNode) MintFunds( - keyName string, - amount ibc.WalletAmount, -) error { - kp, err := pn.Chain.(*PolkadotChain).GetKeyringPair(keyName) - if err != nil { - return err - } - - pn.log.Info( - "ParachainNode MintFunds", - zap.String("From", kp.Address), - zap.String("To", amount.Address), - zap.String("Amount", amount.Amount.String()), - ) - hash, err := MintFundsTx(pn.api, kp, amount) - if err != nil { - pn.log.Info("MintFunds not sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) - return err - } - - pn.log.Info("MintFunds sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", pn.Name())) - return nil -} diff --git a/chain/polkadot/polkadot_chain.go b/chain/polkadot/polkadot_chain.go deleted file mode 100644 index 826c00235..000000000 --- a/chain/polkadot/polkadot_chain.go +++ /dev/null @@ -1,852 +0,0 @@ -package polkadot - -import ( - "context" - "crypto/rand" - crand "crypto/rand" - "encoding/json" - "fmt" - "io" - "strings" - - "cosmossdk.io/math" - "github.com/99designs/keyring" - "github.com/StirlingMarketingGroup/go-namecase" - sdktypes "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/go-bip39" - "github.com/docker/docker/api/types" - volumetypes "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/client" - dockerclient "github.com/docker/docker/client" - "github.com/icza/dyno" - p2pcrypto "github.com/libp2p/go-libp2p/core/crypto" - "github.com/misko9/go-substrate-rpc-client/v4/signature" - gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "go.uber.org/zap" - "golang.org/x/sync/errgroup" -) - -// Increase polkadot wallet amount due to their additional precision -const polkadotScaling = int64(1_000) - -// PolkadotChain implements the ibc.Chain interface for substrate chains. -type PolkadotChain struct { - log *zap.Logger - testName string - cfg ibc.ChainConfig - numRelayChainNodes int - parachainConfig []ParachainConfig - RelayChainNodes RelayChainNodes - ParachainNodes []ParachainNodes - keyring keyring.Keyring -} - -// PolkadotAuthority is used when constructing the validator authorities in the substrate chain spec. -type PolkadotAuthority struct { - Grandpa string `json:"grandpa"` - Babe string `json:"babe"` - IMOnline string `json:"im_online"` - ParachainValidator string `json:"parachain_validator"` - AuthorityDiscovery string `json:"authority_discovery"` - ParaValidator string `json:"para_validator"` - ParaAssignment string `json:"para_assignment"` - Beefy string `json:"beefy"` -} - -// PolkadotParachainSpec is used when constructing substrate chain spec for parachains. -type PolkadotParachainSpec struct { - GenesisHead string `json:"genesis_head"` - ValidationCode string `json:"validation_code"` - Parachain bool `json:"parachain"` -} - -// ParachainConfig is a shared type that allows callers of this module to configure a parachain. -type ParachainConfig struct { - ChainID string - Bin string - Image ibc.DockerImage - NumNodes int - Flags []string - RelayChainFlags []string -} - -// IndexedName is a slice of the substrate dev key names used for key derivation. -var IndexedName = []string{"alice", "bob", "charlie", "dave", "ferdie"} -var IndexedUri = []string{"//Alice", "//Bob", "//Charlie", "//Dave", "//Ferdie"} - -// NewPolkadotChain returns an uninitialized PolkadotChain, which implements the ibc.Chain interface. -func NewPolkadotChain(log *zap.Logger, testName string, chainConfig ibc.ChainConfig, numRelayChainNodes int, parachains []ParachainConfig) *PolkadotChain { - return &PolkadotChain{ - log: log, - testName: testName, - cfg: chainConfig, - numRelayChainNodes: numRelayChainNodes, - parachainConfig: parachains, - keyring: keyring.NewArrayKeyring(nil), - } -} - -// Config fetches the chain configuration. -// Implements Chain interface. -func (c *PolkadotChain) Config() ibc.ChainConfig { - return c.cfg -} - -func (c *PolkadotChain) NewRelayChainNode( - ctx context.Context, - i int, - chain *PolkadotChain, - dockerClient *dockerclient.Client, - networkID string, - testName string, - image ibc.DockerImage, -) (*RelayChainNode, error) { - seed := make([]byte, 32) - if _, err := rand.Read(seed); err != nil { - return nil, err - } - - nodeKey, _, err := p2pcrypto.GenerateEd25519Key(crand.Reader) - if err != nil { - return nil, fmt.Errorf("error generating node key: %w", err) - } - - nameCased := namecase.New().NameCase(IndexedName[i]) - - ed25519PrivKey, err := DeriveEd25519FromName(nameCased) - if err != nil { - return nil, err - } - - accountKeyName := IndexedName[i] - accountKeyUri := IndexedUri[i] - stashKeyName := accountKeyName + "stash" - stashKeyUri := accountKeyUri + "//stash" - - if err := c.RecoverKey(ctx, accountKeyName, accountKeyUri); err != nil { - return nil, err - } - - if err := c.RecoverKey(ctx, stashKeyName, stashKeyUri); err != nil { - return nil, err - } - - ecdsaPrivKey, err := DeriveSecp256k1FromName(nameCased) - if err != nil { - return nil, fmt.Errorf("error generating secp256k1 private key: %w", err) - } - - pn := &RelayChainNode{ - log: c.log, - Index: i, - Chain: c, - DockerClient: dockerClient, - NetworkID: networkID, - TestName: testName, - Image: image, - NodeKey: nodeKey, - Ed25519PrivateKey: ed25519PrivKey, - AccountKeyName: accountKeyName, - StashKeyName: stashKeyName, - EcdsaPrivateKey: *ecdsaPrivKey, - } - - pn.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, dockerClient, pn.Name()) - - v, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - - dockerutil.NodeOwnerLabel: pn.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating volume for chain node: %w", err) - } - pn.VolumeName = v.Name - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: c.log, - Client: dockerClient, - VolumeName: v.Name, - ImageRef: image.Ref(), - TestName: testName, - UidGid: image.UidGid, - }); err != nil { - return nil, fmt.Errorf("set volume owner: %w", err) - } - - return pn, nil -} - -func (c *PolkadotChain) NewParachainNode( - ctx context.Context, - i int, - dockerClient *dockerclient.Client, - networkID string, - testName string, - parachainConfig ParachainConfig, -) (*ParachainNode, error) { - nodeKey, _, err := p2pcrypto.GenerateEd25519Key(crand.Reader) - if err != nil { - return nil, fmt.Errorf("error generating node key: %w", err) - } - pn := &ParachainNode{ - log: c.log, - Index: i, - Chain: c, - DockerClient: dockerClient, - NetworkID: networkID, - TestName: testName, - NodeKey: nodeKey, - Image: parachainConfig.Image, - Bin: parachainConfig.Bin, - ChainID: parachainConfig.ChainID, - Flags: parachainConfig.Flags, - RelayChainFlags: parachainConfig.RelayChainFlags, - } - - pn.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, dockerClient, pn.Name()) - - v, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - - dockerutil.NodeOwnerLabel: pn.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating volume for chain node: %w", err) - } - pn.VolumeName = v.Name - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: c.log, - Client: dockerClient, - VolumeName: v.Name, - ImageRef: parachainConfig.Image.Ref(), - TestName: testName, - UidGid: parachainConfig.Image.UidGid, - }); err != nil { - return nil, fmt.Errorf("set volume owner: %w", err) - } - - return pn, nil -} - -// Initialize initializes node structs so that things like initializing keys can be done before starting the chain. -// Implements Chain interface. -func (c *PolkadotChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error { - relayChainNodes := []*RelayChainNode{} - chainCfg := c.Config() - images := []ibc.DockerImage{} - images = append(images, chainCfg.Images...) - for _, parachain := range c.parachainConfig { - images = append(images, parachain.Image) - } - for _, image := range images { - rc, err := cli.ImagePull( - ctx, - image.Repository+":"+image.Version, - types.ImagePullOptions{}, - ) - if err != nil { - c.log.Error("Failed to pull image", - zap.Error(err), - zap.String("repository", image.Repository), - zap.String("tag", image.Version), - ) - } else { - _, _ = io.Copy(io.Discard, rc) - _ = rc.Close() - } - } - for i := 0; i < c.numRelayChainNodes; i++ { - pn, err := c.NewRelayChainNode(ctx, i, c, cli, networkID, testName, chainCfg.Images[0]) - if err != nil { - return err - } - relayChainNodes = append(relayChainNodes, pn) - } - c.RelayChainNodes = relayChainNodes - for _, pc := range c.parachainConfig { - parachainNodes := []*ParachainNode{} - for i := 0; i < pc.NumNodes; i++ { - pn, err := c.NewParachainNode(ctx, i, cli, networkID, testName, pc) - if err != nil { - return err - } - parachainNodes = append(parachainNodes, pn) - } - c.ParachainNodes = append(c.ParachainNodes, parachainNodes) - } - - return nil -} - -func runtimeGenesisPath(path ...interface{}) []interface{} { - fullPath := []interface{}{"genesis", "runtime", "runtime_genesis_config"} - fullPath = append(fullPath, path...) - return fullPath -} - -func (c *PolkadotChain) modifyRelayChainGenesis(ctx context.Context, chainSpec interface{}, additionalGenesisWallets []ibc.WalletAmount) error { - bootNodes := []string{} - authorities := [][]interface{}{} - balances := [][]interface{}{} - var sudoAddress string - for i, n := range c.RelayChainNodes { - multiAddress, err := n.MultiAddress() - if err != nil { - return err - } - bootNodes = append(bootNodes, multiAddress) - stashAddress, err := c.GetAddress(ctx, n.StashKeyName) - if err != nil { - return fmt.Errorf("error getting stash address: %w", err) - } - accountAddress, err := c.GetAddress(ctx, n.AccountKeyName) - if err != nil { - return fmt.Errorf("error getting account address: %w", err) - } - grandpaAddress, err := n.GrandpaAddress() - if err != nil { - return fmt.Errorf("error getting grandpa address") - } - beefyAddress, err := n.EcdsaAddress() - if err != nil { - return fmt.Errorf("error getting beefy address") - } - balances = append(balances, - []interface{}{string(stashAddress), uint64(1_100_000_000_000_000_000)}, - []interface{}{string(accountAddress), uint64(1_100_000_000_000_000_000)}, - ) - if i == 0 { - sudoAddress = string(accountAddress) - } - authority := []interface{}{string(stashAddress), string(stashAddress), PolkadotAuthority{ - Grandpa: grandpaAddress, - Babe: string(accountAddress), - IMOnline: string(accountAddress), - ParachainValidator: string(accountAddress), - AuthorityDiscovery: string(accountAddress), - ParaValidator: string(accountAddress), - ParaAssignment: string(accountAddress), - Beefy: beefyAddress, - }} - authorities = append(authorities, authority) - } - for _, wallet := range additionalGenesisWallets { - balances = append(balances, - []interface{}{wallet.Address, wallet.Amount.MulRaw(polkadotScaling)}, - ) - } - - if err := dyno.Set(chainSpec, bootNodes, "bootNodes"); err != nil { - return fmt.Errorf("error setting boot nodes: %w", err) - } - if err := dyno.Set(chainSpec, authorities, runtimeGenesisPath("session", "keys")...); err != nil { - return fmt.Errorf("error setting authorities: %w", err) - } - if err := dyno.Set(chainSpec, balances, runtimeGenesisPath("balances", "balances")...); err != nil { - return fmt.Errorf("error setting balances: %w", err) - } - if err := dyno.Set(chainSpec, sudoAddress, runtimeGenesisPath("sudo", "key")...); err != nil { - return fmt.Errorf("error setting sudo key: %w", err) - } - /*if err := dyno.Set(chainSpec, sudoAddress, runtimeGenesisPath("bridgeRococoGrandpa", "owner")...); err != nil { - return fmt.Errorf("error setting bridgeRococoGrandpa owner: %w", err) - } - if err := dyno.Set(chainSpec, sudoAddress, runtimeGenesisPath("bridgeWococoGrandpa", "owner")...); err != nil { - return fmt.Errorf("error setting bridgeWococoGrandpa owner: %w", err) - } - if err := dyno.Set(chainSpec, sudoAddress, runtimeGenesisPath("bridgeRococoMessages", "owner")...); err != nil { - return fmt.Errorf("error setting bridgeRococoMessages owner: %w", err) - } - if err := dyno.Set(chainSpec, sudoAddress, runtimeGenesisPath("bridgeWococoMessages", "owner")...); err != nil { - return fmt.Errorf("error setting bridgeWococoMessages owner: %w", err) - } - */ - if err := dyno.Set(chainSpec, 2, runtimeGenesisPath("configuration", "config", "validation_upgrade_delay")...); err != nil { - return fmt.Errorf("error setting validation upgrade delay: %w", err) - } - parachains := [][]interface{}{} - - for _, parachainNodes := range c.ParachainNodes { - firstParachainNode := parachainNodes[0] - parachainID, err := firstParachainNode.ParachainID(ctx) - if err != nil { - return fmt.Errorf("error getting parachain ID: %w", err) - } - genesisState, err := firstParachainNode.ExportGenesisState(ctx) - if err != nil { - return fmt.Errorf("error exporting genesis state: %w", err) - } - genesisWasm, err := firstParachainNode.ExportGenesisWasm(ctx) - if err != nil { - return fmt.Errorf("error exporting genesis wasm: %w", err) - } - - composableParachain := []interface{}{parachainID, PolkadotParachainSpec{ - GenesisHead: genesisState, - ValidationCode: genesisWasm, - Parachain: true, - }} - parachains = append(parachains, composableParachain) - } - - if err := dyno.Set(chainSpec, parachains, runtimeGenesisPath("paras", "paras")...); err != nil { - return fmt.Errorf("error setting parachains: %w", err) - } - if err := dyno.Set(chainSpec, 20, "genesis", "runtime", "session_length_in_blocks"); err != nil { - return fmt.Errorf("error setting session_length_in_blocks: %w", err) - } - return nil -} - -func (c *PolkadotChain) logger() *zap.Logger { - return c.log.With( - zap.String("chain_id", c.cfg.ChainID), - zap.String("test", c.testName), - ) -} - -// Start sets up everything needed (validators, gentx, fullnodes, peering, additional accounts) for chain to start from genesis. -// Implements Chain interface. -func (c *PolkadotChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - var eg errgroup.Group - // Generate genesis file for each set of parachains - for _, parachainNodes := range c.ParachainNodes { - firstParachainNode := parachainNodes[0] - parachainChainSpec, err := firstParachainNode.GenerateParachainGenesisFile(ctx, additionalGenesisWallets...) - if err != nil { - return fmt.Errorf("error generating parachain genesis file: %w", err) - } - for _, n := range parachainNodes { - n := n - eg.Go(func() error { - c.logger().Info("Copying parachain chain spec", zap.String("container", n.Name())) - fw := dockerutil.NewFileWriter(n.logger(), n.DockerClient, n.TestName) - return fw.WriteFile(ctx, n.VolumeName, n.ParachainChainSpecFileName(), parachainChainSpec) - }) - } - } - if err := eg.Wait(); err != nil { - return err - } - - // generate chain spec - firstNode := c.RelayChainNodes[0] - if err := firstNode.GenerateChainSpec(ctx); err != nil { - return fmt.Errorf("error generating chain spec: %w", err) - } - fr := dockerutil.NewFileRetriever(c.logger(), firstNode.DockerClient, c.testName) - fw := dockerutil.NewFileWriter(c.logger(), firstNode.DockerClient, c.testName) - - chainSpecBytes, err := fr.SingleFileContent(ctx, firstNode.VolumeName, firstNode.ChainSpecFilePathContainer()) - if err != nil { - return fmt.Errorf("error reading chain spec: %w", err) - } - - var chainSpec interface{} - if err := json.Unmarshal(chainSpecBytes, &chainSpec); err != nil { - return fmt.Errorf("error unmarshaling chain spec: %w", err) - } - - if err := c.modifyRelayChainGenesis(ctx, chainSpec, additionalGenesisWallets); err != nil { - return fmt.Errorf("error modifying genesis: %w", err) - } - - editedChainSpec, err := json.MarshalIndent(chainSpec, "", " ") - if err != nil { - return fmt.Errorf("error marshaling modified chain spec: %w", err) - } - - if err := fw.WriteFile(ctx, firstNode.VolumeName, firstNode.ChainSpecFilePathContainer(), editedChainSpec); err != nil { - return fmt.Errorf("error writing modified chain spec: %w", err) - } - - c.logger().Info("Generating raw chain spec", zap.String("container", firstNode.Name())) - - if err := firstNode.GenerateChainSpecRaw(ctx); err != nil { - return err - } - - rawChainSpecBytes, err := fr.SingleFileContent(ctx, firstNode.VolumeName, firstNode.RawChainSpecFilePathRelative()) - if err != nil { - return fmt.Errorf("error reading chain spec: %w", err) - } - - for i, n := range c.RelayChainNodes { - n := n - i := i - eg.Go(func() error { - if i != 0 { - c.logger().Info("Copying raw chain spec", zap.String("container", n.Name())) - if err := fw.WriteFile(ctx, n.VolumeName, n.RawChainSpecFilePathRelative(), rawChainSpecBytes); err != nil { - return fmt.Errorf("error writing raw chain spec: %w", err) - } - } - c.logger().Info("Creating container", zap.String("name", n.Name())) - if err := n.CreateNodeContainer(ctx); err != nil { - return err - } - c.logger().Info("Starting container", zap.String("name", n.Name())) - return n.StartContainer(ctx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - for _, nodes := range c.ParachainNodes { - nodes := nodes - for _, n := range nodes { - n := n - eg.Go(func() error { - c.logger().Info("Copying raw chain spec", zap.String("container", n.Name())) - if err := fw.WriteFile(ctx, n.VolumeName, n.RawRelayChainSpecFilePathRelative(), rawChainSpecBytes); err != nil { - return fmt.Errorf("error writing raw chain spec: %w", err) - } - //fmt.Print(string(rawChainSpecBytes)) - c.logger().Info("Creating container", zap.String("name", n.Name())) - if err := n.CreateNodeContainer(ctx); err != nil { - return err - } - c.logger().Info("Starting container", zap.String("name", n.Name())) - return n.StartContainer(ctx) - }) - } - } - if err := eg.Wait(); err != nil { - return err - } - - return nil -} - -// Exec runs an arbitrary command using Chain's docker environment. -// Implements Chain interface. -func (c *PolkadotChain) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - res := c.RelayChainNodes[0].Exec(ctx, cmd, env) - return res.Stdout, res.Stderr, res.Err -} - -// GetRPCAddress retrieves the rpc address that can be reached by other containers in the docker network. -// Implements Chain interface. -func (c *PolkadotChain) GetRPCAddress() string { - var parachainHostName string - port := strings.Split(rpcPort, "/")[0] - - if len(c.ParachainNodes) > 0 && len(c.ParachainNodes[0]) > 0 { - parachainHostName = c.ParachainNodes[0][0].HostName() - //return fmt.Sprintf("%s:%s", c.ParachainNodes[0][0].HostName(), strings.Split(rpcPort, "/")[0]) - } else { - parachainHostName = c.RelayChainNodes[0].HostName() - } - relaychainHostName := c.RelayChainNodes[0].HostName() - parachainUrl := fmt.Sprintf("http://%s:%s", parachainHostName, port) - relaychainUrl := fmt.Sprintf("http://%s:%s", relaychainHostName, port) - return fmt.Sprintf("%s,%s", parachainUrl, relaychainUrl) - //return fmt.Sprintf("%s:%s", c.RelayChainNodes[0].HostName(), strings.Split(rpcPort, "/")[0]) -} - -// GetGRPCAddress retrieves the grpc address that can be reached by other containers in the docker network. -// Implements Chain interface. -func (c *PolkadotChain) GetGRPCAddress() string { - if len(c.ParachainNodes) > 0 && len(c.ParachainNodes[0]) > 0 { - return fmt.Sprintf("%s:%s", c.ParachainNodes[0][0].HostName(), strings.Split(wsPort, "/")[0]) - } - return fmt.Sprintf("%s:%s", c.RelayChainNodes[0].HostName(), strings.Split(wsPort, "/")[0]) -} - -// GetHostRPCAddress returns the rpc address that can be reached by processes on the host machine. -// Note that this will not return a valid value until after Start returns. -// Implements Chain interface. -func (c *PolkadotChain) GetHostRPCAddress() string { - if len(c.ParachainNodes) > 0 && len(c.ParachainNodes[0]) > 0 { - return c.ParachainNodes[0][0].hostRpcPort - } - return c.RelayChainNodes[0].hostRpcPort -} - -// GetHostGRPCAddress returns the grpc address that can be reached by processes on the host machine. -// Note that this will not return a valid value until after Start returns. -// Implements Chain interface. -func (c *PolkadotChain) GetHostGRPCAddress() string { - if len(c.ParachainNodes) > 0 && len(c.ParachainNodes[0]) > 0 { - return c.ParachainNodes[0][0].hostWsPort - } - return c.RelayChainNodes[0].hostWsPort -} - -// Height returns the current block height or an error if unable to get current height. -// Implements Chain interface. -func (c *PolkadotChain) Height(ctx context.Context) (uint64, error) { - if len(c.ParachainNodes) > 0 && len(c.ParachainNodes[0]) > 0 { - block, err := c.ParachainNodes[0][0].api.RPC.Chain.GetBlockLatest() - if err != nil { - return 0, err - } - return uint64(block.Block.Header.Number), nil - } - block, err := c.RelayChainNodes[0].api.RPC.Chain.GetBlockLatest() - if err != nil { - return 0, err - } - return uint64(block.Block.Header.Number), nil -} - -// ExportState exports the chain state at specific height. -// Implements Chain interface. -func (c *PolkadotChain) ExportState(ctx context.Context, height int64) (string, error) { - panic("[ExportState] not implemented yet") -} - -// HomeDir is the home directory of a node running in a docker container. Therefore, this maps to -// the container's filesystem (not the host). -// Implements Chain interface. -func (c *PolkadotChain) HomeDir() string { - panic("[HomeDir] not implemented yet") -} - -func NewMnemonic() (string, error) { - // Implementation copied from substrate's go-relayer implementation - entropySeed, err := bip39.NewEntropy(256) - if err != nil { - return "", err - } - mnemonic, err := bip39.NewMnemonic(entropySeed) - if err != nil { - return "", err - } - - return mnemonic, nil -} - -// CreateKey creates a test key in the "user" node (either the first fullnode or the first validator if no fullnodes). -// Implements Chain interface. -func (c *PolkadotChain) CreateKey(ctx context.Context, keyName string) error { - _, err := c.keyring.Get(keyName) - if err == nil { - return fmt.Errorf("Key already exists: %s", keyName) - } - - mnemonic, err := NewMnemonic() - if err != nil { - return err - } - - kp, err := signature.KeyringPairFromSecret(mnemonic, Ss58Format) - if err != nil { - return fmt.Errorf("failed to create keypair: %w", err) - } - - serializedKp, err := json.Marshal(kp) - if err != nil { - return err - } - err = c.keyring.Set(keyring.Item{ - Key: keyName, - Data: serializedKp, - }) - - return err -} - -// RecoverKey recovers an existing user from a given mnemonic. -// Implements Chain interface. -func (c *PolkadotChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - _, err := c.keyring.Get(keyName) - if err == nil { - return fmt.Errorf("Key already exists: %s", keyName) - } - - kp, err := signature.KeyringPairFromSecret(mnemonic, Ss58Format) - if err != nil { - return fmt.Errorf("failed to create keypair: %w", err) - } - - serializedKp, err := json.Marshal(kp) - if err != nil { - return err - } - err = c.keyring.Set(keyring.Item{ - Key: keyName, - Data: serializedKp, - }) - - return err -} - -// GetAddress fetches the address for a test key on the "user" node (either the first fullnode or the first validator if no fullnodes). -// Implements Chain interface. -func (c *PolkadotChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - krItem, err := c.keyring.Get(keyName) - if err != nil { - return nil, err - } - - kp := signature.KeyringPair{} - err = json.Unmarshal(krItem.Data, &kp) - if err != nil { - return nil, err - } - - return []byte(kp.Address), nil -} - -func (c *PolkadotChain) GetPublicKey(keyName string) ([]byte, error) { - krItem, err := c.keyring.Get(keyName) - if err != nil { - return nil, err - } - - kp := signature.KeyringPair{} - err = json.Unmarshal(krItem.Data, &kp) - if err != nil { - return nil, err - } - - return kp.PublicKey, nil -} - -// BuildWallet will return a Polkadot wallet -// If mnemonic != "", it will restore using that mnemonic -// If mnemonic == "", it will create a new key -func (c *PolkadotChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) { - if mnemonic != "" { - if err := c.RecoverKey(ctx, keyName, mnemonic); err != nil { - return nil, fmt.Errorf("failed to recover key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } else { - if err := c.CreateKey(ctx, keyName); err != nil { - return nil, fmt.Errorf("failed to create key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } - - addrBytes, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - return NewWallet(keyName, addrBytes, mnemonic, c.cfg), nil -} - -// BuildRelayerWallet will return a Polkadot wallet populated with the mnemonic so that the wallet can -// be restored in the relayer node using the mnemonic. After it is built, that address is included in -// genesis with some funds. -func (c *PolkadotChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) { - mnemonic, err := NewMnemonic() - if err != nil { - return nil, err - } - - return c.BuildWallet(ctx, keyName, mnemonic) -} - -// SendFunds sends funds to a wallet from a user account. -// Implements Chain interface. -func (c *PolkadotChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - // If denom == polkadot denom, it is a relay chain tx, else parachain tx - if amount.Denom == c.cfg.Denom { - // If keyName == faucet, also fund parachain's user until relay chain and parachains are their own chains - if keyName == "faucet" { - err := c.ParachainNodes[0][0].SendFunds(ctx, keyName, amount) - if err != nil { - return err - } - } - return c.RelayChainNodes[0].SendFunds(ctx, keyName, amount) - } - - return c.ParachainNodes[0][0].SendFunds(ctx, keyName, amount) -} - -// SendIBCTransfer sends an IBC transfer returning a transaction or an error if the transfer failed. -// Implements Chain interface. -func (c *PolkadotChain) SendIBCTransfer( - ctx context.Context, - channelID string, - keyName string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) (ibc.Tx, error) { - return ibc.Tx{}, c.ParachainNodes[0][0].SendIbcFunds(ctx, channelID, keyName, amount, options) -} - -// GetBalance fetches the current balance for a specific account address and denom. -// Implements Chain interface. -func (c *PolkadotChain) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { - // If denom == polkadot denom, it is a relay chain query, else parachain query - if denom == c.cfg.Denom { - return c.RelayChainNodes[0].GetBalance(ctx, address, denom) - } - - return c.ParachainNodes[0][0].GetBalance(ctx, address, denom) -} - -// AccountInfo contains information of an account -type AccountInfo struct { - Nonce gstypes.U32 - Consumers gstypes.U32 - Providers gstypes.U32 - Sufficients gstypes.U32 - Data struct { - Free gstypes.U128 - Reserved gstypes.U128 - MiscFrozen gstypes.U128 - FreeFrozen gstypes.U128 - } -} - -// GetGasFeesInNativeDenom gets the fees in native denom for an amount of spent gas. -// Implements Chain interface. -func (c *PolkadotChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { - panic("[GetGasFeesInNativeDenom] not implemented yet") -} - -// Acknowledgements returns all acknowledgements in a block at height. -// Implements Chain interface. -func (c *PolkadotChain) Acknowledgements(ctx context.Context, height uint64) ([]ibc.PacketAcknowledgement, error) { - panic("[Acknowledgements] not implemented yet") -} - -// Timeouts returns all timeouts in a block at height. -// Implements Chain interface. -func (c *PolkadotChain) Timeouts(ctx context.Context, height uint64) ([]ibc.PacketTimeout, error) { - panic("[Timeouts] not implemented yet") -} - -// GetKeyringPair returns the keyring pair from the keyring using keyName -func (c *PolkadotChain) GetKeyringPair(keyName string) (signature.KeyringPair, error) { - kp := signature.KeyringPair{} - krItem, err := c.keyring.Get(keyName) - if err != nil { - return kp, err - } - - err = json.Unmarshal(krItem.Data, &kp) - if err != nil { - return kp, err - } - - return kp, nil -} - -// FindTxs implements blockdb.BlockSaver (Not implemented yet for polkadot, but we don't want to exit) -func (c *PolkadotChain) FindTxs(ctx context.Context, height uint64) ([]blockdb.Tx, error) { - return []blockdb.Tx{}, nil -} - -// GetIbcBalance returns the Coins type of ibc coins in account -func (c *PolkadotChain) GetIbcBalance(ctx context.Context, address string, denom uint64) (sdktypes.Coin, error) { - return c.ParachainNodes[0][0].GetIbcBalance(ctx, address, denom) -} - -// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset -func (c *PolkadotChain) MintFunds(keyName string, amount ibc.WalletAmount) error { - return c.ParachainNodes[0][0].MintFunds(keyName, amount) -} diff --git a/chain/polkadot/polkadot_chain_test.go b/chain/polkadot/polkadot_chain_test.go deleted file mode 100644 index beb065491..000000000 --- a/chain/polkadot/polkadot_chain_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package polkadot_test - -import ( - "context" - "fmt" - "testing" - - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -func TestWalletMethods(t *testing.T) { - ctx := context.Background() - nv := 5 - nf := 3 - - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - ChainConfig: ibc.ChainConfig{ - Type: "polkadot", - Name: "composable", - ChainID: "rococo-local", - Images: []ibc.DockerImage{ - { - Repository: "seunlanlege/centauri-polkadot", - Version: "v0.9.27", - UidGid: "1025:1025", - }, - { - Repository: "seunlanlege/centauri-parachain", - Version: "v0.9.27", - //UidGid: "1025:1025", - }, - }, - Bin: "polkadot", - Bech32Prefix: "composable", - Denom: "uDOT", - GasPrices: "", - GasAdjustment: 0, - TrustingPeriod: "", - CoinType: "354", - }, - NumValidators: &nv, - NumFullNodes: &nf, - }, - }, - ).Chains(t.Name()) - - require.NoError(t, err, "failed to get polkadot chain") - require.Len(t, chains, 1) - chain := chains[0] - - // BuildRelayerWallet test - relayKeyName := "relayerWallet" - relayWallet, err := chain.BuildRelayerWallet(ctx, relayKeyName) - require.NoError(t, err, "Error building wallet") - - address, err := chain.GetAddress(ctx, relayKeyName) - require.NoError(t, err, "Error getting relay address") - fmt.Println("Relay wallet mnemonic: ", relayWallet.Mnemonic()) - fmt.Println("Relay wallet keyname: ", relayWallet.KeyName()) - fmt.Println("Relay wallet address: ", relayWallet.FormattedAddress()) - fmt.Println("Address: ", address) - require.Equal(t, relayWallet.FormattedAddress(), string(address), "Relay addresses not equal") - - // BuildWallet test - userKeyName := "userWallet" - userWallet, err := chain.BuildRelayerWallet(ctx, userKeyName) - require.NoError(t, err, "Error building wallet") - - address, err = chain.GetAddress(ctx, userKeyName) - require.NoError(t, err, "Error getting user address") - fmt.Println("Wallet mnemonic: ", userWallet.Mnemonic()) - fmt.Println("Wallet keyname: ", userWallet.KeyName()) - fmt.Println("Wallet address: ", userWallet.FormattedAddress()) - fmt.Println("Address: ", address) - require.Equal(t, userWallet.FormattedAddress(), string(address), "User addresses not equal") - - // RecoverKey test - recoverKeyName := "recoverWallet" - err = chain.RecoverKey(ctx, recoverKeyName, userWallet.Mnemonic()) - require.NoError(t, err, "Error on RecoverKey") - - userAddress, err := chain.GetAddress(ctx, userKeyName) - require.NoError(t, err, "Error getting user address for recover comparison") - recoverAddress, err := chain.GetAddress(ctx, recoverKeyName) - require.NoError(t, err, "Error getting recover address for recover comparison") - require.Equal(t, userAddress, recoverAddress, "User and recover addresses not equal") -} diff --git a/chain/polkadot/query.go b/chain/polkadot/query.go deleted file mode 100644 index 8b0ca27db..000000000 --- a/chain/polkadot/query.go +++ /dev/null @@ -1,34 +0,0 @@ -package polkadot - -import ( - "cosmossdk.io/math" - gsrpc "github.com/misko9/go-substrate-rpc-client/v4" - gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" -) - -// GetBalance fetches the current balance for a specific account address using the SubstrateAPI -func GetBalance(api *gsrpc.SubstrateAPI, address string) (math.Int, error) { - meta, err := api.RPC.State.GetMetadataLatest() - if err != nil { - return math.Int{}, err - } - pubKey, err := DecodeAddressSS58(address) - if err != nil { - return math.Int{}, err - } - key, err := gstypes.CreateStorageKey(meta, "System", "Account", pubKey, nil) - if err != nil { - return math.Int{}, err - } - - var accountInfo AccountInfo - ok, err := api.RPC.State.GetStorageLatest(key, &accountInfo) - if err != nil { - return math.Int{}, err - } - if !ok { - return math.Int{}, nil - } - - return math.NewIntFromBigInt(accountInfo.Data.Free.Int), nil -} diff --git a/chain/polkadot/relay_chain_node.go b/chain/polkadot/relay_chain_node.go deleted file mode 100644 index dcb862292..000000000 --- a/chain/polkadot/relay_chain_node.go +++ /dev/null @@ -1,300 +0,0 @@ -package polkadot - -import ( - "context" - "encoding/hex" - "fmt" - "path/filepath" - "strings" - "time" - - "cosmossdk.io/math" - "github.com/avast/retry-go/v4" - "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - gsrpc "github.com/misko9/go-substrate-rpc-client/v4" - - p2pCrypto "github.com/libp2p/go-libp2p/core/crypto" - "github.com/libp2p/go-libp2p/core/peer" - "go.uber.org/zap" - - "github.com/decred/dcrd/dcrec/secp256k1/v2" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" -) - -// RelayChainNode defines the properties required for running a polkadot relay chain node. -type RelayChainNode struct { - log *zap.Logger - TestName string - Index int - - NetworkID string - containerLifecycle *dockerutil.ContainerLifecycle - VolumeName string - DockerClient *client.Client - Image ibc.DockerImage - - Chain ibc.Chain - NodeKey p2pCrypto.PrivKey - AccountKeyName string - StashKeyName string - Ed25519PrivateKey p2pCrypto.PrivKey - EcdsaPrivateKey secp256k1.PrivateKey - - api *gsrpc.SubstrateAPI - hostWsPort string - hostRpcPort string -} - -type RelayChainNodes []*RelayChainNode - -const ( - wsPort = "27451/tcp" - //rpcPort = "27452/tcp" - nodePort = "27452/tcp" - rpcPort = "9933/tcp" - prometheusPort = "27453/tcp" -) - -var ( - RtyAtt = retry.Attempts(10) - RtyDel = retry.Delay(time.Second * 2) - RtyErr = retry.LastErrorOnly(true) -) - -var exposedPorts = map[nat.Port]struct{}{ - nat.Port(wsPort): {}, - nat.Port(rpcPort): {}, - nat.Port(prometheusPort): {}, - nat.Port(nodePort): {}, -} - -// Name returns the name of the test node. -func (p *RelayChainNode) Name() string { - return fmt.Sprintf("relaychain-%d-%s-%s", p.Index, p.Chain.Config().ChainID, dockerutil.SanitizeContainerName(p.TestName)) -} - -// HostName returns the docker hostname of the test container. -func (p *RelayChainNode) HostName() string { - return dockerutil.CondenseHostName(p.Name()) -} - -// Bind returns the home folder bind point for running the node. -func (p *RelayChainNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", p.VolumeName, p.NodeHome())} -} - -// NodeHome returns the working directory within the docker image, -// the path where the docker volume is mounted. -func (p *RelayChainNode) NodeHome() string { - return "/home/heighliner" -} - -// PeerID returns the public key of the node key for p2p. -func (p *RelayChainNode) PeerID() (string, error) { - id, err := peer.IDFromPrivateKey(p.NodeKey) - if err != nil { - return "", err - } - return id.String(), nil -} - -// GrandpaAddress returns the ss58 encoded grandpa (consensus) address. -func (p *RelayChainNode) GrandpaAddress() (string, error) { - pubKey, err := p.Ed25519PrivateKey.GetPublic().Raw() - if err != nil { - return "", fmt.Errorf("error fetching pubkey bytes: %w", err) - } - return EncodeAddressSS58(pubKey) -} - -// EcdsaAddress returns the ss58 encoded secp256k1 address. -func (p *RelayChainNode) EcdsaAddress() (string, error) { - pubKey := []byte{} - y := p.EcdsaPrivateKey.PublicKey.Y.Bytes() - if y[len(y)-1]%2 == 0 { - pubKey = append(pubKey, 0x02) - } else { - pubKey = append(pubKey, 0x03) - } - pubKey = append(pubKey, p.EcdsaPrivateKey.PublicKey.X.Bytes()...) - return EncodeAddressSS58(pubKey) -} - -// MultiAddress returns the p2p multiaddr of the node. -func (p *RelayChainNode) MultiAddress() (string, error) { - peerId, err := p.PeerID() - if err != nil { - return "", err - } - return fmt.Sprintf("/dns4/%s/tcp/%s/p2p/%s", p.HostName(), strings.Split(nodePort, "/")[0], peerId), nil -} - -func (c *RelayChainNode) logger() *zap.Logger { - return c.log.With( - zap.String("chain_id", c.Chain.Config().ChainID), - zap.String("test", c.TestName), - ) -} - -// ChainSpecFilePathContainer returns the relative path to the chain spec file -// within the container. -func (p *RelayChainNode) ChainSpecFilePathContainer() string { - return fmt.Sprintf("%s.json", p.Chain.Config().ChainID) -} - -// RawChainSpecFilePathFull returns the full path to the raw chain spec file -// within the container. -func (p *RelayChainNode) RawChainSpecFilePathFull() string { - return filepath.Join(p.NodeHome(), fmt.Sprintf("%s-raw.json", p.Chain.Config().ChainID)) -} - -// RawChainSpecFilePathRelative returns the relative path to the raw chain spec file -// within the container. -func (p *RelayChainNode) RawChainSpecFilePathRelative() string { - return fmt.Sprintf("%s-raw.json", p.Chain.Config().ChainID) -} - -// GenerateChainSpec builds the chain spec for the configured chain ID. -func (p *RelayChainNode) GenerateChainSpec(ctx context.Context) error { - chainCfg := p.Chain.Config() - cmd := []string{ - chainCfg.Bin, - "build-spec", - fmt.Sprintf("--chain=%s", chainCfg.ChainID), - "--disable-default-bootnode", - } - res := p.Exec(ctx, cmd, nil) - if res.Err != nil { - return res.Err - } - fw := dockerutil.NewFileWriter(p.logger(), p.DockerClient, p.TestName) - return fw.WriteFile(ctx, p.VolumeName, p.ChainSpecFilePathContainer(), res.Stdout) -} - -// GenerateChainSpecRaw builds the raw chain spec from the generated chain spec -// for the configured chain ID. -func (p *RelayChainNode) GenerateChainSpecRaw(ctx context.Context) error { - chainCfg := p.Chain.Config() - cmd := []string{ - chainCfg.Bin, - "build-spec", - fmt.Sprintf("--chain=%s.json", filepath.Join(p.NodeHome(), chainCfg.ChainID)), - "--raw", - } - res := p.Exec(ctx, cmd, nil) - if res.Err != nil { - return res.Err - } - fw := dockerutil.NewFileWriter(p.logger(), p.DockerClient, p.TestName) - return fw.WriteFile(ctx, p.VolumeName, p.RawChainSpecFilePathRelative(), res.Stdout) -} - -// CreateNodeContainer assembles a relay chain node docker container ready to launch. -func (p *RelayChainNode) CreateNodeContainer(ctx context.Context) error { - nodeKey, err := p.NodeKey.Raw() - if err != nil { - return fmt.Errorf("error getting ed25519 node key: %w", err) - } - multiAddress, err := p.MultiAddress() - if err != nil { - return err - } - chainCfg := p.Chain.Config() - cmd := []string{ - chainCfg.Bin, - fmt.Sprintf("--chain=%s", p.RawChainSpecFilePathFull()), - fmt.Sprintf("--ws-port=%s", strings.Split(wsPort, "/")[0]), - fmt.Sprintf("--%s", IndexedName[p.Index]), - fmt.Sprintf("--node-key=%s", hex.EncodeToString(nodeKey[0:32])), - // "--validator", - "--ws-external", - "--rpc-external", - "--beefy", - "--rpc-cors=all", - "--unsafe-ws-external", - "--unsafe-rpc-external", - "--prometheus-external", - "--enable-offchain-indexing=true", - "--rpc-methods=unsafe", - "--pruning=archive", - fmt.Sprintf("--prometheus-port=%s", strings.Split(prometheusPort, "/")[0]), - fmt.Sprintf("--listen-addr=/ip4/0.0.0.0/tcp/%s", strings.Split(nodePort, "/")[0]), - fmt.Sprintf("--public-addr=%s", multiAddress), - "--base-path", p.NodeHome(), - } - return p.containerLifecycle.CreateContainer(ctx, p.TestName, p.NetworkID, p.Image, exposedPorts, p.Bind(), p.HostName(), cmd) -} - -// StopContainer stops the relay chain node container, waiting at most 30 seconds. -func (p *RelayChainNode) StopContainer(ctx context.Context) error { - return p.containerLifecycle.StopContainer(ctx) -} - -// StartContainer starts the container after it is built by CreateNodeContainer. -func (p *RelayChainNode) StartContainer(ctx context.Context) error { - if err := p.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := p.containerLifecycle.GetHostPorts(ctx, wsPort, rpcPort) - if err != nil { - return err - } - - // Set the host ports once since they will not change after the container has started. - p.hostWsPort, p.hostRpcPort = hostPorts[0], hostPorts[1] - - p.logger().Info("Waiting for RPC endpoint to be available", zap.String("container", p.Name())) - explorerUrl := fmt.Sprintf("\033[4;34mhttps://polkadot.js.org/apps?rpc=ws://%s#/explorer\033[0m", - strings.Replace(p.hostWsPort, "localhost", "127.0.0.1", 1)) - p.log.Info(explorerUrl, zap.String("container", p.Name())) - var api *gsrpc.SubstrateAPI - if err = retry.Do(func() error { - var err error - api, err = gsrpc.NewSubstrateAPI("ws://" + p.hostWsPort) - return err - }, retry.Context(ctx), RtyAtt, RtyDel, RtyErr); err != nil { - return err - } - - p.logger().Info("Done", zap.String("container", p.Name())) - p.api = api - - return nil -} - -// Exec runs a container for a specific job and blocks until the container exits. -func (p *RelayChainNode) Exec(ctx context.Context, cmd []string, env []string) dockerutil.ContainerExecResult { - job := dockerutil.NewImage(p.log, p.DockerClient, p.NetworkID, p.TestName, p.Image.Repository, p.Image.Version) - opts := dockerutil.ContainerOptions{ - Binds: p.Bind(), - Env: env, - User: p.Image.UidGid, - } - return job.Run(ctx, cmd, opts) -} - -// SendFunds sends funds to a wallet from a user account. -// Implements Chain interface. -func (p *RelayChainNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - kp, err := p.Chain.(*PolkadotChain).GetKeyringPair(keyName) - if err != nil { - return err - } - - hash, err := SendFundsTx(p.api, kp, amount) - if err != nil { - return err - } - - p.log.Info("Transfer sent", zap.String("hash", fmt.Sprintf("%#x", hash)), zap.String("container", p.Name())) - return nil -} - -// GetBalance fetches the current balance for a specific account address and denom. -// Implements Chain interface. -func (p *RelayChainNode) GetBalance(ctx context.Context, address string, denom string) (math.Int, error) { - return GetBalance(p.api, address) -} diff --git a/chain/polkadot/ss58.go b/chain/polkadot/ss58.go deleted file mode 100644 index 0abcb3e87..000000000 --- a/chain/polkadot/ss58.go +++ /dev/null @@ -1,107 +0,0 @@ -package polkadot - -import ( - "encoding/hex" - "fmt" - - "github.com/mr-tron/base58" - "golang.org/x/crypto/blake2b" -) - -const ( - Ss58Format = 49 - ss58Prefix = "SS58PRE" -) - -func EncodeAddressSS58(key []byte) (string, error) { - input := []byte{Ss58Format} - input = append(input, key...) - - checksum, err := ss58Checksum(input) - if err != nil { - return "", err - } - - final := input - if len(key) == 32 || len(key) == 33 { - final = append(final, checksum[0:2]...) - } else { - final = append(final, checksum[0:1]...) - } - - return base58.Encode(final), nil -} - -// Decodes an address to public key, refactored from https://github.com/subscan-explorer/subscan-essentials -func DecodeAddressSS58(address string) ([]byte, error) { - checksumPrefix := []byte(ss58Prefix) - ss58AddrDecoded, err := base58.Decode(address) - if len(ss58AddrDecoded) == 0 || ss58AddrDecoded[0] != byte(Ss58Format) || err != nil { - return nil, err - } - var checksumLength int - if IntInSlice(len(ss58AddrDecoded), []int{3, 4, 6, 10}) { - checksumLength = 1 - } else if IntInSlice(len(ss58AddrDecoded), []int{5, 7, 11, 35}) { - checksumLength = 2 - } else if IntInSlice(len(ss58AddrDecoded), []int{8, 12}) { - checksumLength = 3 - } else if IntInSlice(len(ss58AddrDecoded), []int{9, 13}) { - checksumLength = 4 - } else if IntInSlice(len(ss58AddrDecoded), []int{14}) { - checksumLength = 5 - } else if IntInSlice(len(ss58AddrDecoded), []int{15}) { - checksumLength = 6 - } else if IntInSlice(len(ss58AddrDecoded), []int{16}) { - checksumLength = 7 - } else if IntInSlice(len(ss58AddrDecoded), []int{17}) { - checksumLength = 8 - } else { - return nil, fmt.Errorf("Cannot get checksum length") - } - bss := ss58AddrDecoded[0 : len(ss58AddrDecoded)-checksumLength] - checksum, _ := blake2b.New(64, []byte{}) - w := append(checksumPrefix[:], bss[:]...) - _, err = checksum.Write(w) - if err != nil { - return nil, err - } - - h := checksum.Sum(nil) - if BytesToHex(h[0:checksumLength]) != BytesToHex(ss58AddrDecoded[len(ss58AddrDecoded)-checksumLength:]) { - return nil, fmt.Errorf("Checksum incorrect") - } - return ss58AddrDecoded[1 : len(ss58AddrDecoded)-checksumLength], nil -} - -func BytesToHex(b []byte) string { - c := make([]byte, hex.EncodedLen(len(b))) - hex.Encode(c, b) - return string(c) -} - -func IntInSlice(a int, list []int) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -func ss58Checksum(data []byte) ([]byte, error) { - hasher, err := blake2b.New512(nil) - if err != nil { - return nil, err - } - - if _, err := hasher.Write([]byte(ss58Prefix)); err != nil { - return nil, err - } - - if _, err := hasher.Write(data); err != nil { - return nil, err - } - - return hasher.Sum(nil), nil -} diff --git a/chain/polkadot/tx.go b/chain/polkadot/tx.go deleted file mode 100644 index 38895dcaf..000000000 --- a/chain/polkadot/tx.go +++ /dev/null @@ -1,193 +0,0 @@ -package polkadot - -import ( - "encoding/hex" - "math/big" - "strconv" - - gsrpc "github.com/misko9/go-substrate-rpc-client/v4" - "github.com/misko9/go-substrate-rpc-client/v4/signature" - gstypes "github.com/misko9/go-substrate-rpc-client/v4/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" -) - -// SendFundsTx sends funds to a wallet using the SubstrateAPI -func SendFundsTx(api *gsrpc.SubstrateAPI, senderKeypair signature.KeyringPair, amount ibc.WalletAmount) (gstypes.Hash, error) { - hash := gstypes.Hash{} - meta, err := api.RPC.State.GetMetadataLatest() - if err != nil { - return hash, err - } - - receiverPubKey, err := DecodeAddressSS58(amount.Address) - if err != nil { - return hash, err - } - - receiver, err := gstypes.NewMultiAddressFromHexAccountID(hex.EncodeToString(receiverPubKey)) - if err != nil { - return hash, err - } - - call, err := gstypes.NewCall(meta, "Balances.transfer", receiver, gstypes.NewUCompact(amount.Amount.BigInt())) - if err != nil { - return hash, err - } - - return CreateSignSubmitExt(api, meta, senderKeypair, call) -} - -// Turns on sending and receiving ibc transfers -func EnableIbc(api *gsrpc.SubstrateAPI, senderKeypair signature.KeyringPair) (gstypes.Hash, error) { - hash := gstypes.Hash{} - meta, err := api.RPC.State.GetMetadataLatest() - if err != nil { - return hash, err - } - - c, err := gstypes.NewCall(meta, "Ibc.set_params", gstypes.NewBool(true), gstypes.NewBool(true)) - if err != nil { - return hash, err - } - - sc, err := gstypes.NewCall(meta, "Sudo.sudo", c) - if err != nil { - return hash, err - } - - return CreateSignSubmitExt(api, meta, senderKeypair, sc) -} - -// SendIbcFundsTx sends funds to a wallet using the SubstrateAPI -func SendIbcFundsTx( - api *gsrpc.SubstrateAPI, - senderKeypair signature.KeyringPair, - channelID string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) (gstypes.Hash, error) { - hash := gstypes.Hash{} - meta, err := api.RPC.State.GetMetadataLatest() - if err != nil { - return hash, err - } - - assetNum, err := strconv.ParseInt(amount.Denom, 10, 64) - if err != nil { - return hash, err - } - - raw := gstypes.NewU8(1) - size := gstypes.NewU8(uint8(len(amount.Address) * 4)) - to := gstypes.NewStorageDataRaw([]byte(amount.Address)) - channel := gstypes.NewU64(0) // Parse channel number from string - timeout := gstypes.NewU8(1) - timestamp := gstypes.NewOptionU64(gstypes.NewU64(0)) - height := gstypes.NewOptionU64(gstypes.NewU64(3000)) // Must set timestamp or height - assetId := gstypes.NewU128(*big.NewInt(assetNum)) - amount2 := gstypes.NewU128(*amount.Amount.BigInt()) - memo := gstypes.NewU8(0) - - call, err := gstypes.NewCall(meta, "Ibc.transfer", raw, size, to, channel, timeout, timestamp, height, assetId, amount2, memo) - if err != nil { - return hash, err - } - - return CreateSignSubmitExt(api, meta, senderKeypair, call) -} - -// MintFunds mints an asset for a user on parachain, keyName must be the owner of the asset -func MintFundsTx( - api *gsrpc.SubstrateAPI, - senderKeypair signature.KeyringPair, - amount ibc.WalletAmount, -) (gstypes.Hash, error) { - hash := gstypes.Hash{} - meta, err := api.RPC.State.GetMetadataLatest() - if err != nil { - return hash, err - } - - assetNum, err := strconv.ParseInt(amount.Denom, 10, 64) - if err != nil { - return hash, err - } - - receiverPubKey, err := DecodeAddressSS58(amount.Address) - if err != nil { - return hash, err - } - - receiver, err := gstypes.NewMultiAddressFromHexAccountID(hex.EncodeToString(receiverPubKey)) - if err != nil { - return hash, err - } - - assetId := gstypes.NewU128(*big.NewInt(assetNum)) - amount2 := gstypes.NewUCompact(amount.Amount.BigInt()) - - call, err := gstypes.NewCall(meta, "Assets.mint", assetId, receiver, amount2) - if err != nil { - return hash, err - } - - return CreateSignSubmitExt(api, meta, senderKeypair, call) -} - -// Common tx function to create an extrinsic and sign/submit it -func CreateSignSubmitExt( - api *gsrpc.SubstrateAPI, - meta *gstypes.Metadata, - senderKeypair signature.KeyringPair, - call gstypes.Call, -) (gstypes.Hash, error) { - hash := gstypes.Hash{} - ext := gstypes.NewExtrinsic(call) - genesisHash, err := api.RPC.Chain.GetBlockHash(0) - if err != nil { - return hash, err - } - - rv, err := api.RPC.State.GetRuntimeVersionLatest() - if err != nil { - return hash, err - } - - pubKey, err := DecodeAddressSS58(senderKeypair.Address) - if err != nil { - return hash, err - } - - key, err := gstypes.CreateStorageKey(meta, "System", "Account", pubKey) - if err != nil { - return hash, err - } - - var accountInfo AccountInfo - ok, err := api.RPC.State.GetStorageLatest(key, &accountInfo) - if err != nil || !ok { - return hash, err - } - - nonce := uint32(accountInfo.Nonce) - o := gstypes.SignatureOptions{ - BlockHash: genesisHash, - Era: gstypes.ExtrinsicEra{IsMortalEra: false}, - GenesisHash: genesisHash, - Nonce: gstypes.NewUCompactFromUInt(uint64(nonce)), - SpecVersion: rv.SpecVersion, - Tip: gstypes.NewUCompactFromUInt(0), - TransactionVersion: rv.TransactionVersion, - } - - // Sign the transaction using Alice's default account - err = ext.Sign(senderKeypair, o) - if err != nil { - return hash, err - } - - // Send the extrinsic - hash, err = api.RPC.Author.SubmitExtrinsic(ext) - - return hash, err -} diff --git a/chain/polkadot/wallet.go b/chain/polkadot/wallet.go deleted file mode 100644 index 767aace28..000000000 --- a/chain/polkadot/wallet.go +++ /dev/null @@ -1,42 +0,0 @@ -package polkadot - -import ( - "github.com/strangelove-ventures/interchaintest/v7/ibc" -) - -var _ ibc.Wallet = &PolkadotWallet{} - -type PolkadotWallet struct { - mnemonic string - address []byte - keyName string - chainCfg ibc.ChainConfig -} - -func NewWallet(keyname string, address []byte, mnemonic string, chainCfg ibc.ChainConfig) *PolkadotWallet { - return &PolkadotWallet{ - mnemonic: mnemonic, - address: address, - keyName: keyname, - chainCfg: chainCfg, - } -} - -func (w *PolkadotWallet) KeyName() string { - return w.keyName -} - -func (w *PolkadotWallet) FormattedAddress() string { - return string(w.address) -} - -// Get mnemonic, only used for relayer wallets -func (w *PolkadotWallet) Mnemonic() string { - return w.mnemonic -} - -// Get Address -// TODO Change to SS58 -func (w *PolkadotWallet) Address() []byte { - return w.address -} diff --git a/chainfactory.go b/chainfactory.go index 6a9a46adc..d507740ee 100644 --- a/chainfactory.go +++ b/chainfactory.go @@ -7,10 +7,9 @@ import ( "strings" "sync" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/chain/penumbra" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/penumbra" + "github.com/strangelove-ventures/interchaintest/v8/ibc" "go.uber.org/zap" "gopkg.in/yaml.v3" ) @@ -133,26 +132,6 @@ func buildChain(log *zap.Logger, testName string, cfg ibc.ChainConfig, numValida return cosmos.NewCosmosChain(testName, cfg, nv, nf, log), nil case "penumbra": return penumbra.NewPenumbraChain(log, testName, cfg, nv, nf), nil - case "polkadot": - // TODO Clean this up. RelayChain config should only reference cfg.Images[0] and parachains should iterate through the remaining - // Maybe just pass everything in like NewCosmosChain and NewPenumbraChain, let NewPolkadotChain figure it out - // Or parachains and ICS consumer chains maybe should be their own chain - switch { - case strings.Contains(cfg.Name, "composable"): - parachains := []polkadot.ParachainConfig{{ - //Bin: "composable", - Bin: "parachain-node", - ChainID: "dev-2000", - //ChainID: "dali-dev", - Image: cfg.Images[1], - NumNodes: nf, - Flags: []string{"--execution=wasm", "--wasmtime-instantiation-strategy=recreate-instance-copy-on-write"}, - RelayChainFlags: []string{"--execution=wasm"}, - }} - return polkadot.NewPolkadotChain(log, testName, cfg, nv, parachains), nil - default: - return nil, fmt.Errorf("unexpected error, unknown polkadot parachain: %s", cfg.Name) - } default: return nil, fmt.Errorf("unexpected error, unknown chain type: %s for chain: %s", cfg.Type, cfg.Name) } diff --git a/chainset.go b/chainset.go index 35502413e..25e6d7dc5 100644 --- a/chainset.go +++ b/chainset.go @@ -9,8 +9,8 @@ import ( "time" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "go.uber.org/multierr" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/chainspec.go b/chainspec.go index e111362ca..5c45de301 100644 --- a/chainspec.go +++ b/chainspec.go @@ -8,7 +8,7 @@ import ( "sync" "sync/atomic" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" "go.uber.org/zap" ) @@ -162,44 +162,6 @@ func (s *ChainSpec) applyConfigOverrides(cfg ibc.ChainConfig) (*ibc.ChainConfig, } cfg.Images[0].Version = versionSplit[1] cfg.Images[1].Version = versionSplit[0] - case "polkadot": - // Only set if ChainSpec's Version is set, if not, Version from Images must be set. - if s.Version != "" { - versionSplit := strings.Split(s.Version, ",") - relayChainImageSplit := strings.Split(versionSplit[0], ":") - var relayChainVersion string - if len(relayChainImageSplit) > 1 { - if relayChainImageSplit[0] != "seunlanlege/centauri-polkadot" && - relayChainImageSplit[0] != "polkadot" { - return nil, fmt.Errorf("only polkadot is supported as the relay chain node. got: %s", relayChainImageSplit[0]) - } - relayChainVersion = relayChainImageSplit[1] - } else { - relayChainVersion = relayChainImageSplit[0] - } - cfg.Images[0].Version = relayChainVersion - switch { - case strings.Contains(s.Name, "composable"): - if len(versionSplit) != 2 { - return nil, fmt.Errorf("unexpected composable version: %s. should be comma separated polkadot:version,composable:version", s.Version) - } - imageSplit := strings.Split(versionSplit[1], ":") - if len(imageSplit) != 2 { - return nil, fmt.Errorf("parachain versions should be in the format parachain_name:parachain_version, got: %s", versionSplit[1]) - } - if !strings.Contains(cfg.Images[1].Repository, imageSplit[0]) { - return nil, fmt.Errorf("unexpected parachain: %s", imageSplit[0]) - } - cfg.Images[1].Version = imageSplit[1] - default: - return nil, fmt.Errorf("unexpected parachain: %s", s.Name) - } - } else { - // Ensure there are at least two images and check the 2nd version is populated - if len(s.ChainConfig.Images) < 2 || s.ChainConfig.Images[1].Version == "" { - return nil, fmt.Errorf("ChainCongfig.Images must be >1 and ChainConfig.Images[1].Version must not be empty") - } - } } return &cfg, nil diff --git a/chainspec_test.go b/chainspec_test.go index 24e25f2a3..d911147ab 100644 --- a/chainspec_test.go +++ b/chainspec_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/cmd/interchaintest/flags.go b/cmd/interchaintest/flags.go index b291dab01..e4413609b 100644 --- a/cmd/interchaintest/flags.go +++ b/cmd/interchaintest/flags.go @@ -6,7 +6,7 @@ import ( "os" "time" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/cmd/interchaintest/interchaintest_test.go b/cmd/interchaintest/interchaintest_test.go index dd65f4b5d..e4c32c2e2 100644 --- a/cmd/interchaintest/interchaintest_test.go +++ b/cmd/interchaintest/interchaintest_test.go @@ -13,14 +13,14 @@ import ( "time" "github.com/rivo/tview" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/conformance" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" - blockdbtui "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb/tui" - "github.com/strangelove-ventures/interchaintest/v7/internal/version" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/conformance" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" + blockdbtui "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb/tui" + "github.com/strangelove-ventures/interchaintest/v8/internal/version" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" "go.uber.org/zap" ) diff --git a/cmd/interchaintest/matrix_test.go b/cmd/interchaintest/matrix_test.go index c06e98d73..98aac8892 100644 --- a/cmd/interchaintest/matrix_test.go +++ b/cmd/interchaintest/matrix_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/conformance/flush.go b/conformance/flush.go index 556442aa2..e8d508ca7 100644 --- a/conformance/flush.go +++ b/conformance/flush.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" ) diff --git a/conformance/relayersetup.go b/conformance/relayersetup.go index 4dc706235..487a112d5 100644 --- a/conformance/relayersetup.go +++ b/conformance/relayersetup.go @@ -7,10 +7,10 @@ import ( conntypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" ) diff --git a/conformance/test.go b/conformance/test.go index bf8b1f668..d75964aaa 100644 --- a/conformance/test.go +++ b/conformance/test.go @@ -14,8 +14,8 @@ // import ( // "testing" // -// "github.com/strangelove-ventures/interchaintest/v7/conformance" -// "github.com/strangelove-ventures/interchaintest/v7/ibc" +// "github.com/strangelove-ventures/interchaintest/v8/conformance" +// "github.com/strangelove-ventures/interchaintest/v8/ibc" // ) // // func TestMyRelayer(t *testing.T) { @@ -38,13 +38,13 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" ) diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go index 930319821..7551ab84d 100644 --- a/examples/cosmos/chain_param_change_test.go +++ b/examples/cosmos/chain_param_change_test.go @@ -6,9 +6,9 @@ import ( "testing" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index 2a97aef1e..413d87286 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/conformance" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/conformance" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/cosmos/light_client_test.go b/examples/cosmos/light_client_test.go index 89cd6f59d..ba26b4d26 100644 --- a/examples/cosmos/light_client_test.go +++ b/examples/cosmos/light_client_test.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/math" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "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" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/cosmos/sdk_47_boundary_test.go b/examples/cosmos/sdk_47_boundary_test.go deleted file mode 100644 index b35e80585..000000000 --- a/examples/cosmos/sdk_47_boundary_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package cosmos_test - -import ( - "context" - "testing" - - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/conformance" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -func TestSDK47Boundary(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - Name: "gaia", - ChainName: "gaia", - Version: "v7.0.3", - }, - { - Name: "ibc-go-simd", - ChainName: "ibc-go-simd", - Version: "andrew-47-rc1", - }, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - client, network := interchaintest.DockerSetup(t) - - chain, counterpartyChain := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain) - - const ( - path = "ibc-path" - relayerName = "relayer" - ) - - // Get a relayer instance - rf := interchaintest.NewBuiltinRelayerFactory( - ibc.CosmosRly, - zaptest.NewLogger(t), - ) - - r := rf.Build(t, client, network) - - ic := interchaintest.NewInterchain(). - AddChain(chain). - AddChain(counterpartyChain). - AddRelayer(r, relayerName). - AddLink(interchaintest.InterchainLink{ - Chain1: chain, - Chain2: counterpartyChain, - Relayer: r, - Path: path, - }) - - ctx := context.Background() - - rep := testreporter.NewNopReporter() - - require.NoError(t, ic.Build(ctx, rep.RelayerExecReporter(t), interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: false, - })) - t.Cleanup(func() { - _ = ic.Close() - }) - - // test IBC conformance - conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, path) -} diff --git a/examples/cosmos/sdk_boundary_test.go b/examples/cosmos/sdk_boundary_test.go new file mode 100644 index 000000000..eed455076 --- /dev/null +++ b/examples/cosmos/sdk_boundary_test.go @@ -0,0 +1,132 @@ +package cosmos_test + +import ( + "context" + "testing" + + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/conformance" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/relayer/rly" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" +) + +type boundarySpecs struct { + name string + chainSpecs []*interchaintest.ChainSpec + relayerVersion string +} + +func TestSDKBoundaries(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + + t.Parallel() + + var tests = []boundarySpecs{ + { + name: "sdk 45 <-> 50", + chainSpecs: []*interchaintest.ChainSpec{ + { + Name: "gaia", ChainName: "gaia", Version: "v7.0.3", //sdk 0.45.6 + }, + { + Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", //sdk 0.50 alpha + ChainConfig: ibc.ChainConfig{ + UsingNewGenesisCommand: true, + }, + }, + }, + relayerVersion: "colin-event-fix", + }, + { + name: "sdk 47 <-> 50", + chainSpecs: []*interchaintest.ChainSpec{ + { + Name: "ibc-go-simd", ChainName: "simd-47", Version: "v7.2.0", //sdk 0.47.3 + }, + { + Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", //sdk 0.50 alpha + ChainConfig: ibc.ChainConfig{ + UsingNewGenesisCommand: true, + }, + }, + }, + relayerVersion: "colin-event-fix", + }, + } + + for _, tt := range tests { + tt := tt + testname := tt.name + t.Run(testname, func(t *testing.T) { + t.Parallel() + + cf := interchaintest.NewBuiltinChainFactory( + zaptest.NewLogger(t), + tt.chainSpecs, + ) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + + client, network := interchaintest.DockerSetup(t) + + chain, counterpartyChain := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain) + + const ( + path = "ibc-path" + relayerName = "relayer" + ) + + // Get a relayer instance + rf := interchaintest.NewBuiltinRelayerFactory( + ibc.CosmosRly, + zaptest.NewLogger(t), + relayer.CustomDockerImage( + rly.DefaultContainerImage, + tt.relayerVersion, + rly.RlyDefaultUidGid, + ), + ) + + r := rf.Build(t, client, network) + + ic := interchaintest.NewInterchain(). + AddChain(chain). + AddChain(counterpartyChain). + AddRelayer(r, relayerName). + AddLink(interchaintest.InterchainLink{ + Chain1: chain, + Chain2: counterpartyChain, + Relayer: r, + Path: path, + }) + + ctx := context.Background() + + rep := testreporter.NewNopReporter() + + require.NoError(t, ic.Build(ctx, rep.RelayerExecReporter(t), interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), + SkipPathCreation: false, + })) + t.Cleanup(func() { + _ = ic.Close() + }) + + // test IBC conformance + conformance.TestChainPair(t, ctx, client, network, chain, counterpartyChain, rf, rep, r, path) + + }) + } + +} diff --git a/examples/cosmos/state_sync_test.go b/examples/cosmos/state_sync_test.go index 8e7db028c..181ae3050 100644 --- a/examples/cosmos/state_sync_test.go +++ b/examples/cosmos/state_sync_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + 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/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/hyperspace/hyperspace_test.go b/examples/hyperspace/hyperspace_test.go deleted file mode 100644 index 7e9a4b7e4..000000000 --- a/examples/hyperspace/hyperspace_test.go +++ /dev/null @@ -1,402 +0,0 @@ -package hyperspace_test - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "testing" - "time" - - "cosmossdk.io/math" - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/icza/dyno" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -// TestHyperspace setup -// Must build local docker images of hyperspace, parachain, and polkadot -// ###### hyperspace ###### -// * Repo: ComposableFi/centauri -// * Branch: vmarkushin/wasm -// * Commit: 00ee58381df66b035be75721e6e16c2bbf82f076 -// * Build local Hyperspace docker from centauri repo: -// amd64: "docker build -f scripts/hyperspace.Dockerfile -t hyperspace:local ." -// arm64: "docker build -f scripts/hyperspace.aarch64.Dockerfile -t hyperspace:latest --platform=linux/arm64/v8 . -// ###### parachain ###### -// * Repo: ComposableFi/centauri -// * Branch: vmarkushin/wasm -// * Commit: 00ee58381df66b035be75721e6e16c2bbf82f076 -// * Build local parachain docker from centauri repo: -// ./scripts/build-parachain-node-docker.sh (you can change the script to compile for ARM arch if needed) -// ###### polkadot ###### -// * Repo: paritytech/polkadot -// * Branch: release-v0.9.36 -// * Commit: dc25abc712e42b9b51d87ad1168e453a42b5f0bc -// * Build local polkadot docker from polkadot repo -// amd64: docker build -f scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile . -t polkadot-node:local -// arm64: docker build --platform linux/arm64 -f scripts/ci/dockerfiles/polkadot/polkadot_builder.aarch64.Dockerfile . -t polkadot-node:local - -const ( - heightDelta = uint64(20) - votingPeriod = "30s" - maxDepositPeriod = "10s" - aliceAddress = "5yNZjX24n2eg7W6EVamaTXNQbWCwchhThEaSWB7V3GRjtHeL" -) - -// TestHyperspace 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 TestHyperspace(t *testing.T) { - if testing.Short() { - t.Skip() - } - - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - ctx := context.Background() - - nv := 5 // Number of validators - nf := 3 // Number of full nodes - - consensusOverrides := make(testutil.Toml) - blockTime := 5 // seconds, parachain is 12 second blocks, don't make relayer work harder than needed - blockT := (time.Duration(blockTime) * time.Second).String() - consensusOverrides["timeout_commit"] = blockT - consensusOverrides["timeout_propose"] = blockT - - configTomlOverrides := make(testutil.Toml) - configTomlOverrides["consensus"] = consensusOverrides - - configFileOverrides := make(map[string]any) - configFileOverrides["config/config.toml"] = configTomlOverrides - - // Get both chains - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - ChainName: "composable", // Set ChainName so that a suffix with a "dash" is not appended (required for hyperspace) - ChainConfig: ibc.ChainConfig{ - Type: "polkadot", - Name: "composable", - ChainID: "rococo-local", - Images: []ibc.DockerImage{ - { - Repository: "polkadot-node", - Version: "local", - UidGid: "1000:1000", - }, - { - Repository: "parachain-node", - Version: "latest", - //UidGid: "1025:1025", - }, - }, - Bin: "polkadot", - Bech32Prefix: "composable", - Denom: "uDOT", - GasPrices: "", - GasAdjustment: 0, - TrustingPeriod: "", - CoinType: "354", - }, - NumValidators: &nv, - NumFullNodes: &nf, - }, - { - ChainName: "simd", // Set chain name so that a suffix with a "dash" is not appended (required for hyperspace) - ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "simd", - ChainID: "simd", - Images: []ibc.DockerImage{ - { - Repository: "ghcr.io/strangelove-ventures/heighliner/ibc-go-simd", - Version: "feat-wasm-clients", - UidGid: "1025:1025", - }, - }, - Bin: "simd", - Bech32Prefix: "cosmos", - Denom: "stake", - GasPrices: "0.00stake", - GasAdjustment: 1.3, - TrustingPeriod: "504h", - CoinType: "118", - //EncodingConfig: WasmClientEncoding(), - NoHostMount: true, - ConfigFileOverrides: configFileOverrides, - ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), - }, - }, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - polkadotChain := chains[0].(*polkadot.PolkadotChain) - cosmosChain := chains[1].(*cosmos.CosmosChain) - - // Get a relayer instance - r := interchaintest.NewBuiltinRelayerFactory( - ibc.Hyperspace, - zaptest.NewLogger(t), - // These two fields are used to pass in a custom Docker image built locally - relayer.ImagePull(false), - relayer.CustomDockerImage("hyperspace", "local", "1000:1000"), - ).Build(t, client, network) - - // Build the network; spin up the chains and configure the relayer - const pathName = "composable-simd" - const relayerName = "hyperspace" - - ic := interchaintest.NewInterchain(). - AddChain(polkadotChain). - AddChain(cosmosChain). - AddRelayer(r, relayerName). - AddLink(interchaintest.InterchainLink{ - Chain1: polkadotChain, - Chain2: cosmosChain, - Relayer: r, - Path: pathName, - }) - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: true, // Skip path creation, so we can have granular control over the process - })) - fmt.Println("Interchain built") - - t.Cleanup(func() { - _ = ic.Close() - }) - - // Create a proposal, vote, and wait for it to pass. Return code hash for relayer. - codeHash := pushWasmContractViaGov(t, ctx, cosmosChain) - - // Set client contract hash in cosmos chain config - err = r.SetClientContractHash(ctx, eRep, cosmosChain.Config(), codeHash) - require.NoError(t, err) - - // Ensure parachain has started (starts 1 session/epoch after relay chain) - err = testutil.WaitForBlocks(ctx, 1, polkadotChain) - require.NoError(t, 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) - polkadotUser, cosmosUser := fundUsers(t, ctx, fundAmount, polkadotChain, cosmosChain) - - err = r.GeneratePath(ctx, eRep, cosmosChain.Config().ChainID, polkadotChain.Config().ChainID, pathName) - require.NoError(t, err) - - // Create new clients - err = r.CreateClients(ctx, eRep, pathName, ibc.DefaultClientOpts()) - require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) // these 1 block waits seem to be needed to reduce flakiness - require.NoError(t, err) - - // Create a new connection - err = r.CreateConnections(ctx, eRep, pathName) - require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) - require.NoError(t, err) - - // Create a new channel & get channels from each chain - err = r.CreateChannel(ctx, eRep, pathName, ibc.DefaultChannelOpts()) - require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 1, cosmosChain, polkadotChain) - require.NoError(t, err) - - // Start relayer - r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - t.Cleanup(func() { - err = r.StopRelayer(ctx, eRep) - if err != nil { - panic(err) - } - }) - - // Send 1.77 stake from cosmosUser to parachainUser - amountToSend := int64(1_770_000) - transfer := ibc.WalletAmount{ - Address: polkadotUser.FormattedAddress(), - Denom: cosmosChain.Config().Denom, - Amount: math.NewInt(amountToSend), - } - tx, err := cosmosChain.SendIBCTransfer(ctx, "channel-0", cosmosUser.KeyName(), transfer, ibc.TransferOptions{}) - require.NoError(t, err) - require.NoError(t, tx.Validate()) // test source wallet has decreased funds - err = testutil.WaitForBlocks(ctx, 5, cosmosChain, polkadotChain) - require.NoError(t, err) - - // Verify tokens arrived on parachain user - parachainUserStake, err := polkadotChain.GetIbcBalance(ctx, string(polkadotUser.Address()), 2) - require.NoError(t, err) - require.Equal(t, amountToSend, parachainUserStake.Amount.Int64(), "parachain user's stake amount not expected after first tx") - - // Send 1.16 stake from parachainUser to cosmosUser - amountToReflect := int64(1_160_000) - reflectTransfer := ibc.WalletAmount{ - Address: cosmosUser.FormattedAddress(), - Denom: "2", // stake - Amount: math.NewInt(amountToReflect), - } - _, err = polkadotChain.SendIBCTransfer(ctx, "channel-0", polkadotUser.KeyName(), reflectTransfer, ibc.TransferOptions{}) - require.NoError(t, err) - - // Send 1.88 "UNIT" from Alice to cosmosUser - amountUnits := math.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{}) - require.NoError(t, err) - - // Wait for MsgRecvPacket on cosmos chain - finalStakeBal := math.NewInt(fundAmount - amountToSend + amountToReflect) - err = cosmos.PollForBalance(ctx, cosmosChain, 20, ibc.WalletAmount{ - Address: cosmosUser.FormattedAddress(), - Denom: cosmosChain.Config().Denom, - Amount: finalStakeBal, - }) - require.NoError(t, err) - - // Verify cosmos user's final "stake" balance - cosmosUserStakeBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - require.NoError(t, err) - require.True(t, cosmosUserStakeBal.Equal(finalStakeBal)) - - // Verify cosmos user's final "unit" balance - unitDenomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom("transfer", "channel-0", "UNIT")) - cosmosUserUnitBal, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), unitDenomTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, 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) - require.NoError(t, err) - require.True(t, parachainUserUnits.Amount.LTE(math.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) - require.NoError(t, err) - require.True(t, parachainUserStake.Equal(math.NewInt(amountToSend-amountToReflect)), "parachain user's final stake amount not expected") -} - -type GetCodeQueryMsgResponse struct { - Code []byte `json:"code"` -} - -func pushWasmContractViaGov(t *testing.T, ctx context.Context, cosmosChain *cosmos.CosmosChain) string { - // Set up cosmos user for pushing new wasm code msg via governance - fundAmountForGov := int64(10_000_000_000) - contractUsers := interchaintest.GetAndFundTestUsers(t, ctx, "default", int64(fundAmountForGov), cosmosChain) - contractUser := contractUsers[0] - - contractUserBalInitial, err := cosmosChain.GetBalance(ctx, contractUser.FormattedAddress(), cosmosChain.Config().Denom) - require.NoError(t, err) - require.True(t, contractUserBalInitial.Equal(math.NewInt(fundAmountForGov))) - - proposal := cosmos.TxProposalv1{ - Metadata: "none", - Deposit: "500000000" + cosmosChain.Config().Denom, // greater than min deposit - Title: "Grandpa Contract", - Summary: "new grandpa contract", - } - - proposalTx, codeHash, err := cosmosChain.PushNewWasmClientProposal(ctx, contractUser.KeyName(), "../polkadot/ics10_grandpa_cw.wasm", proposal) - require.NoError(t, err, "error submitting new wasm contract proposal tx") - - height, err := cosmosChain.Height(ctx) - require.NoError(t, err, "error fetching height before submit upgrade proposal") - - err = cosmosChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - - _, err = cosmos.PollForProposalStatus(ctx, cosmosChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) - require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - - err = testutil.WaitForBlocks(ctx, 1, cosmosChain) - require.NoError(t, err) - - var getCodeQueryMsgRsp GetCodeQueryMsgResponse - err = cosmosChain.QueryClientContractCode(ctx, codeHash, &getCodeQueryMsgRsp) - codeHashByte32 := sha256.Sum256(getCodeQueryMsgRsp.Code) - codeHash2 := hex.EncodeToString(codeHashByte32[:]) - require.NoError(t, err) - require.NotEmpty(t, getCodeQueryMsgRsp.Code) - require.Equal(t, codeHash, codeHash2) - - return codeHash -} - -func fundUsers(t *testing.T, ctx context.Context, fundAmount int64, polkadotChain ibc.Chain, cosmosChain ibc.Chain) (ibc.Wallet, ibc.Wallet) { - users := interchaintest.GetAndFundTestUsers(t, ctx, "user", fundAmount, polkadotChain, cosmosChain) - polkadotUser, cosmosUser := users[0], users[1] - err := testutil.WaitForBlocks(ctx, 2, polkadotChain, cosmosChain) // Only waiting 1 block is flaky for parachain - require.NoError(t, err, "cosmos or polkadot chain failed to make blocks") - - // Check balances are correct - amount := math.NewInt(fundAmount) - polkadotUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), polkadotChain.Config().Denom) - require.NoError(t, err) - require.True(t, polkadotUserAmount.Equal(amount), "Initial polkadot user amount not expected") - - parachainUserAmount, err := polkadotChain.GetBalance(ctx, polkadotUser.FormattedAddress(), "") - require.NoError(t, err) - require.True(t, parachainUserAmount.Equal(amount), "Initial parachain user amount not expected") - - cosmosUserAmount, err := cosmosChain.GetBalance(ctx, cosmosUser.FormattedAddress(), cosmosChain.Config().Denom) - require.NoError(t, err) - require.True(t, cosmosUserAmount.Equal(amount), "Initial cosmos user amount not expected") - - return polkadotUser, cosmosUser -} - -func modifyGenesisShortProposals(votingPeriod string, maxDepositPeriod string) func(ibc.ChainConfig, []byte) ([]byte, error) { - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - g := make(map[string]interface{}) - if err := json.Unmarshal(genbz, &g); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - if err := dyno.Set(g, votingPeriod, "app_state", "gov", "params", "voting_period"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - if err := dyno.Set(g, maxDepositPeriod, "app_state", "gov", "params", "max_deposit_period"); err != nil { - return nil, fmt.Errorf("failed to set max deposit period in genesis json: %w", err) - } - if err := dyno.Set(g, chainConfig.Denom, "app_state", "gov", "params", "min_deposit", 0, "denom"); err != nil { - return nil, fmt.Errorf("failed to set min deposit in genesis json: %w", err) - } - out, err := json.Marshal(g) - if err != nil { - return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) - } - return out, nil - } -} diff --git a/examples/ibc/interchain_accounts_test.go b/examples/ibc/interchain_accounts_test.go index 2ce1796fb..defd58537 100644 --- a/examples/ibc/interchain_accounts_test.go +++ b/examples/ibc/interchain_accounts_test.go @@ -10,12 +10,12 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keyring" chantypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/ibc/interchain_queries_test.go b/examples/ibc/interchain_queries_test.go index d1f159584..6b63c6b2b 100644 --- a/examples/ibc/interchain_queries_test.go +++ b/examples/ibc/interchain_queries_test.go @@ -9,13 +9,13 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/icza/dyno" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + 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/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/ibc/learn_ibc_test.go b/examples/ibc/learn_ibc_test.go index e96403c7a..cd537599b 100644 --- a/examples/ibc/learn_ibc_test.go +++ b/examples/ibc/learn_ibc_test.go @@ -8,9 +8,9 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/ibc/packet_forward_test.go b/examples/ibc/packet_forward_test.go index 396741328..951080265 100644 --- a/examples/ibc/packet_forward_test.go +++ b/examples/ibc/packet_forward_test.go @@ -8,11 +8,11 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm b/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm deleted file mode 100644 index 9c715dba0..000000000 Binary files a/examples/ibc/wasm/sample_contracts/ibc_reflect.wasm and /dev/null differ diff --git a/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm b/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm deleted file mode 100644 index 0bc7112b3..000000000 Binary files a/examples/ibc/wasm/sample_contracts/ibc_reflect_send.wasm and /dev/null differ diff --git a/examples/ibc/wasm/sample_contracts/icq.wasm b/examples/ibc/wasm/sample_contracts/icq.wasm deleted file mode 100644 index 3721d42af..000000000 Binary files a/examples/ibc/wasm/sample_contracts/icq.wasm and /dev/null differ diff --git a/examples/ibc/wasm/sample_contracts/reflect.wasm b/examples/ibc/wasm/sample_contracts/reflect.wasm deleted file mode 100644 index 4e8057737..000000000 Binary files a/examples/ibc/wasm/sample_contracts/reflect.wasm and /dev/null differ diff --git a/examples/ibc/wasm/wasm_ibc_test.go b/examples/ibc/wasm/wasm_ibc_test.go deleted file mode 100644 index 5bd2c034c..000000000 --- a/examples/ibc/wasm/wasm_ibc_test.go +++ /dev/null @@ -1,221 +0,0 @@ -package wasm_test - -import ( - "context" - "fmt" - "testing" - "time" - - "cosmossdk.io/math" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/wasm" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -func TestWasmIbc(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - ctx := context.Background() - - // Chain Factory - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {Name: "juno", ChainName: "juno1", Version: "latest", ChainConfig: ibc.ChainConfig{ - GasPrices: "0.00ujuno", - EncodingConfig: wasm.WasmEncoding(), - }}, - {Name: "juno", ChainName: "juno2", Version: "latest", ChainConfig: ibc.ChainConfig{ - GasPrices: "0.00ujuno", - EncodingConfig: wasm.WasmEncoding(), - }}, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - juno1, juno2 := chains[0], chains[1] - - // Relayer Factory - client, network := interchaintest.DockerSetup(t) - r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t)).Build( - t, client, network) - - // Prep Interchain - const ibcPath = "wasmpath" - ic := interchaintest.NewInterchain(). - AddChain(juno1). - AddChain(juno2). - AddRelayer(r, "relayer"). - AddLink(interchaintest.InterchainLink{ - Chain1: juno1, - Chain2: juno2, - Relayer: r, - Path: ibcPath, - }) - - // Log location - f, err := interchaintest.CreateLogFile(fmt.Sprintf("wasm_ibc_test_%d.json", time.Now().Unix())) - require.NoError(t, err) - // Reporter/logs - rep := testreporter.NewReporter(f) - eRep := rep.RelayerExecReporter(t) - - // Build interchain - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: false, - })) - t.Cleanup(func() { - _ = ic.Close() - }) - - // Create and Fund User Wallets - initBal := math.NewInt(100_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "default", initBal.Int64(), juno1, juno2) - juno1User := users[0] - juno2User := users[1] - - err = testutil.WaitForBlocks(ctx, 2, juno1, juno2) - require.NoError(t, err) - - juno1UserBalInitial, err := juno1.GetBalance(ctx, juno1User.FormattedAddress(), juno1.Config().Denom) - require.NoError(t, err) - require.True(t, juno1UserBalInitial.Equal(initBal)) - - juno2UserBalInitial, err := juno2.GetBalance(ctx, juno2User.FormattedAddress(), juno2.Config().Denom) - require.NoError(t, err) - require.True(t, juno2UserBalInitial.Equal(initBal)) - - // Start the relayer - err = r.StartRelayer(ctx, eRep, ibcPath) - require.NoError(t, err) - - t.Cleanup( - func() { - err := r.StopRelayer(ctx, eRep) - if err != nil { - t.Logf("an error occured while stopping the relayer: %s", err) - } - }, - ) - - juno1Chain := juno1.(*cosmos.CosmosChain) - juno2Chain := juno2.(*cosmos.CosmosChain) - - // Store ibc_reflect_send.wasm contract - ibcReflectSendCodeId, err := juno1Chain.StoreContract( - ctx, juno1User.KeyName(), "sample_contracts/ibc_reflect_send.wasm") - require.NoError(t, err) - - // Instantiate ibc_reflect_send.wasm contract - ibcReflectSendContractAddr, err := juno1Chain.InstantiateContract( - ctx, juno1User.KeyName(), ibcReflectSendCodeId, "{}", true) - require.NoError(t, err) - - // Store reflect.wasm contract - reflectCodeId, err := juno2Chain.StoreContract( - ctx, juno2User.KeyName(), "sample_contracts/reflect.wasm") - require.NoError(t, err) - - // Instantiate reflect.wasm contract - _, err = juno2Chain.InstantiateContract( - ctx, juno2User.KeyName(), reflectCodeId, "{}", true) - require.NoError(t, err) - - // Store ibc_reflect.wasm contract - ibcReflectCodeId, err := juno2Chain.StoreContract( - ctx, juno2User.KeyName(), "sample_contracts/ibc_reflect.wasm") - require.NoError(t, err) - - // Instantiate ibc_reflect_send.wasm contract - initMsg := "{\"reflect_code_id\":" + reflectCodeId + "}" - ibcReflectContractAddr, err := juno2Chain.InstantiateContract( - ctx, juno2User.KeyName(), ibcReflectCodeId, initMsg, true) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 2, juno1, juno2) - require.NoError(t, err) - - // Set up channel - ibcReflectSendPortId := "wasm." + ibcReflectSendContractAddr - ibcReflectPortId := "wasm." + ibcReflectContractAddr - err = r.CreateChannel(ctx, eRep, ibcPath, ibc.CreateChannelOptions{ - SourcePortName: ibcReflectSendPortId, - DestPortName: ibcReflectPortId, - Order: ibc.Ordered, - Version: "ibc-reflect-v1", - }) - require.NoError(t, err) - - // Wait for the channel to get set up and whoami message to exchange - err = testutil.WaitForBlocks(ctx, 10, juno1, juno2) - require.NoError(t, err) - - // Get contract channel - juno1ChannelInfo, err := r.GetChannels(ctx, eRep, juno1.Config().ChainID) - require.NoError(t, err) - juno1ChannelID := juno1ChannelInfo[len(juno1ChannelInfo)-1].ChannelID - - // Query ibc_reflect_send contract on Juno1 for remote address (populated via ibc) - queryMsg := ReflectSendQueryMsg{Account: &AccountQuery{ChannelID: juno1ChannelID}} - var ibcReflectSendResponse IbcReflectSendResponseData - err = juno1Chain.QueryContract(ctx, ibcReflectSendContractAddr, queryMsg, &ibcReflectSendResponse) - require.NoError(t, err) - require.NotEmpty(t, ibcReflectSendResponse.Data.RemoteAddr) - - // Query ibc_reflect contract on Juno2 for local account address - var ibcReflectResponse IbcReflectResponseData - err = juno2Chain.QueryContract(ctx, ibcReflectContractAddr, queryMsg, &ibcReflectResponse) - require.NoError(t, err) - require.NotEmpty(t, ibcReflectResponse.Data.Account) - - // Verify that these addresses match, a match is a successful test run - // - ibc_reflect_send contract (Juno1) remote address (retrieved via ibc) - // - ibc_reflect contract (Juno2) account address populated locally - require.Equal(t, ibcReflectSendResponse.Data.RemoteAddr, ibcReflectResponse.Data.Account) -} - -type ReflectSendQueryMsg struct { - Admin *struct{} `json:"admin,omitempty"` - ListAccounts *struct{} `json:"list_accounts,omitempty"` - Account *AccountQuery `json:"account,omitempty"` -} - -type AccountQuery struct { - ChannelID string `json:"channel_id"` -} - -type Coin struct { - Denom string `json:"denom"` // type, eg. "ATOM" - Amount string `json:"amount"` // string encoing of decimal value, eg. "12.3456" -} - -type Coins []Coin - -type IbcReflectSendAccountResponse struct { - LastUpdateTime uint64 `json:"last_update_time,string"` - RemoteAddr string `json:"remote_addr"` - RemoteBalance Coins `json:"remote_balance"` -} - -// ibc_reflect_send response data -type IbcReflectSendResponseData struct { - Data IbcReflectSendAccountResponse `json:"data"` -} - -type IbcReflectAccountResponse struct { - Account string `json:"account"` -} - -// ibc_reflect response data -type IbcReflectResponseData struct { - Data IbcReflectAccountResponse `json:"data"` -} diff --git a/examples/ibc/wasm/wasm_icq_test.go b/examples/ibc/wasm/wasm_icq_test.go deleted file mode 100644 index ebc90eabb..000000000 --- a/examples/ibc/wasm/wasm_icq_test.go +++ /dev/null @@ -1,406 +0,0 @@ -package wasm - -import ( - "context" - "encoding/base64" - "encoding/hex" - "encoding/json" - "fmt" - "strconv" - "testing" - "time" - - "cosmossdk.io/math" - "github.com/strangelove-ventures/interchaintest/v7" - cosmosChain "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos/wasm" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "go.uber.org/zap/zaptest" -) - -// TestInterchainQueriesWASM is a test case that performs a round trip query from an ICQ wasm contract <> ICQ module. -// On the sender chain, CosmWasm capability is required to instantiate/execute the smart contract. On the receiver chain, -// the ICQ module is required to be present in order to receive interchain queries. -func TestInterchainQueriesWASM(t *testing.T) { - //TODO (1): force relayer to use specific versions of the chains configured in the file. - //os.Setenv("IBCTEST_CONFIGURED_CHAINS", "./icq_wasm_configured_chains.yaml") - - //TODO (2): use Juno as sender "ghcr.io/strangelove-ventures/heighliner/juno:v10.1.0" - //and Strangelove's icqd (or another chain with ICQ module present) as receiver. - - logger := zaptest.NewLogger(t) - - if testing.Short() { - t.Skip() - } - - client, network := interchaintest.DockerSetup(t) - f, err := interchaintest.CreateLogFile(fmt.Sprintf("wasm_ibc_test_%d.json", time.Now().Unix())) - require.NoError(t, err) - rep := testreporter.NewReporter(f) - eRep := rep.RelayerExecReporter(t) - ctx := context.Background() - contractFilePath := "sample_contracts/icq.wasm" //Contract that will be initialized on chain - - wasmImage := ibc.DockerImage{ - Repository: "ghcr.io/strangelove-ventures/heighliner/wasmd", - Version: "v0.0.1", - UidGid: dockerutil.GetHeighlinerUserString(), - } - - genesisAllowICQ := map[string]interface{}{ - "interchainquery": map[string]interface{}{ - "host_port": "icqhost", - "params": map[string]interface{}{ - "host_enabled": true, - "allow_queries": []interface{}{"/cosmos.bank.v1beta1.Query/AllBalances"}, - }, - }, - } - - minVal := 1 - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - ChainName: "sender", - NumValidators: &minVal, - ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "sender", - ChainID: "sender", - Images: []ibc.DockerImage{wasmImage}, - Bin: "wasmd", - Bech32Prefix: "wasm", - Denom: "uatom", - GasPrices: "0.00uatom", - TrustingPeriod: "300h", - GasAdjustment: 1.1, - EncodingConfig: wasm.WasmEncoding(), - ModifyGenesis: modifyGenesisAtPath(genesisAllowICQ, "app_state"), - }}, - { - ChainName: "receiver", - NumValidators: &minVal, - ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "receiver", - ChainID: "receiver", - Images: []ibc.DockerImage{wasmImage}, - Bin: "wasmd", - Bech32Prefix: "wasm", - Denom: "uatom", - GasPrices: "0.00uatom", - TrustingPeriod: "300h", - GasAdjustment: 1.1, - EncodingConfig: wasm.WasmEncoding(), - ModifyGenesis: modifyGenesisAtPath(genesisAllowICQ, "app_state"), - }}, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - chain1, chain2 := chains[0], chains[1] - - // Get a relayer instance - r := interchaintest.NewBuiltinRelayerFactory( - ibc.CosmosRly, - logger, - relayer.RelayerOptionExtraStartFlags{Flags: []string{"-p", "events", "-b", "100"}}, - ).Build(t, client, network) - - // Build the network; spin up the chains and configure the relayer - const pathName = "test1-test2" - const relayerName = "relayer" - - ic := interchaintest.NewInterchain(). - AddChain(chain1). - AddChain(chain2). - AddRelayer(r, relayerName). - AddLink(interchaintest.InterchainLink{ - Chain1: chain1, - Chain2: chain2, - Relayer: r, - Path: pathName, - }) - - logger.Info("ic.Build()") - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: false, - })) - - // Wait a few blocks for user accounts to be created on chain - logger.Info("wait for user accounts") - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - // Fund user accounts so we can query balances - chain1UserAmt := math.NewInt(10_000_000_000) - chain2UserAmt := math.NewInt(99_999_999_999) - chain1User := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), chain1UserAmt.Int64(), chain1)[0] - chain2User := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), chain2UserAmt.Int64(), chain2)[0] - - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - chain1UserAddress := chain1User.FormattedAddress() - require.NotEmpty(t, chain1UserAddress) - - chain2UserAddress := chain2User.FormattedAddress() - logger.Info("Address", zap.String("chain 2 user", chain2UserAddress)) - require.NotEmpty(t, chain2UserAddress) - - chain1UserBalInitial, err := chain1.GetBalance(ctx, chain1UserAddress, chain1.Config().Denom) - require.NoError(t, err) - require.True(t, chain1UserBalInitial.Equal(chain1UserAmt)) - - chain2UserBalInitial, err := chain2.GetBalance(ctx, chain2UserAddress, chain2.Config().Denom) - require.NoError(t, err) - require.True(t, chain2UserBalInitial.Equal(chain2UserAmt)) - - logger.Info("instantiating contract") - initMessage := "{\"default_timeout\": 1000}" - chain1CChain := chain1.(*cosmosChain.CosmosChain) - - wasmIcqCodeId, err := chain1CChain.StoreContract(ctx, chain1User.KeyName(), contractFilePath) - require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - //Instantiate the smart contract on the test chain, facilitating testing of ICQ WASM functionality - contractAddr, err := chain1CChain.InstantiateContract(ctx, chain1User.KeyName(), wasmIcqCodeId, initMessage, true) - require.NoError(t, err) - logger.Info("icq contract deployed", zap.String("contractAddr", contractAddr)) - - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - icqWasmPortId := "wasm." + contractAddr - destPort := "icqhost" - // Create channel between icq wasm contract <> icq module. - err = r.CreateChannel(ctx, eRep, pathName, ibc.CreateChannelOptions{ - SourcePortName: icqWasmPortId, - DestPortName: destPort, - Order: ibc.Unordered, - Version: "icq-1", - }) - require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - // Query for the recently created channel-id. - chain2Channels, err := r.GetChannels(ctx, eRep, chain2.Config().ChainID) - require.NoError(t, err) - - for _, c1 := range chain2Channels { - logger.Info("Channel", zap.String("Info", fmt.Sprintf("Channel ID: %s, Port ID: %s, Version: %s, Counterparty Channel ID: %s, Counterparty Port ID: %s", c1.ChannelID, c1.PortID, c1.Version, c1.Counterparty.ChannelID, c1.Counterparty.PortID))) - } - - require.NoError(t, err) - channel := FirstWithPort(chain2Channels, destPort) - require.NotNil(t, channel) - require.NotEmpty(t, channel.Counterparty.ChannelID) - - // Start the relayer and set the cleanup function. - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - t.Cleanup( - func() { - err := r.StopRelayer(ctx, eRep) - if err != nil { - t.Logf("an error occured while stopping the relayer: %s", err) - } - }, - ) - - // Wait a few blocks for the relayer to start. - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - logger.Info("channel", zap.String("info", fmt.Sprintf("Channel Port: %s, Channel ID: %s, Counterparty Channel ID: %s", channel.PortID, channel.ChannelID, channel.Counterparty.ChannelID))) - - //Query for the balances of an account on the counterparty chain using interchain queries. - //Get the base64 encoded chain2 user address in the format required by the AllBalances query - chain2UserAddrQuery := fmt.Sprintf(`{"address":"%s"}`, chain2UserAddress) - chain2UserAddrQueryB64 := base64.StdEncoding.EncodeToString([]byte(chain2UserAddrQuery)) - - // Get current block height for chain 2 - cmd := []string{chain2.Config().Bin, "status", - "--node", chain2.GetRPCAddress(), - "--home", chain2.HomeDir(), - } - stdout, _, err := chain2.Exec(ctx, cmd, nil) - require.NoError(t, err) - blockHeightC2 := &statusResults{} - err = json.Unmarshal(stdout, blockHeightC2) - require.NoError(t, err) - - //and chain 1 - // Get current block height - cmd = []string{chain1.Config().Bin, "status", - "--node", chain1.GetRPCAddress(), - "--home", chain1.HomeDir(), - } - stdout, _, err = chain1.Exec(ctx, cmd, nil) - require.NoError(t, err) - blockHeightC1 := &statusResults{} - err = json.Unmarshal(stdout, blockHeightC1) - require.NoError(t, err) - - logger.Info("Chain height", zap.String("Chain 1", blockHeightC1.SyncInfo.Height), zap.String("Chain 2", blockHeightC2.SyncInfo.Height)) - - query := executeQuery{ - Query: msgQuery{ - Timeout: 1000, - Channel: channel.ChannelID, - Requests: []RequestQuery{ //can't use abci.RequestQuery since Height/Prove JSON fields are omitted which causes contract errors - { - Height: 0, - Prove: false, - Path: "/cosmos.bank.v1beta1.Query/AllBalances", - Data: []byte(chain2UserAddrQueryB64), - }, - }, - }, - } - - b, err := json.Marshal(query) - require.NoError(t, err) - msg := string(b) - logger.Info("Executing msg ->", zap.String("msg", msg)) - - //Query the contract on chain 1. The contract makes an interchain query to chain 2 to get the chain 2 user's balance. - hash, err := chain1CChain.ExecuteContract(ctx, chain1User.KeyName(), contractAddr, msg) - - require.NoError(t, err) - - // Check the results from the interchain query above. - cmd = []string{chain1.Config().Bin, "query", "tx", hash, - "--node", chain1.GetRPCAddress(), - "--home", chain1.HomeDir(), - "--chain-id", chain1.Config().ChainID, - "--output", "json", - } - _, _, err = chain1.Exec(ctx, cmd, nil) - require.NoError(t, err) - - // Wait a few blocks for query to be sent to counterparty. - err = testutil.WaitForBlocks(ctx, 5, chain1, chain2) - require.NoError(t, err) - - // Check the results from the interchain query above. - cmd = []string{chain1.Config().Bin, "query", "wasm", "contract-state", "all", contractAddr, - "--node", chain1.GetRPCAddress(), - "--home", chain1.HomeDir(), - "--chain-id", chain1.Config().ChainID, - "--output", "json", - } - - stdout, _, err = chain1.Exec(ctx, cmd, nil) - require.NoError(t, err) - results := &contractStateResp{} - err = json.Unmarshal(stdout, results) - require.NoError(t, err) - hasIcqQuery := false - - for _, kv := range results.Models { - keyBytes, _ := hex.DecodeString(kv.Key) - valueBytes, err := base64.StdEncoding.DecodeString(kv.Value) - require.NoError(t, err) - if string(keyBytes) == "query_result_counter" { - res, err := strconv.Atoi(string(valueBytes)) - require.NoError(t, err) - if res > 0 { - hasIcqQuery = true - logger.Info("ICQ query result counter", zap.Int("counter", res)) - } - } - } - require.Equal(t, hasIcqQuery, true) -} - -func FirstWithPort(channels []ibc.ChannelOutput, port string) *ibc.ChannelOutput { - for _, channel := range channels { - if channel.PortID == port { - return &channel - } - } - return nil -} - -type RequestQuery struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height"` //do NOT 'omitempty' for JSON field or contract queries will error - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove"` //do NOT 'omitempty' for JSON field or contract queries will error -} - -type msgQuery struct { - Channel string `json:"channel"` - Requests []RequestQuery `json:"requests"` - Timeout uint64 `json:"timeout"` -} - -type executeQuery struct { - Query msgQuery `json:"query"` -} - -type kvPair struct { - Key string // hex encoded string - Value string // b64 encoded json -} - -type contractStateResp struct { - Models []kvPair -} - -type statusResults struct { - SyncInfo struct { - Height string `json:"latest_block_height"` - } `json:"SyncInfo"` -} - -func modifyGenesisAtPath(insertedBlock map[string]interface{}, key string) func(ibc.ChainConfig, []byte) ([]byte, error) { - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - g := make(map[string]interface{}) - if err := json.Unmarshal(genbz, &g); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - - //Get the section of the genesis file under the given key (e.g. "app_state") - genesisBlockI, ok := g[key] - if !ok { - return nil, fmt.Errorf("genesis json does not have top level key: %s", key) - } - - blockBytes, mErr := json.Marshal(genesisBlockI) - if mErr != nil { - return nil, fmt.Errorf("genesis json marshal error for block with key: %s", key) - } - - genesisBlock := make(map[string]interface{}) - mErr = json.Unmarshal(blockBytes, &genesisBlock) - if mErr != nil { - return nil, fmt.Errorf("genesis json unmarshal error for block with key: %s", key) - } - - for k, v := range insertedBlock { - genesisBlock[k] = v - } - - g[key] = genesisBlock - out, err := json.Marshal(g) - if err != nil { - return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) - } - return out, nil - } -} diff --git a/examples/penumbra/penumbra_chain_test.go b/examples/penumbra/penumbra_chain_test.go index 494b77c0a..8697b6e27 100644 --- a/examples/penumbra/penumbra_chain_test.go +++ b/examples/penumbra/penumbra_chain_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/examples/polkadot/ics10_grandpa_cw.wasm b/examples/polkadot/ics10_grandpa_cw.wasm deleted file mode 100644 index 4d921948a..000000000 Binary files a/examples/polkadot/ics10_grandpa_cw.wasm and /dev/null differ diff --git a/examples/polkadot/polkadot_chain_test.go b/examples/polkadot/polkadot_chain_test.go deleted file mode 100644 index 2ac8a673b..000000000 --- a/examples/polkadot/polkadot_chain_test.go +++ /dev/null @@ -1,232 +0,0 @@ -package polkadot_test - -import ( - "context" - "fmt" - "testing" - - "cosmossdk.io/math" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -func TestPolkadotComposableChainStart(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - ctx := context.Background() - - nv := 5 - nf := 3 - - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - ChainConfig: ibc.ChainConfig{ - Type: "polkadot", - Name: "composable", - ChainID: "rococo-local", - Images: []ibc.DockerImage{ - { - Repository: "seunlanlege/centauri-polkadot", - Version: "v0.9.27", - UidGid: "1000:1000", - }, - { - Repository: "seunlanlege/centauri-parachain", - Version: "v0.9.27", - //UidGid: "1025:1025", - }, - }, - Bin: "polkadot", - Bech32Prefix: "composable", - Denom: "uDOT", - GasPrices: "", - GasAdjustment: 0, - TrustingPeriod: "", - CoinType: "354", - }, - NumValidators: &nv, - NumFullNodes: &nf, - }, - }, - ).Chains(t.Name()) - - require.NoError(t, err, "failed to get polkadot chain") - require.Len(t, chains, 1) - chain := chains[0] - - ic := interchaintest.NewInterchain(). - AddChain(chain) - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - - SkipPathCreation: true, // Skip path creation, so we can have granular control over the process - })) - - polkadotChain := chain.(*polkadot.PolkadotChain) - - err = testutil.WaitForBlocks(ctx, 2, chain) - require.NoError(t, err, "polkadot chain failed to make blocks") - - PARACHAIN_DEFAULT_AMOUNT := math.NewInt(1_152_921_504_606_847_000) - RELAYCHAIN_DEFAULT_AMOUNT := math.NewInt(1_100_000_000_000_000_000) - FAUCET_AMOUNT := math.NewInt(100_000_000_000_000_000) // set in interchain.go/global - //RELAYER_AMOUNT := 1_000_000_000_000 // set in interchain.go/global - - // Check the faucet amounts - polkadotFaucetAddress, err := polkadotChain.GetAddress(ctx, "faucet") - require.NoError(t, err) - - polkadotFaucetAmount, err := polkadotChain.GetBalance(ctx, string(polkadotFaucetAddress), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot faucet amount: ", polkadotFaucetAmount) - require.True(t, polkadotFaucetAmount.Equal(FAUCET_AMOUNT), "Polkadot faucet amount not expected") - - parachainFaucetAmount, err := polkadotChain.GetBalance(ctx, string(polkadotFaucetAddress), "") - require.NoError(t, err) - fmt.Println("Parachain faucet amount: ", parachainFaucetAmount) - require.True(t, parachainFaucetAmount.Equal(FAUCET_AMOUNT), "Parachain faucet amount not expected") - - // Check alice - polkadotAliceAddress, err := polkadotChain.GetAddress(ctx, "alice") - require.NoError(t, err) - polkadotAliceAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceAddress), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot alice amount: ", polkadotAliceAmount) - require.True(t, polkadotAliceAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain alice amount not expected") - - parachainAliceAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceAddress), "") - require.NoError(t, err) - fmt.Println("Parachain alice amount: ", parachainAliceAmount) - require.True(t, parachainAliceAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain alice amount not expected") - - // Check alice stash - polkadotAliceStashAddress, err := polkadotChain.GetAddress(ctx, "alicestash") - require.NoError(t, err) - polkadotAliceStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceStashAddress), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot alice stash amount: ", polkadotAliceStashAmount) - require.True(t, polkadotAliceStashAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain alice stash amount not expected") - - parachainAliceStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotAliceStashAddress), "") - require.NoError(t, err) - fmt.Println("Parachain alice stash amount: ", parachainAliceStashAmount) - require.True(t, parachainAliceStashAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain alice stash amount not expected") - - // Check bob - polkadotBobAddress, err := polkadotChain.GetAddress(ctx, "bob") - require.NoError(t, err) - polkadotBobAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobAddress), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot bob amount: ", polkadotBobAmount) - require.True(t, polkadotBobAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain bob amount not expected") - - parachainBobAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobAddress), "") - require.NoError(t, err) - fmt.Println("Parachain bob amount: ", parachainBobAmount) - require.True(t, parachainBobAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain bob amount not expected") - - // Check bob stash - polkadotBobStashAddress, err := polkadotChain.GetAddress(ctx, "bobstash") - require.NoError(t, err) - polkadotBobStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobStashAddress), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot bob stash amount: ", polkadotBobStashAmount) - require.True(t, polkadotBobStashAmount.Equal(RELAYCHAIN_DEFAULT_AMOUNT), "Relaychain bob stash amount not expected") - - parachainBobStashAmount, err := polkadotChain.GetBalance(ctx, string(polkadotBobStashAddress), "") - require.NoError(t, err) - fmt.Println("Parachain bob stash amount: ", parachainBobStashAmount) - require.True(t, parachainBobStashAmount.Equal(PARACHAIN_DEFAULT_AMOUNT), "Parachain bob stash amount not expected") - - // Fund user1 on both relay and parachain, must wait a block to fund user2 due to same faucet address - fundAmount := math.NewInt(12_333_000_000_000) - users1 := interchaintest.GetAndFundTestUsers(t, ctx, "user1", fundAmount.Int64(), polkadotChain) - user1 := users1[0] - err = testutil.WaitForBlocks(ctx, 2, chain) - require.NoError(t, err, "polkadot chain failed to make blocks") - - // Fund user2 on both relay and parachain, check that user1 was funded properly - users2 := interchaintest.GetAndFundTestUsers(t, ctx, "user2", fundAmount.Int64(), polkadotChain) - user2 := users2[0] - polkadotUser1Amount, err := polkadotChain.GetBalance(ctx, user1.FormattedAddress(), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot user1 amount: ", polkadotUser1Amount) - require.True(t, polkadotUser1Amount.Equal(fundAmount), "Initial polkadot user1 amount not expected") - - parachainUser1Amount, err := polkadotChain.GetBalance(ctx, user1.FormattedAddress(), "") - require.NoError(t, err) - fmt.Println("Parachain user1 amount: ", parachainUser1Amount) - require.True(t, parachainUser1Amount.Equal(fundAmount), "Initial parachain user1 amount not expected") - - err = testutil.WaitForBlocks(ctx, 2, chain) - require.NoError(t, err, "polkadot chain failed to make blocks") - - // Check that user2 was funded properly - polkadotUser2Amount, err := polkadotChain.GetBalance(ctx, user2.FormattedAddress(), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot user2 amount: ", polkadotUser2Amount) - require.True(t, polkadotUser2Amount.Equal(fundAmount), "Initial polkadot user2 amount not expected") - - parachainUser2Amount, err := polkadotChain.GetBalance(ctx, user2.FormattedAddress(), "") - require.NoError(t, err) - fmt.Println("Parachain user2 amount: ", parachainUser2Amount) - require.True(t, parachainUser2Amount.Equal(fundAmount), "Initial parachain user2 amount not expected") - - // Transfer 1T units from user1 to user2 on both chains - txAmount := math.NewInt(1_000_000_000_000) - polkadotTxUser1ToUser2 := ibc.WalletAmount{ - Address: user2.FormattedAddress(), - Amount: txAmount, - Denom: polkadotChain.Config().Denom, - } - parachainTxUser1ToUser2 := ibc.WalletAmount{ - Address: user2.FormattedAddress(), - Amount: txAmount, - Denom: "", // Anything other than polkadot denom - } - err = polkadotChain.SendFunds(ctx, user1.KeyName(), polkadotTxUser1ToUser2) - require.NoError(t, err) - err = polkadotChain.SendFunds(ctx, user1.KeyName(), parachainTxUser1ToUser2) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 2, chain) - require.NoError(t, err, "polkadot chain failed to make blocks") - - // Verify user1 and user2 funds on both chains are correct - polkadotUser1Amount, err = polkadotChain.GetBalance(ctx, user1.FormattedAddress(), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot user1 amount: ", polkadotUser1Amount) - require.True(t, polkadotUser1Amount.LTE(fundAmount.Sub(txAmount)), "Final polkadot user1 amount not expected") - - polkadotUser2Amount, err = polkadotChain.GetBalance(ctx, user2.FormattedAddress(), polkadotChain.Config().Denom) - require.NoError(t, err) - fmt.Println("Polkadot user2 amount: ", polkadotUser2Amount) - require.True(t, fundAmount.Add(txAmount).Equal(polkadotUser2Amount), "Final polkadot user2 amount not expected") - - parachainUser1Amount, err = polkadotChain.GetBalance(ctx, user1.FormattedAddress(), "") - require.NoError(t, err) - fmt.Println("Parachain user1 amount: ", parachainUser1Amount) - require.True(t, parachainUser1Amount.LTE(fundAmount.Sub(txAmount)), "Final parachain user1 amount not expected") - - parachainUser2Amount, err = polkadotChain.GetBalance(ctx, user2.FormattedAddress(), "") - require.NoError(t, err) - fmt.Println("Parachain user2 amount: ", parachainUser2Amount) - require.True(t, fundAmount.Add(txAmount).Equal(parachainUser2Amount), "Final parachain user2 amount not expected") -} diff --git a/examples/polkadot/push_wasm_client_code_test.go b/examples/polkadot/push_wasm_client_code_test.go deleted file mode 100644 index 2f55ae5b7..000000000 --- a/examples/polkadot/push_wasm_client_code_test.go +++ /dev/null @@ -1,183 +0,0 @@ -package polkadot_test - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "testing" - - "cosmossdk.io/math" - "github.com/icza/dyno" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -const ( - heightDelta = uint64(20) - votingPeriod = "30s" - maxDepositPeriod = "10s" -) - -// Spin up a simd chain, push a contract, and get that contract code from chain -func TestPushWasmClientCode(t *testing.T) { - if testing.Short() { - t.Skip() - } - - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - ctx := context.Background() - - // Override config files to support an ~2.5MB contract - configFileOverrides := make(map[string]any) - - appTomlOverrides := make(testutil.Toml) - configTomlOverrides := make(testutil.Toml) - - apiOverrides := make(testutil.Toml) - apiOverrides["rpc-max-body-bytes"] = 2_000_000 - appTomlOverrides["api"] = apiOverrides - - rpcOverrides := make(testutil.Toml) - rpcOverrides["max_body_bytes"] = 2_000_000 - rpcOverrides["max_header_bytes"] = 2_100_000 - configTomlOverrides["rpc"] = rpcOverrides - - //mempoolOverrides := make(testutil.Toml) - //mempoolOverrides["max_tx_bytes"] = 6000000 - //configTomlOverrides["mempool"] = mempoolOverrides - - configFileOverrides["config/app.toml"] = appTomlOverrides - configFileOverrides["config/config.toml"] = configTomlOverrides - - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "ibc-go-simd", - ChainID: "simd", - Images: []ibc.DockerImage{ - { - Repository: "ghcr.io/strangelove-ventures/heighliner/ibc-go-simd", - Version: "feat-wasm-clients", - UidGid: "1025:1025", - }, - }, - Bin: "simd", - Bech32Prefix: "cosmos", - Denom: "stake", - GasPrices: "0.00stake", - GasAdjustment: 1.3, - TrustingPeriod: "504h", - //EncodingConfig: WasmClientEncoding(), - NoHostMount: true, - ConfigFileOverrides: configFileOverrides, - ModifyGenesis: modifyGenesisShortProposals(votingPeriod, maxDepositPeriod), - }, - }, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - simd := chains[0] - - ic := interchaintest.NewInterchain(). - AddChain(simd) - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), - SkipPathCreation: true, // Skip path creation, so we can have granular control over the process - })) - - t.Cleanup(func() { - _ = ic.Close() - }) - - // Create and Fund User Wallets - fundAmount := math.NewInt(10_000_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "default", fundAmount.Int64(), simd) - simd1User := users[0] - - simd1UserBalInitial, err := simd.GetBalance(ctx, simd1User.FormattedAddress(), simd.Config().Denom) - require.NoError(t, err) - require.True(t, simd1UserBalInitial.Equal(fundAmount)) - - simdChain := simd.(*cosmos.CosmosChain) - - // Verify a normal user cannot push a wasm light client contract - _, err = simdChain.StoreClientContract(ctx, simd1User.KeyName(), "ics10_grandpa_cw.wasm") - require.ErrorContains(t, err, "invalid authority") - - proposal := cosmos.TxProposalv1{ - Metadata: "none", - Deposit: "500000000" + simdChain.Config().Denom, // greater than min deposit - Title: "Grandpa Contract", - Summary: "new grandpa contract", - } - - proposalTx, codeHash, err := simdChain.PushNewWasmClientProposal(ctx, simd1User.KeyName(), "ics10_grandpa_cw.wasm", proposal) - require.NoError(t, err, "error submitting new wasm contract proposal tx") - - height, err := simdChain.Height(ctx) - require.NoError(t, err, "error fetching height before submit upgrade proposal") - - err = simdChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) - require.NoError(t, err, "failed to submit votes") - - _, err = cosmos.PollForProposalStatus(ctx, simdChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) - require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - - err = testutil.WaitForBlocks(ctx, 2, simd) - require.NoError(t, err) - - var getCodeQueryMsgRsp GetCodeQueryMsgResponse - err = simdChain.QueryClientContractCode(ctx, codeHash, &getCodeQueryMsgRsp) - codeHashByte32 := sha256.Sum256(getCodeQueryMsgRsp.Code) - codeHash2 := hex.EncodeToString(codeHashByte32[:]) - t.Logf("Contract codeHash from code: %s", codeHash2) - require.NoError(t, err) - require.NotEmpty(t, getCodeQueryMsgRsp.Code) - require.Equal(t, codeHash, codeHash2) -} - -type GetCodeQueryMsgResponse struct { - Code []byte `json:"code"` -} - -func modifyGenesisShortProposals(votingPeriod string, maxDepositPeriod string) func(ibc.ChainConfig, []byte) ([]byte, error) { - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - g := make(map[string]interface{}) - if err := json.Unmarshal(genbz, &g); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - if err := dyno.Set(g, votingPeriod, "app_state", "gov", "params", "voting_period"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - if err := dyno.Set(g, maxDepositPeriod, "app_state", "gov", "params", "max_deposit_period"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - if err := dyno.Set(g, chainConfig.Denom, "app_state", "gov", "params", "min_deposit", 0, "denom"); err != nil { - return nil, fmt.Errorf("failed to set voting period in genesis json: %w", err) - } - out, err := json.Marshal(g) - if err != nil { - return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) - } - return out, nil - } -} diff --git a/examples/polkadot/substrate_cosmos_ibc_test.go b/examples/polkadot/substrate_cosmos_ibc_test.go deleted file mode 100644 index e9614b59b..000000000 --- a/examples/polkadot/substrate_cosmos_ibc_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package polkadot_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" -) - -// TestSubstrateToCosmosIBC simulates a Parachain to Cosmos IBC integration by spinning up an IBC enabled -// Parachain along with an IBC enabled Cosmos chain, attempting to create an IBC path between the two chains, -// and initiating an ics20 token transfer between the two. -func TestSubstrateToCosmosIBC(t *testing.T) { - if testing.Short() { - t.Skip() - } - - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - ctx := context.Background() - - nv := 5 // Number of validators - nf := 3 // Number of full nodes - - // Get both chains - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - //Name: "composable", - //Version: "seunlanlege/centauri-polkadot:v0.9.27,seunlanlege/centauri-parachain:v0.9.27", - ChainConfig: ibc.ChainConfig{ - Type: "polkadot", - Name: "composable", - ChainID: "rococo-local", - Images: []ibc.DockerImage{ - { - Repository: "seunlanlege/centauri-polkadot", - Version: "v0.9.27", - UidGid: "1025:1025", - }, - { - Repository: "seunlanlege/centauri-parachain", - Version: "v0.9.27", - //UidGid: "1025:1025", - }, - }, - Bin: "polkadot", - Bech32Prefix: "composable", - Denom: "uDOT", - GasPrices: "", - GasAdjustment: 0, - TrustingPeriod: "", - }, - NumValidators: &nv, - NumFullNodes: &nf, - }, - { - ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "ibc-go-simd", - ChainID: "simd", - Images: []ibc.DockerImage{ - { - Repository: "ibc-go-simd", - Version: "feat-wasm-client", - UidGid: "1025:1025", - }, - }, - Bin: "simd", - Bech32Prefix: "cosmos", - Denom: "stake", - GasPrices: "0.00stake", - GasAdjustment: 1.3, - TrustingPeriod: "504h", - //EncodingConfig: WasmClientEncoding(), - NoHostMount: true, - //ConfigFileOverrides: configFileOverrides, - }, - /* - ChainName: "gaia", - Version: "v7.0.3", - */ - }, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - composable, simd := chains[0], chains[1] - - // Get a relayer instance - r := interchaintest.NewBuiltinRelayerFactory( - ibc.CosmosRly, - zaptest.NewLogger(t), - relayer.StartupFlags("-b", "100"), - // These two fields are used to pass in a custom Docker image built locally - //relayer.ImagePull(false), - relayer.CustomDockerImage("ghcr.io/composablefi/relayer", "sub-create-client", "100:1000"), - //relayer.CustomDockerImage("go-relayer", "local", "100:1000"), - ).Build(t, client, network) - - // Build the network; spin up the chains and configure the relayer - const pathName = "composable-simd" - const relayerName = "relayer" - - ic := interchaintest.NewInterchain(). - AddChain(composable). - AddChain(simd) //. - //AddRelayer(r, relayerName). - /*AddLink(interchaintest.InterchainLink{ - Chain1: composable, - Chain2: simd, - Relayer: r, - Path: pathName, - })*/ - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - - SkipPathCreation: true, // Skip path creation, so we can have granular control over the process - })) - - // If necessary you can wait for x number of blocks to pass before taking some action - //blocksToWait := 10 - //err = testutil.WaitForBlocks(ctx, blocksToWait, composable) - //require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 2000, simd) - require.NoError(t, err) - // Generate a new IBC path between the chains - // This is like running `rly paths new` - err = r.GeneratePath(ctx, eRep, composable.Config().ChainID, simd.Config().ChainID, pathName) - require.NoError(t, err) - - // Attempt to create the light clients for both chains on the counterparty chain - err = r.CreateClients(ctx, rep.RelayerExecReporter(t), pathName, ibc.DefaultClientOpts()) - require.NoError(t, err) - - // Once client, connection, and handshake logic is implemented for the Substrate provider - // we can link the path, start the relayer and attempt to send a token transfer via IBC. - - //r.LinkPath() - // - //composable.SendIBCTransfer() - // - //r.StartRelayer() - //t.Cleanup(func() { - // err = r.StopRelayer(ctx, eRep) - // if err != nil { - // panic(err) - // } - //}) - - // Make assertions to determine if the token transfer was successful - - t.Cleanup(func() { - fmt.Println("Cleaning up in 30 seconds...") - time.Sleep(30 * time.Second) - _ = ic.Close() - }) -} diff --git a/go.mod b/go.mod index 0a159dc06..36438eb22 100644 --- a/go.mod +++ b/go.mod @@ -1,76 +1,66 @@ -module github.com/strangelove-ventures/interchaintest/v7 +module github.com/strangelove-ventures/interchaintest/v8 -go 1.19 +go 1.21 + +toolchain go1.21.0 require ( - cosmossdk.io/math v1.1.2 - github.com/99designs/keyring v1.2.2 + cosmossdk.io/math v1.0.1 + cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982 + cosmossdk.io/x/upgrade v0.0.0-20230818115413-c402c51a1508 github.com/BurntSushi/toml v1.3.2 - github.com/ChainSafe/go-schnorrkel/1 v0.0.0-00010101000000-000000000000 - github.com/CosmWasm/wasmd v0.41.0 - github.com/StirlingMarketingGroup/go-namecase v1.0.0 github.com/atotto/clipboard v0.1.4 github.com/avast/retry-go/v4 v4.5.0 - github.com/cometbft/cometbft v0.37.2 - github.com/cosmos/cosmos-sdk v0.47.5 - github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.3.0 + github.com/cometbft/cometbft v0.38.0-rc3 + github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230819070346-e8164be94954 + github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/ibc-go/modules/capability v1.0.0-rc3 + github.com/cosmos/ibc-go/v7 v7.0.0-20230824131743-d0ab8285e9f0 github.com/davecgh/go-spew v1.1.1 - github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 - github.com/docker/docker v24.0.5+incompatible + github.com/docker/docker v24.0.4+incompatible github.com/docker/go-connections v0.4.0 github.com/gdamore/tcell/v2 v2.6.0 github.com/google/go-cmp v0.5.9 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-version v1.6.0 github.com/icza/dyno v0.0.0-20220812133438-f0b6f8a18845 - github.com/libp2p/go-libp2p v0.27.8 - github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae - github.com/mr-tron/base58 v1.2.0 github.com/pelletier/go-toml v1.9.5 - github.com/pelletier/go-toml/v2 v2.0.9 github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - github.com/tyler-smith/go-bip32 v1.0.0 - github.com/tyler-smith/go-bip39 v1.1.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.25.0 - golang.org/x/crypto v0.12.0 golang.org/x/sync v0.3.0 - golang.org/x/tools v0.12.0 + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 modernc.org/sqlite v1.25.0 ) require ( - cloud.google.com/go v0.110.4 // indirect - cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go v0.110.6 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/iam v1.1.1 // indirect cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/api v0.3.1 // indirect - cosmossdk.io/core v0.6.1 // indirect + cosmossdk.io/api v0.7.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/core v0.10.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.0 // indirect - cosmossdk.io/log v1.2.1 // indirect - cosmossdk.io/tools/rosetta v0.2.1 // indirect + cosmossdk.io/log v1.2.0 // indirect + cosmossdk.io/x/tx v0.9.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 // indirect - github.com/CosmWasm/wasmvm v1.3.0 // indirect - github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect - github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect @@ -78,23 +68,19 @@ require ( github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect - github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-db v1.0.0 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 + github.com/cosmos/iavl v1.0.0-beta.2 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/base58 v1.0.4 // indirect - github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -104,7 +90,8 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/ethereum/go-ethereum v1.10.20 // indirect + github.com/emicklei/dot v1.5.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gdamore/encoding v1.0.0 // indirect @@ -112,7 +99,6 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-stack/stack v1.8.1 // 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 @@ -123,6 +109,7 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b // indirect github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect @@ -132,24 +119,25 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.1 // indirect + github.com/hashicorp/go-plugin v1.4.10 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // 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.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect @@ -162,32 +150,24 @@ require ( github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.9.0 // indirect - github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.8.1 // indirect - github.com/multiformats/go-multihash v0.2.1 // indirect - github.com/multiformats/go-varint v0.0.7 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/oklog/run v1.1.0 // indirect github.com/onsi/gomega v1.27.4 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect - github.com/pierrec/xxHash v0.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect - github.com/rakyll/statik v0.1.7 // indirect + github.com/prometheus/procfs v0.11.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/rivo/uniseg v0.4.3 // indirect @@ -195,7 +175,6 @@ require ( github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -210,7 +189,8 @@ require ( github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.14.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect @@ -220,14 +200,13 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - lukechampine.com/blake3 v1.1.7 // indirect + gotest.tools/v3 v3.5.0 // indirect lukechampine.com/uint128 v1.2.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect modernc.org/ccgo/v3 v3.16.13 // indirect @@ -238,7 +217,7 @@ require ( modernc.org/strutil v1.1.3 // indirect modernc.org/token v1.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect - pgregory.net/rapid v1.0.0 // indirect + pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 25178aa57..16484f642 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= 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= @@ -187,20 +187,34 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= -cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= +cosmossdk.io/api v0.7.0 h1:QsEMIWuv9xWDbF2HZnW4Lpu1/SejCztPu0LQx7t6MN4= +cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= +cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 h1:tt5OMwdouv7dkwkWJYxb8I9h322bOxnC9RmK2qGvWMs= +cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508/go.mod h1:iHeSk2AT6O8RNGlfcEQq6Yty6Z/6gydQsXXBh5I715Q= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= +cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= -cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= -cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +cosmossdk.io/log v1.2.0 h1:BbykkDsutXPSy8RojFB3KZEWyvMsToLy0ykb/ZhsLqQ= +cosmossdk.io/log v1.2.0/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= +cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982 h1:61YFeW2AhwwPfoJWzNJWvVubCj32sm5jZkJfraS9pDQ= +cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982/go.mod h1:QAF9zeRa/9ghuv7E8NS9SzWqRbgVNwH/dZwGhYDHUjI= +cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508 h1:9HRBpMbGgk+W4BIp4ezYH2EjbpuVl2fBlwyJ2GZgrS0= +cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508/go.mod h1:BhFX0kD6lkctNQO3ZGYY3p6h0/wPLVbFhrOt3uQxEIM= +cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508 h1:R9H1lDpcPSkrLOnt6IDE38o0Wp8xE/+BAxocb0oyX4I= +cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508/go.mod h1:yjIo3J0QKDo9CJawK1QoTA1hBx0llafVJdPqI0+ry74= +cosmossdk.io/x/feegrant v0.0.0-20230818115413-c402c51a1508 h1:TKqjhhTfLchU8nSo1WZRgaH7xZWzYUQXVRj9CePcbaw= +cosmossdk.io/x/feegrant v0.0.0-20230818115413-c402c51a1508/go.mod h1:kOr8Rr10RoMeGGk/pfW5yo1R7GQTGu4KdRgKphVvjz4= +cosmossdk.io/x/tx v0.9.1 h1:9pmmXA9Vs4qdouOFnzhsdsff2mif0f0kylMq5xTGhRI= +cosmossdk.io/x/tx v0.9.1/go.mod h1:/YFGTXG6+kyihd8YbfuJiXHV4R/mIMm2uvVzo80CIhA= +cosmossdk.io/x/upgrade v0.0.0-20230818115413-c402c51a1508 h1:tZ5fSX+ev+QHQ15457Vhxug8BSZJcHeBhU8DpgwlkCc= +cosmossdk.io/x/upgrade v0.0.0-20230818115413-c402c51a1508/go.mod h1:M0JWINHzdN0eFHrWMs082akHHSO5muExS+/tNNIOyP8= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -208,40 +222,28 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb 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-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +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/wasmd v0.41.0 h1:fmwxSbwb50zZDcBaayYFRLIaSFca+EFld1WOaQi49jg= -github.com/CosmWasm/wasmd v0.41.0/go.mod h1:0Sds1q2IsPaTN1gHa3BNOYcUFgtGvxH7CXEXPgoihns= -github.com/CosmWasm/wasmvm v1.3.0 h1:x12X4bKlUPS7TT9QQP45+fJo2sp30GEbiSSgb9jsec8= -github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -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/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -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= @@ -254,8 +256,6 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= @@ -265,8 +265,8 @@ github.com/avast/retry-go/v4 v4.5.0/go.mod h1:7hLEXp0oku2Nir2xBAsg0PTphp9z71bN5A github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -280,12 +280,16 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +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/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= +github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -312,8 +316,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D 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= @@ -324,23 +326,27 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH 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.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 h1:M4A5LioEhkZ/s+m0g0pWgiLBQr83p0jWnQUo320Qy+A= +github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-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/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= -github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= -github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.38.0-rc3 h1:Ly3eVPWoFu0y68PmZwLljucPdEBtfigZtqm+OV1W6dE= +github.com/cometbft/cometbft v0.38.0-rc3/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -349,35 +355,32 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV 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.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= +github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= -github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230819070346-e8164be94954 h1:DSVQWPZyt0f7T0Arw7doznp9BK+HDzv3h6HwjMJxNCU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230819070346-e8164be94954/go.mod h1:6HsAg8cQ/D3JnFN7jao6DOuTLWnUC4qh/vracVlSLAM= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 h1:BvSKnPFKxL+TTSLxGKwJN4x0ndCZj0yfXhSvmsQztSA= -github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1/go.mod h1:A+CxAQdn2j6ihDTbClpEEBdHthWgAUAcHbRAQPY8sl4= -github.com/cosmos/ibc-go/v7 v7.3.0 h1:QtGeVMi/3JeLWuvEuC60sBHpAF40Oenx/y+bP8+wRRw= -github.com/cosmos/ibc-go/v7 v7.3.0/go.mod h1:mUmaHFXpXrEdcxfdXyau+utZf14pGKVUiXwYftRZZfQ= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/iavl v1.0.0-beta.2 h1:XOsIM80Yyml/KifCXEYOy9tWCXwMAbLa91n6pReW07Y= +github.com/cosmos/iavl v1.0.0-beta.2/go.mod h1:EA97dJ07TBktRlG/iGzK6g1eCXNj1q3MGoFYkVzrwHE= +github.com/cosmos/ibc-go/modules/capability v1.0.0-rc3 h1:jEq48O/lE7dT34U6dJLLl8PaHSwerFrRqgaVVPg7J4A= +github.com/cosmos/ibc-go/modules/capability v1.0.0-rc3/go.mod h1:h+HXgDnFpzthSy7mKw3xCeOG1QZDiwlz7Vuw8eSevjg= +github.com/cosmos/ibc-go/v7 v7.0.0-20230824131743-d0ab8285e9f0 h1:6vNbAPOYq2uuZThM8gWUvWYIPUIffn5JsPR2/jLzX4U= +github.com/cosmos/ibc-go/v7 v7.0.0-20230824131743-d0ab8285e9f0/go.mod h1:fp481Yxa0mVQ9a4w9a6LifFPmfOgNH1KCmoH9SNwl/8= 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.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= -github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= -github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= @@ -385,17 +388,8 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/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/decred/base58 v1.0.4 h1:QJC6B0E0rXOPA8U/kw2rP+qiRJsUaE2Er+pYb3siUeA= -github.com/decred/base58 v1.0.4/go.mod h1:jJswKPEdvpFpvf7dsDvFZyLT22xZ9lWqEByX38oGd9E= -github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU= -github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60= -github.com/decred/dcrd/crypto/blake256 v1.0.0/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.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= @@ -411,8 +405,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= -github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= +github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -427,6 +421,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m 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.5.0 h1:tc9eKdCBTgoR68vJ6OcgMtI0SdrGDwLPPVaPA6XhX50= +github.com/emicklei/dot v1.5.0/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= @@ -438,16 +434,19 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m 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.10.20 h1:75IW830ClSS40yrQC1ZCMZCt5I+zU16oqId2SiQwdQ4= -github.com/ethereum/go-ethereum v1.10.20/go.mod h1:LWUN82TCHGpxB3En5HVmLLzPD7YSrEUFmFfN1nKkVN0= 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.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= @@ -465,7 +464,9 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -482,26 +483,28 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V 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-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.1.0 h1:7RFti/xnNkMJnrK7D1yQ/iCIB5OrrY/54/H930kIbHA= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -575,12 +578,14 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -600,6 +605,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe 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-20230405160723-4a4c7d95572b h1:Qcx5LM0fSiks9uCyFZwDBUasd3lxd1RM0GYpL+Li5o4= +github.com/google/pprof v0.0.0-20230405160723-4a4c7d95572b/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -647,11 +653,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 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= @@ -661,11 +662,17 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/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.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/Hqck/U= +github.com/hashicorp/go-metrics v0.5.1/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.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= +github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= 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= @@ -673,8 +680,9 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -689,6 +697,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO 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.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -697,6 +707,8 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr 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-20220812133438-f0b6f8a18845 h1:H+uM0Bv88eur3ZSsd2NGKg3YIiuXxwxtlN7HjE66UTU= @@ -707,9 +719,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= -github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -725,6 +736,7 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -740,10 +752,6 @@ github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8 github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -757,12 +765,11 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-libp2p v0.27.8 h1:IX5x/4yKwyPQeVS2AXHZ3J4YATM9oHBGH1gBc23jBAI= -github.com/libp2p/go-libp2p v0.27.8/go.mod h1:eCFFtd0s5i/EVKR7+5Ki8bM7qwkNW3TPTTSSW9sz8NE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= @@ -776,6 +783,7 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v 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= @@ -792,19 +800,13 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= 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.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= -github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= -github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae h1:ZYbJh4TLwfSuSQe6DT/1982SfNNBcmvzrX5FycfSrmo= -github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230413215336-5bd2aea337ae/go.mod h1:XexEkZgpnQ3sqUYz84DFoVUcDake6G/tYHrwdbdERhM= 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= @@ -818,32 +820,19 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F 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-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +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 h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/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/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= 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.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= -github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= -github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.8.1 h1:ycepHwavHafh3grIbR1jIXnKCsFm0fqsfEOsJ8NtKE8= -github.com/multiformats/go-multicodec v0.8.1/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= -github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -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/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= @@ -859,8 +848,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= 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= @@ -882,6 +875,7 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -891,6 +885,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -907,9 +902,8 @@ github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5j github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= -github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -950,10 +944,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -987,13 +979,13 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 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/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1029,7 +1021,6 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.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= @@ -1050,19 +1041,14 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/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 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1102,6 +1088,7 @@ 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.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -1113,7 +1100,6 @@ 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.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= -golang.org/x/crypto v0.0.0-20170613210332-850760c427c5/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1122,7 +1108,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -1142,8 +1127,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1370,7 +1355,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc 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-20220704084225-05e143d24a9e/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= @@ -1408,6 +1392,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb 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.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1470,8 +1455,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1650,12 +1635,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1723,6 +1708,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1730,8 +1716,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy 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= @@ -1750,8 +1734,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1760,10 +1744,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh 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.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= @@ -1771,7 +1751,9 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.24.1 h1:uvJSeCKL/AgzBo2yYIPPTy82v21KgGnizcGYfBHaNuM= modernc.org/libc v1.24.1/go.mod h1:FmfO1RLrU3MHJfyi9eYYmZBfi/R+tqZ6+hQ3yQQUkak= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= @@ -1785,14 +1767,16 @@ modernc.org/sqlite v1.25.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= +modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4= -pgregory.net/rapid v1.0.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/interchain.go b/interchain.go index ab8093d79..f81e15cae 100644 --- a/interchain.go +++ b/interchain.go @@ -6,8 +6,8 @@ import ( "cosmossdk.io/math" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" "go.uber.org/zap" "golang.org/x/sync/errgroup" ) diff --git a/interchain_test.go b/interchain_test.go index f59f02744..a1eb21a1a 100644 --- a/interchain_test.go +++ b/interchain_test.go @@ -12,12 +12,12 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer/rly" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/relayer/rly" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zaptest" diff --git a/internal/blockdb/messages_view_test.go b/internal/blockdb/messages_view_test.go index addfb2240..442c563a7 100644 --- a/internal/blockdb/messages_view_test.go +++ b/internal/blockdb/messages_view_test.go @@ -11,11 +11,11 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/internal/blockdb/tui/model.go b/internal/blockdb/tui/model.go index 169297237..12206c8fe 100644 --- a/internal/blockdb/tui/model.go +++ b/internal/blockdb/tui/model.go @@ -6,7 +6,7 @@ import ( "github.com/atotto/clipboard" "github.com/rivo/tview" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" ) //go:generate go run golang.org/x/tools/cmd/stringer -type=mainContent diff --git a/internal/blockdb/tui/model_test.go b/internal/blockdb/tui/model_test.go index 0cdce5cb7..91f66492b 100644 --- a/internal/blockdb/tui/model_test.go +++ b/internal/blockdb/tui/model_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "github.com/stretchr/testify/require" ) diff --git a/internal/blockdb/tui/presenter/cosmos_message.go b/internal/blockdb/tui/presenter/cosmos_message.go index ad7795d5f..026453a14 100644 --- a/internal/blockdb/tui/presenter/cosmos_message.go +++ b/internal/blockdb/tui/presenter/cosmos_message.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" ) // CosmosMessage presents a blockdb.CosmosMessageResult. diff --git a/internal/blockdb/tui/presenter/cosmos_message_test.go b/internal/blockdb/tui/presenter/cosmos_message_test.go index 67a29f9ec..8e8cec90a 100644 --- a/internal/blockdb/tui/presenter/cosmos_message_test.go +++ b/internal/blockdb/tui/presenter/cosmos_message_test.go @@ -4,7 +4,7 @@ import ( "database/sql" "testing" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "github.com/stretchr/testify/require" ) diff --git a/internal/blockdb/tui/presenter/test_case.go b/internal/blockdb/tui/presenter/test_case.go index 1dd3334a4..168246f53 100644 --- a/internal/blockdb/tui/presenter/test_case.go +++ b/internal/blockdb/tui/presenter/test_case.go @@ -3,7 +3,7 @@ package presenter import ( "strconv" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" ) // TestCase presents a blockdb.TestCaseResult. diff --git a/internal/blockdb/tui/presenter/test_case_test.go b/internal/blockdb/tui/presenter/test_case_test.go index 82af43cda..94b44dae5 100644 --- a/internal/blockdb/tui/presenter/test_case_test.go +++ b/internal/blockdb/tui/presenter/test_case_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "github.com/stretchr/testify/require" ) diff --git a/internal/blockdb/tui/presenter/tx.go b/internal/blockdb/tui/presenter/tx.go index dc9219cd0..6b393d8b5 100644 --- a/internal/blockdb/tui/presenter/tx.go +++ b/internal/blockdb/tui/presenter/tx.go @@ -6,7 +6,7 @@ import ( "strconv" "sync" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" ) var bufPool = sync.Pool{New: func() any { return new(bytes.Buffer) }} diff --git a/internal/blockdb/tui/presenter/tx_test.go b/internal/blockdb/tui/presenter/tx_test.go index 3bceb3eef..12df5cf0a 100644 --- a/internal/blockdb/tui/presenter/tx_test.go +++ b/internal/blockdb/tui/presenter/tx_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "github.com/stretchr/testify/require" ) diff --git a/internal/blockdb/tui/update.go b/internal/blockdb/tui/update.go index a6acbd253..9771a78d6 100644 --- a/internal/blockdb/tui/update.go +++ b/internal/blockdb/tui/update.go @@ -7,7 +7,7 @@ import ( "github.com/gdamore/tcell/v2" "github.com/rivo/tview" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb/tui/presenter" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb/tui/presenter" ) // Update should be the argument for *(tview.Application).SetInputCapture. diff --git a/internal/blockdb/tui/update_test.go b/internal/blockdb/tui/update_test.go index 89a7afb4b..4cff91cf6 100644 --- a/internal/blockdb/tui/update_test.go +++ b/internal/blockdb/tui/update_test.go @@ -9,7 +9,7 @@ import ( "github.com/gdamore/tcell/v2" "github.com/rivo/tview" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" "github.com/stretchr/testify/require" ) diff --git a/internal/blockdb/tui/views.go b/internal/blockdb/tui/views.go index 7c02f70c6..c94824530 100644 --- a/internal/blockdb/tui/views.go +++ b/internal/blockdb/tui/views.go @@ -8,8 +8,8 @@ import ( "github.com/gdamore/tcell/v2" "github.com/rivo/tview" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb" - "github.com/strangelove-ventures/interchaintest/v7/internal/blockdb/tui/presenter" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb" + "github.com/strangelove-ventures/interchaintest/v8/internal/blockdb/tui/presenter" ) func headerView(m *Model) *tview.Flex { diff --git a/internal/dockerutil/container_lifecycle.go b/internal/dockerutil/container_lifecycle.go index be7b7f7e3..264d8f82b 100644 --- a/internal/dockerutil/container_lifecycle.go +++ b/internal/dockerutil/container_lifecycle.go @@ -14,7 +14,7 @@ import ( "github.com/docker/go-connections/nat" "go.uber.org/zap" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) type ContainerLifecycle struct { diff --git a/internal/dockerutil/fileretriever_test.go b/internal/dockerutil/fileretriever_test.go index c73aa1c21..e9157faf8 100644 --- a/internal/dockerutil/fileretriever_test.go +++ b/internal/dockerutil/fileretriever_test.go @@ -5,8 +5,8 @@ import ( "testing" volumetypes "github.com/docker/docker/api/types/volume" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/internal/dockerutil/filewriter_test.go b/internal/dockerutil/filewriter_test.go index cb985eabb..bf5001540 100644 --- a/internal/dockerutil/filewriter_test.go +++ b/internal/dockerutil/filewriter_test.go @@ -5,8 +5,8 @@ import ( "testing" volumetypes "github.com/docker/docker/api/types/volume" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) diff --git a/internal/dockerutil/setup_test.go b/internal/dockerutil/setup_test.go index 007df13d3..020a45073 100644 --- a/internal/dockerutil/setup_test.go +++ b/internal/dockerutil/setup_test.go @@ -7,8 +7,8 @@ import ( volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/errdefs" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/internal/mocktesting" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/internal/mocktesting" "github.com/stretchr/testify/require" ) diff --git a/internal/mocktesting/t_test.go b/internal/mocktesting/t_test.go index 7779487d2..fbb84912a 100644 --- a/internal/mocktesting/t_test.go +++ b/internal/mocktesting/t_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/strangelove-ventures/interchaintest/v7/internal/mocktesting" + "github.com/strangelove-ventures/interchaintest/v8/internal/mocktesting" "github.com/stretchr/testify/require" ) diff --git a/local-interchain/cmd/local-ic/new_chain.go b/local-interchain/cmd/local-ic/new_chain.go index 30715be23..f27bc0c44 100644 --- a/local-interchain/cmd/local-ic/new_chain.go +++ b/local-interchain/cmd/local-ic/new_chain.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/spf13/cobra" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" ictypes "github.com/strangelove-ventures/localinterchain/interchain/types" "github.com/tyler-smith/go-bip39" diff --git a/local-interchain/go.mod b/local-interchain/go.mod index c82f7e55f..ace549025 100644 --- a/local-interchain/go.mod +++ b/local-interchain/go.mod @@ -7,14 +7,14 @@ replace ( github.com/ChainSafe/go-schnorrkel/1 => github.com/ChainSafe/go-schnorrkel v1.0.0 github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.22.2 //indirect github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/strangelove-ventures/interchaintest/v7 => ../ + github.com/strangelove-ventures/interchaintest/v8 => ../ github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 ) require ( github.com/cosmos/cosmos-sdk v0.47.4 github.com/cosmos/ibc-go/v7 v7.2.0 // indirect - github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230508154211-ebc1cbd6d88e + github.com/strangelove-ventures/interchaintest/v8 v7.0.0-20230508154211-ebc1cbd6d88e github.com/tyler-smith/go-bip39 v1.1.0 go.uber.org/zap v1.24.0 diff --git a/local-interchain/interchain/config.go b/local-interchain/interchain/config.go index f726274db..c3dc8faf1 100644 --- a/local-interchain/interchain/config.go +++ b/local-interchain/interchain/config.go @@ -11,10 +11,10 @@ import ( types "github.com/strangelove-ventures/localinterchain/interchain/types" "github.com/strangelove-ventures/localinterchain/interchain/util" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "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/testutil" ) func loadConfig(config *types.Config, filepath string) (*types.Config, error) { diff --git a/local-interchain/interchain/genesis.go b/local-interchain/interchain/genesis.go index 4daae2e28..e8eef5681 100644 --- a/local-interchain/interchain/genesis.go +++ b/local-interchain/interchain/genesis.go @@ -6,8 +6,8 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" types "github.com/strangelove-ventures/localinterchain/interchain/types" ) diff --git a/local-interchain/interchain/handlers/actions.go b/local-interchain/interchain/handlers/actions.go index 8333a1cf7..5aba9fd2d 100644 --- a/local-interchain/interchain/handlers/actions.go +++ b/local-interchain/interchain/handlers/actions.go @@ -9,9 +9,9 @@ import ( "github.com/strangelove-ventures/localinterchain/interchain/util" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) type actions struct { diff --git a/local-interchain/interchain/handlers/uploader.go b/local-interchain/interchain/handlers/uploader.go index 51f2749b0..f2eec0466 100644 --- a/local-interchain/interchain/handlers/uploader.go +++ b/local-interchain/interchain/handlers/uploader.go @@ -7,7 +7,7 @@ import ( "log" "net/http" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/localinterchain/interchain/util" ) diff --git a/local-interchain/interchain/ibc.go b/local-interchain/interchain/ibc.go index e7fc9789c..38931f773 100644 --- a/local-interchain/interchain/ibc.go +++ b/local-interchain/interchain/ibc.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/ibc" types "github.com/strangelove-ventures/localinterchain/interchain/types" ) diff --git a/local-interchain/interchain/logs.go b/local-interchain/interchain/logs.go index fef5e6fa3..3640ba270 100644 --- a/local-interchain/interchain/logs.go +++ b/local-interchain/interchain/logs.go @@ -6,8 +6,8 @@ import ( "path/filepath" "time" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" types "github.com/strangelove-ventures/localinterchain/interchain/types" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/local-interchain/interchain/router/router.go b/local-interchain/interchain/router/router.go index 98a768564..6f67847b4 100644 --- a/local-interchain/interchain/router/router.go +++ b/local-interchain/interchain/router/router.go @@ -6,9 +6,9 @@ import ( "net/http" "github.com/gorilla/mux" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ictypes "github.com/strangelove-ventures/localinterchain/interchain/types" "github.com/strangelove-ventures/localinterchain/interchain/util" diff --git a/local-interchain/interchain/start.go b/local-interchain/interchain/start.go index b40595059..dba47f910 100644 --- a/local-interchain/interchain/start.go +++ b/local-interchain/interchain/start.go @@ -8,12 +8,12 @@ import ( "net/http" "strings" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - interchaintestrelayer "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + interchaintestrelayer "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/strangelove-ventures/localinterchain/interchain/router" "go.uber.org/zap" ) diff --git a/local-interchain/interchain/types/chain.go b/local-interchain/interchain/types/chain.go index 880cf3b11..e45f4ff29 100644 --- a/local-interchain/interchain/types/chain.go +++ b/local-interchain/interchain/types/chain.go @@ -2,7 +2,7 @@ package types import ( "github.com/go-playground/validator" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" ) type Chain struct { diff --git a/local-interchain/interchain/types/genesis.go b/local-interchain/interchain/types/genesis.go index 3d812deaa..79cf2818e 100644 --- a/local-interchain/interchain/types/genesis.go +++ b/local-interchain/interchain/types/genesis.go @@ -1,6 +1,6 @@ package types -import "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" +import "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" type GenesisAccount struct { Name string `json:"name"` diff --git a/local-interchain/interchain/types/types.go b/local-interchain/interchain/types/types.go index c631f27da..4888cb632 100644 --- a/local-interchain/interchain/types/types.go +++ b/local-interchain/interchain/types/types.go @@ -1,7 +1,7 @@ package types import ( - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) type Config struct { diff --git a/relayer/docker.go b/relayer/docker.go index 052b99140..67c3b58bb 100644 --- a/relayer/docker.go +++ b/relayer/docker.go @@ -15,9 +15,9 @@ import ( "github.com/docker/docker/pkg/stdcopy" "go.uber.org/zap" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" ) const ( diff --git a/relayer/hermes/hermes_commander.go b/relayer/hermes/hermes_commander.go index f532a2701..29f70fea3 100644 --- a/relayer/hermes/hermes_commander.go +++ b/relayer/hermes/hermes_commander.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" "go.uber.org/zap" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" diff --git a/relayer/hermes/hermes_config.go b/relayer/hermes/hermes_config.go index 92e6af3c1..5f6d0b4e4 100644 --- a/relayer/hermes/hermes_config.go +++ b/relayer/hermes/hermes_config.go @@ -19,11 +19,15 @@ func NewConfig(chainConfigs ...ChainConfig) Config { } chains = append(chains, Chain{ - ID: chainCfg.ChainID, - RPCAddr: hermesCfg.rpcAddr, - GrpcAddr: fmt.Sprintf("http://%s", hermesCfg.grpcAddr), - WebsocketAddr: strings.ReplaceAll(fmt.Sprintf("%s/websocket", hermesCfg.rpcAddr), "http", "ws"), + ID: chainCfg.ChainID, + RPCAddr: hermesCfg.rpcAddr, + GrpcAddr: fmt.Sprintf("http://%s", hermesCfg.grpcAddr), + EventSource: EventSource{ + Mode: "push", + Url: strings.ReplaceAll(fmt.Sprintf("%s/websocket", hermesCfg.rpcAddr), "http", "ws"), + BatchDelay: "500ms"}, RPCTimeout: "10s", + TrustedNode: true, AccountPrefix: chainCfg.Bech32Prefix, KeyName: hermesCfg.keyName, AddressType: AddressType{ @@ -145,6 +149,12 @@ type GasPrice struct { Denom string `toml:"denom"` } +type EventSource struct { + Mode string `toml:"mode"` + Url string `toml:"url"` + BatchDelay string `toml:"batch_delay"` +} + type TrustThreshold struct { Numerator string `toml:"numerator"` Denominator string `toml:"denominator"` @@ -154,8 +164,9 @@ type Chain struct { ID string `toml:"id"` RPCAddr string `toml:"rpc_addr"` GrpcAddr string `toml:"grpc_addr"` - WebsocketAddr string `toml:"websocket_addr"` + EventSource EventSource `toml:"event_source"` RPCTimeout string `toml:"rpc_timeout"` + TrustedNode bool `toml:"trusted_node"` AccountPrefix string `toml:"account_prefix"` KeyName string `toml:"key_name"` AddressType AddressType `toml:"address_type"` diff --git a/relayer/hermes/hermes_relayer.go b/relayer/hermes/hermes_relayer.go index e67a89412..b5e04e59f 100644 --- a/relayer/hermes/hermes_relayer.go +++ b/relayer/hermes/hermes_relayer.go @@ -10,17 +10,17 @@ import ( "github.com/docker/docker/client" "github.com/pelletier/go-toml" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" "go.uber.org/zap" ) const ( hermes = "hermes" defaultContainerImage = "ghcr.io/informalsystems/hermes" - DefaultContainerVersion = "1.4.0" + DefaultContainerVersion = "1.6.0" - hermesDefaultUidGid = "1000:1000" + hermesDefaultUidGid = "1001:1001" hermesHome = "/home/hermes" hermesConfigPath = ".hermes/config.toml" ) diff --git a/relayer/hermes/hermes_wallet.go b/relayer/hermes/hermes_wallet.go index f3742cd7a..8d02c62a6 100644 --- a/relayer/hermes/hermes_wallet.go +++ b/relayer/hermes/hermes_wallet.go @@ -1,6 +1,6 @@ package hermes -import "github.com/strangelove-ventures/interchaintest/v7/ibc" +import "github.com/strangelove-ventures/interchaintest/v8/ibc" var _ ibc.Wallet = &Wallet{} diff --git a/relayer/hyperspace/hyperspace_commander.go b/relayer/hyperspace/hyperspace_commander.go deleted file mode 100644 index 4576379ac..000000000 --- a/relayer/hyperspace/hyperspace_commander.go +++ /dev/null @@ -1,392 +0,0 @@ -// Package hyperspace provides an interface to the hyperspace relayer running in a Docker container. -package hyperspace - -import ( - "context" - "fmt" - "path" - - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" - types23 "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" - "github.com/misko9/go-substrate-rpc-client/v4/signature" - "github.com/pelletier/go-toml/v2" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "go.uber.org/zap" -) - -// hyperspaceCommander satisfies relayer.RelayerCommander. -type hyperspaceCommander struct { - log *zap.Logger - paths map[string]*pathConfiguration - extraStartFlags []string -} - -// pathConfiguration represents the concept of a "path" which is implemented at the interchain test level rather -// than the hyperspace level. -type pathConfiguration struct { - chainA, chainB pathChainConfig -} - -// pathChainConfig holds all values that will be required when interacting with a path. -type pathChainConfig struct { - chainID string -} - -func (hyperspaceCommander) Name() string { - return "hyperspace" -} - -func (hyperspaceCommander) DockerUser() string { - return "1000:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" -} - -func (c *hyperspaceCommander) AddChainConfiguration(containerFilePath, homeDir string) []string { - fmt.Println("[hyperspace] AddChainConfiguration ", containerFilePath, homeDir) - //c.chainConfigPaths = append(c.chainConfigPaths, containerFilePath) - return []string{ - "hyperspace", - "-h", - } -} - -// Hyperspace doesn't not have this functionality -func (hyperspaceCommander) AddKey(chainID, keyName, coinType, homeDir string) []string { - panic("[AddKey] Do not call me") -} - -func (c *hyperspaceCommander) CreateChannel(pathName string, opts ibc.CreateChannelOptions, homeDir string) []string { - fmt.Println("[hyperspace] CreateChannel", pathName, homeDir) - _, ok := c.paths[pathName] - if !ok { - panic(fmt.Sprintf("path %s not found", pathName)) - } - return []string{ - "hyperspace", - "create-channel", - "--config-a", - configPath(homeDir, c.paths[pathName].chainA.chainID), - "--config-b", - configPath(homeDir, c.paths[pathName].chainB.chainID), - "--config-core", - path.Join(homeDir, "core.config"), - "--delay-period", - "0", - "--port-id", - opts.SourcePortName, - "--order", - "unordered", - "--version", - opts.Version, - } -} - -func (c *hyperspaceCommander) CreateClients(pathName string, opts ibc.CreateClientOptions, homeDir string) []string { - fmt.Println("[hyperspace] CreateClients", pathName, opts, homeDir) - _, ok := c.paths[pathName] - if !ok { - panic(fmt.Sprintf("path %s not found", pathName)) - } - return []string{ - "hyperspace", - "create-clients", - "--config-a", - configPath(homeDir, c.paths[pathName].chainA.chainID), - "--config-b", - configPath(homeDir, c.paths[pathName].chainB.chainID), - "--config-core", - path.Join(homeDir, "core.config"), - "--delay-period", - "0", - "--port-id", - "transfer", - "--order", - "unordered", - } -} - -func (c *hyperspaceCommander) CreateConnections(pathName, homeDir string) []string { - fmt.Println("[hyperspace] CreateConnections", pathName, homeDir) - _, ok := c.paths[pathName] - if !ok { - panic(fmt.Sprintf("path %s not found", pathName)) - } - return []string{ - "hyperspace", - "create-connection", - "--config-a", - configPath(homeDir, c.paths[pathName].chainA.chainID), - "--config-b", - configPath(homeDir, c.paths[pathName].chainB.chainID), - "--config-core", - path.Join(homeDir, "core.config"), - "--delay-period", - "0", - "--port-id", - "transfer", - "--order", - "unordered", - } -} - -// Hyperspace doesn't not have this functionality -func (hyperspaceCommander) FlushAcknowledgements(pathName, channelID, homeDir string) []string { - panic("[FlushAcknowledgements] Do not call me") -} - -// Hyperspace doesn't not have this functionality -func (hyperspaceCommander) FlushPackets(pathName, channelID, homeDir string) []string { - panic("[FlushPackets] Do not call me") -} - -// GeneratePath establishes an in memory path representation. The concept does not exist in hyperspace. -func (c *hyperspaceCommander) GeneratePath(srcChainID, dstChainID, pathName, homeDir string) []string { - if c.paths == nil { - c.paths = map[string]*pathConfiguration{} - } - c.paths[pathName] = &pathConfiguration{ - chainA: pathChainConfig{ - chainID: srcChainID, - }, - chainB: pathChainConfig{ - chainID: dstChainID, - }, - } - return []string{"true"} -} - -// Hyperspace does not have paths, just two configs -func (hyperspaceCommander) UpdatePath(pathName, homeDir string, filter ibc.ChannelFilter) []string { - panic("[UpdatePath] Do not call me") - -} - -// Prints chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -func (hyperspaceCommander) GetChannels(chainID, homeDir string) []string { - fmt.Println("[hyperspace] Get Channels") - configFilePath := path.Join(homeDir, chainID+".config") - return []string{ - "cat", - configFilePath, - } -} - -// Prints chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -func (hyperspaceCommander) GetConnections(chainID, homeDir string) []string { - fmt.Println("[hyperspace] Get Connections") - configFilePath := path.Join(homeDir, chainID+".config") - return []string{ - "cat", - configFilePath, - } -} - -// Prints chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -func (hyperspaceCommander) GetClients(chainID, homeDir string) []string { - fmt.Println("[hyperspace] Get Clients") - configFilePath := path.Join(homeDir, chainID+".config") - return []string{ - "cat", - configFilePath, - } -} - -// Hyperspace does not have link cmd, call create clients, create connection, and create channel -func (hyperspaceCommander) LinkPath(pathName, homeDir string, channelOpts ibc.CreateChannelOptions, clientOpt ibc.CreateClientOptions) []string { - panic("[LinkPath] Do not use me") -} - -// There is no hyperspace call to restore the key, so this can't return an executable. -// HyperspaceRelayer's RestoreKey will restore the key in the chain's config file -func (hyperspaceCommander) RestoreKey(chainID, bech32Prefix, coinType, mnemonic, homeDir string) []string { - panic("[RestoreKey] Do not use me") -} - -// hyperspace can only start 1 path -func (c *hyperspaceCommander) StartRelayer(homeDir string, pathNames ...string) []string { - fmt.Println("[hyperspace] StartRelayer", homeDir, pathNames) - if len(pathNames) != 1 { - panic("Hyperspace's StartRelayer list of paths can only have 1 path") - } - pathName := pathNames[0] - _, ok := c.paths[pathName] - if !ok { - panic(fmt.Sprintf("path %s not found", pathName)) - } - return []string{ - "hyperspace", - "relay", - "--config-a", - configPath(homeDir, c.paths[pathName].chainA.chainID), - "--config-b", - configPath(homeDir, c.paths[pathName].chainB.chainID), - "--config-core", - path.Join(homeDir, "core.config"), - "--delay-period", - "0", - "--port-id", - "transfer", - "--order", - "unordered", - "--version", - "ics20-1", - } -} - -// Hyperspace doesn't not have this functionality -func (hyperspaceCommander) UpdateClients(pathName, homeDir string) []string { - panic("[UpdateClients] Do not use me") -} - -func (hyperspaceCommander) ConfigContent(ctx context.Context, cfg ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) ([]byte, error) { - fmt.Println("[hyperspace] ConfigContent", cfg, keyName, rpcAddr, grpcAddr) - HyperspaceRelayerChainConfig := ChainConfigToHyperspaceRelayerChainConfig(cfg, keyName, rpcAddr, grpcAddr) - bytes, err := toml.Marshal(HyperspaceRelayerChainConfig) - if err != nil { - return nil, err - } - return bytes, nil -} - -func (hyperspaceCommander) DefaultContainerImage() string { - return HyperspaceDefaultContainerImage -} - -func (hyperspaceCommander) DefaultContainerVersion() string { - return HyperspaceDefaultContainerVersion -} - -// There is no hyperspace call to add key, so there is no stdout to parse. -// DockerRelayer's RestoreKey will restore the key in the chain's config file -func (hyperspaceCommander) ParseAddKeyOutput(stdout, stderr string) (ibc.Wallet, error) { - panic("[ParseAddKeyOutput] Do not call me") -} - -// There is no hyperspace call to restore the key, so there is no stdout to parse. -// DockerRelayer's RestoreKey will restore the key in the chain's config file -func (hyperspaceCommander) ParseRestoreKeyOutput(stdout, stderr string) string { - panic("[ParseRestoreKeyOutput] Do not call me") -} - -type ChannelsOutput struct { - Channels [][]string `toml:"channel_whitelist"` -} - -// Parses output of chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -func (hyperspaceCommander) ParseGetChannelsOutput(stdout, stderr string) ([]ibc.ChannelOutput, error) { - var cfg ChannelsOutput - err := toml.Unmarshal([]byte(stdout), &cfg) - if err != nil { - return nil, err - } - - outputs := make([]ibc.ChannelOutput, 0) - for _, channel := range cfg.Channels { - outputs = append(outputs, ibc.ChannelOutput{ - State: "", - Ordering: "", - Counterparty: ibc.ChannelCounterparty{ // TODO: retrieve from hyperspace - PortID: "", - ChannelID: "", - }, - ConnectionHops: []string{}, - Version: "", - PortID: channel[1], - ChannelID: channel[0], - }) - } - return outputs, nil -} - -type ConnectionsOutput struct { - ConnectionID string `toml:"connection_id"` - ClientID string `toml:"client_id"` -} - -// Parses output of chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -// Only supports 1 connection and limited info -func (hyperspaceCommander) ParseGetConnectionsOutput(stdout, stderr string) (ibc.ConnectionOutputs, error) { - var cfg ConnectionsOutput - err := toml.Unmarshal([]byte(stdout), &cfg) - if err != nil { - return nil, err - } - - return ibc.ConnectionOutputs{ - &ibc.ConnectionOutput{ - ID: cfg.ConnectionID, - ClientID: cfg.ClientID, - Versions: []*ibcexported.Version{ - { - Identifier: "", - Features: []string{}, - }, - }, - State: "", - Counterparty: &ibcexported.Counterparty{ - ClientId: "", - ConnectionId: "", - Prefix: types23.MerklePrefix{ - KeyPrefix: []byte{}, - }, - }, - DelayPeriod: "0", - }, - }, nil -} - -type ClientOutput struct { - ChainID string `toml:"chain_id"` - ClientID string `toml:"client_id"` -} - -// Parses output of chain config which is populated by hyperspace -// Ideally, there should be a command from hyperspace to get this output -// Only supports 1 client -func (hyperspaceCommander) ParseGetClientsOutput(stdout, stderr string) (ibc.ClientOutputs, error) { - var cfg ClientOutput - err := toml.Unmarshal([]byte(stdout), &cfg) - if err != nil { - return nil, err - } - - return ibc.ClientOutputs{ - &ibc.ClientOutput{ - ClientID: cfg.ClientID, - ClientState: ibc.ClientState{ - ChainID: cfg.ChainID, - }, - }, - }, nil -} - -func (hyperspaceCommander) Init(homeDir string) []string { - fmt.Println("[hyperspace] Init", homeDir) - // Return hyperspace help to ensure hyperspace binary is accessible - return []string{ - "hyperspace", - "-h", - } -} - -func (hyperspaceCommander) CreateWallet(keyName, address, mnemonic string) ibc.Wallet { - kp, err := signature.KeyringPairFromSecret(mnemonic, polkadot.Ss58Format) - if err != nil { - return NewWallet("", "", "") - } - return NewWallet("", kp.Address, mnemonic) -} - -func (hyperspaceCommander) Flush(pathName, channelID, homeDir string) []string { - panic("flush implemented in hyperspace not the commander") -} - -func configPath(homeDir, chainID string) string { - chainConfigFile := chainID + ".config" - return path.Join(homeDir, chainConfigFile) -} diff --git a/relayer/hyperspace/hyperspace_config.go b/relayer/hyperspace/hyperspace_config.go deleted file mode 100644 index 50f1fcee2..000000000 --- a/relayer/hyperspace/hyperspace_config.go +++ /dev/null @@ -1,144 +0,0 @@ -package hyperspace - -import ( - "fmt" - "strconv" - "strings" - - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/chain/polkadot" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - bip32 "github.com/tyler-smith/go-bip32" - bip39 "github.com/tyler-smith/go-bip39" -) - -type HyperspaceRelayerCoreConfig struct { - PrometheusEndpoint string -} - -type HyperspaceRelayerSubstrateChainConfig struct { - Type string `toml:"type"` - Name string `toml:"name"` - ParaID uint32 `toml:"para_id"` - ParachainRPCURL string `toml:"parachain_rpc_url"` - RelayChainRPCURL string `toml:"relay_chain_rpc_url"` - BeefyActivation uint32 `toml:"beefy_activation_block"` - CommitmentPrefix string `toml:"commitment_prefix"` - PrivateKey string `toml:"private_key"` - SS58Version uint8 `toml:"ss58_version"` - FinalityProtocol string `toml:"finality_protocol"` - KeyType string `toml:"key_type"` - ChannelWhitelist []string `toml:"channel_whitelist"` -} - -type KeyEntry struct { - PublicKey string `toml:"public_key"` - PrivateKey string `toml:"private_key"` - Account string `toml:"account"` - Address []byte `toml:"address"` -} - -type HyperspaceRelayerCosmosChainConfig struct { - Type string `toml:"type"` - Name string `toml:"name"` - RPCUrl string `toml:"rpc_url"` - GRPCUrl string `toml:"grpc_url"` - WebsocketUrl string `toml:"websocket_url"` - ChainID string `toml:"chain_id"` - AccountPrefix string `toml:"account_prefix"` - FeeDenom string `toml:"fee_denom"` - FeeAmount string `toml:"fee_amount"` - GasLimit uint64 `toml:"gas_limit"` - StorePrefix string `toml:"store_prefix"` - MaxTxSize uint64 `toml:"max_tx_size"` - WasmCodeId string `toml:"wasm_code_id"` - Keybase KeyEntry `toml:"keybase"` - ChannelWhitelist []string `toml:"channel_whitelist"` -} - -const ( - HyperspaceDefaultContainerImage = "hyperspace" - HyperspaceDefaultContainerVersion = "local" -) - -func GenKeyEntry(bech32Prefix, coinType, mnemonic string) KeyEntry { - coinType64, err := strconv.ParseUint(coinType, 10, 32) - if err != nil { - return KeyEntry{} - } - algo := keyring.SignatureAlgo(hd.Secp256k1) - hdPath := hd.CreateHDPath(uint32(coinType64), 0, 0).String() - - // create master key and derive first key for keyring - derivedPriv, err := algo.Derive()(mnemonic, "", hdPath) - if err != nil { - return KeyEntry{} - } - - privKey := algo.Generate()(derivedPriv) - address := types.AccAddress(privKey.PubKey().Address()) - bech32Addr := types.MustBech32ifyAddressBytes(bech32Prefix, address) - - // Derive extended private key - seed := bip39.NewSeed(mnemonic, "") - masterKey, _ := bip32.NewMasterKey(seed) - purposeKey, _ := masterKey.NewChildKey(0x8000002C) // 44' - coinTypeKey, _ := purposeKey.NewChildKey(0x80000000 + uint32(coinType64)) // 118' - accountKey, _ := coinTypeKey.NewChildKey(0x80000000) // 0' - changeKey, _ := accountKey.NewChildKey(0) // 0 - indexKey, _ := changeKey.NewChildKey(0) // 0 - - return KeyEntry{ - PublicKey: indexKey.PublicKey().B58Serialize(), // i.e. "xpub6GNKSnPmR5zN3Ef3EqYkSJTZzjzGecb1n1SqJRUNnoFPsyxviG7QyoVzjEjP3gfqRu7AvRrEZMfXJazz8pZgmYP6yvvdRqC2pWmWpeQTMBP" - PrivateKey: indexKey.B58Serialize(), // i.e. "xprvA3Ny3GrsaiS4pkaa8p1k5AWqSi9nF9sAQnXEW34mETiR1BdnAioAS1BWsx3uAXKT3NbY6cpY2mQL6N7R8se1GVHqNkpjwc7rv5VRaQ9x8EB" - Account: bech32Addr, // i.e. "cosmos1pyxjp07wc207l7jecyr3wcmq9cr54tqwhcwugm" - Address: address.Bytes(), // i.e. [9, 13, 32, 191, 206, 194, 159, 239, 250, 89, 193, 7, 23, 99, 96, 46, 7, 74, 172, 14] - } -} -func ChainConfigToHyperspaceRelayerChainConfig(chainConfig ibc.ChainConfig, keyName, rpcAddr, grpcAddr string) interface{} { - chainType := chainConfig.Type - if chainType == "polkadot" || chainType == "parachain" || chainType == "relaychain" { - chainType = "parachain" - } - - if chainType == "parachain" { - addrs := strings.Split(rpcAddr, ",") - paraRpcAddr := rpcAddr - relayRpcAddr := grpcAddr - if len(addrs) > 1 { - paraRpcAddr, relayRpcAddr = addrs[0], addrs[1] - } - return HyperspaceRelayerSubstrateChainConfig{ - Type: chainType, - Name: chainConfig.Name, - ParaID: 2000, - ParachainRPCURL: strings.Replace(strings.Replace(paraRpcAddr, "http", "ws", 1), "9933", "27451", 1), - RelayChainRPCURL: strings.Replace(strings.Replace(relayRpcAddr, "http", "ws", 1), "9933", "27451", 1), - CommitmentPrefix: "0x6962632f", - PrivateKey: "//Alice", - SS58Version: polkadot.Ss58Format, - KeyType: "sr25519", - FinalityProtocol: "Grandpa", - } - } else if chainType == "cosmos" { - wsUrl := strings.Replace(rpcAddr, "http", "ws", 1) + "/websocket" - return HyperspaceRelayerCosmosChainConfig{ - Type: chainType, - Name: chainConfig.Name, - ChainID: chainConfig.ChainID, - AccountPrefix: chainConfig.Bech32Prefix, - FeeDenom: "stake", - FeeAmount: "4000", - GasLimit: 10_000_000, - GRPCUrl: "http://" + grpcAddr, - RPCUrl: rpcAddr, - StorePrefix: "ibc", - MaxTxSize: 200000, - WebsocketUrl: wsUrl, - } - } else { - panic(fmt.Sprintf("unsupported chain type %s", chainType)) - } -} diff --git a/relayer/hyperspace/hyperspace_relayer.go b/relayer/hyperspace/hyperspace_relayer.go deleted file mode 100644 index e5bb74344..000000000 --- a/relayer/hyperspace/hyperspace_relayer.go +++ /dev/null @@ -1,206 +0,0 @@ -// Package hyperspace provides an interface to the hyperspace relayer running in a Docker container. -package hyperspace - -import ( - "context" - "fmt" - "path" - "time" - - "github.com/docker/docker/client" - "github.com/pelletier/go-toml/v2" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "go.uber.org/zap" -) - -var _ ibc.Relayer = &HyperspaceRelayer{} - -// ******* DockerRelayer methods that will panic in hyperspace commander, no overrides yet ******* -// FlushAcknowledgements() - no hyperspace implementation yet -// FlushPackets() - no hypersapce implementation yet -// UpdatePath() - hyperspace doesn't understand paths, may not be needed. -// UpdateClients() - no hyperspace implementation yet -// AddKey() - no hyperspace implementation yet - -// HyperspaceRelayer is the ibc.Relayer implementation for github.com/ComposableFi/hyperspace. -type HyperspaceRelayer struct { - // Embedded DockerRelayer so commands just work. - *relayer.DockerRelayer -} - -func NewHyperspaceRelayer(log *zap.Logger, testName string, cli *client.Client, networkID string, options ...relayer.RelayerOption) *HyperspaceRelayer { - c := hyperspaceCommander{log: log} - for _, opt := range options { - switch o := opt.(type) { - case relayer.RelayerOptionExtraStartFlags: - c.extraStartFlags = o.Flags - } - } - dr, err := relayer.NewDockerRelayer(context.TODO(), log, testName, cli, networkID, &c, options...) - if err != nil { - panic(err) // TODO: return - } - - coreConfig := HyperspaceRelayerCoreConfig{ - PrometheusEndpoint: "", - } - bytes, err := toml.Marshal(coreConfig) - if err != nil { - panic(err) // TODO: return - } - err = dr.WriteFileToHomeDir(context.TODO(), "core.config", bytes) - if err != nil { - panic(err) // TODO: return - } - - r := &HyperspaceRelayer{ - DockerRelayer: dr, - } - - return r -} - -// HyperspaceCapabilities returns the set of capabilities of the Cosmos relayer. -// -// Note, this API may change if the rly package eventually needs -// to distinguish between multiple rly versions. -func HyperspaceCapabilities() map[relayer.Capability]bool { - // RC1 matches the full set of capabilities as of writing. - return nil // relayer.FullCapabilities() -} - -// LinkPath performs the operations that happen when a path is linked. This includes creating clients, creating connections -// and establishing a channel. This happens across multiple operations rather than a single link path cli command. -// Parachains need a Polkadot epoch/session before starting, do not link in interchain.Build() -func (r *HyperspaceRelayer) LinkPath(ctx context.Context, rep ibc.RelayerExecReporter, pathName string, channelOpts ibc.CreateChannelOptions, clientOpts ibc.CreateClientOptions) error { - if err := r.CreateClients(ctx, rep, pathName, clientOpts); err != nil { - return err - } - - if err := r.CreateConnections(ctx, rep, pathName); err != nil { - return err - } - - if err := r.CreateChannel(ctx, rep, pathName, channelOpts); err != nil { - return err - } - - return nil -} - -func (r *HyperspaceRelayer) RestoreKey(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, keyName, mnemonic string) error { - addrBytes := "" - chainID := cfg.ChainID - coinType := cfg.CoinType - chainType := cfg.Type - - chainConfigFile := chainID + ".config" - config, err := r.GetRelayerChainConfig(ctx, chainConfigFile, chainType) - if err != nil { - return err - } - switch chainType { - case "cosmos": - bech32Prefix := cfg.Bech32Prefix - config.(*HyperspaceRelayerCosmosChainConfig).Keybase = GenKeyEntry(bech32Prefix, coinType, mnemonic) - case "polkadot": - config.(*HyperspaceRelayerSubstrateChainConfig).PrivateKey = mnemonic - } - - err = r.SetRelayerChainConfig(ctx, chainConfigFile, config) - if err != nil { - return err - } - - r.AddWallet(chainID, NewWallet(chainID, addrBytes, mnemonic)) - - return nil -} - -func (r *HyperspaceRelayer) SetClientContractHash(ctx context.Context, rep ibc.RelayerExecReporter, cfg ibc.ChainConfig, hash string) error { - chainID := cfg.ChainID - chainType := cfg.Type - chainConfigFile := chainID + ".config" - config, err := r.GetRelayerChainConfig(ctx, chainConfigFile, chainType) - if err != nil { - return err - } - switch chainType { - case "cosmos": - config.(*HyperspaceRelayerCosmosChainConfig).WasmCodeId = hash - } - - return r.SetRelayerChainConfig(ctx, chainConfigFile, config) -} - -func (r *HyperspaceRelayer) PrintCoreConfig(ctx context.Context, rep ibc.RelayerExecReporter) error { - cmd := []string{ - "cat", - path.Join(r.HomeDir(), "core.config"), - } - - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - res := r.Exec(ctx, rep, cmd, nil) - if res.Err != nil { - return res.Err - } - fmt.Println(string(res.Stdout)) - return nil -} - -func (r *HyperspaceRelayer) PrintConfigs(ctx context.Context, rep ibc.RelayerExecReporter, chainID string) error { - cmd := []string{ - "cat", - path.Join(r.HomeDir(), chainID+".config"), - } - - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - res := r.Exec(ctx, rep, cmd, nil) - if res.Err != nil { - return res.Err - } - fmt.Println(string(res.Stdout)) - return nil -} - -func (r *HyperspaceRelayer) GetRelayerChainConfig( - ctx context.Context, - filePath string, - chainType string, -) (interface{}, error) { - configRaw, err := r.ReadFileFromHomeDir(ctx, filePath) - if err != nil { - return nil, err - } - - switch chainType { - case "cosmos": - var config HyperspaceRelayerCosmosChainConfig - if err := toml.Unmarshal(configRaw, &config); err != nil { - return nil, fmt.Errorf("failed to unmarshal %s: %w", filePath, err) - } - return &config, nil - case "polkadot": - var config HyperspaceRelayerSubstrateChainConfig - if err := toml.Unmarshal(configRaw, &config); err != nil { - return nil, fmt.Errorf("failed to unmarshal %s: %w", filePath, err) - } - return &config, nil - } - return nil, fmt.Errorf("unsupported chain config: %s", chainType) -} -func (r *HyperspaceRelayer) SetRelayerChainConfig( - ctx context.Context, - filePath string, - config interface{}, -) error { - bytes, err := toml.Marshal(config) - if err != nil { - return err - } - - return r.WriteFileToHomeDir(ctx, filePath, bytes) -} diff --git a/relayer/hyperspace/hyperspace_test.go b/relayer/hyperspace/hyperspace_test.go deleted file mode 100644 index 996684d40..000000000 --- a/relayer/hyperspace/hyperspace_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package hyperspace_test - -import ( - "testing" - - "github.com/strangelove-ventures/interchaintest/v7/relayer/hyperspace" - "github.com/stretchr/testify/require" -) - -func TestKeys(t *testing.T) { - bech32Prefix := "cosmos" - coinType := "118" - mnemonic := "taste shoot adapt slow truly grape gift need suggest midnight burger horn whisper hat vast aspect exit scorpion jewel axis great area awful blind" - - expectedKeyEntry := hyperspace.KeyEntry{ - PublicKey: "xpub6G1GwQBqWwXuCRhri9q1JzxZ9eMWFazo2ssoZNkAsqusDTT6MPUXiPaXMJS9v4RVaSmYPhA1HK5RCD7WPutmUn3eeqXduM142X7YRVBx8bn", - PrivateKey: "xprvA31vXtewgZybywdPc8Hzws1pbcX1r8GwfexCkzLZKWNtLf7worAHAbG3W3F1SagK47ng5877ihXkDvmNfZnVHSGw7Ad1JkzyPTKEtSpmSxa", - Address: []byte{69, 6, 166, 110, 97, 215, 215, 210, 224, 48, 93, 126, 44, 86, 4, 36, 109, 137, 43, 242}, - Account: "cosmos1g5r2vmnp6lta9cpst4lzc4syy3kcj2lj0nuhmy", - } - - keyEntry := hyperspace.GenKeyEntry(bech32Prefix, coinType, mnemonic) - require.Equal(t, expectedKeyEntry.PublicKey, keyEntry.PublicKey, "PublicKey is wrong") - require.Equal(t, expectedKeyEntry.PrivateKey, keyEntry.PrivateKey, "PrivateKey is wrong") - require.Equal(t, expectedKeyEntry.Account, keyEntry.Account, "Account is wrong") - require.Equal(t, expectedKeyEntry.Address, keyEntry.Address, "Address is wrong") -} diff --git a/relayer/hyperspace/wallet.go b/relayer/hyperspace/wallet.go deleted file mode 100644 index 441cf8f9e..000000000 --- a/relayer/hyperspace/wallet.go +++ /dev/null @@ -1,44 +0,0 @@ -package hyperspace - -import ( - "github.com/strangelove-ventures/interchaintest/v7/ibc" -) - -var _ ibc.Wallet = &HyperspaceWallet{} - -type WalletModel struct { - Mnemonic string `json:"mnemonic"` - Address string `json:"address"` -} - -type HyperspaceWallet struct { - mnemonic string - address string - keyName string -} - -func NewWallet(keyname string, address string, mnemonic string) *HyperspaceWallet { - return &HyperspaceWallet{ - mnemonic: mnemonic, - address: address, - keyName: keyname, - } -} - -func (w *HyperspaceWallet) KeyName() string { - return w.keyName -} - -func (w *HyperspaceWallet) FormattedAddress() string { - return w.address -} - -// Get mnemonic, only used for relayer wallets -func (w *HyperspaceWallet) Mnemonic() string { - return w.mnemonic -} - -// Get Address -func (w *HyperspaceWallet) Address() []byte { - return []byte(w.address) -} diff --git a/relayer/options.go b/relayer/options.go index fdbb73ec9..05150af90 100644 --- a/relayer/options.go +++ b/relayer/options.go @@ -1,7 +1,7 @@ package relayer import ( - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) // RelayerOption is used to customize the relayer configuration, whether constructed with the diff --git a/relayer/rly/cosmos_relayer.go b/relayer/rly/cosmos_relayer.go index 25442af20..2f0d20413 100644 --- a/relayer/rly/cosmos_relayer.go +++ b/relayer/rly/cosmos_relayer.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" "go.uber.org/zap" ) @@ -80,9 +80,6 @@ func Capabilities() map[relayer.Capability]bool { func ChainConfigToCosmosRelayerChainConfig(chainConfig ibc.ChainConfig, keyName, rpcAddr, gprcAddr string) CosmosRelayerChainConfig { chainType := chainConfig.Type - if chainType == "polkadot" || chainType == "parachain" || chainType == "relaychain" { - chainType = "substrate" - } return CosmosRelayerChainConfig{ Type: chainType, Value: CosmosRelayerChainConfigValue{ diff --git a/relayer/rly/wallet.go b/relayer/rly/wallet.go index ddc853dc0..84a58e80c 100644 --- a/relayer/rly/wallet.go +++ b/relayer/rly/wallet.go @@ -1,7 +1,7 @@ package rly import ( - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) var _ ibc.Wallet = &RlyWallet{} diff --git a/relayerfactory.go b/relayerfactory.go index bc4af42f8..7312087df 100644 --- a/relayerfactory.go +++ b/relayerfactory.go @@ -4,11 +4,10 @@ import ( "fmt" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" - "github.com/strangelove-ventures/interchaintest/v7/relayer/hermes" - "github.com/strangelove-ventures/interchaintest/v7/relayer/hyperspace" - "github.com/strangelove-ventures/interchaintest/v7/relayer/rly" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/relayer" + "github.com/strangelove-ventures/interchaintest/v8/relayer/hermes" + "github.com/strangelove-ventures/interchaintest/v8/relayer/rly" "go.uber.org/zap" ) @@ -61,14 +60,6 @@ func (f builtinRelayerFactory) Build( networkID, f.options..., ) - case ibc.Hyperspace: - return hyperspace.NewHyperspaceRelayer( - f.log, - t.Name(), - cli, - networkID, - f.options..., - ) case ibc.Hermes: return hermes.NewHermesRelayer(f.log, t.Name(), cli, networkID, f.options...) default: diff --git a/tempdir_test.go b/tempdir_test.go index dc2979672..47d8b20ec 100644 --- a/tempdir_test.go +++ b/tempdir_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/internal/mocktesting" + interchaintest "github.com/strangelove-ventures/interchaintest/v8" + "github.com/strangelove-ventures/interchaintest/v8/internal/mocktesting" "github.com/stretchr/testify/require" ) diff --git a/test_setup.go b/test_setup.go index ba50bcc85..53e54b492 100644 --- a/test_setup.go +++ b/test_setup.go @@ -8,10 +8,10 @@ import ( "time" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/internal/version" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/internal/version" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" ) const ( diff --git a/test_user.go b/test_user.go index 50877a73e..1e1445378 100644 --- a/test_user.go +++ b/test_user.go @@ -6,9 +6,9 @@ import ( "testing" "cosmossdk.io/math" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" - "github.com/strangelove-ventures/interchaintest/v7/testutil" + "github.com/strangelove-ventures/interchaintest/v8/ibc" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/testutil" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" ) diff --git a/testreporter/messages_test.go b/testreporter/messages_test.go index 678bb8915..1e7afe70b 100644 --- a/testreporter/messages_test.go +++ b/testreporter/messages_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" "github.com/stretchr/testify/require" ) diff --git a/testreporter/reporter_test.go b/testreporter/reporter_test.go index 541d3d171..8d66ed91a 100644 --- a/testreporter/reporter_test.go +++ b/testreporter/reporter_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/strangelove-ventures/interchaintest/v7/internal/mocktesting" - "github.com/strangelove-ventures/interchaintest/v7/testreporter" + "github.com/strangelove-ventures/interchaintest/v8/internal/mocktesting" + "github.com/strangelove-ventures/interchaintest/v8/testreporter" "github.com/stretchr/testify/require" ) diff --git a/testutil/poll_for_state.go b/testutil/poll_for_state.go index d136bd94c..907e2afb0 100644 --- a/testutil/poll_for_state.go +++ b/testutil/poll_for_state.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/davecgh/go-spew/spew" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" ) var ErrNotFound = errors.New("not found") diff --git a/testutil/poll_for_state_test.go b/testutil/poll_for_state_test.go index fb41a2f6f..0997c7170 100644 --- a/testutil/poll_for_state_test.go +++ b/testutil/poll_for_state_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v8/ibc" "github.com/stretchr/testify/require" ) diff --git a/testutil/toml.go b/testutil/toml.go index 7f382adf9..3f3b5bca8 100644 --- a/testutil/toml.go +++ b/testutil/toml.go @@ -8,7 +8,7 @@ import ( "github.com/BurntSushi/toml" "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/internal/dockerutil" + "github.com/strangelove-ventures/interchaintest/v8/internal/dockerutil" "go.uber.org/zap" )