Retire puppet workers (#1449)

Closes #583

After the separation of PVF worker binaries, dedicated puppet workers
are not needed for tests anymore. The production workers can be used
instead, avoiding some code duplication and decreasing complexity.

The changes also make it possible to further refactor the code to
isolate workers completely.
This commit is contained in:
s0me0ne-unkn0wn
2023-09-11 19:14:07 +02:00
committed by GitHub
parent 4b8bd9060e
commit 2c8021f998
20 changed files with 71 additions and 376 deletions
@@ -11,11 +11,6 @@ license.workspace = true
name = "adder-collator"
path = "src/main.rs"
[[bin]]
name = "adder_collator_puppet_worker"
path = "bin/puppet_worker.rs"
required-features = ["test-utils"]
[dependencies]
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
clap = { version = "4.4.2", features = ["derive"] }
@@ -33,25 +28,17 @@ polkadot-node-subsystem = { path = "../../../../node/subsystem" }
sc-cli = { path = "../../../../../substrate/client/cli" }
sp-core = { path = "../../../../../substrate/primitives/core" }
sc-service = { path = "../../../../../substrate/client/service" }
# This one is tricky. Even though it is not used directly by the collator, we still need it for the
# `puppet_worker` binary, which is required for the integration test. However, this shouldn't be
# a big problem since it is used transitively anyway.
polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true }
[dev-dependencies]
polkadot-parachain-primitives = { path = "../../.." }
polkadot-test-service = { path = "../../../../node/test/service" }
polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"] }
substrate-test-utils = { path = "../../../../../substrate/test-utils" }
sc-service = { path = "../../../../../substrate/client/service" }
sp-keyring = { path = "../../../../../substrate/primitives/keyring" }
# For the puppet worker, depend on ourselves with the test-utils feature.
test-parachain-adder-collator = { path = "", features = ["test-utils"] }
tokio = { version = "1.24.2", features = ["macros"] }
[features]
network-protocol-staging = [ "polkadot-cli/network-protocol-staging" ]
# This feature is used to export test code to other crates without putting it in the production build.
# This is also used by the `puppet_worker` binary.
test-utils = [ "polkadot-node-core-pvf/test-utils" ]