Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collator-protocol: remove elastic-scaling-experimental feature #4595

Merged
merged 10 commits into from
May 31, 2024
1 change: 0 additions & 1 deletion cumulus/polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,3 @@ try-runtime = [
"sp-runtime/try-runtime",
]
fast-runtime = ["bridge-hub-rococo-runtime/fast-runtime"]
elastic-scaling-experimental = ["polkadot-service/elastic-scaling-experimental"]
1 change: 0 additions & 1 deletion polkadot/node/network/collator-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" }

[features]
default = []
elastic-scaling-experimental = []
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ async fn send_collation(
let peer_id = request.peer_id();
let candidate_hash = receipt.hash();

#[cfg(feature = "elastic-scaling-experimental")]
let result = match parent_head_data {
ParentHeadData::WithData { head_data, .. } =>
Ok(request_v2::CollationFetchingResponse::CollationWithParentHeadData {
Expand All @@ -935,13 +934,6 @@ async fn send_collation(
ParentHeadData::OnlyHash(_) =>
Ok(request_v1::CollationFetchingResponse::Collation(receipt, pov)),
};
#[cfg(not(feature = "elastic-scaling-experimental"))]
let result = {
// suppress unused warning
let _parent_head_data = parent_head_data;

Ok(request_v1::CollationFetchingResponse::Collation(receipt, pov))
};

let response =
OutgoingResponse { result, reputation_changes: Vec::new(), sent_feedback: Some(tx) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ impl Default for TestState {
impl TestState {
/// Adds a few more scheduled cores to the state for the same para id
/// compared to the default.
#[cfg(feature = "elastic-scaling-experimental")]
pub fn with_elastic_scaling() -> Self {
let mut state = Self::default();
let para_id = state.para_id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ fn distribute_collation_up_to_limit() {
/// Tests that collator send the parent head data in
/// case the para is assigned to multiple cores (elastic scaling).
#[test]
#[cfg(feature = "elastic-scaling-experimental")]
fn send_parent_head_data_for_elastic_scaling() {
let test_state = TestState::with_elastic_scaling();

Expand Down
4 changes: 0 additions & 4 deletions polkadot/node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,3 @@ runtime-metrics = [
"rococo-runtime?/runtime-metrics",
"westend-runtime?/runtime-metrics",
]

elastic-scaling-experimental = [
"polkadot-collator-protocol?/elastic-scaling-experimental",
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ log = { workspace = true, default-features = true }
test-parachain-adder = { path = ".." }
polkadot-primitives = { path = "../../../../primitives" }
polkadot-cli = { path = "../../../../cli" }
polkadot-service = { path = "../../../../node/service", features = ["elastic-scaling-experimental", "rococo-native"] }
polkadot-service = { path = "../../../../node/service", features = ["rococo-native"] }
polkadot-node-primitives = { path = "../../../../node/primitives" }
polkadot-node-subsystem = { path = "../../../../node/subsystem" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ log = { workspace = true, default-features = true }
test-parachain-undying = { path = ".." }
polkadot-primitives = { path = "../../../../primitives" }
polkadot-cli = { path = "../../../../cli" }
polkadot-service = { path = "../../../../node/service", features = ["elastic-scaling-experimental", "rococo-native"] }
polkadot-service = { path = "../../../../node/service", features = ["rococo-native"] }
polkadot-node-primitives = { path = "../../../../node/primitives" }
polkadot-node-subsystem = { path = "../../../../node/subsystem" }

Expand Down
15 changes: 15 additions & 0 deletions prdoc/pr_4595.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: "Remove `elastic-scaling-experimental` feature flag"

doc:
- audience: Node Dev
description: |
The feature was masking the ability of collators to respond with `CollationWithParentHeadData`
to validator collation fetch requests. This is no longer needed as validators
have been upgraded to support the new response. `CollationWithParentHeadData` however
sandreim marked this conversation as resolved.
Show resolved Hide resolved
is only sent by collators of parachains with multiple cores assigned.

crates:
- name: polkadot-collator-protocol
bump: minor
- name: polkadot-service
bump: minor
bkchr marked this conversation as resolved.
Show resolved Hide resolved
Loading