mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-16 12:16:11 +00:00
blockchain: verify +2/3 (#5278)
## Description Verify only +2/3 of the commit. Closes: #5259
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user