vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
242 stars 52 forks source link

Clear single-vote attestations when aggregate is full #1076

Closed arnetheduck closed 3 months ago

arnetheduck commented 3 months ago

We currently store both single-vote attestations and aggregates in the attestation pool - the former are used to "top up" the latter - ie when an incomplete aggregate arrives on the aggregate channel, we use singles to fill in any gaps.

Once an aggregate is "full", ie all attesters are represented, we could drop the singles because there can be no better aggregate constructed any more.

Given that attestations are stored for 2 epochs with signatures and all, they contribute significantly to memory usage - this is a simple way to reduce this footprint.

arnetheduck commented 3 months ago

Oops, wrong repo