diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto index 0426c741b9a2..c60ecc4363d2 100644 --- a/proto/ibc/core/channel/v1/tx.proto +++ b/proto/ibc/core/channel/v1/tx.proto @@ -148,7 +148,7 @@ message MsgRecvPacket { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; ibc.core.client.v1.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 4; @@ -163,7 +163,7 @@ message MsgTimeout { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; ibc.core.client.v1.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; @@ -179,7 +179,7 @@ message MsgTimeoutOnClose { option (gogoproto.goproto_getters) = false; Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; ibc.core.client.v1.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; @@ -197,7 +197,7 @@ message MsgAcknowledgement { Packet packet = 1 [(gogoproto.nullable) = false]; bytes acknowledgement = 2; - bytes proof = 3; + bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; ibc.core.client.v1.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; string signer = 5; diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 5903b1b651cf..738217fa6cbd 100644 --- a/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -49,7 +49,6 @@ message Header { // of a sequence and two signatures over different messages at that sequence. message Misbehaviour { option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; uint64 sequence = 2; SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index d92b1d670495..6f9285c05730 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -72,12 +72,10 @@ message ConsensusState { // that implements Misbehaviour interface expected by ICS-02 message Misbehaviour { option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - Header header_1 = 3 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; - Header header_2 = 4 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; + Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; + Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; } // Header defines the Tendermint client consensus Header. diff --git a/server/export.go b/server/export.go index 280d62da327c..150add98e78d 100644 --- a/server/export.go +++ b/server/export.go @@ -113,7 +113,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") cmd.Flags().Int64(FlagHeight, -1, "Export state from a particular height (-1 means latest height)") cmd.Flags().Bool(FlagForZeroHeight, false, "Export state to start at height zero (perform preproccessing)") - cmd.Flags().StringSlice(FlagJailAllowedAddrs, []string{}, "List of validators to not jail state export") + cmd.Flags().StringSlice(FlagJailAllowedAddrs, []string{}, "Comma-separated list of operator addresses of jailed validators to unjail") return cmd } diff --git a/x/ibc/applications/transfer/keeper/relay.go b/x/ibc/applications/transfer/keeper/relay.go index c9bc4470d344..d26e71e9846e 100644 --- a/x/ibc/applications/transfer/keeper/relay.go +++ b/x/ibc/applications/transfer/keeper/relay.go @@ -361,7 +361,9 @@ func (k Keeper) refundPacketToken(ctx sdk.Context, packet channeltypes.Packet, d // DenomPathFromHash returns the full denomination path prefix from an ibc denom with a hash // component. func (k Keeper) DenomPathFromHash(ctx sdk.Context, denom string) (string, error) { - hexHash := denom[4:] + // trim the denomination prefix, by default "ibc/" + hexHash := denom[len(types.DenomPrefix+"/"):] + hash, err := types.ParseHexHash(hexHash) if err != nil { return "", sdkerrors.Wrap(types.ErrInvalidDenomForTransfer, err.Error()) diff --git a/x/ibc/applications/transfer/spec/01_concepts.md b/x/ibc/applications/transfer/spec/01_concepts.md index 55b8a6c0c616..96f05f12a7ca 100644 --- a/x/ibc/applications/transfer/spec/01_concepts.md +++ b/x/ibc/applications/transfer/spec/01_concepts.md @@ -109,3 +109,9 @@ Cosmos Hub for the `uatom`). Sending a token back to the same chain across a dif **not** move the token back across its timeline. If a channel in the chain history closes before the token can be sent back across that channel, then the token will not be returnable to its original form. + + +## Security Considerations + +For safety, no other module must be capable of minting tokens with the `ibc/` prefix. The IBC +transfer module needs a subset of the denomination space that only it can create tokens in. diff --git a/x/ibc/applications/transfer/types/keys.go b/x/ibc/applications/transfer/types/keys.go index b9d4b3085eac..f1fbffd95179 100644 --- a/x/ibc/applications/transfer/types/keys.go +++ b/x/ibc/applications/transfer/types/keys.go @@ -25,6 +25,9 @@ const ( // QuerierRoute is the querier route for IBC transfer QuerierRoute = ModuleName + + // DenomPrefix is the prefix used for internal SDK coin representation. + DenomPrefix = "ibc" ) var ( diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index d465dcbc29b4..b4527d668fdc 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -54,7 +54,7 @@ func (dt DenomTrace) GetPrefix() string { // 'ibc/{hash(tracePath + baseDenom)}'. If the trace is empty, it will return the base denomination. func (dt DenomTrace) IBCDenom() string { if dt.Path != "" { - return fmt.Sprintf("ibc/%s", dt.Hash()) + return fmt.Sprintf("%s/%s", DenomPrefix, dt.Hash()) } return dt.BaseDenom } @@ -172,8 +172,8 @@ func ValidateIBCDenom(denom string) error { switch { case strings.TrimSpace(denom) == "", - len(denomSplit) == 1 && denomSplit[0] == "ibc", - len(denomSplit) == 2 && (denomSplit[0] != "ibc" || strings.TrimSpace(denomSplit[1]) == ""): + len(denomSplit) == 1 && denomSplit[0] == DenomPrefix, + len(denomSplit) == 2 && (denomSplit[0] != DenomPrefix || strings.TrimSpace(denomSplit[1]) == ""): return sdkerrors.Wrapf(ErrInvalidDenomForTransfer, "denomination should be prefixed with the format 'ibc/{hash(trace + \"/\" + %s)}'", denom) case denomSplit[0] == denom && strings.TrimSpace(denom) != "": diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index ae2836af54dc..c2f5c8144afd 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -33,11 +33,11 @@ func (suite *KeeperTestSuite) TestCreateClient() { i := i if tc.expPanic { suite.Require().Panics(func() { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.CreateClient(suite.ctx, tc.clientID, clientState, suite.consensusState) }, "Msg %d didn't panic: %s", i, tc.msg) } else { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if tc.expPass { suite.Require().NotNil(clientState, "valid test case %d failed: %s", i, tc.msg) } @@ -80,7 +80,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { expPass bool }{ {"valid update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return err }, true}, {"valid past update", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"consensus state not found", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) suite.keeper.SetClientState(suite.ctx, testClientID, clientState) updateHeader = createFutureUpdateFn(suite) @@ -145,7 +145,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, false}, {"valid past update before client was frozen", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) clientState.FrozenHeight = types.NewHeight(0, testClientHeight.VersionHeight-1) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) @@ -165,7 +165,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { return nil }, true}, {"invalid header", func() error { - clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) updateHeader = createPastUpdateFn(suite) @@ -250,7 +250,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "successful upgrade", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -275,7 +275,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state not found", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -302,7 +302,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "client state frozen", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -333,7 +333,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { name: "tendermint client VerifyUpgrade fails", setup: func() { - upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + upgradedClient = ibctmtypes.NewClientState("newChainId", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod+trustingPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) // upgrade Height is at next block upgradeHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) @@ -342,7 +342,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { suite.chainB.App.UpgradeKeeper.SetUpgradedClient(suite.chainB.GetContext(), int64(upgradeHeight.GetVersionHeight()), upgradedClient) // change upgradedClient client-specified parameters - upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) + upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) @@ -413,12 +413,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) return err @@ -430,12 +429,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store intermediate consensus state to check that trustedHeight does not need to be highest consensus state before header height @@ -457,12 +455,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // store trusted consensus state for Header2 @@ -484,12 +481,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -501,12 +497,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.VersionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = valsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) // intermediate consensus state at height + 3 is not created return err @@ -524,12 +519,11 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { suite.consensusState.NextValidatorsHash = bothValsHash - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) clientState.FrozenHeight = types.NewHeight(0, 1) @@ -544,11 +538,10 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { &ibctmtypes.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.VersionHeight), testClientHeight, suite.ctx.BlockTime(), altValSet, bothValSet, altSigners), - ChainId: testChainID, ClientId: testClientID, }, func() error { - clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) if err != nil { return err } diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index 603fe6934731..75cfc97eb08f 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -30,7 +30,7 @@ func (suite *TypesTestSuite) TestPackClientState() { }, { "tendermint client", - ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true, }, { @@ -175,7 +175,7 @@ func (suite *TypesTestSuite) TestPackMisbehaviour() { }, { "tendermint misbehaviour", - ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, suite.chainA.LastHeader, suite.chainA.LastHeader), + ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.LastHeader, suite.chainA.LastHeader), true, }, { diff --git a/x/ibc/core/02-client/types/msgs_test.go b/x/ibc/core/02-client/types/msgs_test.go index fbbbb4aa7556..7373205cc56c 100644 --- a/x/ibc/core/02-client/types/msgs_test.go +++ b/x/ibc/core/02-client/types/msgs_test.go @@ -56,7 +56,7 @@ func (suite *TypesTestSuite) TestMarshalMsgCreateClient() { }, { "tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -108,7 +108,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "valid - tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -132,7 +132,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "failed to unpack consensus state", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgCreateClient("tendermint", tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) msg.ConsensusState = nil @@ -348,7 +348,7 @@ func (suite *TypesTestSuite) TestMarshalMsgUpgradeClient() { { "client upgrades to new tendermint client", func() { - tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) msg, err = types.NewMsgUpgradeClient("clientid", tendermintClient, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -462,7 +462,7 @@ func (suite *TypesTestSuite) TestMsgUpgradeClient_ValidateBasic() { for _, tc := range cases { tc := tc - clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + clientState := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) newClientHeight := types.NewHeight(1, 1) msg, _ := types.NewMsgUpgradeClient("testclientid", clientState, newClientHeight, []byte("proofUpgrade"), suite.chainA.SenderAccount.GetAddress()) @@ -503,7 +503,7 @@ func (suite *TypesTestSuite) TestMarshalMsgSubmitMisbehaviour() { header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, header1, header2) + misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) @@ -561,7 +561,7 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.VersionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", suite.chainA.ChainID, header1, header2) + misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 2ecdae5952b8..2ece130ebba0 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -272,7 +272,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Require().True(found) connection.State = types.INIT - connection.Versions = []*types.Version{&types.Version{}} + connection.Versions = []*types.Version{{}} suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) diff --git a/x/ibc/core/03-connection/types/connection_test.go b/x/ibc/core/03-connection/types/connection_test.go index c735841b0e45..ff2aa08d4a66 100644 --- a/x/ibc/core/03-connection/types/connection_test.go +++ b/x/ibc/core/03-connection/types/connection_test.go @@ -43,7 +43,7 @@ func TestConnectionValidateBasic(t *testing.T) { }, { "invalid version", - types.ConnectionEnd{clientID, []*types.Version{&types.Version{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, + types.ConnectionEnd{clientID, []*types.Version{{}}, types.INIT, types.Counterparty{clientID2, connectionID2, commitmenttypes.NewMerklePrefix([]byte("prefix"))}}, false, }, { diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index 798c8b0f7182..675de9934719 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -150,7 +150,7 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() { {"invalid consensusHeight", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false}, {"empty singer", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, nil), false}, {"success", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true}, - {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{&types.Version{}}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, + {"invalid version", types.NewMsgConnectionOpenTry("ibcconntest", provedID, "clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false}, } for _, tc := range testCases { diff --git a/x/ibc/core/04-channel/types/msgs.go b/x/ibc/core/04-channel/types/msgs.go index 96a4283d8f01..772a1204effc 100644 --- a/x/ibc/core/04-channel/types/msgs.go +++ b/x/ibc/core/04-channel/types/msgs.go @@ -405,14 +405,14 @@ var _ sdk.Msg = &MsgRecvPacket{} // NewMsgRecvPacket constructs new MsgRecvPacket // nolint:interfacer func NewMsgRecvPacket( - packet Packet, proof []byte, proofHeight clienttypes.Height, + packet Packet, proofCommitment []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgRecvPacket { return &MsgRecvPacket{ - Packet: packet, - Proof: proof, - ProofHeight: proofHeight, - Signer: signer.String(), + Packet: packet, + ProofCommitment: proofCommitment, + ProofHeight: proofHeight, + Signer: signer.String(), } } @@ -423,7 +423,7 @@ func (msg MsgRecvPacket) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgRecvPacket) ValidateBasic() error { - if len(msg.Proof) == 0 { + if len(msg.ProofCommitment) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { @@ -468,13 +468,13 @@ var _ sdk.Msg = &MsgTimeout{} // NewMsgTimeout constructs new MsgTimeout // nolint:interfacer func NewMsgTimeout( - packet Packet, nextSequenceRecv uint64, proof []byte, + packet Packet, nextSequenceRecv uint64, proofUnreceived []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeout { return &MsgTimeout{ Packet: packet, NextSequenceRecv: nextSequenceRecv, - Proof: proof, + ProofUnreceived: proofUnreceived, ProofHeight: proofHeight, Signer: signer.String(), } @@ -487,12 +487,15 @@ func (msg MsgTimeout) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgTimeout) ValidateBasic() error { - if len(msg.Proof) == 0 { - return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") + if len(msg.ProofUnreceived) == 0 { + return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty unreceived proof") } if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } + if msg.NextSequenceRecv == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "next sequence receive cannot be 0") + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) @@ -524,13 +527,13 @@ func (msg MsgTimeout) Type() string { // nolint:interfacer func NewMsgTimeoutOnClose( packet Packet, nextSequenceRecv uint64, - proof, proofClose []byte, + proofUnreceived, proofClose []byte, proofHeight clienttypes.Height, signer sdk.AccAddress, ) *MsgTimeoutOnClose { return &MsgTimeoutOnClose{ Packet: packet, NextSequenceRecv: nextSequenceRecv, - Proof: proof, + ProofUnreceived: proofUnreceived, ProofClose: proofClose, ProofHeight: proofHeight, Signer: signer.String(), @@ -544,7 +547,10 @@ func (msg MsgTimeoutOnClose) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgTimeoutOnClose) ValidateBasic() error { - if len(msg.Proof) == 0 { + if msg.NextSequenceRecv == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidSequence, "next sequence receive cannot be 0") + } + if len(msg.ProofUnreceived) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if len(msg.ProofClose) == 0 { @@ -585,11 +591,15 @@ var _ sdk.Msg = &MsgAcknowledgement{} // NewMsgAcknowledgement constructs a new MsgAcknowledgement // nolint:interfacer func NewMsgAcknowledgement( - packet Packet, ack []byte, proof []byte, proofHeight clienttypes.Height, signer sdk.AccAddress) *MsgAcknowledgement { + packet Packet, + ack, proofAcked []byte, + proofHeight clienttypes.Height, + signer sdk.AccAddress, +) *MsgAcknowledgement { return &MsgAcknowledgement{ Packet: packet, Acknowledgement: ack, - Proof: proof, + ProofAcked: proofAcked, ProofHeight: proofHeight, Signer: signer.String(), } @@ -602,12 +612,15 @@ func (msg MsgAcknowledgement) Route() string { // ValidateBasic implements sdk.Msg func (msg MsgAcknowledgement) ValidateBasic() error { - if len(msg.Proof) == 0 { + if len(msg.ProofAcked) == 0 { return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } + if len(msg.Acknowledgement) == 0 { + return sdkerrors.Wrap(ErrInvalidAcknowledgement, "ack bytes cannot be empty") + } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) diff --git a/x/ibc/core/04-channel/types/msgs_test.go b/x/ibc/core/04-channel/types/msgs_test.go index f7004df6820a..3a666b31beef 100644 --- a/x/ibc/core/04-channel/types/msgs_test.go +++ b/x/ibc/core/04-channel/types/msgs_test.go @@ -333,7 +333,7 @@ func (suite *TypesTestSuite) TestMsgRecvPacketValidateBasic() { msg *types.MsgRecvPacket expPass bool }{ - {"", types.NewMsgRecvPacket(packet, suite.proof, height, addr), true}, + {"success", types.NewMsgRecvPacket(packet, suite.proof, height, addr), true}, {"proof height is zero", types.NewMsgRecvPacket(packet, suite.proof, clienttypes.ZeroHeight(), addr), false}, {"proof contain empty proof", types.NewMsgRecvPacket(packet, emptyProof, height, addr), false}, {"missing signer address", types.NewMsgRecvPacket(packet, suite.proof, height, emptyAddr), false}, @@ -369,8 +369,9 @@ func (suite *TypesTestSuite) TestMsgTimeoutValidateBasic() { msg *types.MsgTimeout expPass bool }{ - {"", types.NewMsgTimeout(packet, 1, suite.proof, height, addr), true}, + {"success", types.NewMsgTimeout(packet, 1, suite.proof, height, addr), true}, {"proof height must be > 0", types.NewMsgTimeout(packet, 1, suite.proof, clienttypes.ZeroHeight(), addr), false}, + {"seq 0", types.NewMsgTimeout(packet, 0, suite.proof, height, addr), false}, {"missing signer address", types.NewMsgTimeout(packet, 1, suite.proof, height, emptyAddr), false}, {"cannot submit an empty proof", types.NewMsgTimeout(packet, 1, emptyProof, height, addr), false}, {"invalid packet", types.NewMsgTimeout(invalidPacket, 1, suite.proof, height, addr), false}, @@ -398,6 +399,7 @@ func (suite *TypesTestSuite) TestMsgTimeoutOnCloseValidateBasic() { expPass bool }{ {"success", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, suite.proof, height, addr), true}, + {"seq 0", types.NewMsgTimeoutOnClose(packet, 0, suite.proof, suite.proof, height, addr), false}, {"empty proof", types.NewMsgTimeoutOnClose(packet, 1, emptyProof, suite.proof, height, addr), false}, {"empty proof close", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, emptyProof, height, addr), false}, {"proof height is zero", types.NewMsgTimeoutOnClose(packet, 1, suite.proof, suite.proof, clienttypes.ZeroHeight(), addr), false}, @@ -426,8 +428,9 @@ func (suite *TypesTestSuite) TestMsgAcknowledgementValidateBasic() { msg *types.MsgAcknowledgement expPass bool }{ - {"", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, addr), true}, + {"success", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, addr), true}, {"proof height must be > 0", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, clienttypes.ZeroHeight(), addr), false}, + {"empty ack", types.NewMsgAcknowledgement(packet, nil, suite.proof, height, addr), false}, {"missing signer address", types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, height, emptyAddr), false}, {"cannot submit an empty proof", types.NewMsgAcknowledgement(packet, packet.GetData(), emptyProof, height, addr), false}, {"invalid packet", types.NewMsgAcknowledgement(invalidPacket, packet.GetData(), suite.proof, height, addr), false}, diff --git a/x/ibc/core/04-channel/types/tx.pb.go b/x/ibc/core/04-channel/types/tx.pb.go index 2ad25780da15..608f573a7754 100644 --- a/x/ibc/core/04-channel/types/tx.pb.go +++ b/x/ibc/core/04-channel/types/tx.pb.go @@ -513,10 +513,10 @@ var xxx_messageInfo_MsgChannelCloseConfirmResponse proto.InternalMessageInfo // MsgRecvPacket receives incoming IBC packet type MsgRecvPacket struct { - Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` - ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty" yaml:"proof_commitment"` + ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` } func (m *MsgRecvPacket) Reset() { *m = MsgRecvPacket{} } @@ -592,7 +592,7 @@ var xxx_messageInfo_MsgRecvPacketResponse proto.InternalMessageInfo // MsgTimeout receives timed-out packet type MsgTimeout struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` NextSequenceRecv uint64 `protobuf:"varint,4,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` @@ -671,7 +671,7 @@ var xxx_messageInfo_MsgTimeoutResponse proto.InternalMessageInfo // MsgTimeoutOnClose timed-out packet upon counterparty channel closure. type MsgTimeoutOnClose struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + ProofUnreceived []byte `protobuf:"bytes,2,opt,name=proof_unreceived,json=proofUnreceived,proto3" json:"proof_unreceived,omitempty" yaml:"proof_unreceived"` ProofClose []byte `protobuf:"bytes,3,opt,name=proof_close,json=proofClose,proto3" json:"proof_close,omitempty" yaml:"proof_close"` ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` NextSequenceRecv uint64 `protobuf:"varint,5,opt,name=next_sequence_recv,json=nextSequenceRecv,proto3" json:"next_sequence_recv,omitempty" yaml:"next_sequence_recv"` @@ -752,7 +752,7 @@ var xxx_messageInfo_MsgTimeoutOnCloseResponse proto.InternalMessageInfo type MsgAcknowledgement struct { Packet Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` - Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + ProofAcked []byte `protobuf:"bytes,3,opt,name=proof_acked,json=proofAcked,proto3" json:"proof_acked,omitempty" yaml:"proof_acked"` ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height" yaml:"proof_height"` Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` } @@ -853,77 +853,80 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/tx.proto", fileDescriptor_bc4637e0ac3fc7b7) } var fileDescriptor_bc4637e0ac3fc7b7 = []byte{ - // 1110 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x3f, 0x6f, 0xdb, 0x46, - 0x14, 0x17, 0x25, 0x59, 0xb6, 0x9f, 0xdd, 0xc4, 0xa1, 0x64, 0x47, 0xa1, 0x6c, 0xd1, 0x25, 0xd0, - 0x44, 0x4d, 0x11, 0x29, 0x76, 0x02, 0xb4, 0x0d, 0xba, 0x58, 0x5a, 0x6a, 0x04, 0x46, 0x0a, 0xc6, - 0xe8, 0x60, 0x14, 0x10, 0xe4, 0xd3, 0x85, 0x22, 0x24, 0xdd, 0xa9, 0x24, 0xad, 0x58, 0xdf, 0xa0, - 0x4b, 0x81, 0xce, 0x9d, 0x32, 0x16, 0xe8, 0x90, 0x0f, 0xd1, 0x25, 0x63, 0xb6, 0x74, 0x22, 0x0a, - 0x7b, 0xc9, 0xac, 0x4f, 0x50, 0xf0, 0x78, 0x22, 0x29, 0x8a, 0xb4, 0xe9, 0xba, 0x16, 0x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xe0, 0xfe, 0x25, 0x53, 0x39, - 0x2e, 0x5e, 0x7b, 0xd1, 0x47, 0x9e, 0xb3, 0x79, 0xc3, 0xc7, 0x5d, 0x6c, 0x94, 0x21, 0x60, 0xfc, - 0xe6, 0x8d, 0x39, 0x31, 0xea, 0xea, 0xbb, 0xb3, 0xb2, 0xf0, 0xfe, 0xac, 0x2c, 0xfc, 0x73, 0x56, - 0x16, 0x7e, 0x3b, 0x2f, 0xa7, 0xde, 0x9f, 0x97, 0x53, 0x7f, 0x9f, 0x97, 0x53, 0x47, 0xdf, 0x68, - 0xba, 0xd5, 0x39, 0x39, 0xae, 0x22, 0xda, 0xaf, 0x21, 0x6a, 0xf6, 0xa9, 0xc9, 0x7f, 0x1e, 0x99, - 0xed, 0x6e, 0xed, 0xb4, 0xe6, 0xfd, 0x5f, 0xf4, 0xf8, 0xe9, 0xa3, 0xc9, 0x5f, 0x46, 0xd6, 0x68, - 0x80, 0xcd, 0xe3, 0x1c, 0xfb, 0xbb, 0xe8, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x86, - 0x17, 0x79, 0xbd, 0x12, 0x00, 0x00, + // 1158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xd6, 0x9f, 0x65, 0x7b, 0xec, 0xc6, 0x0e, 0xfd, 0xa7, 0x50, 0xb6, 0xe8, 0x12, 0x68, 0xe2, + 0xa6, 0x88, 0x14, 0x3b, 0x01, 0xda, 0x06, 0xbd, 0x58, 0x02, 0x8a, 0x1a, 0x81, 0x91, 0x82, 0x71, + 0x7b, 0x30, 0x0a, 0x08, 0xf2, 0x6a, 0x43, 0x11, 0xb2, 0x76, 0x55, 0x92, 0x56, 0xac, 0x37, 0xe8, + 0x31, 0xe7, 0x9e, 0x72, 0xef, 0x21, 0x7d, 0x87, 0x5e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a, 0xac, 0x3f, 0x2b, 0x81, 0xe5, 0xb1, 0x4b, 0xd7, + 0xce, 0x15, 0x71, 0x7c, 0xa4, 0xf8, 0x30, 0x2d, 0xd2, 0x9f, 0xef, 0x25, 0xac, 0xc4, 0x5e, 0x94, + 0xd2, 0x04, 0xf2, 0xd6, 0xf9, 0xe8, 0x1a, 0x60, 0x7f, 0xe2, 0x1f, 0x00, 0x42, 0xb7, 0x09, 0x39, + 0x29, 0x44, 0x80, 0x11, 0xef, 0x5f, 0x8d, 0xf1, 0xa3, 0x3f, 0x87, 0x59, 0xef, 0xfc, 0x95, 0x92, + 0x86, 0x71, 0x80, 0x78, 0xef, 0x0a, 0x40, 0x58, 0x7b, 0x91, 0x13, 0xe6, 0xee, 0x15, 0x43, 0x39, + 0x2e, 0x59, 0x7b, 0xf1, 0x5d, 0xd1, 0xd9, 0xbc, 0xd1, 0x8e, 0x98, 0x98, 0x65, 0x04, 0x98, 0xbc, + 0x79, 0x13, 0x3a, 0x46, 0x5d, 0x79, 0x7b, 0x51, 0xc9, 0xbe, 0xbb, 0xa8, 0x64, 0xff, 0xbc, 0xa8, + 0x64, 0x5f, 0x5d, 0x56, 0x32, 0xef, 0x2e, 0x2b, 0x99, 0xdf, 0x2f, 0x2b, 0x99, 0xe3, 0x2f, 0x54, + 0xcd, 0xec, 0x9c, 0x9d, 0x54, 0x11, 0xed, 0xd5, 0x10, 0x35, 0x7a, 0xd4, 0xe0, 0x3f, 0x0f, 0x8c, + 0x76, 0xb7, 0x76, 0x5e, 0xf3, 0xff, 0xe8, 0x7a, 0xf8, 0xf8, 0x81, 0xf7, 0x5f, 0x97, 0x39, 0xec, + 0x63, 0xe3, 0xa4, 0xc8, 0xfe, 0xe7, 0x7a, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x07, + 0x48, 0xeb, 0x76, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1905,10 +1908,10 @@ func (m *MsgRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofCommitment) > 0 { + i -= len(m.ProofCommitment) + copy(dAtA[i:], m.ProofCommitment) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofCommitment))) i-- dAtA[i] = 0x12 } @@ -1990,10 +1993,10 @@ func (m *MsgTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofUnreceived) > 0 { + i -= len(m.ProofUnreceived) + copy(dAtA[i:], m.ProofUnreceived) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUnreceived))) i-- dAtA[i] = 0x12 } @@ -2082,10 +2085,10 @@ func (m *MsgTimeoutOnClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofUnreceived) > 0 { + i -= len(m.ProofUnreceived) + copy(dAtA[i:], m.ProofUnreceived) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofUnreceived))) i-- dAtA[i] = 0x12 } @@ -2162,10 +2165,10 @@ func (m *MsgAcknowledgement) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x22 - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintTx(dAtA, i, uint64(len(m.Proof))) + if len(m.ProofAcked) > 0 { + i -= len(m.ProofAcked) + copy(dAtA[i:], m.ProofAcked) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofAcked))) i-- dAtA[i] = 0x1a } @@ -2455,7 +2458,7 @@ func (m *MsgRecvPacket) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofCommitment) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2485,7 +2488,7 @@ func (m *MsgTimeout) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofUnreceived) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2518,7 +2521,7 @@ func (m *MsgTimeoutOnClose) Size() (n int) { _ = l l = m.Packet.Size() n += 1 + l + sovTx(uint64(l)) - l = len(m.Proof) + l = len(m.ProofUnreceived) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2559,7 +2562,7 @@ func (m *MsgAcknowledgement) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Proof) + l = len(m.ProofAcked) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -4325,7 +4328,7 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofCommitment", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4352,9 +4355,9 @@ func (m *MsgRecvPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofCommitment = append(m.ProofCommitment[:0], dAtA[iNdEx:postIndex]...) + if m.ProofCommitment == nil { + m.ProofCommitment = []byte{} } iNdEx = postIndex case 3: @@ -4563,7 +4566,7 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofUnreceived", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4590,9 +4593,9 @@ func (m *MsgTimeout) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofUnreceived = append(m.ProofUnreceived[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUnreceived == nil { + m.ProofUnreceived = []byte{} } iNdEx = postIndex case 3: @@ -4820,7 +4823,7 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofUnreceived", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -4847,9 +4850,9 @@ func (m *MsgTimeoutOnClose) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofUnreceived = append(m.ProofUnreceived[:0], dAtA[iNdEx:postIndex]...) + if m.ProofUnreceived == nil { + m.ProofUnreceived = []byte{} } iNdEx = postIndex case 3: @@ -5145,7 +5148,7 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofAcked", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -5172,9 +5175,9 @@ func (m *MsgAcknowledgement) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} + m.ProofAcked = append(m.ProofAcked[:0], dAtA[iNdEx:postIndex]...) + if m.ProofAcked == nil { + m.ProofAcked = []byte{} } iNdEx = postIndex case 4: diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index a46c8da0b25b..10d437cbce73 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -154,7 +154,6 @@ type ConsensusState interface { type Misbehaviour interface { ClientType() string GetClientID() string - String() string ValidateBasic() error // Height at which the infraction occurred diff --git a/x/ibc/core/keeper/msg_server.go b/x/ibc/core/keeper/msg_server.go index 01d3dae3111e..c7579fdbbabf 100644 --- a/x/ibc/core/keeper/msg_server.go +++ b/x/ibc/core/keeper/msg_server.go @@ -431,7 +431,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke } // Perform TAO verification - if err := k.ChannelKeeper.RecvPacket(ctx, cap, msg.Packet, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.RecvPacket(ctx, cap, msg.Packet, msg.ProofCommitment, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "receive packet verification failed") } @@ -482,7 +482,7 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c } // Perform TAO verification - if err := k.ChannelKeeper.TimeoutPacket(ctx, msg.Packet, msg.Proof, msg.ProofHeight, msg.NextSequenceRecv); err != nil { + if err := k.ChannelKeeper.TimeoutPacket(ctx, msg.Packet, msg.ProofUnreceived, msg.ProofHeight, msg.NextSequenceRecv); err != nil { return nil, sdkerrors.Wrap(err, "timeout packet verification failed") } @@ -531,7 +531,7 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo } // Perform TAO verification - if err := k.ChannelKeeper.TimeoutOnClose(ctx, cap, msg.Packet, msg.Proof, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv); err != nil { + if err := k.ChannelKeeper.TimeoutOnClose(ctx, cap, msg.Packet, msg.ProofUnreceived, msg.ProofClose, msg.ProofHeight, msg.NextSequenceRecv); err != nil { return nil, sdkerrors.Wrap(err, "timeout on close packet verification failed") } @@ -582,7 +582,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn } // Perform TAO verification - if err := k.ChannelKeeper.AcknowledgePacket(ctx, cap, msg.Packet, msg.Acknowledgement, msg.Proof, msg.ProofHeight); err != nil { + if err := k.ChannelKeeper.AcknowledgePacket(ctx, cap, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight); err != nil { return nil, sdkerrors.Wrap(err, "acknowledge packet verification failed") } diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go index 66ee6d939208..8a59eb2d9a7c 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour.go @@ -3,8 +3,6 @@ package types import ( "bytes" - yaml "gopkg.in/yaml.v2" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types" host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" @@ -30,12 +28,6 @@ func (misbehaviour Misbehaviour) Type() string { return exported.TypeClientMisbehaviour } -// String implements Evidence interface. -func (misbehaviour Misbehaviour) String() string { - out, _ := yaml.Marshal(misbehaviour) - return string(out) -} - // GetHeight returns the sequence at which misbehaviour occurred. // Return exported.Height to satisfy interface // Version number is always 0 for a solo-machine diff --git a/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go b/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go index 833535da16ee..592d73b22b4e 100644 --- a/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go +++ b/x/ibc/light-clients/06-solomachine/types/solomachine.pb.go @@ -229,8 +229,9 @@ type Misbehaviour struct { SignatureTwo *SignatureAndData `protobuf:"bytes,4,opt,name=signature_two,json=signatureTwo,proto3" json:"signature_two,omitempty" yaml:"signature_two"` } -func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } -func (*Misbehaviour) ProtoMessage() {} +func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } +func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } +func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { return fileDescriptor_6cc2ee18f7f86d4e, []int{3} } @@ -820,93 +821,92 @@ func init() { } var fileDescriptor_6cc2ee18f7f86d4e = []byte{ - // 1368 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdf, 0x8f, 0xdb, 0xc4, - 0x13, 0x3f, 0xa7, 0xe9, 0xf5, 0x32, 0xb9, 0xe6, 0xf2, 0x75, 0xd3, 0x36, 0xe7, 0x56, 0x89, 0xbf, - 0x46, 0x94, 0x03, 0xd1, 0x84, 0x2b, 0xa2, 0x42, 0x15, 0x02, 0x1c, 0xc7, 0xd0, 0xb4, 0x77, 0xbe, - 0xe0, 0xf8, 0x80, 0x56, 0x48, 0x96, 0xe3, 0xec, 0x25, 0xd6, 0x25, 0x76, 0x88, 0x9d, 0xa4, 0x41, - 0x42, 0x42, 0x3c, 0x95, 0x88, 0x07, 0x1e, 0x79, 0x89, 0x84, 0x40, 0xfc, 0x2b, 0x08, 0x89, 0x97, - 0xf2, 0xc6, 0x53, 0x40, 0xed, 0x7f, 0x90, 0xbf, 0x00, 0xad, 0x77, 0x13, 0xdb, 0xb9, 0x5e, 0x4e, - 0xfc, 0x7a, 0xca, 0xee, 0xcc, 0x67, 0x3e, 0x33, 0x3b, 0x33, 0x99, 0x5d, 0xc3, 0xae, 0x55, 0x37, - 0x8b, 0x6d, 0xab, 0xd9, 0xf2, 0xcc, 0xb6, 0x85, 0x6c, 0xcf, 0x2d, 0xba, 0x4e, 0xdb, 0xe9, 0x18, - 0x66, 0xcb, 0xb2, 0x51, 0x71, 0xb0, 0x1b, 0xde, 0x16, 0xba, 0x3d, 0xc7, 0x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xdb, 0x90, 0x8b, 0x9d, 0xee, 0x64, 0xbb, 0xa1, 0x86, 0x0c, - 0xa9, 0xdf, 0x06, 0xa4, 0x25, 0xf2, 0xcc, 0x59, 0xed, 0xf4, 0x36, 0x5c, 0xa0, 0xcf, 0x21, 0xea, - 0xf1, 0x7a, 0xc8, 0x23, 0x7d, 0x27, 0x61, 0x77, 0x64, 0xa9, 0xce, 0xc1, 0xd4, 0xcb, 0x3d, 0xc8, - 0x54, 0x0d, 0xf3, 0x18, 0x79, 0x92, 0xd3, 0xe9, 0x58, 0x5e, 0x07, 0xd9, 0xde, 0xa9, 0x9e, 0x72, - 0xf8, 0x78, 0x73, 0x94, 0xef, 0x6c, 0x53, 0x0d, 0x49, 0x84, 0x07, 0xb0, 0x4d, 0xb8, 0x44, 0xf3, - 0xd8, 0x76, 0x86, 0x6d, 0xd4, 0x68, 0xa2, 0x95, 0x84, 0x3b, 0xb0, 0x65, 0x44, 0xa1, 0x94, 0x75, - 0x59, 0x2c, 0x14, 0x20, 0x4b, 0xa8, 0x55, 0x64, 0x22, 0xab, 0xeb, 0x89, 0x75, 0x17, 0xcf, 0x81, - 0xd3, 0x98, 0x85, 0x16, 0x64, 0x14, 0xf4, 0xc8, 0x9b, 0x3f, 0xc0, 0x54, 0x64, 0x0e, 0x4e, 0x8d, - 0xe2, 0x2d, 0xb8, 0x68, 0xa3, 0x47, 0x1e, 0x7e, 0xbe, 0xe9, 0x3d, 0x64, 0x0e, 0xe8, 0xfb, 0x2e, - 0x74, 0x15, 0x44, 0xd4, 0x82, 0x9a, 0xb4, 0x09, 0x35, 0x66, 0x7d, 0xe5, 0xeb, 0x38, 0x6c, 0xcc, - 0x07, 0x03, 0xfb, 0x26, 0xbc, 0x50, 0x16, 0x35, 0x51, 0xd7, 0x1e, 0x54, 0x65, 0xfd, 0x50, 0xa9, - 0x28, 0x15, 0xad, 0x22, 0xee, 0x55, 0x1e, 0xca, 0x65, 0xfd, 0x50, 0xa9, 0x55, 0x65, 0xa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db, 0x70, 0x3d, 0xb0, 0x57, 0xe4, 0x8f, 0x35, 0xbd, 0x26, 0x7f, 0x70, - 0x88, 0x55, 0x98, 0xe6, 0xc3, 0xf4, 0x06, 0x09, 0x1c, 0x6b, 0xe6, 0x0a, 0x2c, 0x67, 0x79, 0x48, - 0x07, 0x76, 0x77, 0x65, 0xb1, 0x2c, 0xab, 0xe9, 0x04, 0xa9, 0x0c, 0xd9, 0x71, 0xf1, 0xc7, 0x3f, - 0xe4, 0xd6, 0x4a, 0xfa, 0xcf, 0x4f, 0x73, 0xcc, 0x93, 0xa7, 0x39, 0xe6, 0x8f, 0xa7, 0x39, 0xe6, - 0x9b, 0x67, 0xb9, 0xb5, 0x27, 0xcf, 0x72, 0x6b, 0xbf, 0x3d, 0xcb, 0xad, 0x3d, 0x94, 0x9b, 0x96, - 0xd7, 0xea, 0xd7, 0x0b, 0xa6, 0xd3, 0x29, 0x9a, 0x8e, 0xdb, 0x71, 0x5c, 0xfa, 0x73, 0xd3, 0x6d, - 0x1c, 0x17, 0x1f, 0x15, 0x17, 0x1f, 0x59, 0x37, 0xe7, 0x5f, 0x59, 0xaf, 0xdd, 0xbe, 0x19, 0xfe, - 0xd0, 0xc2, 0xb7, 0x8c, 0x5b, 0x5f, 0xf7, 0xc7, 0xd9, 0xeb, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x20, 0x84, 0x51, 0xf7, 0x95, 0x0d, 0x00, 0x00, + // 1359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x5f, 0x8f, 0xdb, 0x44, + 0x10, 0x3f, 0xa7, 0xe9, 0xf5, 0x32, 0xb9, 0xe6, 0x82, 0x9b, 0xb6, 0x39, 0xb7, 0x4a, 0x8c, 0x11, + 0xe5, 0x40, 0x34, 0xe1, 0x8a, 0xa8, 0x50, 0x85, 0x00, 0xc7, 0x31, 0x34, 0xed, 0x9d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x6e, 0xba, 0x8d, 0xe3, 0xe2, 0xa3, 0xe2, 0xe2, 0x03, 0xeb, 0xe6, 0xfc, + 0x0b, 0xeb, 0x8d, 0xdb, 0x37, 0xc3, 0x1f, 0x59, 0xde, 0x2d, 0xe3, 0xd6, 0xd7, 0xfd, 0x71, 0xf6, + 0xe6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x80, 0xd3, 0x79, 0xb6, 0x91, 0x0d, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index c090ecb0b6ea..3e604e0f91ae 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -4,8 +4,6 @@ import ( "math" "time" - yaml "gopkg.in/yaml.v2" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" @@ -20,10 +18,9 @@ var ( ) // NewMisbehaviour creates a new Misbehaviour instance. -func NewMisbehaviour(clientID, chainID string, header1, header2 *Header) *Misbehaviour { +func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour { return &Misbehaviour{ ClientId: clientID, - ChainId: chainID, Header1: header1, Header2: header2, } @@ -39,16 +36,6 @@ func (misbehaviour Misbehaviour) GetClientID() string { return misbehaviour.ClientId } -// String implements Misbehaviour interface -func (misbehaviour Misbehaviour) String() string { - // FIXME: implement custom marshaller - bz, err := yaml.Marshal(misbehaviour) - if err != nil { - panic(err) - } - return string(bz) -} - // GetHeight returns the height at which misbehaviour occurred // // NOTE: assumes that misbehaviour headers have the same height @@ -84,6 +71,9 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if misbehaviour.Header2.TrustedValidators == nil { return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header2 cannot be empty") } + if misbehaviour.Header1.Header.ChainID != misbehaviour.Header2.Header.ChainID { + return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers must have identical chainIDs") + } if err := host.ClientIdentifierValidator(misbehaviour.ClientId); err != nil { return sdkerrors.Wrap(err, "misbehaviour client ID is invalid") @@ -120,10 +110,10 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if blockID1.Equals(*blockID2) { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers blockIDs are equal") } - if err := ValidCommit(misbehaviour.ChainId, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { + if err := ValidCommit(misbehaviour.Header1.Header.ChainID, misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { return err } - if err := ValidCommit(misbehaviour.ChainId, misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { + if err := ValidCommit(misbehaviour.Header2.Header.ChainID, misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { return err } return nil diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 556bfeb524fb..6d8cd5e32a8f 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -59,7 +59,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -75,7 +74,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -91,7 +89,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -107,7 +104,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion0, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion0, ClientId: chainID, }, suite.now, @@ -123,7 +119,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion0, 3, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion0, 3, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion0, ClientId: chainID, }, suite.now, @@ -139,7 +134,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainIDVersion1, 1, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainIDVersion1, ClientId: chainID, }, suite.now, @@ -155,7 +149,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -171,7 +164,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: "ethermint", ClientId: chainID, }, suite.now, @@ -187,7 +179,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -203,7 +194,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -219,7 +209,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -235,7 +224,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -262,7 +250,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -278,7 +265,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now.Add(ubdPeriod), @@ -294,7 +280,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -310,7 +295,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, altValSet, bothValSet, altSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -326,7 +310,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, @@ -342,7 +325,6 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now, altValSet, bothValSet, altSigners), Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), - ChainId: chainID, ClientId: chainID, }, suite.now, diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go index 9d7cddff5cc0..c8e441661240 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go @@ -21,7 +21,6 @@ func (suite *TendermintTestSuite) TestMisbehaviour() { misbehaviour := &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, } @@ -65,7 +64,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -73,13 +71,13 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { }, { "misbehaviour Header1 is nil", - types.NewMisbehaviour(clientID, chainID, nil, suite.header), + types.NewMisbehaviour(clientID, nil, suite.header), func(m *types.Misbehaviour) error { return nil }, false, }, { "misbehaviour Header2 is nil", - types.NewMisbehaviour(clientID, chainID, suite.header, nil), + types.NewMisbehaviour(clientID, suite.header, nil), func(m *types.Misbehaviour) error { return nil }, false, }, @@ -88,7 +86,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.NewHeight(0, height.VersionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -99,7 +96,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -110,7 +106,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -121,7 +116,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -132,7 +126,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -143,40 +136,16 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: "GAIA", }, func(misbehaviour *types.Misbehaviour) error { return nil }, false, }, { - "wrong chainID on header1", + "chainIDs do not match", &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: "ethermint", - ClientId: clientID, - }, - func(misbehaviour *types.Misbehaviour) error { return nil }, - false, - }, - { - "wrong chainID on header2", - &types.Misbehaviour{ - Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.VersionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, - ClientId: clientID, - }, - func(misbehaviour *types.Misbehaviour) error { return nil }, - false, - }, - { - "wrong chainID in misbehaviour", - &types.Misbehaviour{ - Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), - ChainId: "ethermint", ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -187,7 +156,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, 6, clienttypes.NewHeight(0, 4), suite.now, suite.valSet, suite.valSet, signers), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -198,7 +166,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -209,7 +176,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), Header2: suite.header, - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { @@ -231,7 +197,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { @@ -253,7 +218,6 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { &types.Misbehaviour{ Header1: suite.header, Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.VersionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), - ChainId: chainID, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go index e613edf2fdf7..df0967ef0205 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go @@ -141,13 +141,13 @@ var xxx_messageInfo_ConsensusState proto.InternalMessageInfo // that implements Misbehaviour interface expected by ICS-02 type Misbehaviour struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` - Header1 *Header `protobuf:"bytes,3,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty" yaml:"header_1"` - Header2 *Header `protobuf:"bytes,4,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty" yaml:"header_2"` + Header1 *Header `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty" yaml:"header_1"` + Header2 *Header `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty" yaml:"header_2"` } -func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } -func (*Misbehaviour) ProtoMessage() {} +func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } +func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } +func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { return fileDescriptor_c6d6cf2b288949be, []int{2} } @@ -317,76 +317,75 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1096 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x27, 0xe9, 0x76, 0xf1, 0x96, 0x6e, 0x5a, 0xba, 0x71, 0x64, 0xd0, - 0x52, 0x21, 0xd5, 0x26, 0x59, 0x24, 0xa4, 0x8a, 0x0b, 0x6e, 0x41, 0x2d, 0x62, 0xa5, 0xca, 0xe5, - 0x87, 0x84, 0x04, 0x66, 0x62, 0x4f, 0x92, 0x51, 0x6d, 0x8f, 0xf1, 0x4c, 0x42, 0xca, 0x5f, 0x00, - 0xb7, 0x3d, 0xae, 0x38, 0x71, 0xe0, 0x1f, 0xe1, 0xb6, 0xc7, 0x1e, 0x39, 0x19, 0xd4, 0x5e, 0x38, - 0xe7, 0xc8, 0x09, 0xcd, 0x0f, 0xdb, 0xd3, 0x6c, 0x97, 0x6a, 0xb9, 0xb4, 0xf3, 0xde, 0xfb, 0xde, - 0xf7, 0x65, 0xde, 0xbc, 0x79, 0x63, 0xe0, 0xe0, 0x7e, 0xe0, 0x44, 0x78, 0x38, 0x62, 0x41, 0x84, - 0x51, 0xc2, 0xa8, 0xc3, 0x50, 0x12, 0xa2, 0x2c, 0xc6, 0x09, 0x73, 0x26, 0x5d, 0xcd, 0xb2, 0xd3, - 0x8c, 0x30, 0x62, 0xb4, 0x71, 0x3f, 0xb0, 0xf5, 0x04, 0x5b, 0x83, 0x4c, 0xba, 0xdb, 0x1d, 0x2d, - 0x9f, 0x9d, 0xa7, 0x88, 0x3a, 0x13, 0x18, 0xe1, 0x10, 0x32, 0x92, 0x49, 0x86, 0xed, 0x9d, 0x17, - 0x10, 0xe2, 0xaf, 0x8a, 0xde, 0x0f, 0x48, 0x32, 0xc0, 0xc4, 0x49, 0x33, 0x42, 0x06, 0x85, 0xb3, - 0x3d, 0x24, 0x64, 0x18, 0x21, 0x47, 0x58, 0xfd, 0xf1, 0xc0, 0x09, 0xc7, 0x19, 0x64, 0x98, 0x24, - 0x2a, 0x6e, 0xce, 0xc7, 0x19, 0x8e, 0x11, 0x65, 0x30, 0x4e, 0x0b, 0x00, 0xdf, 0x66, 0x40, 0x32, - 0xe4, 0xc8, 0x5f, 0xcd, 0xb7, 0x26, 0x57, 0x0a, 0xf0, 0x4e, 0x05, 0x20, 0x71, 0x8c, 0x59, 0x5c, - 0x80, 0x4a, 0x4b, 0x01, 0x37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, 0xa9, 0xcc, 0xb7, 0xbc, 0x35, - 0xe5, 0x50, 0xa3, 0x2f, 0x02, 0x46, 0x81, 0xa8, 0x1a, 0x5c, 0x9d, 0xd2, 0x6d, 0xbb, 0x78, 0x38, - 0xcb, 0xcd, 0xad, 0xeb, 0x2a, 0x15, 0x87, 0xe5, 0xbd, 0xae, 0x9c, 0x55, 0xab, 0x5b, 0x9f, 0x82, - 0x7a, 0xf1, 0x28, 0x1b, 0x3b, 0x60, 0x35, 0x19, 0xc7, 0x28, 0xe3, 0x11, 0x71, 0x32, 0xcb, 0x5e, - 0xe5, 0x30, 0x3a, 0xa0, 0x11, 0xa2, 0x84, 0xc4, 0x38, 0x11, 0xf1, 0x45, 0x11, 0xd7, 0x5d, 0xee, - 0xb7, 0xcf, 0x2f, 0xdb, 0xb5, 0x8b, 0xcb, 0x76, 0xed, 0xaf, 0xcb, 0x76, 0xed, 0xe9, 0x55, 0x7b, - 0xe1, 0xe2, 0xaa, 0xbd, 0xf0, 0xc7, 0x55, 0x7b, 0xe1, 0xeb, 0x43, 0xed, 0x5a, 0x06, 0x84, 0xc6, - 0x84, 0xaa, 0x7f, 0x7b, 0x34, 0x3c, 0x73, 0xa6, 0xd5, 0xe7, 0xdb, 0x5e, 0xf1, 0xfd, 0xf6, 0xde, - 0x07, 0x7b, 0xf3, 0x1f, 0x58, 0xfd, 0x3b, 0x62, 0x0a, 0x3d, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, - 0xd1, 0xc9, 0xf2, 0x91, 0xee, 0x09, 0x00, 0x00, + // 1079 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x6f, 0xda, 0x7e, 0xb7, 0xe9, 0x24, 0xdd, 0xf6, 0xeb, 0x2d, 0xdd, 0xb4, 0x74, 0xe3, 0xc8, + 0xa0, 0xa5, 0x42, 0xaa, 0x4d, 0xb2, 0x48, 0x48, 0x15, 0x17, 0xdc, 0x82, 0x5a, 0xc4, 0x4a, 0x95, + 0xcb, 0x0f, 0x09, 0x09, 0xcc, 0xc4, 0x9e, 0x24, 0xa3, 0xda, 0x1e, 0xe3, 0x99, 0x84, 0x94, 0xbf, + 0x00, 0x0e, 0x48, 0x7b, 0x44, 0x9c, 0x38, 0xf0, 0xc7, 0xec, 0xb1, 0x47, 0x4e, 0x06, 0xb5, 0x17, + 0xce, 0x39, 0x72, 0x42, 0xf3, 0xc3, 0xf6, 0x34, 0xdb, 0xa5, 0x5a, 0x2e, 0xed, 0xbc, 0xf7, 0x3e, + 0xef, 0xf3, 0xc9, 0xbc, 0x79, 0xf3, 0xc6, 0xc0, 0xc1, 0xfd, 0xc0, 0x89, 0xf0, 0x70, 0xc4, 0x82, + 0x08, 0xa3, 0x84, 0x51, 0x87, 0xa1, 0x24, 0x44, 0x59, 0x8c, 0x13, 0xe6, 0x4c, 0xba, 0x9a, 0x65, + 0xa7, 0x19, 0x61, 0xc4, 0x68, 0xe3, 0x7e, 0x60, 0xeb, 0x09, 0xb6, 0x06, 0x99, 0x74, 0x77, 0x3a, + 0x5a, 0x3e, 0xbb, 0x48, 0x11, 0x75, 0x26, 0x30, 0xc2, 0x21, 0x64, 0x24, 0x93, 0x0c, 0x3b, 0xbb, + 0x2f, 0x20, 0xc4, 0x5f, 0x15, 0x7d, 0x10, 0x90, 0x64, 0x80, 0x89, 0x93, 0x66, 0x84, 0x0c, 0x0a, + 0x67, 0x7b, 0x48, 0xc8, 0x30, 0x42, 0x8e, 0xb0, 0xfa, 0xe3, 0x81, 0x13, 0x8e, 0x33, 0xc8, 0x30, + 0x49, 0x54, 0xdc, 0x9c, 0x8f, 0x33, 0x1c, 0x23, 0xca, 0x60, 0x9c, 0x16, 0x00, 0xbe, 0xcd, 0x80, + 0x64, 0xc8, 0x91, 0xbf, 0x9a, 0x6f, 0x4d, 0xae, 0x14, 0xe0, 0xad, 0x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5, 0xac, 0xea, 0x61, 0xb9, 0x6b, 0x17, 0x8f, 0x66, 0xb9, + 0xb9, 0x7d, 0x53, 0xa5, 0xe2, 0xb0, 0xbc, 0xff, 0x2b, 0x67, 0xd5, 0xb6, 0xd6, 0xc7, 0xa0, 0x5e, + 0x3c, 0xb0, 0xc6, 0x2e, 0x58, 0x4d, 0xc6, 0x31, 0xca, 0x78, 0x44, 0x9c, 0xcc, 0xb2, 0x57, 0x39, + 0x8c, 0x0e, 0x68, 0x84, 0x28, 0x21, 0x31, 0x4e, 0x44, 0x7c, 0x51, 0xc4, 0x75, 0x97, 0xfb, 0xf5, + 0xf3, 0xab, 0x76, 0xed, 0xf2, 0xaa, 0x5d, 0xfb, 0xf3, 0xaa, 0x5d, 0x7b, 0x76, 0xdd, 0x5e, 0xb8, + 0xbc, 0x6e, 0x2f, 0xfc, 0x7e, 0xdd, 0x5e, 0xf8, 0xf2, 0x48, 0xbb, 0x62, 0x01, 0xa1, 0x31, 0xa1, + 0xea, 0xdf, 0x3e, 0x0d, 0xcf, 0x9d, 0x69, 0xf5, 0x29, 0xb6, 0x5f, 0x7c, 0x8b, 0xbd, 0xf3, 0xde, + 0xfe, 0xfc, 0xc7, 0x52, 0xff, 0x9e, 0x98, 0x28, 0x4f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x4c, + 0xb7, 0x2c, 0x8e, 0xba, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -592,7 +591,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if m.Header1 != nil { { @@ -604,13 +603,6 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.ChainId))) - i-- dAtA[i] = 0x12 } if len(m.ClientId) > 0 { @@ -804,10 +796,6 @@ func (m *Misbehaviour) Size() (n int) { if l > 0 { n += 1 + l + sovTendermint(uint64(l)) } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTendermint(uint64(l)) - } if m.Header1 != nil { l = m.Header1.Size() n += 1 + l + sovTendermint(uint64(l)) @@ -1467,38 +1455,6 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { m.ClientId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header1", wireType) } @@ -1534,7 +1490,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Header2", wireType) }