From 4a06dc99160df4003afa783e59e22af16796d7a0 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 30 Jul 2020 17:27:48 +0200 Subject: [PATCH] abci: fix abci evidence types (#5174) --- CHANGELOG_PENDING.md | 8 ++++++++ UPGRADING.md | 8 ++++++++ types/protobuf.go | 13 ++++++------- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 4db64697c..0f60620d0 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -1 +1,9 @@ ## v0.34.1 + +Special thanks to external contributors on this release: + +Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermint). + +### FEATURES: + +- [abci] [\#5174](https://github.com/tendermint/tendermint/pull/5174) Add amnesia evidence and remove mock and potential amnesia evidence from abci (@cmwaters) \ No newline at end of file diff --git a/UPGRADING.md b/UPGRADING.md index 439c4edf2..bb10866de 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -3,6 +3,14 @@ This guide provides steps to be followed when you upgrade your applications to a newer version of Tendermint Core. +## v0.34.1 + +### ABCI application changes + +A new form of evidence: amnesia evidence, has been added. Potential amnesia and +mock evidence have been removed. Applications should be able to handle these +evidence types. + ## v0.34.0 **This release is not compatible with previous blockchains** due to switching diff --git a/types/protobuf.go b/types/protobuf.go index 63cc69ead..c125528c2 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -16,11 +16,10 @@ import ( // Use strings to distinguish types in ABCI messages const ( - ABCIEvidenceTypeDuplicateVote = "duplicate/vote" - ABCIEvidenceTypePhantom = "phantom" - ABCIEvidenceTypeLunatic = "lunatic" - ABCIEvidenceTypePotentialAmnesia = "potential_amnesia" - ABCIEvidenceTypeMock = "mock/evidence" + ABCIEvidenceTypeDuplicateVote = "duplicate/vote" + ABCIEvidenceTypePhantom = "phantom" + ABCIEvidenceTypeLunatic = "lunatic" + ABCIEvidenceTypeAmnesia = "amnesia" ) const ( @@ -137,8 +136,8 @@ func (tm2pb) Evidence(ev Evidence, valSet *ValidatorSet, evTime time.Time) abci. evType = ABCIEvidenceTypePhantom case *LunaticValidatorEvidence: evType = ABCIEvidenceTypeLunatic - case *PotentialAmnesiaEvidence: - evType = ABCIEvidenceTypePotentialAmnesia + case *AmnesiaEvidence: + evType = ABCIEvidenceTypeAmnesia default: panic(fmt.Sprintf("Unknown evidence type: %v %v", ev, reflect.TypeOf(ev))) }