Skip to content

Commit

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

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

(cherry picked from commit 1e6af48)

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
2 people authored and ulbqb committed Jul 31, 2023
1 parent 5764260 commit ef37dfe
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 @@ -10,9 +10,6 @@ import (
"github.com/Finschia/ostracon/crypto"
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/suite"
abcitypes "github.com/tendermint/tendermint/abci/types"
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 ef37dfe

Please sign in to comment.