mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 20:57:59 +00:00
*: Disable authority discovery module (#3914)
The authority discovery module enables authorities to be discoverable and discover other authorities to improve interconnection among them. In order to achieve this the module needs to know when the authority set changes, thus when a session changes. One has to register a module as a *session handler* in order for it to be notified of changing sessions. The order and number of these *session handlers* **MUST** correspond to the order and number of the *session keys*. Commit027d887added the authority discovery to the `SessionHandlers`. Given that the authority discovery module piggybacks on the Babe session keys the commit violated the above constraint. This commit reverts most of027d887, leaving `core/authority-discovery` and `srml/authority-discovery` untouched.
This commit is contained in:
@@ -20,9 +20,9 @@ use chain_spec::ChainSpecExtension;
|
||||
use primitives::{Pair, Public, crypto::UncheckedInto, sr25519};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use node_runtime::{
|
||||
AuthorityDiscoveryConfig, BabeConfig, BalancesConfig, ContractsConfig, CouncilConfig, DemocracyConfig,
|
||||
ElectionsConfig, GrandpaConfig, ImOnlineConfig, IndicesConfig, SessionConfig, SessionKeys, StakerStatus,
|
||||
StakingConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, WASM_BINARY,
|
||||
BabeConfig, BalancesConfig, ContractsConfig, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig,
|
||||
ImOnlineConfig, IndicesConfig, SessionConfig, SessionKeys, StakerStatus, StakingConfig, SudoConfig, SystemConfig,
|
||||
TechnicalCommitteeConfig, WASM_BINARY,
|
||||
};
|
||||
use node_runtime::Block;
|
||||
use node_runtime::constants::{time::*, currency::*};
|
||||
@@ -265,9 +265,6 @@ pub fn testnet_genesis(
|
||||
im_online: Some(ImOnlineConfig {
|
||||
keys: vec![],
|
||||
}),
|
||||
authority_discovery: Some(AuthorityDiscoveryConfig{
|
||||
keys: vec![],
|
||||
}),
|
||||
grandpa: Some(GrandpaConfig {
|
||||
authorities: vec![],
|
||||
}),
|
||||
|
||||
@@ -130,8 +130,8 @@ macro_rules! new_full {
|
||||
// back-pressure. Authority discovery is triggering one event per authority within the current authority set.
|
||||
// This estimates the authority set size to be somewhere below 10 000 thereby setting the channel buffer size to
|
||||
// 10 000.
|
||||
let (dht_event_tx, dht_event_rx) =
|
||||
mpsc::channel::<DhtEvent>(10000);
|
||||
let (dht_event_tx, _dht_event_rx) =
|
||||
mpsc::channel::<DhtEvent>(10_000);
|
||||
|
||||
let service = builder.with_network_protocol(|_| Ok(crate::service::NodeProtocol::new()))?
|
||||
.with_finality_proof_provider(|client, backend|
|
||||
@@ -169,14 +169,6 @@ macro_rules! new_full {
|
||||
|
||||
let babe = babe::start_babe(babe_config)?;
|
||||
service.spawn_essential_task(babe);
|
||||
|
||||
let authority_discovery = authority_discovery::AuthorityDiscovery::new(
|
||||
service.client(),
|
||||
service.network(),
|
||||
dht_event_rx,
|
||||
);
|
||||
|
||||
service.spawn_task(authority_discovery);
|
||||
}
|
||||
|
||||
let config = grandpa::Config {
|
||||
|
||||
Reference in New Issue
Block a user