From a8e4552c336e4e3e2b6550cc389170eecabc5b2d Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:43:11 +0300 Subject: [PATCH 1/4] ci: callbacks.yml to run on every PR and push to main (#4657) --- .github/workflows/callbacks.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/callbacks.yml b/.github/workflows/callbacks.yml index a74b3162a75..9c9b7d5b4ac 100644 --- a/.github/workflows/callbacks.yml +++ b/.github/workflows/callbacks.yml @@ -2,9 +2,9 @@ name: Callbacks Module # This workflow runs when a PR is opened that targets code that is part of the callbacks module. on: pull_request: - paths: - - '.github/workflows/callbacks.yml' - - 'modules/apps/callbacks/**' + push: + branches: + - main permissions: contents: read From 4fcb399fcbf3593a4b3ff8b1824f71eb62627015 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Mon, 18 Sep 2023 09:22:59 +0000 Subject: [PATCH 2/4] E2E Upgrade: Human Readable IBC Denom (#4649) --- .github/workflows/e2e-upgrade.yaml | 2 +- e2e/tests/transfer/base_test.go | 8 ++--- e2e/tests/upgrades/upgrade_test.go | 14 +++++---- e2e/testsuite/grpc_query.go | 41 +++++++++++++++++--------- e2e/testsuite/testsuite.go | 15 ++++++++++ modules/apps/transfer/keeper/keeper.go | 1 - 6 files changed, 54 insertions(+), 27 deletions(-) diff --git a/.github/workflows/e2e-upgrade.yaml b/.github/workflows/e2e-upgrade.yaml index 6c9e8e43c4e..8c9f19a3668 100644 --- a/.github/workflows/e2e-upgrade.yaml +++ b/.github/workflows/e2e-upgrade.yaml @@ -71,7 +71,7 @@ jobs: chain-binary: simd chain-a-tag: v7.0.0 chain-b-tag: v7.0.0 - chain-upgrade-tag: pr-4591 # TODO: update this to a real tag once v8 is released + chain-upgrade-tag: main # TODO: update this to a real tag once v8 is released upgrade-plan-name: "v8" test-entry-point: "TestUpgradeTestSuite" test: "TestV7ToV8ChainUpgrade" diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index d2dd81c4659..94efe105d96 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -106,12 +106,8 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { }) if testvalues.TokenMetadataFeatureReleases.IsSupported(chainBVersion) { - t.Run("metadata for token exists on chainB", func(t *testing.T) { - balances, err := s.QueryAllBalances(ctx, chainB, chainBAddress, true) - s.Require().NoError(err) - - // balance for IBC token returns a human-readable denomination - s.Require().Equal(chainBIBCToken.GetFullDenomPath(), balances[1].Denom) + t.Run("metadata for IBC denomination exists on chainB", func(t *testing.T) { + s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) }) } diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 1df81a1f3aa..2e289f10eab 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -721,21 +721,21 @@ func (s *UpgradeTestSuite) TestV7ToV8ChainUpgrade() { s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") t.Run("upgrade chain", func(t *testing.T) { - govProposalWallet := s.CreateUserOnChainA(ctx, testvalues.StartingTokenAmount) - s.UpgradeChain(ctx, chainA, govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) + govProposalWallet := s.CreateUserOnChainB(ctx, testvalues.StartingTokenAmount) + s.UpgradeChain(ctx, chainB, govProposalWallet, testCfg.UpgradeConfig.PlanName, testCfg.ChainConfigs[0].Tag, testCfg.UpgradeConfig.Tag) }) t.Run("update params", func(t *testing.T) { - authority, err := s.QueryModuleAccountAddress(ctx, govtypes.ModuleName, chainA) + authority, err := s.QueryModuleAccountAddress(ctx, govtypes.ModuleName, chainB) s.Require().NoError(err) s.Require().NotNil(authority) msg := clienttypes.NewMsgUpdateParams(authority.String(), clienttypes.NewParams(exported.Tendermint, "some-client")) - s.ExecuteGovV1Proposal(ctx, msg, chainA, chainAWallet) + s.ExecuteGovV1Proposal(ctx, msg, chainB, chainBWallet) }) t.Run("query params", func(t *testing.T) { - clientParams, err := s.GetChainGRCPClients(chainA).ClientQueryClient.ClientParams(ctx, &clienttypes.QueryClientParamsRequest{}) + clientParams, err := s.GetChainGRCPClients(chainB).ClientQueryClient.ClientParams(ctx, &clienttypes.QueryClientParamsRequest{}) s.Require().NoError(err) allowedClients := clientParams.Params.AllowedClients @@ -744,6 +744,10 @@ func (s *UpgradeTestSuite) TestV7ToV8ChainUpgrade() { s.Require().Contains(allowedClients, exported.Tendermint) s.Require().Contains(allowedClients, "some-client") }) + + t.Run("query human readable ibc denom", func(t *testing.T) { + s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) + }) } // RegisterInterchainAccount will attempt to register an interchain account on the counterparty chain. diff --git a/e2e/testsuite/grpc_query.go b/e2e/testsuite/grpc_query.go index fb71017aa6e..42afae1501c 100644 --- a/e2e/testsuite/grpc_query.go +++ b/e2e/testsuite/grpc_query.go @@ -279,20 +279,6 @@ func (s *E2ETestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Cha return res.CounterpartyPayee, nil } -// QueryBalances returns all the balances on the given chain for the provided address. -func (s *E2ETestSuite) QueryAllBalances(ctx context.Context, chain ibc.Chain, address string, resolveDenom bool) (sdk.Coins, error) { - queryClient := s.GetChainGRCPClients(chain).BankQueryClient - res, err := queryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ - Address: address, - ResolveDenom: resolveDenom, - }) - if err != nil { - return sdk.Coins{}, err - } - - return res.Balances, nil -} - // QueryProposalV1Beta1 queries the governance proposal on the given chain with the given proposal ID. func (s *E2ETestSuite) QueryProposalV1Beta1(ctx context.Context, chain ibc.Chain, proposalID uint64) (govtypesv1beta1.Proposal, error) { queryClient := s.GetChainGRCPClients(chain).GovQueryClient @@ -394,3 +380,30 @@ func (s *E2ETestSuite) QueryGranterGrants(ctx context.Context, chain *cosmos.Cos return grants.Grants, nil } + +// QueryBalances returns all the balances on the given chain for the provided address. +func (s *E2ETestSuite) QueryAllBalances(ctx context.Context, chain ibc.Chain, address string, resolveDenom bool) (sdk.Coins, error) { + queryClient := s.GetChainGRCPClients(chain).BankQueryClient + res, err := queryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ + Address: address, + ResolveDenom: resolveDenom, + }) + if err != nil { + return sdk.Coins{}, err + } + + return res.Balances, nil +} + +// QueryDenomMetadata queries the metadata for the given denom. +func (s *E2ETestSuite) QueryDenomMetadata(ctx context.Context, chain *cosmos.CosmosChain, denom string) (banktypes.Metadata, error) { + bankClient := s.GetChainGRCPClients(chain).BankQueryClient + queryRequest := &banktypes.QueryDenomMetadataRequest{ + Denom: denom, + } + res, err := bankClient.DenomMetadata(ctx, queryRequest) + if err != nil { + return banktypes.Metadata{}, err + } + return res.Metadata, nil +} diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index a0b2349c686..2e30bccd731 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -322,6 +322,21 @@ func (s *E2ETestSuite) AssertPacketRelayed(ctx context.Context, chain *cosmos.Co s.Require().Empty(commitment) } +// AssertHumanReadableDenom asserts that a human readable denom is present for a given chain. +func (s *E2ETestSuite) AssertHumanReadableDenom(ctx context.Context, chain *cosmos.CosmosChain, counterpartyNativeDenom string, counterpartyChannel ibc.ChannelOutput) { + chainIBCDenom := GetIBCToken(counterpartyNativeDenom, counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID) + + denomMetadata, err := s.QueryDenomMetadata(ctx, chain, chainIBCDenom.IBCDenom()) + s.Require().NoError(err) + + s.Require().Equal(chainIBCDenom.IBCDenom(), denomMetadata.Base, "denom metadata base does not match expected %s: got %s", chainIBCDenom.IBCDenom(), denomMetadata.Base) + expectedName := fmt.Sprintf("%s/%s/%s IBC token", counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID, counterpartyNativeDenom) + s.Require().Equal(expectedName, denomMetadata.Name, "denom metadata name does not match expected %s: got %s", expectedName, denomMetadata.Name) + expectedDisplay := fmt.Sprintf("%s/%s/%s", counterpartyChannel.Counterparty.PortID, counterpartyChannel.Counterparty.ChannelID, counterpartyNativeDenom) + s.Require().Equal(expectedDisplay, denomMetadata.Display, "denom metadata display does not match expected %s: got %s", expectedDisplay, denomMetadata.Display) + s.Require().Equal(strings.ToUpper(counterpartyNativeDenom), denomMetadata.Symbol, "denom metadata symbol does not match expected %s: got %s", strings.ToUpper(counterpartyNativeDenom), denomMetadata.Symbol) +} + // createCosmosChains creates two separate chains in docker containers. // test and can be retrieved with GetChains. func (s *E2ETestSuite) createCosmosChains(chainOptions ChainOptions) (*cosmos.CosmosChain, *cosmos.CosmosChain) { diff --git a/modules/apps/transfer/keeper/keeper.go b/modules/apps/transfer/keeper/keeper.go index a58ec865f45..5a033980d87 100644 --- a/modules/apps/transfer/keeper/keeper.go +++ b/modules/apps/transfer/keeper/keeper.go @@ -58,7 +58,6 @@ func NewKeeper( if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic("the IBC transfer module account has not been set") } - // set KeyTable if it has not already been set if !legacySubspace.HasKeyTable() { legacySubspace = legacySubspace.WithKeyTable(types.ParamKeyTable()) From 234ff4ef7ca8acfc048984a3e30bba0ab56dd1eb Mon Sep 17 00:00:00 2001 From: Gbenga <52829434+CyberGA@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:57:09 +0100 Subject: [PATCH 3/4] replace all instances of collections.Contains with slices.Contains across the entire codebase (#4685) * replace collections.Contains with slices.Contains * chore: remove internal/collections pkg * chore: fix slices.Contains api usage, and remove unused imports --------- Co-authored-by: Damian Nolan Co-authored-by: Jim Fasarakis-Hilliard --- internal/collections/collections.go | 11 ----- internal/collections/collections_test.go | 44 ------------------- .../host/client/cli/tx.go | 4 +- .../27-interchain-accounts/types/metadata.go | 7 +-- modules/core/02-client/types/params.go | 4 +- modules/core/03-connection/types/version.go | 9 ++-- testing/events.go | 4 +- 7 files changed, 14 insertions(+), 69 deletions(-) delete mode 100644 internal/collections/collections.go delete mode 100644 internal/collections/collections_test.go diff --git a/internal/collections/collections.go b/internal/collections/collections.go deleted file mode 100644 index ae8c403f72e..00000000000 --- a/internal/collections/collections.go +++ /dev/null @@ -1,11 +0,0 @@ -package collections - -// Contains is a generic function which returns true if elem T exists within the list of elements []T. -func Contains[T comparable](elem T, elements []T) bool { - for _, e := range elements { - if elem == e { - return true - } - } - return false -} diff --git a/internal/collections/collections_test.go b/internal/collections/collections_test.go deleted file mode 100644 index 184de69d84e..00000000000 --- a/internal/collections/collections_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package collections_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/ibc-go/v8/internal/collections" -) - -func TestContainsString(t *testing.T) { - testCases := []struct { - name string - haystack []string - needle string - expected bool - }{ - {"failure empty haystack", []string{}, "needle", false}, - {"failure empty needle", []string{"hay", "stack"}, "", false}, - {"failure needle not in haystack", []string{"hay", "stack"}, "needle", false}, - {"success needle in haystack", []string{"hay", "stack", "needle"}, "needle", true}, - } - - for _, tc := range testCases { - require.Equal(t, tc.expected, collections.Contains(tc.needle, tc.haystack), tc.name) - } -} - -func TestContainsInt(t *testing.T) { - testCases := []struct { - name string - haystack []int - needle int - expected bool - }{ - {"failure empty haystack", []int{}, 1, false}, - {"failure needle not in haystack", []int{1, 2, 3}, 4, false}, - {"success needle in haystack", []int{1, 2, 3, 4}, 4, true}, - } - - for _, tc := range testCases { - require.Equal(t, tc.expected, collections.Contains(tc.needle, tc.haystack), tc.name) - } -} diff --git a/modules/apps/27-interchain-accounts/host/client/cli/tx.go b/modules/apps/27-interchain-accounts/host/client/cli/tx.go index 76a7f198bc8..78f204eb63b 100644 --- a/modules/apps/27-interchain-accounts/host/client/cli/tx.go +++ b/modules/apps/27-interchain-accounts/host/client/cli/tx.go @@ -3,6 +3,7 @@ package cli import ( "encoding/json" "fmt" + "slices" "github.com/cosmos/gogoproto/proto" "github.com/spf13/cobra" @@ -12,7 +13,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/cosmos/ibc-go/v8/internal/collections" icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" ) @@ -82,7 +82,7 @@ otherwise the encoding flag can be used in combination with either "proto3" or " return err } - if !collections.Contains(encoding, []string{icatypes.EncodingProtobuf, icatypes.EncodingProto3JSON}) { + if !slices.Contains([]string{icatypes.EncodingProtobuf, icatypes.EncodingProto3JSON}, encoding) { return fmt.Errorf("unsupported encoding type: %s", encoding) } diff --git a/modules/apps/27-interchain-accounts/types/metadata.go b/modules/apps/27-interchain-accounts/types/metadata.go index 1314ce087a0..29d1da45d42 100644 --- a/modules/apps/27-interchain-accounts/types/metadata.go +++ b/modules/apps/27-interchain-accounts/types/metadata.go @@ -1,11 +1,12 @@ package types import ( + "slices" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/ibc-go/v8/internal/collections" connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" ) @@ -134,7 +135,7 @@ func ValidateHostMetadata(ctx sdk.Context, channelKeeper ChannelKeeper, connecti // isSupportedEncoding returns true if the provided encoding is supported, otherwise false func isSupportedEncoding(encoding string) bool { - return collections.Contains(encoding, getSupportedEncoding()) + return slices.Contains(getSupportedEncoding(), encoding) } // getSupportedEncoding returns a string slice of supported encoding formats @@ -144,7 +145,7 @@ func getSupportedEncoding() []string { // isSupportedTxType returns true if the provided transaction type is supported, otherwise false func isSupportedTxType(txType string) bool { - return collections.Contains(txType, getSupportedTxTypes()) + return slices.Contains(getSupportedTxTypes(), txType) } // getSupportedTxTypes returns a string slice of supported transaction types diff --git a/modules/core/02-client/types/params.go b/modules/core/02-client/types/params.go index 1279cc4c0a3..2234f049e66 100644 --- a/modules/core/02-client/types/params.go +++ b/modules/core/02-client/types/params.go @@ -2,9 +2,9 @@ package types import ( "fmt" + "slices" "strings" - "github.com/cosmos/ibc-go/v8/internal/collections" "github.com/cosmos/ibc-go/v8/modules/core/exported" ) @@ -30,7 +30,7 @@ func (p Params) Validate() error { // IsAllowedClient checks if the given client type is registered on the allowlist. func (p Params) IsAllowedClient(clientType string) bool { - return collections.Contains(clientType, p.AllowedClients) + return slices.Contains(p.AllowedClients, clientType) } // validateClients checks that the given clients are not blank. diff --git a/modules/core/03-connection/types/version.go b/modules/core/03-connection/types/version.go index 9ece332016d..00aadcb8682 100644 --- a/modules/core/03-connection/types/version.go +++ b/modules/core/03-connection/types/version.go @@ -1,11 +1,10 @@ package types import ( + "slices" "strings" errorsmod "cosmossdk.io/errors" - - "github.com/cosmos/ibc-go/v8/internal/collections" ) var ( @@ -86,7 +85,7 @@ func (version Version) VerifyProposedVersion(proposedVersion *Version) error { } for _, proposedFeature := range proposedVersion.GetFeatures() { - if !collections.Contains(proposedFeature, version.GetFeatures()) { + if !slices.Contains(version.GetFeatures(), proposedFeature) { return errorsmod.Wrapf( ErrVersionNegotiationFailed, "proposed feature (%s) is not a supported feature set (%s)", proposedFeature, version.GetFeatures(), @@ -100,7 +99,7 @@ func (version Version) VerifyProposedVersion(proposedVersion *Version) error { // VerifySupportedFeature takes in a version and feature string and returns // true if the feature is supported by the version and false otherwise. func VerifySupportedFeature(version *Version, feature string) bool { - return collections.Contains(feature, version.GetFeatures()) + return slices.Contains(version.GetFeatures(), feature) } // GetCompatibleVersions returns a descending ordered set of compatible IBC @@ -176,7 +175,7 @@ func PickVersion(supportedVersions, counterpartyVersions []*Version) (*Version, // set for the counterparty version. func GetFeatureSetIntersection(sourceFeatureSet, counterpartyFeatureSet []string) (featureSet []string) { for _, feature := range sourceFeatureSet { - if collections.Contains(feature, counterpartyFeatureSet) { + if slices.Contains(counterpartyFeatureSet, feature) { featureSet = append(featureSet, feature) } } diff --git a/testing/events.go b/testing/events.go index 58607080a21..9ccfaea96fa 100644 --- a/testing/events.go +++ b/testing/events.go @@ -2,13 +2,13 @@ package ibctesting import ( "fmt" + "slices" "strconv" testifysuite "github.com/stretchr/testify/suite" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cosmos/ibc-go/v8/internal/collections" clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" @@ -185,7 +185,7 @@ func AssertEvents( for _, expectedAttr := range expectedEvent.Attributes { // any expected attributes that are not contained in the actual events will cause this event // not to match - attributeMatch = attributeMatch && collections.Contains(expectedAttr, actualEvent.Attributes) + attributeMatch = attributeMatch && slices.Contains(actualEvent.Attributes, expectedAttr) } if attributeMatch { From 82d66ad0ecb7983136c490b9653e6a89943dee41 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 18 Sep 2023 12:40:59 +0200 Subject: [PATCH 4/4] e2e: use interchaintest main (#4662) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * this should get us out of the fork * let's see if this works * Update e2e/go.mod Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> * fix genesis e2e test --------- Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- e2e/go.mod | 5 +---- e2e/go.sum | 4 ++-- e2e/tests/upgrades/genesis_test.go | 7 ------- e2e/testsuite/testconfig.go | 32 ++++++++++-------------------- e2e/testvalues/values.go | 12 ----------- 5 files changed, 14 insertions(+), 46 deletions(-) diff --git a/e2e/go.mod b/e2e/go.mod index 5baa6cc5ec7..0aff5fd0a4b 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -11,7 +11,7 @@ require ( github.com/cosmos/gogoproto v1.4.11 github.com/cosmos/ibc-go/v8 v8.0.0-20230906115913-46ee5f92e1af github.com/docker/docker v24.0.6+incompatible - github.com/strangelove-ventures/interchaintest/v8 v8.0.0-20230817191535-cc35cd35adbc + github.com/strangelove-ventures/interchaintest/v8 v8.0.0-20230913202406-3e11bf474a3b github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.25.0 golang.org/x/mod v0.12.0 @@ -235,6 +235,3 @@ replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.2021 replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 -//replace github.com/strangelove-ventures/interchaintest/v8 => github.com/notional-labs/interchaintest/v8 v8.0.0-20230905211440-c2dc240d2221 - -replace github.com/strangelove-ventures/interchaintest/v8 => github.com/colin-axner/interchaintest/v8 v8.0.0-20230906142353-5d89200aad4a diff --git a/e2e/go.sum b/e2e/go.sum index f3d134a2cc9..7585f4143be 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -339,8 +339,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ 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/colin-axner/interchaintest/v8 v8.0.0-20230906142353-5d89200aad4a h1:rWxVtMsp/X9FVOzIvLCrJ8FWzuAGwpI7jwh51Pgt5Lc= -github.com/colin-axner/interchaintest/v8 v8.0.0-20230906142353-5d89200aad4a/go.mod h1:aXLHcZ5Tv0R5/LynEsE86bc4UwuHl5TZpzGSLqo79AE= github.com/cometbft/cometbft v0.38.0 h1:ogKnpiPX7gxCvqTEF4ly25/wAxUqf181t30P3vqdpdc= github.com/cometbft/cometbft v0.38.0/go.mod h1:5Jz0Z8YsHSf0ZaAqGvi/ifioSdVFPtEGrm8Y9T/993k= github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= @@ -994,6 +992,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/strangelove-ventures/interchaintest/v8 v8.0.0-20230913202406-3e11bf474a3b h1:B3VTNRBsh/kp9+TpMQVXsjUql38+82trUSxPOKd7R/k= +github.com/strangelove-ventures/interchaintest/v8 v8.0.0-20230913202406-3e11bf474a3b/go.mod h1:ELE57+yyFCeMuxuFHHu50Wxs3/CPmHxH2uBlvCF1lq4= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= diff --git a/e2e/tests/upgrades/genesis_test.go b/e2e/tests/upgrades/genesis_test.go index 9728549c184..9d1d367d4c0 100644 --- a/e2e/tests/upgrades/genesis_test.go +++ b/e2e/tests/upgrades/genesis_test.go @@ -2,7 +2,6 @@ package upgrades import ( "context" - "strings" "testing" "time" @@ -198,12 +197,6 @@ func (s *GenesisTestSuite) HaltChainAndExportGenesis(ctx context.Context, chain state, err := chain.ExportState(ctx, int64(haltHeight)) s.Require().NoError(err) - // state exports currently read from stdout which include log entries, this discards the log entry by the server module - // this may need to be updated if log entries are inserted in between exporting of state and the server module logging - // see issue: https://github.com/strangelove-ventures/interchaintest/issues/721 - str := strings.SplitAfter(state, "server") - state = str[1] - appTomlOverrides := make(test.Toml) appTomlOverrides["halt-height"] = 0 diff --git a/e2e/testsuite/testconfig.go b/e2e/testsuite/testconfig.go index e30ea9cc910..541770be982 100644 --- a/e2e/testsuite/testconfig.go +++ b/e2e/testsuite/testconfig.go @@ -394,15 +394,6 @@ func newDefaultSimappConfig(cc ChainConfig, name, chainID, denom string, cometCf tmTomlOverrides["log_level"] = cometCfg.LogLevel // change to debug in ~/.ibc-go-e2e-config.json to increase cometbft logging. configFileOverrides["config/config.toml"] = tmTomlOverrides - var useNewGenesisCommand bool - if cc.Binary == defaultBinary && testvalues.SimdNewGenesisCommandsFeatureReleases.IsSupported(cc.Tag) { - useNewGenesisCommand = true - } - - if cc.Binary == icadBinary && testvalues.IcadNewGenesisCommandsFeatureReleases.IsSupported(cc.Tag) { - useNewGenesisCommand = true - } - return ibc.ChainConfig{ Type: "cosmos", Name: name, @@ -413,18 +404,17 @@ func newDefaultSimappConfig(cc ChainConfig, name, chainID, denom string, cometCf Version: cc.Tag, }, }, - Bin: cc.Binary, - Bech32Prefix: "cosmos", - CoinType: fmt.Sprint(sdk.GetConfig().GetCoinType()), - Denom: denom, - EncodingConfig: SDKEncodingConfig(), - GasPrices: fmt.Sprintf("0.00%s", denom), - GasAdjustment: 1.3, - TrustingPeriod: "508h", - NoHostMount: false, - ModifyGenesis: getGenesisModificationFunction(cc), - ConfigFileOverrides: configFileOverrides, - UsingNewGenesisCommand: useNewGenesisCommand, + Bin: cc.Binary, + Bech32Prefix: "cosmos", + CoinType: fmt.Sprint(sdk.GetConfig().GetCoinType()), + Denom: denom, + EncodingConfig: SDKEncodingConfig(), + GasPrices: fmt.Sprintf("0.00%s", denom), + GasAdjustment: 1.3, + TrustingPeriod: "508h", + NoHostMount: false, + ModifyGenesis: getGenesisModificationFunction(cc), + ConfigFileOverrides: configFileOverrides, } } diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go index 5c9de12dbe0..41207196e49 100644 --- a/e2e/testvalues/values.go +++ b/e2e/testvalues/values.go @@ -67,18 +67,6 @@ var IcadGovGenesisFeatureReleases = semverutil.FeatureReleases{ }, } -// IcadNewGenesisCommandsFeatureReleases represents the releases of icad using the new genesis commands. -var IcadNewGenesisCommandsFeatureReleases = semverutil.FeatureReleases{ - MinorVersions: []string{ - "v0.5", - }, -} - -// SimdNewGenesisCommandsFeatureReleases represents the releases the simd binary started using the new genesis command. -var SimdNewGenesisCommandsFeatureReleases = semverutil.FeatureReleases{ - MajorVersion: "v8", -} - // SelfParamsFeatureReleases represents the releases the transfer module started managing its own params. var SelfParamsFeatureReleases = semverutil.FeatureReleases{ MajorVersion: "v8",