Skip to content

Commit 5ef97a7

Browse files
committed
Remove rococo/polkadot feature gate
1 parent 886c901 commit 5ef97a7

File tree

9 files changed

+33
-264
lines changed

9 files changed

+33
-264
lines changed

.github/workflows/check.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,9 @@ jobs:
7070
cache-on-failure: true
7171
cache-all-crates: true
7272

73-
- name: Cargo check (Rococo) (benchmarking)
73+
- name: Cargo check benchmarking
7474
run: |
75-
cargo check --workspace --features=rococo,runtime-benchmarks
76-
77-
- name: Cargo check (Polkadot) (benchmarking)
78-
run: |
79-
cargo check --workspace --features=polkadot,runtime-benchmarks
75+
cargo check --workspace --features=runtime-benchmarks
8076
8177
test:
8278
name: Test
@@ -103,10 +99,10 @@ jobs:
10399
104100
- name: Run (Rococo) runtime tests
105101
run: |
106-
cargo test -p polkadot-bulletin-chain-runtime --features=rococo
107-
cargo test -p polkadot-bulletin-chain-runtime --features=rococo,runtime-benchmarks
102+
cargo test -p polkadot-bulletin-chain-runtime
103+
cargo test -p polkadot-bulletin-chain-runtime --features=runtime-benchmarks
108104
109105
- name: Run (Polkadot) runtime tests
110106
run: |
111-
cargo test -p polkadot-bulletin-chain-runtime --features=polkadot
112-
cargo test -p polkadot-bulletin-chain-runtime --features=polkadot,runtime-benchmarks
107+
cargo test -p bulletin-polkadot-runtime
108+
cargo test -p bulletin-polkadot-runtime --features=runtime-benchmarks

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ tracing = { version = "0.1.41", default-features = false }
2121
try-runtime-cli = { version = "0.42" }
2222

2323
# Local workspace members
24+
bulletin-polkadot-runtime = { version = "1.0.0", path = "runtimes/bulletin-polkadot" }
2425
pallet-relayer-set = { version = "1.0.0", path = "pallets/relayer-set", default-features = false }
2526
pallet-transaction-storage = { version = "4.0.0-dev", path = "pallets/transaction-storage", default-features = false }
2627
pallet-validator-set = { version = "1.0.0", path = "pallets/validator-set", default-features = false }
2728
pallets-common = { version = "0.1.0", path = "pallets/common", default-features = false }
2829
polkadot-bulletin-chain-runtime = { version = "0.1.0-dev", path = "runtime" }
29-
bulletin-polkadot-runtime = { version = "1.0.0", path = "runtimes/bulletin-polkadot" }
3030

3131
# Polkadot SDK crates (shared git revision)
3232
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "db5e645422ccf952018a3c466a33fef477858602", default-features = false }

node/Cargo.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ frame-benchmarking = { workspace = true }
5858
frame-benchmarking-cli = { workspace = true }
5959

6060
# Local Dependencies
61+
# Rococo testnet
6162
polkadot-bulletin-chain-runtime = { workspace = true }
63+
# Polkadot production
64+
bulletin-polkadot-runtime = { workspace = true }
6265

6366
# CLI-specific dependencies
6467
try-runtime-cli = { optional = true, workspace = true }
@@ -67,12 +70,9 @@ try-runtime-cli = { optional = true, workspace = true }
6770
substrate-build-script-utils = { workspace = true }
6871

6972
[features]
70-
default = [
71-
# TODO: temporary let's activate rococo by default
72-
"rococo",
73-
]
7473
# Dependencies that are only required if runtime benchmarking should be built.
7574
runtime-benchmarks = [
75+
"bulletin-polkadot-runtime/runtime-benchmarks",
7676
"frame-benchmarking-cli/runtime-benchmarks",
7777
"frame-benchmarking/runtime-benchmarks",
7878
"frame-system/runtime-benchmarks",
@@ -83,12 +83,9 @@ runtime-benchmarks = [
8383
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
8484
# in the near future.
8585
try-runtime = [
86+
"bulletin-polkadot-runtime/try-runtime",
8687
"frame-system/try-runtime",
8788
"polkadot-bulletin-chain-runtime/try-runtime",
8889
"sp-runtime/try-runtime",
8990
"try-runtime-cli/try-runtime",
9091
]
91-
# To bridge with Rococo Bridge Hub
92-
rococo = ["polkadot-bulletin-chain-runtime/rococo"]
93-
# To bridge with PeoplePolkadot
94-
polkadot = ["polkadot-bulletin-chain-runtime/polkadot"]

runtime/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "polkadot-bulletin-chain-runtime"
33
version = "0.1.0-dev"
4-
description = "Runtime for the Polkadot Bulletin Chain"
4+
description = "Runtime for the Rococo Bulletin Chain"
55
authors = ["Parity Technologies <[email protected]>"]
66
edition.workspace = true
77
license = "MIT-0"
@@ -12,7 +12,6 @@ repository.workspace = true
1212
targets = ["x86_64-unknown-linux-gnu"]
1313

1414
[dependencies]
15-
cfg-if = { workspace = true }
1615
codec = { workspace = true, features = ["derive"] }
1716
log = { workspace = true }
1817
scale-info = { features = ["derive"], workspace = true }
@@ -243,5 +242,3 @@ try-runtime = [
243242
"parachains-common?/try-runtime",
244243
"sp-runtime/try-runtime",
245244
]
246-
rococo = []
247-
polkadot = []

runtime/src/bridge_config.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(feature = "rococo")]
2-
31
//! With Rococo Bridge Hub bridge configuration.
42
53
use crate::{
@@ -486,9 +484,9 @@ pub type ToBridgeHaulBlobExporter = HaulBlobExporter<
486484
// bp_test_utils::test_header_with_root(POLKADOT_HEADER_NUMBER, state_root)
487485
// }
488486
//
489-
// fn polkadot_grandpa_justification(t: HeaderType) -> GrandpaJustification<bp_polkadot_core::Header> {
490-
// bp_test_utils::make_default_justification(&polkadot_header(t))
491-
// }
487+
// fn polkadot_grandpa_justification(t: HeaderType) ->
488+
// GrandpaJustification<bp_polkadot_core::Header> { bp_test_utils::make_default_justification(&
489+
// polkadot_header(t)) }
492490
//
493491
// fn bridge_hub_polkadot_header(t: HeaderType) -> bp_bridge_hub_polkadot::Header {
494492
// bp_test_utils::test_header_with_root(

runtime/src/genesis_config_presets.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ use crate::{
33
SessionConfig, Signature, SudoConfig, ValidatorSetConfig, BABE_GENESIS_EPOCH_CONFIG,
44
};
55

6-
#[cfg(feature = "polkadot")]
7-
use crate::{
8-
bridge_config::XCM_LANE, BridgePolkadotGrandpaConfig, BridgePolkadotMessagesConfig,
9-
BridgePolkadotParachainsConfig,
10-
};
11-
#[cfg(feature = "rococo")]
126
use crate::{
137
bridge_config::XCM_LANE, BridgeRococoGrandpaConfig, BridgeRococoMessagesConfig,
148
BridgeRococoParachainsConfig,
@@ -85,38 +79,19 @@ fn testnet_genesis(
8579
// would want to use separate keys for the relayers.
8680
initial_relayers: initial_authorities.into_iter().map(|x| x.0).collect::<Vec<_>>(),
8781
},
88-
#[cfg(feature = "rococo")]
8982
bridge_rococo_grandpa: BridgeRococoGrandpaConfig {
9083
owner: bridges_pallet_owner.clone(),
9184
..Default::default()
9285
},
93-
#[cfg(feature = "rococo")]
9486
bridge_rococo_parachains: BridgeRococoParachainsConfig {
9587
owner: bridges_pallet_owner.clone(),
9688
..Default::default()
9789
},
98-
#[cfg(feature = "rococo")]
9990
bridge_rococo_messages: BridgeRococoMessagesConfig {
10091
owner: bridges_pallet_owner,
10192
opened_lanes: vec![XCM_LANE],
10293
..Default::default()
10394
},
104-
#[cfg(feature = "polkadot")]
105-
bridge_polkadot_grandpa: BridgePolkadotGrandpaConfig {
106-
owner: bridges_pallet_owner.clone(),
107-
..Default::default()
108-
},
109-
#[cfg(feature = "polkadot")]
110-
bridge_polkadot_parachains: BridgePolkadotParachainsConfig {
111-
owner: bridges_pallet_owner.clone(),
112-
..Default::default()
113-
},
114-
#[cfg(feature = "polkadot")]
115-
bridge_polkadot_messages: BridgePolkadotMessagesConfig {
116-
owner: bridges_pallet_owner,
117-
opened_lanes: vec![XCM_LANE],
118-
..Default::default()
119-
},
12095
..Default::default()
12196
};
12297

0 commit comments

Comments
 (0)