Avoid HEAD memory cache infinite growth
In WS2PCluster.ts, the headsCache
member is subject to infinite growth currently, because it takes any pubkey's HEAD update. So if an attacker wanted to, it could propagate many fake HEADs that would be accepted by the nodes and inflate the headsCache
continuously.
We need a mechanism to limite the number of HEADs per member, and also limit it for non-members.