lambdaclass / lambda_ethereum_consensus

Elixir implementation of an Ethereum consensus client, which offers high reliance & fault tolerance
Apache License 2.0
100 stars 33 forks source link

Block & Blob Downloaders need manage the empty peerbook async #1317

Open rodrigo-o opened 3 weeks ago

rodrigo-o commented 3 weeks ago

Right now we have tech debt in how both block and blob downloaders manage the empty peerbook case.

Before #1314, the node hanged if no we run out peers due to #1308. After #1314 this raise, before it continually sleep making impossible for LibP2P to handle new peers. This needs to instead being delayed asynchronously to allow new peers to be part of the peerbook.

After #1314, this issue is less common due to a better penalization scheme and more time in the begining for peer discovery, but still possible if all initial peers aren't responding, luckily this isn't the case most of the times and it is an issue mostly at the start of the node where we have a small number of peers.

If this proves to be more common than anticipated it need to move from P2 to P1.

rodrigo-o commented 3 weeks ago

This issue is related to #233