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
+23
View File
@@ -4884,6 +4884,27 @@ dependencies = [
"thiserror",
]
[[package]]
name = "polkadot-approval-distribution"
version = "0.1.0"
dependencies = [
"assert_matches",
"env_logger 0.8.2",
"futures 0.3.12",
"log",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-node-subsystem-test-helpers",
"polkadot-node-subsystem-util",
"polkadot-primitives",
"rand_core 0.5.1",
"schnorrkel",
"sp-core",
"tracing",
"tracing-futures",
]
[[package]]
name = "polkadot-availability-bitfield-distribution"
version = "0.1.0"
@@ -5289,6 +5310,7 @@ dependencies = [
"parity-scale-codec",
"polkadot-primitives",
"polkadot-statement-table",
"sp-consensus-slots",
"sp-consensus-vrf",
"sp-core",
"sp-runtime",
@@ -5683,6 +5705,7 @@ dependencies = [
"pallet-im-online",
"pallet-staking",
"pallet-transaction-payment-rpc-runtime-api",
"polkadot-approval-distribution",
"polkadot-availability-bitfield-distribution",
"polkadot-availability-distribution",
"polkadot-availability-recovery",