-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Description
The request/response module has a 1 MB limit on requests, and 10 MB limit on responses, both hard coded as fixed limits.
rust-libp2p/protocols/request-response/src/cbor.rs
Lines 58 to 61 in 40550dc
/// Max request size in bytes | |
const REQUEST_SIZE_MAXIMUM: u64 = 1024 * 1024; | |
/// Max response size in bytes | |
const RESPONSE_SIZE_MAXIMUM: u64 = 10 * 1024 * 1024; |
It would be preferable if this was configurable.
Is there a reason why these limits are set to these values, are there any obvious downsides to having much higher limits, or no limits at all?
Motivation
Messages which exceed these limits fail with a confusing Eof { name: "u8", expect: Small(1) }
error. Sending messages larger than these, such as files, etc would be useful.
Current Implementation
Limits messages to 1 MB for requests, and 10 MB for responses for both JSON and CBOR implementations.
Are you planning to do it yourself in a pull request?
Maybe
Metadata
Metadata
Assignees
Labels
No labels