Update RequestResponseConfig interface to match substrate (#5849)

* Update RequestResponseConfig interface

* minor: Bump CI

* update lockfile for {"substrate"}

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Dmitry Markinandparity-processbot authored and GitHub committed 2022-08-05 10:37:19 +00:00
1 parent 023c70badd
commit 43107b5391
2 files changed
+179 -171

No files matched your search

+173 -171
View File
File diff suppressed because it is too large. Load diff
@@ -132,6 +132,7 @@ impl Protocol {
let cfg = match self {
Protocol::ChunkFetchingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
max_response_size: POV_RESPONSE_SIZE as u64 * 3,
// We are connected to all validators:
@@ -140,6 +141,7 @@ impl Protocol {
},
Protocol::CollationFetchingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
max_response_size: POV_RESPONSE_SIZE,
// Taken from initial implementation in collator protocol:
@@ -148,6 +150,7 @@ impl Protocol {
},
Protocol::PoVFetchingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
max_response_size: POV_RESPONSE_SIZE,
request_timeout: POV_REQUEST_TIMEOUT_CONNECTED,
@@ -155,6 +158,7 @@ impl Protocol {
},
Protocol::AvailableDataFetchingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
// Available data size is dominated by the PoV size.
max_response_size: POV_RESPONSE_SIZE,
@@ -163,6 +167,7 @@ impl Protocol {
},
Protocol::StatementFetchingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
// Available data size is dominated code size.
max_response_size: STATEMENT_RESPONSE_SIZE,
@@ -180,6 +185,7 @@ impl Protocol {
},
Protocol::DisputeSendingV1 => RequestResponseConfig {
name: p_name,
fallback_names: Vec::new(),
max_request_size: 1_000,
/// Responses are just confirmation, in essence not even a bit. So 100 seems
/// plenty.