diff --git a/app/app.go b/app/app.go index 3e812657b..55be9c23b 100644 --- a/app/app.go +++ b/app/app.go @@ -36,7 +36,6 @@ import ( porttypes "github.com/cosmos/ibc-go/v9/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v9/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v9/modules/core/keeper" - solomachine "github.com/cosmos/ibc-go/v9/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v9/modules/light-clients/07-tendermint" "github.com/spf13/cast" @@ -701,9 +700,6 @@ func NewWasmApp( tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider) clientKeeper.AddRoute(ibctm.ModuleName, &tmLightClientModule) - smLightClientModule := solomachine.NewLightClientModule(appCodec, storeProvider) - clientKeeper.AddRoute(solomachine.ModuleName, &smLightClientModule) - /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment @@ -744,7 +740,6 @@ func NewWasmApp( ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), ibctm.NewAppModule(tmLightClientModule), - solomachine.NewAppModule(smLightClientModule), // sdk crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them ) diff --git a/tests/ibctesting/chain.go b/tests/ibctesting/chain.go index 68e438cf5..f8ab58542 100644 --- a/tests/ibctesting/chain.go +++ b/tests/ibctesting/chain.go @@ -155,6 +155,15 @@ func NewTestChain(t *testing.T, coord *Coordinator, appFactory ChainAppFactory, return NewTestChainWithValSet(t, coord, appFactory, chainID, valSet, signersByAddress, opts...) } +// Add this helper method +func GetLatestHeight(clientState exported.ClientState) clienttypes.Height { + tmClientState, ok := clientState.(*ibctm.ClientState) + if !ok { + panic("invalid client state type") + } + return tmClientState.LatestHeight +} + // NewTestChainWithValSet initializes a new TestChain instance with the given validator set // and signer array. It also initializes 10 Sender accounts with a balance of 10000000000000000000 coins of // bond denom to use for tests. @@ -306,7 +315,7 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) { clientState := chain.GetClientState(clientID) - consensusHeight := chain.GetLatestHeight(clientState) + consensusHeight := GetLatestHeight(clientState) consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) proofConsensus, _ := chain.QueryProof(consensusKey) @@ -427,15 +436,6 @@ func (chain *TestChain) CaptureIBCEvents(r *abci.ExecTxResult) { } } -// Add this helper method to TestChain -func (chain *TestChain) GetLatestHeight(clientState exported.ClientState) clienttypes.Height { - tmClientState, ok := clientState.(*ibctm.ClientState) - if !ok { - panic("invalid client state type") - } - return tmClientState.LatestHeight -} - // GetClientState retrieves the client state for the provided clientID. The client is // expected to exist otherwise testing will fail. func (chain *TestChain) GetClientState(clientID string) exported.ClientState { @@ -503,7 +503,7 @@ func (chain *TestChain) ConstructUpdateCMTClientHeaderWithTrustedHeight(counterp header := counterparty.LastHeader // Relayer must query for LatestHeight on client to get TrustedHeight if the trusted height is not set if trustedHeight.IsZero() { - trustedHeight = chain.GetLatestHeight(chain.GetClientState(clientID)) + trustedHeight = GetLatestHeight(chain.GetClientState(clientID)) } var ( cmtTrustedVals *cmttypes.ValidatorSet diff --git a/tests/ibctesting/endpoint.go b/tests/ibctesting/endpoint.go index 2745065c6..c8bfe9f52 100644 --- a/tests/ibctesting/endpoint.go +++ b/tests/ibctesting/endpoint.go @@ -66,7 +66,7 @@ func (endpoint *Endpoint) QueryProof(key []byte) ([]byte, clienttypes.Height) { clientState := endpoint.Counterparty.Chain.GetClientState(endpoint.Counterparty.ClientID) // query proof on the counterparty using the latest height of the IBC client - return endpoint.QueryProofAtHeight(key, endpoint.Counterparty.Chain.GetLatestHeight(clientState).GetRevisionHeight()) + return endpoint.QueryProofAtHeight(key, GetLatestHeight(clientState).GetRevisionHeight()) } // QueryProofAtHeight queries proof associated with this endpoint using the proof height @@ -197,7 +197,7 @@ func (endpoint *Endpoint) UpgradeChain() error { Root: commitmenttypes.NewMerkleRoot(endpoint.Chain.LastHeader.Header.GetAppHash()), NextValidatorsHash: endpoint.Chain.LastHeader.Header.NextValidatorsHash, } - endpoint.Counterparty.SetConsensusState(consensusState, endpoint.Chain.GetLatestHeight(clientState)) + endpoint.Counterparty.SetConsensusState(consensusState, GetLatestHeight(clientState)) // ensure the next update isn't identical to the one set in state endpoint.Chain.Coordinator.IncrementTime() @@ -301,7 +301,7 @@ func (endpoint *Endpoint) QueryConnectionHandshakeProof() ( clientKey := host.FullClientStateKey(endpoint.Counterparty.ClientID) proofClient, proofHeight = endpoint.Counterparty.QueryProof(clientKey) - consensusHeight = endpoint.Chain.GetLatestHeight(clientState) + consensusHeight = GetLatestHeight(clientState) // query proof for the consensus state on the counterparty consensusKey := host.FullConsensusStateKey(endpoint.Counterparty.ClientID, consensusHeight) @@ -423,8 +423,6 @@ func (endpoint *Endpoint) ChanCloseConfirm() error { channelKey := host.ChannelKey(endpoint.Counterparty.ChannelConfig.PortID, endpoint.Counterparty.ChannelID) proof, proofHeight := endpoint.Counterparty.QueryProof(channelKey) - // counterpartyUpgradeSequence uint64, - msg := channeltypes.NewMsgChannelCloseConfirm( endpoint.ChannelConfig.PortID, endpoint.ChannelID, proof, proofHeight,