abci: fix abci evidence types (#5174)

This commit is contained in:
Callum Waters
2020-07-30 17:27:48 +02:00
committed by GitHub
parent 29d15df10b
commit 4a06dc9916
3 changed files with 22 additions and 7 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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)))
}