Skip to content

Commit 04161b1

Browse files
Remove parameterized-consensus-hook feature (#4380)
Closes #4366
1 parent c7cb1f2 commit 04161b1

27 files changed

Lines changed: 43 additions & 46 deletions

File tree

bridges/snowbridge/runtime/test-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-feat
3232
xcm-executor = { package = "staging-xcm-executor", path = "../../../../polkadot/xcm/xcm-executor", default-features = false }
3333

3434
# Cumulus
35-
cumulus-pallet-parachain-system = { path = "../../../../cumulus/pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
35+
cumulus-pallet-parachain-system = { path = "../../../../cumulus/pallets/parachain-system", default-features = false }
3636
pallet-collator-selection = { path = "../../../../cumulus/pallets/collator-selection", default-features = false }
3737
parachain-info = { package = "staging-parachain-info", path = "../../../../cumulus/parachains/pallets/parachain-info", default-features = false }
3838
parachains-runtimes-test-utils = { path = "../../../../cumulus/parachains/runtimes/test-utils", default-features = false }

cumulus/pallets/parachain-system/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,3 @@ try-runtime = [
122122
"polkadot-runtime-parachains/try-runtime",
123123
"sp-runtime/try-runtime",
124124
]
125-
126-
parameterized-consensus-hook = []

cumulus/pallets/parachain-system/src/lib.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,6 @@ pub mod pallet {
245245
/// [`consensus_hook::ExpectParentIncluded`] here. This is only necessary in the case
246246
/// that collators aren't expected to have node versions that supply the included block
247247
/// in the relay-chain state proof.
248-
///
249-
/// This config type is only available when the `parameterized-consensus-hook` crate feature
250-
/// is activated.
251-
#[cfg(feature = "parameterized-consensus-hook")]
252248
type ConsensusHook: ConsensusHook;
253249
}
254250

@@ -556,10 +552,8 @@ pub mod pallet {
556552
.expect("Invalid relay chain state proof");
557553

558554
// Update the desired maximum capacity according to the consensus hook.
559-
#[cfg(feature = "parameterized-consensus-hook")]
560-
let (consensus_hook_weight, capacity) = T::ConsensusHook::on_state_proof(&relay_state_proof);
561-
#[cfg(not(feature = "parameterized-consensus-hook"))]
562-
let (consensus_hook_weight, capacity) = ExpectParentIncluded::on_state_proof(&relay_state_proof);
555+
let (consensus_hook_weight, capacity) =
556+
T::ConsensusHook::on_state_proof(&relay_state_proof);
563557
total_weight += consensus_hook_weight;
564558
total_weight += Self::maybe_drop_included_ancestors(&relay_state_proof, capacity);
565559
// Deposit a log indicating the relay-parent storage root.
@@ -1639,10 +1633,8 @@ impl<T: Config> polkadot_runtime_common::xcm_sender::EnsureForParachain for Pall
16391633
}
16401634

16411635
/// Something that can check the inherents of a block.
1642-
#[cfg_attr(
1643-
feature = "parameterized-consensus-hook",
1644-
deprecated = "consider switching to `cumulus-pallet-parachain-system::ConsensusHook`"
1645-
)]
1636+
#[deprecated(note = "This trait is deprecated and will be removed by September 2024. \
1637+
Consider switching to `cumulus-pallet-parachain-system::ConsensusHook`")]
16461638
pub trait CheckInherents<Block: BlockT> {
16471639
/// Check all inherents of the block.
16481640
///

cumulus/pallets/xcmp-queue/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pallet-balances = { path = "../../../substrate/frame/balances" }
4848
frame-support = { path = "../../../substrate/frame/support", features = ["experimental"] }
4949

5050
# Cumulus
51-
cumulus-pallet-parachain-system = { path = "../parachain-system", features = ["parameterized-consensus-hook"] }
51+
cumulus-pallet-parachain-system = { path = "../parachain-system" }
5252

5353
[features]
5454
default = ["std"]

cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ xcm-fee-payment-runtime-api = { path = "../../../../../polkadot/xcm/xcm-fee-paym
7272

7373
# Cumulus
7474
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
75-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
75+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
7676
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
7777
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
7878
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }

cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ xcm-fee-payment-runtime-api = { path = "../../../../../polkadot/xcm/xcm-fee-paym
7272
# Cumulus
7373
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
7474
pallet-message-queue = { path = "../../../../../substrate/frame/message-queue", default-features = false }
75-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
75+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
7676
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
7777
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
7878
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }

cumulus/parachains/runtimes/assets/test-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sp-runtime = { path = "../../../../../substrate/primitives/runtime", default-fea
2424
sp-std = { path = "../../../../../substrate/primitives/std", default-features = false }
2525

2626
# Cumulus
27-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
27+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
2828
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false }
2929
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
3030
parachains-common = { path = "../../../common", default-features = false }

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkad
6969

7070
# Cumulus
7171
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
72-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = [
73-
"parameterized-consensus-hook",
74-
] }
72+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
7573
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
7674
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
7775
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = [

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkad
6565

6666
# Cumulus
6767
cumulus-pallet-aura-ext = { path = "../../../../pallets/aura-ext", default-features = false }
68-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
68+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
6969
cumulus-pallet-session-benchmarking = { path = "../../../../pallets/session-benchmarking", default-features = false }
7070
cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = false }
7171
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false, features = ["bridging"] }

cumulus/parachains/runtimes/bridge-hubs/test-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pallet-timestamp = { path = "../../../../../substrate/frame/timestamp", default-
2929

3030
# Cumulus
3131
asset-test-utils = { path = "../../assets/test-utils" }
32-
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false, features = ["parameterized-consensus-hook"] }
32+
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
3333
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false }
3434
parachains-common = { path = "../../../common", default-features = false }
3535
parachains-runtimes-test-utils = { path = "../../test-utils", default-features = false }

0 commit comments

Comments
 (0)