The goal of this issue is to make sure that the _newPeers and _triedPeers (address book) does not grow to unlimited size. This should be done according to the LIP.
We still need to consider the size of each PeerInfo within the lists.
This issue also involves making sure that peers are moved between the two lists according to the LIP.
Description
This is related to https://github.com/LiskHQ/lisk-elements/issues/1072 - The _newPeers and _triedPeers maps (which store P2PDiscoveredPeerInfo) need to have a size limit to prevent DoS. The LIP has a mechanism which limits the size of the _newPeers and _triedPeers maps so it should be implemented.
Actual behavior
_newPeers and _triedPeers are not currently managed according to the LIP.
This issue is there to address any remaining details which may be left over in order to fully comply with the LIP regarding the management of the the address book (_newPeers and _triedPeers).
Expected behavior
Scope
The goal of this issue is to make sure that the _newPeers and _triedPeers (address book) does not grow to unlimited size. This should be done according to the LIP.
Description
This is related to https://github.com/LiskHQ/lisk-elements/issues/1072 - The
_newPeers
and_triedPeers
maps (which storeP2PDiscoveredPeerInfo
) need to have a size limit to prevent DoS. The LIP has a mechanism which limits the size of the_newPeers
and_triedPeers
maps so it should be implemented.Actual behavior
_newPeers
and_triedPeers
are not currently managed according to the LIP.