spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪

Home Page:https://spacemesh.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syncer should not retry to download an object if syntactic validation fails

dshulyak opened this issue · comments

examples of the syntactic validation:

  • signagure verification
  • vrf verification
  • encoding format

we are using special purpose error p2p.ErrReject to disconnect peers that send invalid data, it is definitely missing for ballot vrf verification, leading sync to retry indefinitely if it stumbles on a peer that shares broken data.

it also should not retry object if chain of them fails, such if ballot X references ballot Y, and ballot Y is invalid we should not try download redownload ballot X again and again.