litep2p icon indicating copy to clipboard operation
litep2p copied to clipboard

request-response: Provide more details into rejected requests for a high request failure

Open lexnv opened this issue 6 months ago • 0 comments

Substrate presents many rejected connections, especially for the sync protocol. The metrics are configured here in substrate.

Screenshot 2024-07-30 at 15 17 25

Running libp2p side by side with litep2p, we can observe from the previous figure a very high number of requests that are marked as "rejected".

Provide more details into rejected requests by enriching the RequestResponseError::Rejected with specific details:

  • is the failure due to opening a substream?
  • is the connection closed and we reject all active requests?
  • is this a dial failure and we reported back immediately? etc

Detected while testing and debugging:

  • https://github.com/paritytech/polkadot-sdk/pull/5029

lexnv avatar Jul 30 '24 12:07 lexnv