mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 00:45:43 +00:00
Companion for paritytech/substrate#12264 (#5973)
* Companion for paritytech/substrate#12198 * Use `ProtocolName` from sc-network-common * Update node service * Revert Cargo.lock changes * Fix node service test * cargo-fmt * disable cancel-pipeline-test-linux-stable to check companion * update lockfile for {"substrate"} Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -228,7 +228,7 @@ deploy-parity-testnet:
|
|||||||
trigger:
|
trigger:
|
||||||
project: "parity/infrastructure/ci_cd/pipeline-stopper"
|
project: "parity/infrastructure/ci_cd/pipeline-stopper"
|
||||||
|
|
||||||
cancel-pipeline-test-linux-stable:
|
.cancel-pipeline-test-linux-stable:
|
||||||
extends: .cancel-pipeline-template
|
extends: .cancel-pipeline-template
|
||||||
needs:
|
needs:
|
||||||
- job: test-linux-stable
|
- job: test-linux-stable
|
||||||
|
|||||||
Generated
+198
-172
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ polkadot-node-primitives = { path = "../../primitives" }
|
|||||||
polkadot-node-jaeger = { path = "../../jaeger" }
|
polkadot-node-jaeger = { path = "../../jaeger" }
|
||||||
parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] }
|
parity-scale-codec = { version = "3.1.5", default-features = false, features = ["derive"] }
|
||||||
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
strum = { version = "0.24", features = ["derive"] }
|
strum = { version = "0.24", features = ["derive"] }
|
||||||
futures = "0.3.21"
|
futures = "0.3.21"
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
use derive_more::Display;
|
use derive_more::Display;
|
||||||
use polkadot_primitives::v2::Hash;
|
use polkadot_primitives::v2::Hash;
|
||||||
use sc_network::{
|
use sc_network_common::{
|
||||||
config::{NonDefaultSetConfig, SetConfig},
|
config::{NonDefaultSetConfig, SetConfig},
|
||||||
ProtocolName,
|
protocol::ProtocolName,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{hash_map::Entry, HashMap},
|
collections::{hash_map::Entry, HashMap},
|
||||||
@@ -80,7 +80,7 @@ impl PeerSet {
|
|||||||
notifications_protocol: protocol,
|
notifications_protocol: protocol,
|
||||||
fallback_names,
|
fallback_names,
|
||||||
max_notification_size,
|
max_notification_size,
|
||||||
set_config: sc_network::config::SetConfig {
|
set_config: sc_network_common::config::SetConfig {
|
||||||
// we allow full nodes to connect to validators for gossip
|
// we allow full nodes to connect to validators for gossip
|
||||||
// to ensure any `MIN_GOSSIP_PEERS` always include reserved peers
|
// to ensure any `MIN_GOSSIP_PEERS` always include reserved peers
|
||||||
// we limit the amount of non-reserved slots to be less
|
// we limit the amount of non-reserved slots to be less
|
||||||
@@ -88,7 +88,7 @@ impl PeerSet {
|
|||||||
in_peers: super::MIN_GOSSIP_PEERS as u32 / 2 - 1,
|
in_peers: super::MIN_GOSSIP_PEERS as u32 / 2 - 1,
|
||||||
out_peers: super::MIN_GOSSIP_PEERS as u32 / 2 - 1,
|
out_peers: super::MIN_GOSSIP_PEERS as u32 / 2 - 1,
|
||||||
reserved_nodes: Vec::new(),
|
reserved_nodes: Vec::new(),
|
||||||
non_reserved_mode: sc_network::config::NonReservedPeerMode::Accept,
|
non_reserved_mode: sc_network_common::config::NonReservedPeerMode::Accept,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
PeerSet::Collation => NonDefaultSetConfig {
|
PeerSet::Collation => NonDefaultSetConfig {
|
||||||
@@ -101,9 +101,9 @@ impl PeerSet {
|
|||||||
out_peers: 0,
|
out_peers: 0,
|
||||||
reserved_nodes: Vec::new(),
|
reserved_nodes: Vec::new(),
|
||||||
non_reserved_mode: if is_authority == IsAuthority::Yes {
|
non_reserved_mode: if is_authority == IsAuthority::Yes {
|
||||||
sc_network::config::NonReservedPeerMode::Accept
|
sc_network_common::config::NonReservedPeerMode::Accept
|
||||||
} else {
|
} else {
|
||||||
sc_network::config::NonReservedPeerMode::Deny
|
sc_network_common::config::NonReservedPeerMode::Deny
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -188,7 +188,7 @@ impl<T> IndexMut<PeerSet> for PerPeerSet<T> {
|
|||||||
pub fn peer_sets_info(
|
pub fn peer_sets_info(
|
||||||
is_authority: IsAuthority,
|
is_authority: IsAuthority,
|
||||||
peerset_protocol_names: &PeerSetProtocolNames,
|
peerset_protocol_names: &PeerSetProtocolNames,
|
||||||
) -> Vec<sc_network::config::NonDefaultSetConfig> {
|
) -> Vec<sc_network_common::config::NonDefaultSetConfig> {
|
||||||
PeerSet::iter()
|
PeerSet::iter()
|
||||||
.map(|s| s.get_info(is_authority, &peerset_protocol_names))
|
.map(|s| s.get_info(is_authority, &peerset_protocol_names))
|
||||||
.collect()
|
.collect()
|
||||||
|
|||||||
@@ -898,7 +898,7 @@ where
|
|||||||
grandpa_hard_forks,
|
grandpa_hard_forks,
|
||||||
));
|
));
|
||||||
|
|
||||||
let (network, system_rpc_tx, network_starter) =
|
let (network, system_rpc_tx, tx_handler_controller, network_starter) =
|
||||||
service::build_network(service::BuildNetworkParams {
|
service::build_network(service::BuildNetworkParams {
|
||||||
config: &config,
|
config: &config,
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
@@ -968,6 +968,7 @@ where
|
|||||||
transaction_pool: transaction_pool.clone(),
|
transaction_pool: transaction_pool.clone(),
|
||||||
task_manager: &mut task_manager,
|
task_manager: &mut task_manager,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
|
tx_handler_controller,
|
||||||
telemetry: telemetry.as_mut(),
|
telemetry: telemetry.as_mut(),
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,8 @@ use polkadot_test_runtime::{
|
|||||||
};
|
};
|
||||||
use sc_chain_spec::ChainSpec;
|
use sc_chain_spec::ChainSpec;
|
||||||
use sc_client_api::execution_extensions::ExecutionStrategies;
|
use sc_client_api::execution_extensions::ExecutionStrategies;
|
||||||
use sc_network::{
|
use sc_network::{config::NetworkConfiguration, multiaddr};
|
||||||
config::{NetworkConfiguration, TransportConfig},
|
use sc_network_common::{config::TransportConfig, service::NetworkStateInfo};
|
||||||
multiaddr,
|
|
||||||
};
|
|
||||||
use sc_network_common::service::NetworkStateInfo;
|
|
||||||
use sc_service::{
|
use sc_service::{
|
||||||
config::{
|
config::{
|
||||||
DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, WasmExecutionMethod,
|
DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, WasmExecutionMethod,
|
||||||
|
|||||||
Reference in New Issue
Block a user