evidence: create proof of lock change and implement it in evidence store (#4746)

creates a proof of lock change which is an array of votes that proves the validator was permitted to change locked block and vote again. This proof is stored in the evidence pool and is used as a part of amnesia evidence
This commit is contained in:
Callum Waters
2020-05-11 17:06:01 +02:00
committed by GitHub
parent 18f178bf3b
commit 7cb3d90e01
10 changed files with 571 additions and 35 deletions

View File

@@ -48,9 +48,11 @@ const (
type cleanupFunc func()
// genesis, chain_id, priv_val
var config *cfg.Config // NOTE: must be reset for each _test.go file
var consensusReplayConfig *cfg.Config
var ensureTimeout = time.Millisecond * 100
var (
config *cfg.Config // NOTE: must be reset for each _test.go file
consensusReplayConfig *cfg.Config
ensureTimeout = time.Millisecond * 100
)
func ensureDir(dir string, mode os.FileMode) {
if err := tmos.EnsureDir(dir, mode); err != nil {
@@ -300,7 +302,6 @@ func validatePrecommit(
lockedBlockHash))
}
}
}
func validatePrevoteAndPrecommit(