Skip to content

fastsync may stuck by a wrong block #2457

@goolAdapter

Description

@goolAdapter

When VerifyCommit failed, the logic only redo the first block request, but the wrong block may was the second one. In this situation, didProcess will always empty loop in the next moment .

err := state.Validators.VerifyCommit(
chainID, firstID, first.Height, second.LastCommit)
if err != nil {
bcR.Logger.Error("Error in validation", "err", err)
peerID := bcR.pool.RedoRequest(first.Height)
peer := bcR.Switch.Peers().Get(peerID)
if peer != nil {
// NOTE: we've already removed the peer's request, but we
// still need to clean up the rest.
bcR.Switch.StopPeerForError(peer, fmt.Errorf("BlockchainReactor validation error: %v", err))
}
continue FOR_LOOP
} else {

Metadata

Metadata

Assignees

Labels

C:syncComponent: Fast Sync, State SyncT:bugType Bug (Confirmed)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions