Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit b651e4a

Browse files
authored
Implement PoV Distribution Subsystem (#1344)
* introduce candidatedescriptor type * add PoVDistribution message type * loosen bound on PoV Distribution to account for equivocations * re-export some types from the messages module * begin PoV Distribution subsystem * remove redundant index from PoV distribution * define state machine for pov distribution * handle overseer signals * set up control flow * remove `ValidatorStatement` section * implement PoV fetching * implement distribution logic * add missing ` * implement some network bridge event handlers * stub for message processing, handle our view change * control flow for handling messages * handle `awaiting` message * handle any incoming PoVs and redistribute * actually provide a subsystem implementation * remove set-builder notation * begin testing PoV distribution * test that we send awaiting messages only to peers with same view * ensure we distribute awaited PoVs to peers on view changes * test that peers can complete fetch and are rewarded * test some reporting logic * ensure peer is reported for flooding * test punishing peers diverging from awaited protocol * test that we eagerly complete peers' awaited PoVs based on what we receive * test that we prune the awaited set after receiving * expand pov-distribution in guide to match a change I made * remove unneeded import
1 parent edd8f3b commit b651e4a

File tree

9 files changed

+1565
-16
lines changed

9 files changed

+1565
-16
lines changed

Cargo.lock

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ members = [
4545

4646
"node/core/proposer",
4747
"node/network/bridge",
48+
"node/network/pov-distribution",
4849
"node/network/statement-distribution",
4950
"node/overseer",
5051
"node/primitives",

node/network/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Stub - This folder will hold networking subsystem implementations, each with their own crate.
1+
This folder holds all networking subsystem implementations, each with their own crate.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
name = "polkadot-pov-distribution"
3+
version = "0.1.0"
4+
authors = ["Parity Technologies <[email protected]>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
futures = "0.3.5"
9+
log = "0.4.8"
10+
futures-timer = "3.0.2"
11+
streamunordered = "0.5.1"
12+
polkadot-primitives = { path = "../../../primitives" }
13+
node-primitives = { package = "polkadot-node-primitives", path = "../../primitives" }
14+
parity-scale-codec = "1.3.0"
15+
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
16+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
17+
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
18+
19+
[dev-dependencies]
20+
parking_lot = "0.10.0"
21+
subsystem-test = { package = "polkadot-subsystem-test-helpers", path = "../../test-helpers/subsystem" }
22+
assert_matches = "1.3.0"

0 commit comments

Comments
 (0)