koinos/koinos-p2p

Error Score on Fork Bombing

mvandeberg opened this issue · 0 comments

As a Koinos node operator, I don't want to be fork bombed.

A fork block is defined as a block that has the same parent, same producer, but a different ID. This can happen accidentally (a node operator misconfiguring a backup block producer, for instance) but can also happen during a fork bomb attack. To prevent this attack, we will track these fork blocks and when a 4th fork block is pushed, we will drop that ban hammer on a peer by assigning a large error score (enough to ban for a significant time period) to them.

  • Add fork tracking to the block applicator and return error on the 4th fork block
  • Test fork bomb errors