ethereum/ethereumj

Attestation pool refactor

mkalinin opened this issue · 0 comments

Abstract

Attestation pool is a memory pool that tracks attestations came from the wire and not yet included into known blocks. It's obviously important to track those attestations for proposers. But it either important part of DoS attack vectors that are based on attestations.

Implementation

Here is a basic implementation of AttestationPool.

Improvements

  • Atomic pool updates within imported block
  • Track list of known attestations to quickly reject duplicates, reject attestations by slot number
  • Add a queue to process attestations that came from the wire, it will reduce lock duration
  • Reorgs should be handled in a proper way with reverting back attestations aggregated in blocks that are reverted
  • Limiting and ordering of attestations in the pool
  • Attestations validation, as many validations as possible to prevent bad attestations from being propagated to the net