mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 10:31:03 +00:00
*: Update authority discovery and remove WorkerConfig (#1953)
* *: Update authority discovery and remove WorkerConfig With https://github.com/paritytech/substrate/pull/7545 the authority discovery module queries and publishes addresses on an exponentially increasing interval. Doing so should make custom configurations obsolete, as operations are retried in a timely fashion in the first minutes. * */Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing * Revert "*/Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing" This reverts commit 0785943a1e377454f088814ef20f4432de09da7a. * "Update Substrate" * Revert ""Update Substrate"" This reverts commit 377b221e1853b2c383f0c416d686535b545796cb. * Cargo.lock: Manual Substrate update * node/test/service/src/lib: Remove unused import * parachain/test-parachains/adder: Remove unused import Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+136
-136
File diff suppressed because it is too large
Load Diff
@@ -148,7 +148,6 @@ pub fn run() -> Result<()> {
|
|||||||
config,
|
config,
|
||||||
service::IsCollator::No,
|
service::IsCollator::No,
|
||||||
grandpa_pause,
|
grandpa_pause,
|
||||||
None,
|
|
||||||
).map(|full| full.task_manager),
|
).map(|full| full.task_manager),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ use {
|
|||||||
polkadot_node_core_proposer::ProposerFactory,
|
polkadot_node_core_proposer::ProposerFactory,
|
||||||
polkadot_overseer::{AllSubsystems, BlockInfo, Overseer, OverseerHandler},
|
polkadot_overseer::{AllSubsystems, BlockInfo, Overseer, OverseerHandler},
|
||||||
polkadot_primitives::v1::ParachainHost,
|
polkadot_primitives::v1::ParachainHost,
|
||||||
sc_authority_discovery::{Service as AuthorityDiscoveryService, WorkerConfig as AuthorityWorkerConfig},
|
sc_authority_discovery::Service as AuthorityDiscoveryService,
|
||||||
sp_blockchain::HeaderBackend,
|
sp_blockchain::HeaderBackend,
|
||||||
sp_core::traits::SpawnNamed,
|
sp_core::traits::SpawnNamed,
|
||||||
sp_keystore::SyncCryptoStorePtr,
|
sp_keystore::SyncCryptoStorePtr,
|
||||||
@@ -474,7 +474,6 @@ pub fn new_full<RuntimeApi, Executor>(
|
|||||||
mut config: Configuration,
|
mut config: Configuration,
|
||||||
is_collator: IsCollator,
|
is_collator: IsCollator,
|
||||||
grandpa_pause: Option<(u32, u32)>,
|
grandpa_pause: Option<(u32, u32)>,
|
||||||
authority_discovery_config: Option<AuthorityWorkerConfig>,
|
|
||||||
isolation_strategy: IsolationStrategy,
|
isolation_strategy: IsolationStrategy,
|
||||||
) -> Result<NewFull<Arc<FullClient<RuntimeApi, Executor>>>, Error>
|
) -> Result<NewFull<Arc<FullClient<RuntimeApi, Executor>>>, Error>
|
||||||
where
|
where
|
||||||
@@ -583,8 +582,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
|||||||
Event::Dht(e) => Some(e),
|
Event::Dht(e) => Some(e),
|
||||||
_ => None,
|
_ => None,
|
||||||
}});
|
}});
|
||||||
let (worker, service) = sc_authority_discovery::new_worker_and_service_with_config(
|
let (worker, service) = sc_authority_discovery::new_worker_and_service(
|
||||||
authority_discovery_config.unwrap_or_default(),
|
|
||||||
client.clone(),
|
client.clone(),
|
||||||
network.clone(),
|
network.clone(),
|
||||||
Box::pin(dht_event_stream),
|
Box::pin(dht_event_stream),
|
||||||
@@ -897,14 +895,12 @@ pub fn build_full(
|
|||||||
config: Configuration,
|
config: Configuration,
|
||||||
is_collator: IsCollator,
|
is_collator: IsCollator,
|
||||||
grandpa_pause: Option<(u32, u32)>,
|
grandpa_pause: Option<(u32, u32)>,
|
||||||
authority_discovery_config: Option<AuthorityWorkerConfig>,
|
|
||||||
) -> Result<NewFull<Client>, Error> {
|
) -> Result<NewFull<Client>, Error> {
|
||||||
if config.chain_spec.is_rococo() {
|
if config.chain_spec.is_rococo() {
|
||||||
new_full::<rococo_runtime::RuntimeApi, RococoExecutor>(
|
new_full::<rococo_runtime::RuntimeApi, RococoExecutor>(
|
||||||
config,
|
config,
|
||||||
is_collator,
|
is_collator,
|
||||||
grandpa_pause,
|
grandpa_pause,
|
||||||
authority_discovery_config,
|
|
||||||
Default::default(),
|
Default::default(),
|
||||||
).map(|full| full.with_client(Client::Rococo))
|
).map(|full| full.with_client(Client::Rococo))
|
||||||
} else if config.chain_spec.is_kusama() {
|
} else if config.chain_spec.is_kusama() {
|
||||||
@@ -912,7 +908,6 @@ pub fn build_full(
|
|||||||
config,
|
config,
|
||||||
is_collator,
|
is_collator,
|
||||||
grandpa_pause,
|
grandpa_pause,
|
||||||
authority_discovery_config,
|
|
||||||
Default::default(),
|
Default::default(),
|
||||||
).map(|full| full.with_client(Client::Kusama))
|
).map(|full| full.with_client(Client::Kusama))
|
||||||
} else if config.chain_spec.is_westend() {
|
} else if config.chain_spec.is_westend() {
|
||||||
@@ -920,7 +915,6 @@ pub fn build_full(
|
|||||||
config,
|
config,
|
||||||
is_collator,
|
is_collator,
|
||||||
grandpa_pause,
|
grandpa_pause,
|
||||||
authority_discovery_config,
|
|
||||||
Default::default(),
|
Default::default(),
|
||||||
).map(|full| full.with_client(Client::Westend))
|
).map(|full| full.with_client(Client::Westend))
|
||||||
} else {
|
} else {
|
||||||
@@ -928,7 +922,6 @@ pub fn build_full(
|
|||||||
config,
|
config,
|
||||||
is_collator,
|
is_collator,
|
||||||
grandpa_pause,
|
grandpa_pause,
|
||||||
authority_discovery_config,
|
|
||||||
Default::default(),
|
Default::default(),
|
||||||
).map(|full| full.with_client(Client::Polkadot))
|
).map(|full| full.with_client(Client::Polkadot))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ use sp_blockchain::HeaderBackend;
|
|||||||
use sp_keyring::Sr25519Keyring;
|
use sp_keyring::Sr25519Keyring;
|
||||||
use sp_runtime::{codec::Encode, generic, traits::IdentifyAccount, MultiSigner};
|
use sp_runtime::{codec::Encode, generic, traits::IdentifyAccount, MultiSigner};
|
||||||
use sp_state_machine::BasicExternalities;
|
use sp_state_machine::BasicExternalities;
|
||||||
use std::{sync::Arc, time::Duration};
|
use std::sync::Arc;
|
||||||
use substrate_test_client::{BlockchainEventsExt, RpcHandlersExt, RpcTransactionOutput, RpcTransactionError};
|
use substrate_test_client::{BlockchainEventsExt, RpcHandlersExt, RpcTransactionOutput, RpcTransactionError};
|
||||||
|
|
||||||
native_executor_instance!(
|
native_executor_instance!(
|
||||||
@@ -82,11 +82,6 @@ pub fn new_full(
|
|||||||
config,
|
config,
|
||||||
is_collator,
|
is_collator,
|
||||||
None,
|
None,
|
||||||
Some(sc_authority_discovery::WorkerConfig {
|
|
||||||
query_interval: Duration::from_secs(1),
|
|
||||||
query_start_delay: Duration::from_secs(0),
|
|
||||||
..Default::default()
|
|
||||||
}),
|
|
||||||
polkadot_parachain::wasm_executor::IsolationStrategy::InProcess,
|
polkadot_parachain::wasm_executor::IsolationStrategy::InProcess,
|
||||||
).map_err(Into::into)
|
).map_err(Into::into)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ use polkadot_node_subsystem::messages::{CollationGenerationMessage, CollatorProt
|
|||||||
use polkadot_primitives::v1::Id as ParaId;
|
use polkadot_primitives::v1::Id as ParaId;
|
||||||
use sc_cli::{Result, Role, SubstrateCli};
|
use sc_cli::{Result, Role, SubstrateCli};
|
||||||
use sp_core::hexdisplay::HexDisplay;
|
use sp_core::hexdisplay::HexDisplay;
|
||||||
use std::time::Duration;
|
|
||||||
use test_parachain_adder_collator::Collator;
|
use test_parachain_adder_collator::Collator;
|
||||||
|
|
||||||
const PARA_ID: ParaId = ParaId::new(100);
|
const PARA_ID: ParaId = ParaId::new(100);
|
||||||
@@ -60,11 +59,6 @@ fn main() -> Result<()> {
|
|||||||
config,
|
config,
|
||||||
polkadot_service::IsCollator::Yes(collator.collator_id()),
|
polkadot_service::IsCollator::Yes(collator.collator_id()),
|
||||||
None,
|
None,
|
||||||
Some(sc_authority_discovery::WorkerConfig {
|
|
||||||
query_interval: Duration::from_secs(1),
|
|
||||||
query_start_delay: Duration::from_secs(0),
|
|
||||||
..Default::default()
|
|
||||||
}),
|
|
||||||
)?;
|
)?;
|
||||||
let mut overseer_handler = full_node
|
let mut overseer_handler = full_node
|
||||||
.overseer_handler
|
.overseer_handler
|
||||||
|
|||||||
Reference in New Issue
Block a user