Skip to content

Commit

Permalink
Introduce approval-voting-parallel
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh committed Jul 12, 2024
1 parent d13e1c8 commit cd2d303
Show file tree
Hide file tree
Showing 37 changed files with 1,365 additions and 121 deletions.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ members = [
"polkadot/erasure-coding/fuzzer",
"polkadot/node/collation-generation",
"polkadot/node/core/approval-voting",
"polkadot/node/core/approval-voting-parallel",
"polkadot/node/core/av-store",
"polkadot/node/core/backing",
"polkadot/node/core/bitfield-signing",
Expand Down Expand Up @@ -1009,6 +1010,7 @@ polkadot-gossip-support = { path = "polkadot/node/network/gossip-support", defau
polkadot-network-bridge = { path = "polkadot/node/network/bridge", default-features = false }
polkadot-node-collation-generation = { path = "polkadot/node/collation-generation", default-features = false }
polkadot-node-core-approval-voting = { path = "polkadot/node/core/approval-voting", default-features = false }
polkadot-node-core-approval-voting-parallel = { path = "polkadot/node/core/approval-voting-parallel", default-features = false }
polkadot-node-core-av-store = { path = "polkadot/node/core/av-store", default-features = false }
polkadot-node-core-backing = { path = "polkadot/node/core/backing", default-features = false }
polkadot-node-core-bitfield-signing = { path = "polkadot/node/core/bitfield-signing", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions cumulus/client/relay-chain-inprocess-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ fn build_polkadot_full_node(
execute_workers_max_num: None,
prepare_workers_hard_max_num: None,
prepare_workers_soft_max_num: None,
enable_approval_voting_parallel: false,
},
)?;

Expand Down
6 changes: 6 additions & 0 deletions polkadot/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ pub struct RunCmd {
/// TESTING ONLY: disable the version check between nodes and workers.
#[arg(long, hide = true)]
pub disable_worker_version_check: bool,

/// Enable approval-voting message processing in parallel.
///
///**Dangerous!** This is an experimental feature and should not be used in production.
#[arg(long)]
pub enable_approval_voting_parallel: bool,
}

#[allow(missing_docs)]
Expand Down
1 change: 1 addition & 0 deletions polkadot/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ where
execute_workers_max_num: cli.run.execute_workers_max_num,
prepare_workers_hard_max_num: cli.run.prepare_workers_hard_max_num,
prepare_workers_soft_max_num: cli.run.prepare_workers_soft_max_num,
enable_approval_voting_parallel: cli.run.enable_approval_voting_parallel,
},
)
.map(|full| full.task_manager)?;
Expand Down
67 changes: 67 additions & 0 deletions polkadot/node/core/approval-voting-parallel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[package]
name = "polkadot-node-core-approval-voting-parallel"
version = "7.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Approval Voting Subsystem running approval work in parallel"

[lints]
workspace = true

[dependencies]
futures = "0.3.30"
futures-timer = "3.0.2"
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = ["bit-vec", "derive"] }
gum = { package = "tracing-gum", path = "../../gum" }
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
schnellru = "0.2.1"
merlin = "3.0"
schnorrkel = "0.11.4"
kvdb = "0.13.0"
derive_more = "0.99.17"
thiserror = { workspace = true }
itertools = "0.11"
async-trait = { workspace = true }

polkadot-node-core-approval-voting = { workspace = true, default-features = true }
polkadot-approval-distribution = { workspace = true, default-features = true }


polkadot-node-subsystem = { workspace = true, default-features = true }
polkadot-node-subsystem-util = { workspace = true, default-features = true }
polkadot-overseer = { workspace = true, default-features = true }
polkadot-primitives = { workspace = true, default-features = true }
polkadot-node-primitives = { workspace = true, default-features = true }
polkadot-node-jaeger = { workspace = true, default-features = true }

sc-keystore = { workspace = true, default-features = false }
sp-consensus = { workspace = true, default-features = false }
sp-consensus-slots = { workspace = true, default-features = false }
sp-application-crypto = { workspace = true, default-features = false, features = ["full_crypto"] }
sp-runtime = { workspace = true, default-features = false }
polkadot-node-network-protocol = { workspace = true, default-features = true }
polkadot-node-metrics = { workspace = true, default-features = true}

rand = "0.8.5"

# rand_core should match schnorrkel
rand_core = "0.6.2"
rand_chacha = { version = "0.3.1" }

[dev-dependencies]
async-trait = "0.1.79"
parking_lot = "0.12.1"
sp-keyring = { workspace = true, default-features = true }
sp-keystore = {workspace = true, default-features = true}
sp-core = { workspace = true, default-features = true}
sp-consensus-babe = { workspace = true, default-features = true }
polkadot-node-subsystem-test-helpers = { workspace = true, default-features = true}
assert_matches = "1.4.0"
kvdb-memorydb = "0.13.0"
polkadot-primitives-test-helpers = { workspace = true, default-features = true }
log = { workspace = true, default-features = true }
env_logger = "0.11"

polkadot-subsystem-bench = { workspace = true, default-features = true}

Loading

0 comments on commit cd2d303

Please sign in to comment.