ethstorage/es-node

Use dynamically adjusted request size to fetch blobs data from peers through p2p instread of using the static p2p.max.request.size value

Closed this issue · 0 comments

Why should this feature exist?

Currently, we use p2p.max.request.size to control the size of blobs fetched from peers. However, different peers are distributed in different regions, so the request sizes between the local node and peers should be different. So we should use different request sizes to fetch blobs from different peers.

How does it work?

When the local node is connected to a new peer, it still uses the p2p.max.request.size to control the size fetch blobs, if the request fails 5 times with the following error (means request timeout between the local node and the new peer), reduce the request size to half of the previous value.
t=2024-03-09T02:03:32+0000 lvl=warn msg="Failed to request blobs" peer=16Uiu2HAmCsJgtzAZLtJPPmaSz46sasCDy7Y3xByb8NUZ1anDraCU err="i/o deadline reached"