From a0f45eba1ee7ae358bec9eec5ef8877176296b18 Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Mon, 27 May 2024 13:20:37 +0300 Subject: [PATCH 1/7] remove feature Signed-off-by: Andrei Sandu --- cumulus/polkadot-parachain/Cargo.toml | 1 - polkadot/node/network/collator-protocol/Cargo.toml | 1 - .../network/collator-protocol/src/collator_side/mod.rs | 8 -------- .../collator-protocol/src/collator_side/tests/mod.rs | 1 - .../src/collator_side/tests/prospective_parachains.rs | 1 - polkadot/node/service/Cargo.toml | 4 ---- .../parachain/test-parachains/adder/collator/Cargo.toml | 2 +- .../parachain/test-parachains/undying/collator/Cargo.toml | 2 +- 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/cumulus/polkadot-parachain/Cargo.toml b/cumulus/polkadot-parachain/Cargo.toml index a22606edb6c5c..def7d95fd5663 100644 --- a/cumulus/polkadot-parachain/Cargo.toml +++ b/cumulus/polkadot-parachain/Cargo.toml @@ -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"] diff --git a/polkadot/node/network/collator-protocol/Cargo.toml b/polkadot/node/network/collator-protocol/Cargo.toml index c02999a59b5a9..d7291552738db 100644 --- a/polkadot/node/network/collator-protocol/Cargo.toml +++ b/polkadot/node/network/collator-protocol/Cargo.toml @@ -45,4 +45,3 @@ polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" } [features] default = [] -elastic-scaling-experimental = [] diff --git a/polkadot/node/network/collator-protocol/src/collator_side/mod.rs b/polkadot/node/network/collator-protocol/src/collator_side/mod.rs index 88375d5830904..80a85420b392b 100644 --- a/polkadot/node/network/collator-protocol/src/collator_side/mod.rs +++ b/polkadot/node/network/collator-protocol/src/collator_side/mod.rs @@ -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 { @@ -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) }; diff --git a/polkadot/node/network/collator-protocol/src/collator_side/tests/mod.rs b/polkadot/node/network/collator-protocol/src/collator_side/tests/mod.rs index 689e03ce4737b..412792bbecfba 100644 --- a/polkadot/node/network/collator-protocol/src/collator_side/tests/mod.rs +++ b/polkadot/node/network/collator-protocol/src/collator_side/tests/mod.rs @@ -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; diff --git a/polkadot/node/network/collator-protocol/src/collator_side/tests/prospective_parachains.rs b/polkadot/node/network/collator-protocol/src/collator_side/tests/prospective_parachains.rs index 2a147aef69e2f..0a0a85fb1f275 100644 --- a/polkadot/node/network/collator-protocol/src/collator_side/tests/prospective_parachains.rs +++ b/polkadot/node/network/collator-protocol/src/collator_side/tests/prospective_parachains.rs @@ -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(); diff --git a/polkadot/node/service/Cargo.toml b/polkadot/node/service/Cargo.toml index 37836f134bda6..0dfdf926b1b09 100644 --- a/polkadot/node/service/Cargo.toml +++ b/polkadot/node/service/Cargo.toml @@ -238,7 +238,3 @@ runtime-metrics = [ "rococo-runtime?/runtime-metrics", "westend-runtime?/runtime-metrics", ] - -elastic-scaling-experimental = [ - "polkadot-collator-protocol?/elastic-scaling-experimental", -] diff --git a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml index dbc8507d599bb..f9aaab74debd8 100644 --- a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml @@ -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" } diff --git a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml index 28efdbbf242f7..08d1e74d87983 100644 --- a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml @@ -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" } From e64143dd5ba42b79d2faa489fabd4ca13fa5dd25 Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Mon, 27 May 2024 13:43:40 +0300 Subject: [PATCH 2/7] PRDoc Signed-off-by: Andrei Sandu --- prdoc/pr_4595.prdoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 prdoc/pr_4595.prdoc diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc new file mode 100644 index 0000000000000..efe39a255e345 --- /dev/null +++ b/prdoc/pr_4595.prdoc @@ -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 + is only sent by collators of parachains with multiple cores assigned. + +crates: + - name: polkadot-collator-protocol + bump: minor + - name: polkadot-service + bump: minor \ No newline at end of file From 8b9a80f7241e70ff3135a88735e2076a910f1154 Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Wed, 29 May 2024 10:59:15 +0300 Subject: [PATCH 3/7] feedback Signed-off-by: Andrei Sandu --- prdoc/pr_4595.prdoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc index efe39a255e345..079fa4616afa9 100644 --- a/prdoc/pr_4595.prdoc +++ b/prdoc/pr_4595.prdoc @@ -4,9 +4,14 @@ 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 - is only sent by collators of parachains with multiple cores assigned. + to validator collation fetch requests, a requirement for elastic scaling. + Please note that `CollationWithParentHeadData` is only sent by collators of parachains with + multiple cores assigned, otherwise collators must respond with `CollationFetchingResponse::Collation` + - audience: Node Operator + description: | + This changes enables elastic scaling support in collators. Please upgrade to latest version, + otherwise validator nodes will not be able to back elastic parachain blocks leading to + missed rewards. crates: - name: polkadot-collator-protocol From 26ec6f8f5d2755c44fcc84fff34b49dae343b592 Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Wed, 29 May 2024 11:00:09 +0300 Subject: [PATCH 4/7] typo Signed-off-by: Andrei Sandu --- prdoc/pr_4595.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc index 079fa4616afa9..62dc63717ee15 100644 --- a/prdoc/pr_4595.prdoc +++ b/prdoc/pr_4595.prdoc @@ -9,7 +9,7 @@ doc: multiple cores assigned, otherwise collators must respond with `CollationFetchingResponse::Collation` - audience: Node Operator description: | - This changes enables elastic scaling support in collators. Please upgrade to latest version, + This change enables elastic scaling support in collators. Please upgrade to latest version, otherwise validator nodes will not be able to back elastic parachain blocks leading to missed rewards. From 4d0db5762548d322444b5246d4a1fdbdfe8cc47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 29 May 2024 12:08:17 +0200 Subject: [PATCH 5/7] Update prdoc/pr_4595.prdoc --- prdoc/pr_4595.prdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc index 62dc63717ee15..6787207b7d756 100644 --- a/prdoc/pr_4595.prdoc +++ b/prdoc/pr_4595.prdoc @@ -16,5 +16,7 @@ doc: crates: - name: polkadot-collator-protocol bump: minor + validate: false - name: polkadot-service - bump: minor \ No newline at end of file + bump: minor + validate: false \ No newline at end of file From 95aec4169e1a19cb8426b09753bb9b8d05b337e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 29 May 2024 13:36:23 +0200 Subject: [PATCH 6/7] Apply suggestions from code review --- prdoc/pr_4595.prdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc index 6787207b7d756..3cf33163ccb9b 100644 --- a/prdoc/pr_4595.prdoc +++ b/prdoc/pr_4595.prdoc @@ -15,8 +15,8 @@ doc: crates: - name: polkadot-collator-protocol - bump: minor + bump: major validate: false - name: polkadot-service - bump: minor + bump: major validate: false \ No newline at end of file From 36e1395bf01d70dec54fa1fd08baac5943687f3f Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Thu, 30 May 2024 13:03:04 +0300 Subject: [PATCH 7/7] add polkadot-parachain-bin in prdoc Signed-off-by: Andrei Sandu --- prdoc/pr_4595.prdoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/prdoc/pr_4595.prdoc b/prdoc/pr_4595.prdoc index 3cf33163ccb9b..8baa6e8a91f3c 100644 --- a/prdoc/pr_4595.prdoc +++ b/prdoc/pr_4595.prdoc @@ -19,4 +19,7 @@ crates: validate: false - name: polkadot-service bump: major - validate: false \ No newline at end of file + validate: false + - name: polkadot-parachain-bin + bump: minor + validate: false