Skip to content

Commit 46b4f0f

Browse files
sandreimbkchr
authored andcommitted
collator-protocol: remove elastic-scaling-experimental feature (paritytech#4595)
Validators already have been upgraded so they could already receive the new `CollationWithParentHeadData` response when fetching collation. However this is only sent by collators when the parachain has more than 1 core is assigned. TODO: - [x] PRDoc --------- Signed-off-by: Andrei Sandu <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
1 parent fee640a commit 46b4f0f

9 files changed

Lines changed: 27 additions & 18 deletions

File tree

cumulus/polkadot-parachain/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,3 @@ try-runtime = [
172172
"sp-runtime/try-runtime",
173173
]
174174
fast-runtime = ["bridge-hub-rococo-runtime/fast-runtime"]
175-
elastic-scaling-experimental = ["polkadot-service/elastic-scaling-experimental"]

polkadot/node/network/collator-protocol/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" }
4545

4646
[features]
4747
default = []
48-
elastic-scaling-experimental = []

polkadot/node/network/collator-protocol/src/collator_side/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,6 @@ async fn send_collation(
924924
let peer_id = request.peer_id();
925925
let candidate_hash = receipt.hash();
926926

927-
#[cfg(feature = "elastic-scaling-experimental")]
928927
let result = match parent_head_data {
929928
ParentHeadData::WithData { head_data, .. } =>
930929
Ok(request_v2::CollationFetchingResponse::CollationWithParentHeadData {
@@ -935,13 +934,6 @@ async fn send_collation(
935934
ParentHeadData::OnlyHash(_) =>
936935
Ok(request_v1::CollationFetchingResponse::Collation(receipt, pov)),
937936
};
938-
#[cfg(not(feature = "elastic-scaling-experimental"))]
939-
let result = {
940-
// suppress unused warning
941-
let _parent_head_data = parent_head_data;
942-
943-
Ok(request_v1::CollationFetchingResponse::Collation(receipt, pov))
944-
};
945937

946938
let response =
947939
OutgoingResponse { result, reputation_changes: Vec::new(), sent_feedback: Some(tx) };

polkadot/node/network/collator-protocol/src/collator_side/tests/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ impl Default for TestState {
144144
impl TestState {
145145
/// Adds a few more scheduled cores to the state for the same para id
146146
/// compared to the default.
147-
#[cfg(feature = "elastic-scaling-experimental")]
148147
pub fn with_elastic_scaling() -> Self {
149148
let mut state = Self::default();
150149
let para_id = state.para_id;

polkadot/node/network/collator-protocol/src/collator_side/tests/prospective_parachains.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,6 @@ fn distribute_collation_up_to_limit() {
443443
/// Tests that collator send the parent head data in
444444
/// case the para is assigned to multiple cores (elastic scaling).
445445
#[test]
446-
#[cfg(feature = "elastic-scaling-experimental")]
447446
fn send_parent_head_data_for_elastic_scaling() {
448447
let test_state = TestState::with_elastic_scaling();
449448

polkadot/node/service/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,3 @@ runtime-metrics = [
238238
"rococo-runtime?/runtime-metrics",
239239
"westend-runtime?/runtime-metrics",
240240
]
241-
242-
elastic-scaling-experimental = [
243-
"polkadot-collator-protocol?/elastic-scaling-experimental",
244-
]

polkadot/parachain/test-parachains/adder/collator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ log = { workspace = true, default-features = true }
2424
test-parachain-adder = { path = ".." }
2525
polkadot-primitives = { path = "../../../../primitives" }
2626
polkadot-cli = { path = "../../../../cli" }
27-
polkadot-service = { path = "../../../../node/service", features = ["elastic-scaling-experimental", "rococo-native"] }
27+
polkadot-service = { path = "../../../../node/service", features = ["rococo-native"] }
2828
polkadot-node-primitives = { path = "../../../../node/primitives" }
2929
polkadot-node-subsystem = { path = "../../../../node/subsystem" }
3030

polkadot/parachain/test-parachains/undying/collator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ log = { workspace = true, default-features = true }
2424
test-parachain-undying = { path = ".." }
2525
polkadot-primitives = { path = "../../../../primitives" }
2626
polkadot-cli = { path = "../../../../cli" }
27-
polkadot-service = { path = "../../../../node/service", features = ["elastic-scaling-experimental", "rococo-native"] }
27+
polkadot-service = { path = "../../../../node/service", features = ["rococo-native"] }
2828
polkadot-node-primitives = { path = "../../../../node/primitives" }
2929
polkadot-node-subsystem = { path = "../../../../node/subsystem" }
3030

prdoc/pr_4595.prdoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
title: "Remove `elastic-scaling-experimental` feature flag"
2+
3+
doc:
4+
- audience: Node Dev
5+
description: |
6+
The feature was masking the ability of collators to respond with `CollationWithParentHeadData`
7+
to validator collation fetch requests, a requirement for elastic scaling.
8+
Please note that `CollationWithParentHeadData` is only sent by collators of parachains with
9+
multiple cores assigned, otherwise collators must respond with `CollationFetchingResponse::Collation`
10+
- audience: Node Operator
11+
description: |
12+
This change enables elastic scaling support in collators. Please upgrade to latest version,
13+
otherwise validator nodes will not be able to back elastic parachain blocks leading to
14+
missed rewards.
15+
16+
crates:
17+
- name: polkadot-collator-protocol
18+
bump: major
19+
validate: false
20+
- name: polkadot-service
21+
bump: major
22+
validate: false
23+
- name: polkadot-parachain-bin
24+
bump: minor
25+
validate: false

0 commit comments

Comments
 (0)