Skip to content

Commit

Permalink
disabled genesis_transfer and transfers_enabled feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin committed Sep 15, 2024
1 parent d7c897c commit e80be26
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
7 changes: 4 additions & 3 deletions app/ante/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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),
)
}

Expand Down Expand Up @@ -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),
)
}
5 changes: 3 additions & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions ibctesting/genesis_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"}
Expand Down
2 changes: 2 additions & 0 deletions ibctesting/transfers_enabled_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e80be26

Please sign in to comment.