mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 00:31:02 +00:00
Bump Substrate to ec180313 (#955)
* Bump Substrate to commit `0856e0729c5f9cd5d398b93680ab154fe486e588` * Update service to use new inherent data client Relevant Substrate PR: https://github.com/paritytech/substrate/pull/8526 * Appease Clippy
This commit is contained in:
committed by
Bastian Köcher
parent
4ccf7a2f5a
commit
92b1860f5a
@@ -47,6 +47,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|||||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ use sc_finality_grandpa::SharedVoterState;
|
|||||||
use sc_keystore::LocalKeystore;
|
use sc_keystore::LocalKeystore;
|
||||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||||
use sc_telemetry::{Telemetry, TelemetryWorker};
|
use sc_telemetry::{Telemetry, TelemetryWorker};
|
||||||
|
use sp_consensus::SlotData;
|
||||||
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
||||||
use sp_inherents::InherentDataProviders;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
@@ -80,8 +80,6 @@ pub fn new_partial(
|
|||||||
if config.keystore_remote.is_some() {
|
if config.keystore_remote.is_some() {
|
||||||
return Err(ServiceError::Other("Remote Keystores are not supported.".to_string()));
|
return Err(ServiceError::Other("Remote Keystores are not supported.".to_string()));
|
||||||
}
|
}
|
||||||
let inherent_data_providers = InherentDataProviders::new();
|
|
||||||
|
|
||||||
let telemetry = config
|
let telemetry = config
|
||||||
.telemetry_endpoints
|
.telemetry_endpoints
|
||||||
.clone()
|
.clone()
|
||||||
@@ -124,14 +122,24 @@ pub fn new_partial(
|
|||||||
let aura_block_import =
|
let aura_block_import =
|
||||||
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration();
|
||||||
|
|
||||||
|
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams {
|
||||||
block_import: aura_block_import.clone(),
|
block_import: aura_block_import.clone(),
|
||||||
justification_import: Some(Box::new(grandpa_block_import)),
|
justification_import: Some(Box::new(grandpa_block_import)),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
inherent_data_providers: inherent_data_providers.clone(),
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
|
can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
check_for_equivocation: Default::default(),
|
check_for_equivocation: Default::default(),
|
||||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||||
@@ -145,7 +153,6 @@ pub fn new_partial(
|
|||||||
keystore_container,
|
keystore_container,
|
||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
|
||||||
other: (aura_block_import, grandpa_link, telemetry),
|
other: (aura_block_import, grandpa_link, telemetry),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -167,7 +174,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
mut keystore_container,
|
mut keystore_container,
|
||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
|
||||||
other: (block_import, grandpa_link, mut telemetry),
|
other: (block_import, grandpa_link, mut telemetry),
|
||||||
} = new_partial(&config)?;
|
} = new_partial(&config)?;
|
||||||
|
|
||||||
@@ -277,13 +283,25 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
|
|
||||||
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
|
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
|
||||||
|
|
||||||
let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _>(StartAuraParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
let raw_slot_duration = slot_duration.slot_duration();
|
||||||
client: client.clone(),
|
|
||||||
|
let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _>(StartAuraParams {
|
||||||
|
slot_duration,
|
||||||
|
client,
|
||||||
select_chain,
|
select_chain,
|
||||||
block_import,
|
block_import,
|
||||||
proposer_factory,
|
proposer_factory,
|
||||||
inherent_data_providers,
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
raw_slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
force_authoring,
|
force_authoring,
|
||||||
backoff_authoring_blocks,
|
backoff_authoring_blocks,
|
||||||
keystore: keystore_container.sync_keystore(),
|
keystore: keystore_container.sync_keystore(),
|
||||||
@@ -394,14 +412,23 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
let aura_block_import =
|
let aura_block_import =
|
||||||
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration();
|
||||||
|
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams {
|
||||||
block_import: aura_block_import,
|
block_import: aura_block_import,
|
||||||
justification_import: Some(Box::new(grandpa_block_import)),
|
justification_import: Some(Box::new(grandpa_block_import)),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
inherent_data_providers: InherentDataProviders::new(),
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
can_author_with: sp_consensus::NeverCanAuthor,
|
can_author_with: sp_consensus::NeverCanAuthor,
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
check_for_equivocation: Default::default(),
|
check_for_equivocation: Default::default(),
|
||||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|||||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ use sc_finality_grandpa::SharedVoterState;
|
|||||||
use sc_keystore::LocalKeystore;
|
use sc_keystore::LocalKeystore;
|
||||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||||
use sc_telemetry::{Telemetry, TelemetryWorker};
|
use sc_telemetry::{Telemetry, TelemetryWorker};
|
||||||
|
use sp_consensus::SlotData;
|
||||||
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
||||||
use sp_inherents::InherentDataProviders;
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
@@ -80,7 +80,6 @@ pub fn new_partial(
|
|||||||
if config.keystore_remote.is_some() {
|
if config.keystore_remote.is_some() {
|
||||||
return Err(ServiceError::Other("Remote Keystores are not supported.".to_string()));
|
return Err(ServiceError::Other("Remote Keystores are not supported.".to_string()));
|
||||||
}
|
}
|
||||||
let inherent_data_providers = InherentDataProviders::new();
|
|
||||||
|
|
||||||
let telemetry = config
|
let telemetry = config
|
||||||
.telemetry_endpoints
|
.telemetry_endpoints
|
||||||
@@ -124,14 +123,24 @@ pub fn new_partial(
|
|||||||
let aura_block_import =
|
let aura_block_import =
|
||||||
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration();
|
||||||
|
|
||||||
|
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams {
|
||||||
block_import: aura_block_import.clone(),
|
block_import: aura_block_import.clone(),
|
||||||
justification_import: Some(Box::new(grandpa_block_import)),
|
justification_import: Some(Box::new(grandpa_block_import)),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
inherent_data_providers: inherent_data_providers.clone(),
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
|
can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
check_for_equivocation: Default::default(),
|
check_for_equivocation: Default::default(),
|
||||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||||
@@ -145,7 +154,6 @@ pub fn new_partial(
|
|||||||
keystore_container,
|
keystore_container,
|
||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
|
||||||
other: (aura_block_import, grandpa_link, telemetry),
|
other: (aura_block_import, grandpa_link, telemetry),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -167,7 +175,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
mut keystore_container,
|
mut keystore_container,
|
||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
|
||||||
other: (block_import, grandpa_link, mut telemetry),
|
other: (block_import, grandpa_link, mut telemetry),
|
||||||
} = new_partial(&config)?;
|
} = new_partial(&config)?;
|
||||||
|
|
||||||
@@ -278,13 +285,24 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
|
|
||||||
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
|
let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
|
||||||
|
|
||||||
let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _>(StartAuraParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
let raw_slot_duration = slot_duration.slot_duration();
|
||||||
client: client.clone(),
|
let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _>(StartAuraParams {
|
||||||
|
slot_duration,
|
||||||
|
client,
|
||||||
select_chain,
|
select_chain,
|
||||||
block_import,
|
block_import,
|
||||||
proposer_factory,
|
proposer_factory,
|
||||||
inherent_data_providers,
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
raw_slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
force_authoring,
|
force_authoring,
|
||||||
backoff_authoring_blocks,
|
backoff_authoring_blocks,
|
||||||
keystore: keystore_container.sync_keystore(),
|
keystore: keystore_container.sync_keystore(),
|
||||||
@@ -395,14 +413,23 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
let aura_block_import =
|
let aura_block_import =
|
||||||
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(grandpa_block_import.clone(), client.clone());
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
|
let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration();
|
||||||
|
let import_queue = sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams {
|
||||||
block_import: aura_block_import,
|
block_import: aura_block_import,
|
||||||
justification_import: Some(Box::new(grandpa_block_import)),
|
justification_import: Some(Box::new(grandpa_block_import)),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
inherent_data_providers: InherentDataProviders::new(),
|
create_inherent_data_providers: move |_, ()| async move {
|
||||||
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
|
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
|
||||||
|
*timestamp,
|
||||||
|
slot_duration,
|
||||||
|
);
|
||||||
|
|
||||||
|
Ok((timestamp, slot))
|
||||||
|
},
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
can_author_with: sp_consensus::NeverCanAuthor,
|
can_author_with: sp_consensus::NeverCanAuthor,
|
||||||
slot_duration: sc_consensus_aura::slot_duration(&*client)?,
|
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
check_for_equivocation: Default::default(),
|
check_for_equivocation: Default::default(),
|
||||||
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
telemetry: telemetry.as_ref().map(|x| x.handle()),
|
||||||
|
|||||||
Reference in New Issue
Block a user