archethic-node
archethic-node copied to clipboard
Control Slot in summary cache
Describe the problem you discovered
Actually if a beacon summary node receive a valid slot, it adds it into the summary cache ets table. But if a malicious node send multiple times a slot, the beacon summary node will add it again an again in the summary cache leading to a memory overflow and a crash.
Describe the solution you'd like
To avoid this error, when a beacon summary node receive a slot from a slot node, it can verify in the summary cache if there is already a slot of the same time from the same node. If so the node can aggregate the replication attestations from the new slot into the already existing slot.
The addition of the node information in the SummaryCache is done in PR: Set network coordinates from BeaconChain. We can base the work on this change.