approval-distribution: batched approval/assignment sending (#6401)

* Imple batched send

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Add batch tests

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* pub MAX_NOTIFICATION_SIZE

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* spell check

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* spellcheck ...

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Fix comment

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* o.O

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* 2 constants

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Ensure batch size is at least 1 element

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* feedback impl

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
Andrei Sandu
2022-12-13 14:06:05 +02:00
committed by GitHub
parent da0b0224c5
commit 7f020eb527
3 changed files with 222 additions and 31 deletions
@@ -36,7 +36,7 @@ const LEGACY_COLLATION_PROTOCOL_V1: &str = "/polkadot/collation/1";
const LEGACY_PROTOCOL_VERSION_V1: u32 = 1;
/// Max notification size is currently constant.
const MAX_NOTIFICATION_SIZE: u64 = 100 * 1024;
pub const MAX_NOTIFICATION_SIZE: u64 = 100 * 1024;
/// The peer-sets and thus the protocols which are used for the network.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, EnumIter)]