impl approval distribution (#2160)

* initial impl approval distribution

* initial tests and fixes

* batching seems difficult: different peers have different needs

* bridge: fix test after merge

* some guide updates

* only send assignments to peers who know about the block

* fix a test, add approvals test

* simplify

* do not send assignment to peers for finalized blocks

* guide: protocol input and output

* one more test

* more comments, logs, initial metrics

* fix a typo

* one more thing: early return when reimporting a thing locally
This commit is contained in:
Andronik Ordian
2021-01-26 00:14:32 +01:00
committed by GitHub
parent fa6e4b4488
commit 3f1e1a6ff7
18 changed files with 2119 additions and 80 deletions
+2
View File
@@ -94,6 +94,7 @@ polkadot-node-core-provisioner = { path = "../core/provisioner", optional = true
polkadot-node-core-runtime-api = { path = "../core/runtime-api", optional = true }
polkadot-pov-distribution = { path = "../network/pov-distribution", optional = true }
polkadot-statement-distribution = { path = "../network/statement-distribution", optional = true }
polkadot-approval-distribution = { path = "../network/approval-distribution", optional = true }
[dev-dependencies]
polkadot-test-client = { path = "../test/client" }
@@ -130,4 +131,5 @@ real-overseer = [
"polkadot-node-core-runtime-api",
"polkadot-pov-distribution",
"polkadot-statement-distribution",
"polkadot-approval-distribution",
]
+4
View File
@@ -403,6 +403,7 @@ where
use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
use polkadot_statement_distribution::StatementDistribution as StatementDistributionSubsystem;
use polkadot_availability_recovery::AvailabilityRecoverySubsystem;
use polkadot_approval_distribution::ApprovalDistribution as ApprovalDistributionSubsystem;
let all_subsystems = AllSubsystems {
availability_distribution: AvailabilityDistributionSubsystem::new(
@@ -474,6 +475,9 @@ where
statement_distribution: StatementDistributionSubsystem::new(
Metrics::register(registry)?,
),
approval_distribution: ApprovalDistributionSubsystem::new(
Metrics::register(registry)?,
),
};
Overseer::new(