Browse Source

abci: fix abci evidence types (#5174)

pull/5182/head
Callum Waters 4 years ago
committed by GitHub
parent
commit
4a06dc9916
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 7 deletions
  1. +8
    -0
      CHANGELOG_PENDING.md
  2. +8
    -0
      UPGRADING.md
  3. +6
    -7
      types/protobuf.go

+ 8
- 0
CHANGELOG_PENDING.md 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)

+ 8
- 0
UPGRADING.md 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


+ 6
- 7
types/protobuf.go 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)))
}


Loading…
Cancel
Save