koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

BlockDownloadManager needs protection against blocks that don't apply #154

Closed theoreticalbts closed 2 years ago

theoreticalbts commented 2 years ago

It might be possible for sync to ask for a block that doesn't apply, then BlockDownloadManager clears the block out of the data structure, asks for it again, applies it again, it fails again, and so on.

We need some way to blacklist a known-bad block to break out of this loop.

We also need to be discriminatory in our error handling:

mvandeberg commented 2 years ago

This is irrelevant after #166