From e80be26808a86f643332125915d961bcebfbd469 Mon Sep 17 00:00:00 2001 From: Michael Tsitrin Date: Sun, 15 Sep 2024 13:28:38 +0300 Subject: [PATCH] disabled genesis_transfer and transfers_enabled feature --- app/ante/handlers.go | 7 ++++--- app/keepers/keepers.go | 5 +++-- ibctesting/genesis_transfer_test.go | 4 ++++ ibctesting/transfers_enabled_test.go | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/ante/handlers.go b/app/ante/handlers.go index 444fe1b0f..39684d8ad 100644 --- a/app/ante/handlers.go +++ b/app/ante/handlers.go @@ -4,7 +4,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ante "github.com/cosmos/cosmos-sdk/x/auth/ante" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - "github.com/dymensionxyz/dymension/v3/x/rollapp/transfergenesis" ethante "github.com/evmos/ethermint/app/ante" txfeesante "github.com/osmosis-labs/osmosis/v15/x/txfees/ante" @@ -76,7 +75,8 @@ func newLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), - transfergenesis.NewTransferEnabledDecorator(options.RollappKeeper.GetRollapp, options.IBCKeeper.ChannelKeeper), + // disabled until #1208 handled (https://github.com/dymensionxyz/dymension/issues/1208) + // transfergenesis.NewTransferEnabledDecorator(options.RollappKeeper.GetRollapp, options.IBCKeeper.ChannelKeeper), ) } @@ -113,6 +113,7 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), - transfergenesis.NewTransferEnabledDecorator(options.RollappKeeper.GetRollapp, options.IBCKeeper.ChannelKeeper), + // disabled until #1208 handled (https://github.com/dymensionxyz/dymension/issues/1208) + // transfergenesis.NewTransferEnabledDecorator(options.RollappKeeper.GetRollapp, options.IBCKeeper.ChannelKeeper), ) } diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 2bb7dca57..e87e70d0e 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -87,7 +87,6 @@ import ( lockuptypes "github.com/dymensionxyz/dymension/v3/x/lockup/types" rollappmodule "github.com/dymensionxyz/dymension/v3/x/rollapp" rollappmodulekeeper "github.com/dymensionxyz/dymension/v3/x/rollapp/keeper" - "github.com/dymensionxyz/dymension/v3/x/rollapp/transfergenesis" rollappmoduletypes "github.com/dymensionxyz/dymension/v3/x/rollapp/types" sequencermodulekeeper "github.com/dymensionxyz/dymension/v3/x/sequencer/keeper" sequencermoduletypes "github.com/dymensionxyz/dymension/v3/x/sequencer/types" @@ -512,7 +511,9 @@ func (a *AppKeepers) InitTransferStack() { delayedackmodule.WithRollappKeeper(a.RollappKeeper), ) a.TransferStack = a.delayedAckMiddleware - a.TransferStack = transfergenesis.NewIBCModule(a.TransferStack, a.DelayedAckKeeper, *a.RollappKeeper, a.TransferKeeper, a.DenomMetadataKeeper) + + // disabled until #1208 handled (https://github.com/dymensionxyz/dymension/issues/1208) + // a.TransferStack = transfergenesis.NewIBCModule(a.TransferStack, a.DelayedAckKeeper, *a.RollappKeeper, a.TransferKeeper, a.DenomMetadataKeeper) // Create static IBC router, add transfer route, then set and seal it ibcRouter := ibcporttypes.NewRouter() diff --git a/ibctesting/genesis_transfer_test.go b/ibctesting/genesis_transfer_test.go index 097da8904..69db21ecf 100644 --- a/ibctesting/genesis_transfer_test.go +++ b/ibctesting/genesis_transfer_test.go @@ -49,6 +49,8 @@ func (s *transferGenesisSuite) SetupTest() { // memo immediately when the channel opens. This will cause all the denoms to get registered, and tokens // to go to the right addresses. After all transfers are sent, the bridge opens. func (s *transferGenesisSuite) TestHappyPath() { + s.T().Skip("disabled until #1208 handled") // https://github.com/dymensionxyz/dymension/issues/1208 + /* Send a bunch of transfer packets to the hub Check the balances are created @@ -92,6 +94,8 @@ func (s *transferGenesisSuite) TestHappyPath() { // In the fault path, a chain tries to do another genesis transfer (to skip eibc) after the genesis phase // is already complete. It triggers a fraud. func (s *transferGenesisSuite) TestCannotDoGenesisTransferAfterBridgeEnabled() { + s.T().Skip("disabled until #1208 handled") // https://github.com/dymensionxyz/dymension/issues/1208 + amt := math.NewIntFromUint64(10000000000000000000) denoms := []string{"foo", "bar", "baz"} diff --git a/ibctesting/transfers_enabled_test.go b/ibctesting/transfers_enabled_test.go index 840e480a3..ab8a8333c 100644 --- a/ibctesting/transfers_enabled_test.go +++ b/ibctesting/transfers_enabled_test.go @@ -39,6 +39,8 @@ func (s *transfersEnabledSuite) SetupTest() { // Regular (non genesis) transfers (RA->Hub) and Hub->RA should both be blocked when the bridge is not open func (s *transfersEnabledSuite) TestHubToRollappDisabled() { + s.T().Skip("disabled until #1208 handled") // https://github.com/dymensionxyz/dymension/issues/1208 + amt := math.NewIntFromUint64(10000000000000000000) denom := "foo" tokens := sdk.NewCoin(denom, amt)