Skip to content

Commit 0153f6c

Browse files
authored
Update polkadot-sdk to stable2407 (#648)
1 parent 502cbb9 commit 0153f6c

62 files changed

Lines changed: 3084 additions & 3697 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

Cargo.toml

Lines changed: 291 additions & 292 deletions
Large diffs are not rendered by default.

client/consensus/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ sp-runtime = { workspace = true }
3333
sp-state-machine = { workspace = true }
3434
sp-timestamp = { workspace = true }
3535
sp-transaction-pool = { workspace = true }
36+
sp-version = { workspace = true }
3637
substrate-prometheus-endpoint = { workspace = true }
3738

3839
# Own

client/consensus/src/tests.rs

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ use {
2626
async_trait::async_trait,
2727
cumulus_client_collator::service::CollatorService,
2828
cumulus_client_consensus_proposer::Proposer as ConsensusProposer,
29-
cumulus_primitives_core::{relay_chain::BlockId, CollationInfo, CollectCollationInfo, ParaId},
29+
cumulus_primitives_core::{
30+
relay_chain::{BlockId, BlockNumber, CoreState},
31+
CollationInfo, CollectCollationInfo, ParaId,
32+
},
3033
cumulus_relay_chain_interface::{
3134
CommittedCandidateReceipt, OverseerHandle, RelayChainInterface, RelayChainResult,
3235
StorageValue,
@@ -64,6 +67,7 @@ use {
6467
Digest, DigestItem,
6568
},
6669
sp_timestamp::Timestamp,
70+
sp_version::RuntimeVersion,
6771
std::{
6872
collections::{BTreeMap, BTreeSet},
6973
pin::Pin,
@@ -259,6 +263,25 @@ impl RelayChainInterface for RelayChain {
259263
) -> RelayChainResult<Option<polkadot_primitives::ValidationCodeHash>> {
260264
unimplemented!("Not needed for test")
261265
}
266+
267+
async fn candidates_pending_availability(
268+
&self,
269+
_: PHash,
270+
_: ParaId,
271+
) -> RelayChainResult<Vec<CommittedCandidateReceipt>> {
272+
unimplemented!("Not needed for test")
273+
}
274+
275+
async fn availability_cores(
276+
&self,
277+
_relay_parent: PHash,
278+
) -> RelayChainResult<Vec<CoreState<PHash, BlockNumber>>> {
279+
unimplemented!("Not needed for test");
280+
}
281+
282+
async fn version(&self, _: PHash) -> RelayChainResult<RuntimeVersion> {
283+
unimplemented!("Not needed for test")
284+
}
262285
}
263286

264287
#[derive(Clone)]
@@ -303,7 +326,7 @@ impl SealExtractorVerfier {
303326
#[async_trait::async_trait]
304327
impl<B: BlockT> sc_consensus::Verifier<B> for SealExtractorVerfier {
305328
async fn verify(
306-
&mut self,
329+
&self,
307330
mut block: sc_consensus::BlockImportParams<B>,
308331
) -> Result<sc_consensus::BlockImportParams<B>, String> {
309332
if block.fork_choice.is_none() {

client/node-common/src/service.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ use {
3737
},
3838
sc_executor::{
3939
sp_wasm_interface::{ExtendedHostFunctions, HostFunctions},
40-
HeapAllocStrategy, NativeElseWasmExecutor, NativeExecutionDispatch, RuntimeVersionOf,
41-
WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY,
40+
HeapAllocStrategy, NativeExecutionDispatch, RuntimeVersionOf, WasmExecutor,
41+
DEFAULT_HEAP_ALLOC_STRATEGY,
4242
},
4343
sc_network::{config::FullNetworkConfiguration, NetworkBlock},
4444
sc_network_sync::SyncingService,
@@ -62,6 +62,9 @@ use {
6262
std::{str::FromStr, sync::Arc},
6363
};
6464

65+
#[allow(deprecated)]
66+
use sc_executor::NativeElseWasmExecutor;
67+
6568
/// Trait to configure the main types the builder rely on, bundled in a single
6669
/// type to reduce verbosity and the amount of type parameters.
6770
pub trait NodeBuilderConfig {
@@ -174,13 +177,15 @@ impl TanssiExecutorExt for WasmExecutor<ParachainHostFunctions> {
174177
}
175178
}
176179

180+
#[allow(deprecated)]
177181
impl<D> TanssiExecutorExt for NativeElseWasmExecutor<D>
178182
where
179183
D: NativeExecutionDispatch,
180184
{
181185
type HostFun = ExtendedHostFunctions<sp_io::SubstrateHostFunctions, D::ExtendHostFunctions>;
182186

183187
fn new_with_wasm_executor(wasm_executor: WasmExecutor<Self::HostFun>) -> Self {
188+
#[allow(deprecated)]
184189
NativeElseWasmExecutor::new_with_wasm_executor(wasm_executor)
185190
}
186191
}

client/service-container-chain/src/chain_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use {
2121
};
2222

2323
/// Specialized `ChainSpec` for container chains that only allows raw genesis format.
24-
pub type RawChainSpec = sc_service::GenericChainSpec<RawGenesisConfig, Extensions>;
24+
pub type RawChainSpec = sc_service::GenericChainSpec<Extensions>;
2525

2626
/// Helper type that implements the traits needed to be used as a "GenesisConfig",
2727
/// but whose implementation panics because we only expect it to be used with raw ChainSpecs,

client/service-container-chain/src/service.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use {
3535
polkadot_primitives::CollatorPair,
3636
sc_basic_authorship::ProposerFactory,
3737
sc_consensus::{BasicQueue, BlockImport},
38-
sc_executor::{NativeElseWasmExecutor, WasmExecutor},
38+
sc_executor::WasmExecutor,
3939
sc_network::NetworkBlock,
4040
sc_network_sync::SyncingService,
4141
sc_service::{
@@ -58,6 +58,9 @@ use {
5858
tokio_util::sync::CancellationToken,
5959
};
6060

61+
#[allow(deprecated)]
62+
use sc_executor::NativeElseWasmExecutor;
63+
6164
type FullBackend = TFullBackend<Block>;
6265

6366
/// Native executor type.
@@ -102,12 +105,12 @@ impl<BI> OrchestratorParachainBlockImport<BI> {
102105
#[async_trait::async_trait]
103106
impl<BI> BlockImport<Block> for OrchestratorParachainBlockImport<BI>
104107
where
105-
BI: BlockImport<Block> + Send,
108+
BI: BlockImport<Block> + Send + Sync,
106109
{
107110
type Error = BI::Error;
108111

109112
async fn check_block(
110-
&mut self,
113+
&self,
111114
block: sc_consensus::BlockCheckParams<Block>,
112115
) -> Result<sc_consensus::ImportResult, Self::Error> {
113116
self.inner.check_block(block).await
@@ -127,6 +130,7 @@ where
127130
impl<BI> ParachainBlockImportMarker for OrchestratorParachainBlockImport<BI> {}
128131

129132
// Orchestrator chain types
133+
#[allow(deprecated)]
130134
pub type ParachainExecutor = NativeElseWasmExecutor<ParachainNativeExecutor>;
131135
pub type ParachainClient = TFullClient<Block, RuntimeApi, ParachainExecutor>;
132136
pub type ParachainBackend = TFullBackend<Block>;

container-chains/nodes/frontier/src/chain_spec.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ use {
2929
};
3030

3131
/// Specialized `ChainSpec` for the normal parachain runtime.
32-
pub type ChainSpec = sc_service::GenericChainSpec<
33-
container_chain_template_frontier_runtime::RuntimeGenesisConfig,
34-
Extensions,
35-
>;
32+
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
3633

3734
/// Orcherstrator's parachain id
3835
pub const ORCHESTRATOR: ParaId = ParaId::new(1000);

container-chains/nodes/frontier/src/service.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ pub async fn start_dev_node(
438438
let time = MockTimestampInherentDataProvider;
439439
let mocked_parachain = MockValidationDataInherentDataProvider {
440440
current_para_block,
441+
current_para_block_head: None,
441442
relay_offset: 1000,
442443
relay_blocks_per_para_block: 2,
443444
// TODO: Recheck
@@ -446,12 +447,12 @@ pub async fn start_dev_node(
446447
xcm_config: MockXcmConfig::new(
447448
&*client_for_xcm,
448449
block,
449-
para_id,
450450
Default::default(),
451451
),
452452
raw_downward_messages: downward_xcm_receiver.drain().collect(),
453453
raw_horizontal_messages: hrmp_xcm_receiver.drain().collect(),
454454
additional_key_values: Some(additional_keys),
455+
para_id,
455456
};
456457

457458
Ok((time, mocked_parachain, mocked_authorities_noting))

container-chains/nodes/simple/src/chain_spec.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ use {
2828
};
2929

3030
/// Specialized `ChainSpec` for the normal parachain runtime.
31-
pub type ChainSpec = sc_service::GenericChainSpec<
32-
container_chain_template_simple_runtime::RuntimeGenesisConfig,
33-
Extensions,
34-
>;
31+
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
3532

3633
/// Helper function to generate a crypto pair from seed
3734
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {

0 commit comments

Comments
 (0)