Skip to content

Commit ec8e18e

Browse files
authored
bump to polkadot-stable2503 (#51)
1 parent 6a61b39 commit ec8e18e

File tree

12 files changed

+46
-44
lines changed

12 files changed

+46
-44
lines changed

Cargo.toml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@ members = [
55
"runtime-api",
66
"tests",
77

8-
# parachain
8+
# parachain
99
"examples/parachain/node",
1010
"examples/parachain/runtime",
1111

12-
# aura
13-
"examples/aura/node",
14-
"examples/aura/runtime",
12+
# aura
13+
"examples/aura/node",
14+
"examples/aura/runtime",
1515

16-
# babe
17-
"examples/babe/node",
18-
"examples/babe/runtime",
19-
"examples/babe/rpc",
16+
# babe
17+
"examples/babe/node",
18+
"examples/babe/runtime",
19+
"examples/babe/rpc",
2020
]
2121

2222
[workspace.dependencies]
2323
codec = { version = "3.1.3", package = "parity-scale-codec", default-features = false }
24-
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
24+
scale-info = { version = "2.1.1", default-features = false, features = [
25+
"derive",
26+
] }
2527
jsonrpsee = "0.24"
26-
polkadot-sdk = { version = "0.12.2", default-features = false }
28+
polkadot-sdk = { version = "=2503.0.1", default-features = false }
2729

2830
# crates which cannot be used from polkadot-sdk
29-
sp-core = { version = "35.0.0", default-features = false }
30-
sp-runtime-interface = { version = "29.0.0", default-features = false }
31-
cumulus-pallet-parachain-system = { version = "0.18.1", default-features = false }
32-
substrate-wasm-builder = "25.0.0"
33-
sc-service = "0.49.0"
34-
sc-tracing = "38.0.0"
35-
sp-api-proc-macro = "21.0.0"
31+
sp-core = { version = "36.1.0", default-features = false }
32+
sp-runtime-interface = { version = "29.0.1", default-features = false }
33+
cumulus-pallet-parachain-system = { version = "0.20.0", default-features = false }
34+
substrate-wasm-builder = "26.0.0"
35+
sc-service = "0.50.0"
36+
sc-network-sync = "0.48.0"
37+
sc-tracing = "39.0.0"
38+
sp-api-proc-macro = "22.0.0"
3639

3740
# local crates
38-
simnode-runtime-api = { path = "./runtime-api", version = "2412.0.0", default-features = false }
39-
sc-simnode = { path = "./simnode", version = "2412.0.0" }
41+
simnode-runtime-api = { path = "./runtime-api", version = "2503.0.0", default-features = false }
42+
sc-simnode = { path = "./simnode", version = "2503.0.0" }

examples/aura/node/src/service.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
176176
Vec::default(),
177177
));
178178

179-
let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
179+
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
180180
sc_service::build_network(sc_service::BuildNetworkParams {
181181
config: &config,
182182
net_config,
@@ -336,6 +336,5 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
336336
);
337337
}
338338

339-
network_starter.start_network();
340339
Ok(task_manager)
341340
}

examples/babe/node/src/service.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ pub fn new_full_base(
391391
Vec::default(),
392392
));
393393

394-
let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
394+
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
395395
sc_service::build_network(sc_service::BuildNetworkParams {
396396
config: &config,
397397
net_config,
@@ -576,7 +576,6 @@ pub fn new_full_base(
576576
);
577577
}
578578

579-
network_starter.start_network();
580579
Ok(NewFullBase {
581580
task_manager,
582581
client,

examples/babe/runtime/src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,17 @@ pub type Executive = frame_executive::Executive<
166166
/// to even the core data structures.
167167
pub mod opaque {
168168
use super::*;
169+
use sp_runtime::{generic, traits::BlakeTwo256};
169170

170171
pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
171-
172172
/// Opaque block header type.
173173
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
174174
/// Opaque block type.
175175
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
176176
/// Opaque block identifier type.
177177
pub type BlockId = generic::BlockId<Block>;
178+
/// Opaque block hash type.
179+
pub type Hash = <BlakeTwo256 as sp_runtime::traits::Hash>::Output;
178180
}
179181

180182
/// Max size for serialized extrinsic params for this testing runtime.
@@ -447,6 +449,7 @@ impl pallet_session::Config for Runtime {
447449
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
448450
type Keys = SessionKeys;
449451
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
452+
type DisablingStrategy = ();
450453
}
451454

452455
impl pallet_session::historical::Config for Runtime {
@@ -511,7 +514,9 @@ impl pallet_staking::Config for Runtime {
511514
type EventListeners = ();
512515
type BenchmarkingConfig = StakingBenchmarkingConfig;
513516
type WeightInfo = ();
514-
type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy;
517+
type OldCurrency = Balances;
518+
type RuntimeHoldReason = RuntimeHoldReason;
519+
type Filter = ();
515520
}
516521

517522
parameter_types! {

examples/parachain/node/src/service.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ async fn start_node_impl(
180180
>::new(
181181
&parachain_config.network, parachain_config.prometheus_registry().cloned()
182182
);
183-
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
183+
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
184184
build_network(BuildNetworkParams {
185185
parachain_config: &parachain_config,
186186
net_config,
@@ -326,7 +326,7 @@ async fn start_node_impl(
326326
)?;
327327
}
328328

329-
start_network.start_network();
329+
// Network starts automatically
330330

331331
Ok((task_manager, client))
332332
}
@@ -427,6 +427,7 @@ fn start_consensus(
427427
collator_service,
428428
// Async backing time
429429
authoring_duration: Duration::from_millis(1500),
430+
max_pov_percentage: Some(100),
430431
};
431432

432433
let fut =

examples/parachain/runtime/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ impl pallet_session::Config for Runtime {
463463
type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
464464
type Keys = SessionKeys;
465465
type WeightInfo = ();
466+
// Disable validator slots when they get kicked from the CollatorSelection pallet
467+
type DisablingStrategy = ();
466468
}
467469

468470
impl pallet_aura::Config for Runtime {

examples/parachain/runtime/src/xcm_config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ impl staging_xcm_executor::Config for XcmConfig {
198198
type UniversalLocation = UniversalLocation;
199199
type Barrier = Barrier;
200200
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
201+
type XcmEventEmitter = PolkadotXcm;
201202
type Trader =
202203
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
203204
type ResponseHandler = PolkadotXcm;
@@ -248,6 +249,7 @@ impl pallet_xcm::Config for Runtime {
248249
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
249250
type UniversalLocation = UniversalLocation;
250251
type RuntimeOrigin = RuntimeOrigin;
252+
type AuthorizedAliasConsideration = ();
251253
type RuntimeCall = RuntimeCall;
252254

253255
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;

runtime-api/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "simnode-runtime-api"
3-
version = "2412.0.0"
3+
version = "2503.0.0"
44
authors = ["Polytope Labs <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -17,7 +17,4 @@ polkadot-sdk = { workspace = true, features = ["sp-api", "sp-std"] }
1717

1818
[features]
1919
default = ["std"]
20-
std = [
21-
"codec/std",
22-
"polkadot-sdk/std",
23-
]
20+
std = ["codec/std", "polkadot-sdk/std"]

simnode/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sc-simnode"
3-
version = "2412.0.0"
3+
version = "2503.0.0"
44
authors = ["Polytope Labs <[email protected]>"]
55
edition = "2021"
66
license = "Apache-2.0"
@@ -20,9 +20,9 @@ rand = "0.8.5"
2020
futures = "0.3.16"
2121
tokio = { version = "1.13", features = ["signal"] }
2222
clap = { version = "4.0.9", features = ["derive"] }
23-
jsonrpsee = { workspace = true, features = ["server", "client-core", "macros"] }
23+
jsonrpsee = { workspace = true, features = ["server", "client-core", "macros"] }
2424

25-
sc-service = { workspace = true, features = ["test-helpers"] }
25+
sc-service = { workspace = true }
2626
sp-runtime-interface = { workspace = true, default-features = true }
2727
simnode-runtime-api = { workspace = true, default-features = true }
2828

simnode/src/client/aura.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ where
104104
config.prometheus_registry(),
105105
);
106106

107-
let (network, system_rpc_tx, tx_handler_controller, _network_starter, sync_service) = {
107+
let (network, system_rpc_tx, tx_handler_controller, sync_service) = {
108108
let params = BuildNetworkParams {
109109
config: &config,
110110
net_config,
@@ -181,8 +181,6 @@ where
181181
};
182182
spawn_tasks(params)?;
183183

184-
_network_starter.start_network();
185-
186184
let task = run_manual_seal(ManualSealParams {
187185
block_import,
188186
env,

0 commit comments

Comments
 (0)