diff --git a/CHANGELOG.md b/CHANGELOG.md index 53af158eb..d621cd60e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ older clients. ### API Breaking Changes +* (x/evidence) [\#7251](https://github.com/cosmos/cosmos-sdk/pull/7251) New evidence types and light client evidence handling. The module function names changed. * (modules) [\#6564](https://github.com/cosmos/cosmos-sdk/pull/6564) Constant `DefaultParamspace` is removed from all modules, use ModuleName instead. * (client) [\#6525](https://github.com/cosmos/cosmos-sdk/pull/6525) Removed support for `indent` in JSON responses. Clients should consider piping to an external tool such as `jq`. * (x/staking) [\#6451](https://github.com/cosmos/cosmos-sdk/pull/6451) `DefaultParamspace` and `ParamKeyTable` in staking module are moved from keeper to types to enforce consistency. @@ -129,11 +130,11 @@ be used to retrieve the actual proposal `Content`. Also the `NewMsgSubmitProposa * (modules) [\#6311](https://github.com/cosmos/cosmos-sdk/issues/6311) Remove `alias.go` usage * (x/auth) [\#6443](https://github.com/cosmos/cosmos-sdk/issues/6443) Move `FeeTx` and `TxWithMemo` interfaces from `x/auth/ante` to `types`. * (modules) [\#6447](https://github.com/cosmos/cosmos-sdk/issues/6447) Rename `blacklistedAddrs` to `blockedAddrs`. - + Migration guide: ```go - cliCtx := context.CLIContext{} + cliCtx := context.CLIContext{} ``` Now becomes: @@ -144,7 +145,7 @@ be used to retrieve the actual proposal `Content`. Also the `NewMsgSubmitProposa * (client/rpc) [\#6290](https://github.com/cosmos/cosmos-sdk/pull/6290) `RegisterRoutes` of rpc is moved from package client to client/rpc and client/rpc.RegisterRPCRoutes is removed. * (client/lcd) [\#6290](https://github.com/cosmos/cosmos-sdk/pull/6290) `CliCtx` of struct `RestServer` in package client/lcd has been renamed to `ClientCtx`. * (types) [\#6327](https://github.com/cosmos/cosmos-sdk/pull/6327) `sdk.Msg` now inherits `proto.Message`, as a result all `sdk.Msg` types now use pointer semantics. -* (codec) [\#6330](https://github.com/cosmos/cosmos-sdk/pull/6330) `codec.RegisterCrypto` has been moved to the `crypto/codec` package and the global `codec.Cdc` Amino instance has been deprecated and moved to the `codec/legacy_global` package. +* (codec) [\#6330](https://github.com/cosmos/cosmos-sdk/pull/6330) `codec.RegisterCrypto` has been moved to the `crypto/codec` package and the global `codec.Cdc` Amino instance has been deprecated and moved to the `codec/legacy_global` package. * (x/ibc) [\#6374](https://github.com/cosmos/cosmos-sdk/pull/6374) `VerifyMembership` and `VerifyNonMembership` now take a `specs []string` argument to specify the proof format used for verification. Most SDK chains can simply use `commitmenttypes.GetSDKSpecs()` for this argument. * (crypto/types/multisig) [\#6373](https://github.com/cosmos/cosmos-sdk/pull/6373) `multisig.Multisignature` has been renamed to `AminoMultisignature` * (x/auth) [\#6428](https://github.com/cosmos/cosmos-sdk/issues/6428): @@ -193,7 +194,7 @@ be used to retrieve the actual proposal `Content`. Also the `NewMsgSubmitProposa * (types) [\#7038](https://github.com/cosmos/cosmos-sdk/issues/7038) Fix infinite looping of `ApproxRoot` by including a hard-coded maximum iterations limit of 100. * (simulation) [\#7129](https://github.com/cosmos/cosmos-sdk/issues/7129) Fix support for custom `Account` and key types on auth's simulation. * (types) [\#7084](https://github.com/cosmos/cosmos-sdk/pull/7084) Fix panic when calling `BigInt()` on an uninitialized `Int`. -* (x/bank) [\#6536](https://github.com/cosmos/cosmos-sdk/pull/6536) Fix bug in `WriteGeneratedTxResponse` function used by multiple +* (x/bank) [\#6536](https://github.com/cosmos/cosmos-sdk/pull/6536) Fix bug in `WriteGeneratedTxResponse` function used by multiple REST endpoints. Now it writes a Tx in StdTx format. * (x/staking) [\#6529](https://github.com/cosmos/cosmos-sdk/pull/6529) Export validator addresses (previously was empty). * (export) [\#6510](https://github.com/cosmos/cosmos-sdk/pull/6510/) Field TimeIotaMs now is included in genesis file while exporting. @@ -324,7 +325,7 @@ pagination. * (baseapp) [\#6053](https://github.com/cosmos/cosmos-sdk/pull/6053) Customizable panic recovery handling added for `app.runTx()` method (as proposed in the [ADR 22](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-022-custom-panic-handling.md)). Adds ability for developers to register custom panic handlers extending standard ones. * (store) [\#6481](https://github.com/cosmos/cosmos-sdk/pull/6481) Move `SimpleProofsFromMap` from Tendermint into the SDK. * (store) [\#6719](https://github.com/cosmos/cosmos-sdk/6754) Add validity checks to stores for nil and empty keys. -* (types) \#6897 Add KV type from tendermint to `types` directory. +* (types) \#6897 Add KV type from tendermint to `types` directory. ## [v0.39.0] - 2020-07-20 diff --git a/Makefile b/Makefile index 1678d990a..9fcf5930c 100644 --- a/Makefile +++ b/Makefile @@ -338,7 +338,7 @@ proto-check-breaking-docker: @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master .PHONY: proto-check-breaking-ci -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc3/proto/tendermint +TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/3359e0bf2f8414d9687f9eecda67b899d64a9cd1/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.2 diff --git a/baseapp/params.go b/baseapp/params.go index 7dd1d526c..f7d8d1c0a 100644 --- a/baseapp/params.go +++ b/baseapp/params.go @@ -67,10 +67,6 @@ func ValidateEvidenceParams(i interface{}) error { return fmt.Errorf("evidence maximum number of evidence must be positive: %v", v.MaxAgeDuration) } - if v.ProofTrialPeriod <= 0 { - return fmt.Errorf("proof of trial period must be greater than 0: %v", v.MaxAgeDuration) - } - return nil } diff --git a/baseapp/params_test.go b/baseapp/params_test.go index 1d6c7b909..a78f132de 100644 --- a/baseapp/params_test.go +++ b/baseapp/params_test.go @@ -36,9 +36,8 @@ func TestValidateEvidenceParams(t *testing.T) { {nil, true}, {&tmproto.EvidenceParams{}, true}, {tmproto.EvidenceParams{}, true}, - {tmproto.EvidenceParams{MaxAgeNumBlocks: -1, MaxAgeDuration: 18004000, MaxNum: 50, ProofTrialPeriod: 10_000}, true}, - {tmproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxNum: 50, ProofTrialPeriod: -1}, true}, - {tmproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxNum: 50, ProofTrialPeriod: 50_0000}, false}, + {tmproto.EvidenceParams{MaxAgeNumBlocks: -1, MaxAgeDuration: 18004000, MaxNum: 50}, true}, + {tmproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxNum: 50}, false}, } for _, tc := range testCases { diff --git a/codec/amino.go b/codec/amino.go index 38e93429d..f34713a9b 100644 --- a/codec/amino.go +++ b/codec/amino.go @@ -32,10 +32,6 @@ func NewLegacyAmino() *LegacyAmino { func RegisterEvidences(cdc *LegacyAmino) { cdc.Amino.RegisterInterface((*tmtypes.Evidence)(nil), nil) cdc.Amino.RegisterConcrete(&tmtypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) - cdc.Amino.RegisterConcrete(&tmtypes.ConflictingHeadersEvidence{}, "tendermint/ConflictingHeadersEvidence", nil) - cdc.Amino.RegisterConcrete(&tmtypes.LunaticValidatorEvidence{}, "tendermint/LunaticValidatorEvidence", nil) - cdc.Amino.RegisterConcrete(&tmtypes.PotentialAmnesiaEvidence{}, "tendermint/PotentialAmnesiaEvidence", nil) - cdc.Amino.RegisterConcrete(&tmtypes.AmnesiaEvidence{}, "tendermint/AmnesiaEvidence", nil) } // MarshalJSONIndent provides a utility for indented JSON encoding of an object diff --git a/go.mod b/go.mod index 551387005..2794c2169 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.15.1 - github.com/tendermint/tendermint v0.34.0-rc3 + github.com/tendermint/tendermint v0.34.0-rc3.0.20200907055413-3359e0bf2f84 github.com/tendermint/tm-db v0.6.2 golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 diff --git a/go.sum b/go.sum index 07e71cb83..5a1f271a2 100644 --- a/go.sum +++ b/go.sum @@ -580,6 +580,8 @@ github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.34.0-rc3 h1:d7Fsd5rdbxq4GmJ0kRfx7l7LesQM7e70f0ytWLTQ/Go= github.com/tendermint/tendermint v0.34.0-rc3/go.mod h1:BoHcEpjfpBHc1Be7RQz3AHaXFNObcDG7SNHCev6Or4g= +github.com/tendermint/tendermint v0.34.0-rc3.0.20200907055413-3359e0bf2f84 h1:BI/EhLLh6SAlOtMaHePo8BNFLsNRiFNCtJ8cMBX+OE8= +github.com/tendermint/tendermint v0.34.0-rc3.0.20200907055413-3359e0bf2f84/go.mod h1:ZgOz3PoriH5yHRJmUmhDTVX8ps4+hzFvhmDq6MDUHxU= github.com/tendermint/tm-db v0.6.1 h1:w3X87itMPXopcRPlFiqspEKhw4FXihPk2rnFFkP0zGk= github.com/tendermint/tm-db v0.6.1/go.mod h1:m3x9kRP4UFd7JODJL0yBAZqE7wTw+S37uAE90cTx7OA= github.com/tendermint/tm-db v0.6.2 h1:DOn8jwCdjJblrCFJbtonEIPD1IuJWpbRUUdR8GWE4RM= diff --git a/server/export.go b/server/export.go index 55746d9aa..b5fccaf05 100644 --- a/server/export.go +++ b/server/export.go @@ -88,10 +88,9 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com TimeIotaMs: doc.ConsensusParams.Block.TimeIotaMs, }, Evidence: tmproto.EvidenceParams{ - MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks, - MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration, - MaxNum: exported.ConsensusParams.Evidence.MaxNum, - ProofTrialPeriod: exported.ConsensusParams.Evidence.ProofTrialPeriod, + MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks, + MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration, + MaxNum: exported.ConsensusParams.Evidence.MaxNum, }, Validator: tmproto.ValidatorParams{ PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes, diff --git a/server/util.go b/server/util.go index 6e34dcfe5..4796aca0f 100644 --- a/server/util.go +++ b/server/util.go @@ -124,7 +124,7 @@ func interceptConfigs(ctx *Context, rootViper *viper.Viper) (*tmcfg.Config, erro return nil, fmt.Errorf("error in config file: %v", err) } - conf.ProfListenAddress = "localhost:6060" + conf.RPC.PprofListenAddress = "localhost:6060" conf.P2P.RecvRate = 5120000 conf.P2P.SendRate = 5120000 conf.Consensus.TimeoutCommit = 5 * time.Second diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index c08cca2bd..09b96f1dd 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -351,8 +351,14 @@ message VoteInfo { bool signed_last_block = 2; } +enum EvidenceType { + UNKNOWN = 0; + DUPLICATE_VOTE = 1; + LIGHT_CLIENT_ATTACK = 2; +} + message Evidence { - string type = 1; + EvidenceType type = 1; // The offending validator Validator validator = 2 [(gogoproto.nullable) = false]; // The height when the offense occurred diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index e3a8ce934..af9db49fc 100644 --- a/third_party/proto/tendermint/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -14,11 +14,3 @@ message PublicKey { bytes ed25519 = 1; } } - -// PrivateKey defines the keys available for use with Tendermint Validators -// WARNING PrivateKey is used for internal purposes only -message PrivateKey { - oneof sum { - bytes ed25519 = 1; - } -} diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto index c2bb74ca4..3ff10c1b3 100644 --- a/third_party/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -13,46 +13,14 @@ import "tendermint/crypto/keys.proto"; message DuplicateVoteEvidence { Vote vote_a = 1; Vote vote_b = 2; - + google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message PotentialAmnesiaEvidence { - Vote vote_a = 1; - Vote vote_b = 2; - - int64 height_stamp = 3; - google.protobuf.Timestamp timestamp = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message AmnesiaEvidence { - PotentialAmnesiaEvidence potential_amnesia_evidence = 1; - ProofOfLockChange polc = 2; -} - -message ConflictingHeadersEvidence { - SignedHeader h1 = 1; - SignedHeader h2 = 2; -} - -message LunaticValidatorEvidence { - Header header = 1; - Vote vote = 2; - string invalid_header_field = 3; - - google.protobuf.Timestamp timestamp = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message Evidence { oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - ConflictingHeadersEvidence conflicting_headers_evidence = 2; - LunaticValidatorEvidence lunatic_validator_evidence = 3; - PotentialAmnesiaEvidence potential_amnesia_evidence = 4; - AmnesiaEvidence amnesia_evidence = 5; + DuplicateVoteEvidence duplicate_vote_evidence = 1; } } @@ -61,8 +29,3 @@ message EvidenceData { repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; bytes hash = 2; } - -message ProofOfLockChange { - repeated Vote votes = 1; - tendermint.crypto.PublicKey pub_key = 2; -} diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto index 33ed4f773..897c07c17 100644 --- a/third_party/proto/tendermint/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -53,11 +53,6 @@ message EvidenceParams { // each evidence (See MaxEvidenceBytes). The maximum number is MaxEvidencePerBlock. // Default is 50 uint32 max_num = 3; - - // Proof trial period dictates the time given for nodes accused of amnesia evidence, incorrectly - // voting twice in two different rounds to respond with their respective proofs. - // Default is half the max age in blocks: 50,000 - int64 proof_trial_period = 4; } // ValidatorParams restrict the public key types validators can use. diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto index 7ba7de8bd..2762f4a78 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto"; import "tendermint/libs/bits/types.proto"; import "tendermint/crypto/proof.proto"; import "tendermint/version/types.proto"; +import "tendermint/types/validator.proto"; // BlockIdFlag indicates which BlcokID the signature is for enum BlockIDFlag { @@ -141,6 +142,11 @@ message SignedHeader { Commit commit = 2; } +message LightBlock { + SignedHeader signed_header = 1; + tendermint.types.ValidatorSet validator_set = 2; +} + message BlockMeta { BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; int64 block_size = 2; diff --git a/x/evidence/abci.go b/x/evidence/abci.go index c59ccccd1..63866fd2b 100644 --- a/x/evidence/abci.go +++ b/x/evidence/abci.go @@ -4,12 +4,10 @@ import ( "fmt" "time" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - - abci "github.com/tendermint/tendermint/abci/types" - tmtypes "github.com/tendermint/tendermint/types" - "github.com/cosmos/cosmos-sdk/x/evidence/keeper" "github.com/cosmos/cosmos-sdk/x/evidence/types" ) @@ -21,9 +19,11 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) for _, tmEvidence := range req.ByzantineValidators { switch tmEvidence.Type { - case tmtypes.ABCIEvidenceTypeDuplicateVote: - evidence := types.ConvertDuplicateVoteEvidence(tmEvidence) - k.HandleDoubleSign(ctx, evidence.(*types.Equivocation)) + // It's still ongoing discussion how should we treat and slash attacks with + // premeditation. So for now we agree to treat them in the same way. + case abci.EvidenceType_DUPLICATE_VOTE, abci.EvidenceType_LIGHT_CLIENT_ATTACK: + evidence := types.FromABCIEvidence(tmEvidence) + k.HandleEquivocationEvidence(ctx, evidence.(*types.Equivocation)) default: k.Logger(ctx).Error(fmt.Sprintf("ignored unknown evidence type: %s", tmEvidence.Type)) diff --git a/x/evidence/keeper/infraction.go b/x/evidence/keeper/infraction.go index 75de7d4a2..427c8de42 100644 --- a/x/evidence/keeper/infraction.go +++ b/x/evidence/keeper/infraction.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/evidence/types" ) -// HandleDoubleSign implements an equivocation evidence handler. Assuming the +// HandleEquivocationEvidence implements an equivocation evidence handler. Assuming the // evidence is valid, the validator committing the misbehavior will be slashed, // jailed and tombstoned. Once tombstoned, the validator will not be able to // recover. Note, the evidence contains the block time and height at the time of @@ -22,7 +22,7 @@ import ( // // TODO: Some of the invalid constraints listed above may need to be reconsidered // in the case of a lunatic attack. -func (k Keeper) HandleDoubleSign(ctx sdk.Context, evidence *types.Equivocation) { +func (k Keeper) HandleEquivocationEvidence(ctx sdk.Context, evidence *types.Equivocation) { logger := k.Logger(ctx) consAddr := evidence.GetConsensusAddress() diff --git a/x/evidence/keeper/infraction_test.go b/x/evidence/keeper/infraction_test.go index c510ea902..817ffed03 100644 --- a/x/evidence/keeper/infraction_test.go +++ b/x/evidence/keeper/infraction_test.go @@ -52,7 +52,7 @@ func (suite *KeeperTestSuite) TestHandleDoubleSign() { Power: power, ConsensusAddress: sdk.ConsAddress(val.Address()), } - suite.app.EvidenceKeeper.HandleDoubleSign(ctx, evidence) + suite.app.EvidenceKeeper.HandleEquivocationEvidence(ctx, evidence) // should be jailed and tombstoned suite.True(suite.app.StakingKeeper.Validator(ctx, operatorAddr).IsJailed()) @@ -63,7 +63,7 @@ func (suite *KeeperTestSuite) TestHandleDoubleSign() { suite.True(newTokens.LT(oldTokens)) // submit duplicate evidence - suite.app.EvidenceKeeper.HandleDoubleSign(ctx, evidence) + suite.app.EvidenceKeeper.HandleEquivocationEvidence(ctx, evidence) // tokens should be the same (capped slash) suite.True(suite.app.StakingKeeper.Validator(ctx, operatorAddr).GetTokens().Equal(newTokens)) @@ -119,7 +119,7 @@ func (suite *KeeperTestSuite) TestHandleDoubleSign_TooOld() { ctx = ctx.WithConsensusParams(cp) ctx = ctx.WithBlockTime(ctx.BlockTime().Add(cp.Evidence.MaxAgeDuration + 1)) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + cp.Evidence.MaxAgeNumBlocks + 1) - suite.app.EvidenceKeeper.HandleDoubleSign(ctx, evidence) + suite.app.EvidenceKeeper.HandleEquivocationEvidence(ctx, evidence) suite.False(suite.app.StakingKeeper.Validator(ctx, operatorAddr).IsJailed()) suite.False(suite.app.SlashingKeeper.IsTombstoned(ctx, sdk.ConsAddress(val.Address()))) diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index 0f5235ee6..239aabbb5 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -84,9 +84,9 @@ func (e Equivocation) GetValidatorPower() int64 { // GetTotalPower is a no-op for the Equivocation type. func (e Equivocation) GetTotalPower() int64 { return 0 } -// ConvertDuplicateVoteEvidence converts a Tendermint concrete Evidence type to +// FromABCIEvidence converts a Tendermint concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. -func ConvertDuplicateVoteEvidence(dupVote abci.Evidence) exported.Evidence { +func FromABCIEvidence(dupVote abci.Evidence) exported.Evidence { return &Equivocation{ Height: dupVote.Height, Power: dupVote.Validator.Power, diff --git a/x/simulation/mock_tendermint.go b/x/simulation/mock_tendermint.go index 152e4de29..aa5d46ef7 100644 --- a/x/simulation/mock_tendermint.go +++ b/x/simulation/mock_tendermint.go @@ -11,7 +11,6 @@ import ( cryptoenc "github.com/tendermint/tendermint/crypto/encoding" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" ) type mockValidator struct { @@ -201,7 +200,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, evidence = append(evidence, abci.Evidence{ - Type: tmtypes.ABCIEvidenceTypeDuplicateVote, + Type: abci.EvidenceType_DUPLICATE_VOTE, Validator: validator, Height: height, Time: time,