Browse Source

blockchain: verify +2/3 (#5278)

## Description

Verify only +2/3 of the commit. 

Closes: #5259
pull/5282/head
Marko 4 years ago
committed by GitHub
parent
commit
135ac0400e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions
  1. +3
    -1
      CHANGELOG_PENDING.md
  2. +1
    -1
      blockchain/v0/reactor.go
  3. +1
    -1
      blockchain/v1/reactor.go
  4. +1
    -1
      blockchain/v2/processor_context.go

+ 3
- 1
CHANGELOG_PENDING.md View File

@ -10,10 +10,12 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
## FEATURES
- [privval] \#5239 Add `chainID` to requests from client.
- [privval] \#5239 Add `chainID` to requests from client. (@marbar3778)
## IMPROVEMENTS
- [blockchain] \#5278 Verify only +2/3 of the signatures in a block when fast syncing. (@marbar3778)
## BUG FIXES
- [blockchain] \#5249 Fix fast sync halt with initial height > 1 (@erikgrinaker)

+ 1
- 1
blockchain/v0/reactor.go View File

@ -358,7 +358,7 @@ FOR_LOOP:
// NOTE: we can probably make this more efficient, but note that calling
// first.Hash() doesn't verify the tx contents, so MakePartSet() is
// currently necessary.
err := state.Validators.VerifyCommit(
err := state.Validators.VerifyCommitLight(
chainID, firstID, first.Height, second.LastCommit)
if err != nil {
bcR.Logger.Error("Error in validation", "err", err)


+ 1
- 1
blockchain/v1/reactor.go View File

@ -463,7 +463,7 @@ func (bcR *BlockchainReactor) processBlock() error {
// NOTE: we can probably make this more efficient, but note that calling
// first.Hash() doesn't verify the tx contents, so MakePartSet() is
// currently necessary.
err = bcR.state.Validators.VerifyCommit(chainID, firstID, first.Height, second.LastCommit)
err = bcR.state.Validators.VerifyCommitLight(chainID, firstID, first.Height, second.LastCommit)
if err != nil {
bcR.Logger.Error("error during commit verification", "err", err,
"first", first.Height, "second", second.Height)


+ 1
- 1
blockchain/v2/processor_context.go View File

@ -44,7 +44,7 @@ func (pc *pContext) setState(state state.State) {
}
func (pc pContext) verifyCommit(chainID string, blockID types.BlockID, height int64, commit *types.Commit) error {
return pc.state.Validators.VerifyCommit(chainID, blockID, height, commit)
return pc.state.Validators.VerifyCommitLight(chainID, blockID, height, commit)
}
func (pc *pContext) saveBlock(block *types.Block, blockParts *types.PartSet, seenCommit *types.Commit) {


Loading…
Cancel
Save