reth icon indicating copy to clipboard operation
reth copied to clipboard

Unblock `NetworkState`

Open emhane opened this issue 1 year ago • 0 comments

Describe the feature

Branching from changes that were requested too late https://github.com/paradigmxyz/reth/pull/6640#pullrequestreview-1886660131.

As mentioned in the link PR, Swarm can still block and starve other threads. So, one iteration in NetworkManager might take a second, or it might take some microseconds.

Even if we made the budget in network manager a Duration instead of an i32, we would still not return from swarm if it blocks. So, let's aim at unblocking swarm, most pressingly the nested stream NetworkState.

https://github.com/paradigmxyz/reth/blob/29701f6486717514673e61b2b9b49418de7c4187/crates/net/network/src/state.rs#L398-L471

Additional context

No response

emhane avatar Feb 17 '24 17:02 emhane