Skip to content

Commit 88139a6

Browse files
committed
Upgrade polkadot-sdk 436b4935 -> 161e7f4d
1 parent 6385160 commit 88139a6

File tree

8 files changed

+449
-387
lines changed

8 files changed

+449
-387
lines changed

Cargo.lock

Lines changed: 327 additions & 274 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/Cargo.toml

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,49 @@ name = "polkadot-bulletin-chain"
1919
clap = { version = "4.2.5", features = ["derive"] }
2020
futures = { version = "0.3.21", features = ["thread-pool"]}
2121

22-
frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
23-
pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
24-
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
25-
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
26-
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
27-
sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
28-
sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
29-
sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
30-
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
31-
sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
32-
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
33-
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
34-
sc-service = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
35-
sc-statement-store = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
36-
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
37-
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
38-
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
39-
sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
40-
sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
41-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
42-
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
43-
sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
44-
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
45-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
46-
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
47-
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
22+
frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
23+
pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
24+
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
25+
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
26+
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
27+
sc-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
28+
sc-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
29+
sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
30+
sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
31+
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
32+
sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
33+
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
34+
sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
35+
sc-service = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
36+
sc-statement-store = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
37+
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
38+
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
39+
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
40+
sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
41+
sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
42+
sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
43+
sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
44+
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
45+
sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
46+
sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
47+
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
48+
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
49+
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
4850

4951
# These dependencies are used for the node's RPCs
5052
serde_json = { version = "1.0.132", default-features = true }
5153
jsonrpsee = { version = "0.24.3", features = ["server"] }
52-
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
53-
sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
54-
sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
55-
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
56-
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
57-
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
58-
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
54+
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
55+
sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
56+
sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
57+
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
58+
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
59+
sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
60+
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
5961

6062
# These dependencies are used for runtime benchmarking
61-
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
62-
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
63+
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
64+
frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
6365

6466
# Local Dependencies
6567
polkadot-bulletin-chain-runtime = { version = "0.1.0-dev", path = "../runtime" }
@@ -68,7 +70,7 @@ polkadot-bulletin-chain-runtime = { version = "0.1.0-dev", path = "../runtime" }
6870
try-runtime-cli = { optional = true, version = "0.42" }
6971

7072
[build-dependencies]
71-
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367" }
73+
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860" }
7274

7375
[features]
7476
default = []

node/src/service.rs

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use sc_consensus_grandpa::SharedVoterState;
88
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
99
use sc_telemetry::{Telemetry, TelemetryWorker};
1010
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
11+
use sp_consensus_babe::inherents::BabeCreateInherentDataProviders;
1112
use std::{sync::Arc, time::Duration};
1213

1314
pub(crate) type FullClient = sc_service::TFullClient<
@@ -35,7 +36,13 @@ pub fn new_partial(
3536
sc_consensus::DefaultImportQueue<Block>,
3637
sc_transaction_pool::TransactionPoolHandle<Block, FullClient>,
3738
(
38-
sc_consensus_babe::BabeBlockImport<Block, FullClient, FullGrandpaBlockImport>,
39+
sc_consensus_babe::BabeBlockImport<
40+
Block,
41+
FullClient,
42+
FullGrandpaBlockImport,
43+
BabeCreateInherentDataProviders<Block>,
44+
FullSelectChain,
45+
>,
3946
sc_consensus_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
4047
sc_consensus_babe::BabeLink<Block>,
4148
Option<Telemetry>,
@@ -90,10 +97,22 @@ pub fn new_partial(
9097
)?;
9198
let justification_import = grandpa_block_import.clone();
9299

100+
let babe_config = sc_consensus_babe::configuration(&*client)?;
101+
let slot_duration = babe_config.slot_duration();
93102
let (block_import, babe_link) = sc_consensus_babe::block_import(
94-
sc_consensus_babe::configuration(&*client)?,
103+
babe_config,
95104
grandpa_block_import,
96105
client.clone(),
106+
Arc::new(move |_, _| async move {
107+
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
108+
let slot = sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
109+
*timestamp,
110+
slot_duration,
111+
);
112+
Ok((slot, timestamp))
113+
}) as BabeCreateInherentDataProviders<Block>,
114+
select_chain.clone(),
115+
OffchainTransactionPoolFactory::new(transaction_pool.clone()),
97116
)?;
98117

99118
let slot_duration = babe_link.config().slot_duration();
@@ -103,22 +122,10 @@ pub fn new_partial(
103122
block_import: block_import.clone(),
104123
justification_import: Some(Box::new(justification_import)),
105124
client: client.clone(),
106-
select_chain: select_chain.clone(),
107-
create_inherent_data_providers: move |_, ()| async move {
108-
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
109-
110-
let slot =
111-
sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
112-
*timestamp,
113-
slot_duration,
114-
);
115-
116-
Ok((slot, timestamp))
117-
},
125+
slot_duration,
118126
spawner: &task_manager.spawn_essential_handle(),
119127
registry: config.prometheus_registry(),
120128
telemetry: telemetry.as_ref().map(|x| x.handle()),
121-
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
122129
})?;
123130

124131
// TODO Wire up to RPC

pallets/common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features =
1515
log = "0.4.17"
1616
scale-info = { version = "2.11.6", default-features = false, features = ["derive"] }
1717

18-
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false, features = [
18+
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false, features = [
1919
"experimental",
2020
"runtime",
2121
] }

pallets/relayer-set/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features =
1414
log = "0.4.17"
1515
scale-info = { version = "2.11.6", default-features = false, features = ["derive"] }
1616

17-
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false, features = [
17+
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false, features = [
1818
"experimental",
1919
"runtime",
2020
] }

pallets/transaction-storage/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features =
1818
log = "0.4.17"
1919
scale-info = { version = "2.11.6", default-features = false, features = ["derive"] }
2020

21-
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false, features = [
21+
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false, features = [
2222
"experimental",
2323
"runtime",
2424
] }
25-
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false }
25+
sp-transaction-storage-proof = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false }
2626

2727
[features]
2828
default = ["std"]

pallets/validator-set/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ codec = { package = "parity-scale-codec", version = "3.7.5", default-features =
1010
log = "0.4.17"
1111
scale-info = { version = "2.11.6", default-features = false, features = ["derive"] }
1212

13-
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false, features = [
13+
polkadot-sdk-frame = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false, features = [
1414
"experimental",
1515
"runtime",
1616
] }
17-
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false }
18-
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "436b4935b52562f79a83b6ecadeac7dcbc1c2367", default-features = false, features = [
17+
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false }
18+
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", rev = "161e7f4d8b9b6908694d0ccc9bd0ef4a1674e860", default-features = false, features = [
1919
"historical",
2020
] }
2121

0 commit comments

Comments
 (0)