diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 04c6b037ca4..fb09617ba2d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -326,7 +326,7 @@ func NewAppKeeper( // create static IBC router, add transfer route, then set and seal it ibcRouter := porttypes.NewRouter() ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule). - AddRoute(ibctransfertypes.ModuleName, transferIBCModule) + AddRoute(ibctransfertypes.ModuleName, appKeepers.RouterModule) appKeepers.IBCKeeper.SetRouter(ibcRouter) diff --git a/go.mod b/go.mod index 609291b990a..ee126763e5b 100644 --- a/go.mod +++ b/go.mod @@ -288,10 +288,11 @@ replace ( // force all dependecies to use the same versions of ibc, tendermint and cosmos-sdk github.com/cosmos/ibc-go/v3 => github.com/cosmos/ibc-go/v3 v3.4.0 + github.com/tendermint/tendermint => github.com/tendermint/tendermint v0.34.24 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.11 // use cosmos style protobufs github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - github.com/tendermint/tendermint => github.com/tendermint/tendermint v0.34.24 // latest grpc doesn't work with with our modified proto compiler, so we need to enforce // the following version across all dependencies. diff --git a/tests/e2e/e2e_ibc_test.go b/tests/e2e/e2e_ibc_test.go index 0c3d8c525f5..060838980a5 100644 --- a/tests/e2e/e2e_ibc_test.go +++ b/tests/e2e/e2e_ibc_test.go @@ -382,11 +382,9 @@ func (s *IntegrationTestSuite) testMultihopIBCTokenTransfer() { func() bool { afterSenderUAtomBalance, err := getSpecificBalance(chainAAPIEndpoint, sender, uatomDenom) s.Require().NoError(err) - fmt.Println("afterSenderUAtomBalance", afterSenderUAtomBalance) afterRecipientUAtomBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, uatomDenom) s.Require().NoError(err) - fmt.Println("afterRecipientUAtomBalance", afterRecipientUAtomBalance) decremented := beforeSenderUAtomBalance.Sub(tokenAmount).Sub(standardFees).IsEqual(afterSenderUAtomBalance) incremented := beforeRecipientUAtomBalance.Add(tokenAmount).IsEqual(afterRecipientUAtomBalance) @@ -400,22 +398,13 @@ func (s *IntegrationTestSuite) testMultihopIBCTokenTransfer() { } /* -TestFailedMultihopIBCTokenTransfer tests that sending a failing IBC transfer using the IBC Packet Forward Middleware will preserve the tokens -on the middle hop chain in the designated address. - -Steps: -1. Check balance of Account 1 on Chain 1 -2. Check balance of Account 1 on Chain 2 -3. Account 1 on Chain 1 sends x tokens to Account 1 on non-existent chain via Account 1 on Chain 2 -4. Check Balance of Account 1 on Chain 1, confirm it is original minus x tokens -5. Check Balance of Account 1 on Chain 2, confirm it is original plus x tokens +TestFailedMultihopIBCTokenTransfer tests that sending a failing IBC transfer using the IBC Packet Forward +Middleware will send the tokens back to the original account after failing. */ func (s *IntegrationTestSuite) testFailedMultihopIBCTokenTransfer() { time.Sleep(30 * time.Second) s.Run("send_failed_multihop_uatom_to_chainA_from_chainA", func() { - // require the recipient account receives the IBC tokens (IBC packets ACKd) - address := s.chainA.validators[0].keyInfo.GetAddress() sender := address.String() @@ -423,7 +412,7 @@ func (s *IntegrationTestSuite) testFailedMultihopIBCTokenTransfer() { middlehop := address.String() address = s.chainA.validators[1].keyInfo.GetAddress() - recipient := strings.Replace(address.String(), "cosmos", "foobar", 1) // this should be an invalid recipient but only fail the final send so it will be returned + recipient := strings.Replace(address.String(), "cosmos", "foobar", 1) // this should be an invalid recipient to force the tx to fail forwardPort := "transfer" forwardChannel := "channel-0" @@ -431,11 +420,9 @@ func (s *IntegrationTestSuite) testFailedMultihopIBCTokenTransfer() { tokenAmt := 3300000000 chainAAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) - chainBAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainB.id][0].GetHostPort("1317/tcp")) var ( beforeSenderUAtomBalance sdk.Coin - beforeMiddleIBCBalance sdk.Coin err error ) @@ -443,9 +430,6 @@ func (s *IntegrationTestSuite) testFailedMultihopIBCTokenTransfer() { func() bool { beforeSenderUAtomBalance, err = getSpecificBalance(chainAAPIEndpoint, sender, uatomDenom) s.Require().NoError(err) - beforeMiddleIBCBalance, err = getSpecificBalance(chainBAPIEndpoint, middlehop, "ibc/") - s.Require().True(beforeMiddleIBCBalance.IsNil()) - s.Require().NoError(err) return beforeSenderUAtomBalance.IsValid() }, diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index a3a9046eff9..0436d02f8bb 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -12,7 +12,7 @@ var ( runFeeGrantTest = true runGlobalFeesTest = true runGovTest = false // legacy gov system needs to be added back - runIBCTest = false // multihop ibc test is not working + runIBCTest = true runSlashingTest = true runStakingAndDistributionTest = true runVestingTest = true