litep2p
litep2p copied to clipboard
request-response: Provide more details into rejected requests for a high request failure
Substrate presents many rejected connections, especially for the sync
protocol.
The metrics are configured here in substrate.
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