Skip to content

Commit

Permalink
remove spurious TestABCICodeDeterminism tests (cosmos#1695)
Browse files Browse the repository at this point in the history
## Description

Thanks @colin-axner for noticing this.

closes: #XXXX

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
  • Loading branch information
crodriguezvega authored Jul 13, 2022
1 parent ef4eaf9 commit 1e6af48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 144 deletions.
63 changes: 0 additions & 63 deletions modules/apps/27-interchain-accounts/host/ibc_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import (
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/suite"
abcitypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
tmprotostate "github.com/tendermint/tendermint/proto/tendermint/state"
tmstate "github.com/tendermint/tendermint/state"

"github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
Expand Down Expand Up @@ -692,63 +689,3 @@ func (suite *InterchainAccountsTestSuite) TestControlAccountAfterChannelClose()
hasBalance = suite.chainB.GetSimApp().BankKeeper.HasBalance(suite.chainB.GetContext(), icaAddr, sdk.Coin{Denom: sdk.DefaultBondDenom, Amount: sdk.NewInt(0)})
suite.Require().True(hasBalance)
}

// The safety of including SDK MsgResponses in the acknowledgement rests
// on the inclusion of the abcitypes.ResponseDeliverTx.Data in the
// abcitypes.ResposneDeliverTx hash. If the abcitypes.ResponseDeliverTx.Data
// gets removed from consensus they must no longer be used in the packet
// acknowledgement.
//
// This test acts as an indicator that the abcitypes.ResponseDeliverTx.Data
// may no longer be deterministic.
func (suite *InterchainAccountsTestSuite) TestABCICodeDeterminism() {
msgResponseBz, err := proto.Marshal(&channeltypes.MsgChannelOpenInitResponse{})
suite.Require().NoError(err)

msgData := &sdk.MsgData{
MsgType: sdk.MsgTypeURL(&channeltypes.MsgChannelOpenInit{}),
Data: msgResponseBz,
}

txResponse, err := proto.Marshal(&sdk.TxMsgData{
Data: []*sdk.MsgData{msgData},
})
suite.Require().NoError(err)

deliverTx := abcitypes.ResponseDeliverTx{
Data: txResponse,
}
responses := tmprotostate.ABCIResponses{
DeliverTxs: []*abcitypes.ResponseDeliverTx{
&deliverTx,
},
}

differentMsgResponseBz, err := proto.Marshal(&channeltypes.MsgRecvPacketResponse{})
suite.Require().NoError(err)

differentMsgData := &sdk.MsgData{
MsgType: sdk.MsgTypeURL(&channeltypes.MsgRecvPacket{}),
Data: differentMsgResponseBz,
}

differentTxResponse, err := proto.Marshal(&sdk.TxMsgData{
Data: []*sdk.MsgData{differentMsgData},
})
suite.Require().NoError(err)

differentDeliverTx := abcitypes.ResponseDeliverTx{
Data: differentTxResponse,
}

differentResponses := tmprotostate.ABCIResponses{
DeliverTxs: []*abcitypes.ResponseDeliverTx{
&differentDeliverTx,
},
}

hash := tmstate.ABCIResponsesResultsHash(&responses)
differentHash := tmstate.ABCIResponsesResultsHash(&differentResponses)

suite.Require().NotEqual(hash, differentHash)
}
81 changes: 0 additions & 81 deletions modules/apps/27-interchain-accounts/host/types/ack_test.go

This file was deleted.

0 comments on commit 1e6af48

Please sign in to comment.