mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
[companion] Get rid of Peerset compatibility layer (#2739)
* Init `PeerStore` in `build_collator_network` * kick CI * Update Cargo.lock for substrate * Companion for substrate 14373 * Companion for paritytech/substrate#14020 * update lockfile for {"substrate", "polkadot"} --------- Co-authored-by: Davide Galassi <davxy@datawok.net> Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+267
-265
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,7 @@ use sc_network::{
|
||||
config::{
|
||||
NonDefaultSetConfig, NonReservedPeerMode, NotificationHandshake, ProtocolId, SetConfig,
|
||||
},
|
||||
peer_store::PeerStore,
|
||||
NetworkService,
|
||||
};
|
||||
|
||||
@@ -52,6 +53,17 @@ pub(crate) fn build_collator_network(
|
||||
genesis_hash,
|
||||
);
|
||||
|
||||
let peer_store = PeerStore::new(
|
||||
network_config
|
||||
.network_config
|
||||
.boot_nodes
|
||||
.iter()
|
||||
.map(|bootnode| bootnode.peer_id)
|
||||
.collect(),
|
||||
);
|
||||
let peer_store_handle = peer_store.handle();
|
||||
spawn_handle.spawn("peer-store", Some("networking"), peer_store.run());
|
||||
|
||||
// RX is not used for anything because syncing is not started for the minimal node
|
||||
let (tx, _rx) = tracing_unbounded("mpsc_syncing_engine_protocol", 100_000);
|
||||
let network_params = sc_network::config::Params::<Block> {
|
||||
@@ -64,6 +76,7 @@ pub(crate) fn build_collator_network(
|
||||
},
|
||||
fork_id: None,
|
||||
network_config,
|
||||
peer_store: peer_store_handle,
|
||||
genesis_hash,
|
||||
protocol_id,
|
||||
metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
|
||||
use grandpa::AuthorityId as GrandpaId;
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
use crate::{
|
||||
constants::currency::deposit, Balance, Balances, RandomnessCollectiveFlip, Runtime,
|
||||
RuntimeCall, RuntimeEvent, Timestamp,
|
||||
RuntimeCall, RuntimeEvent, RuntimeHoldReason, Timestamp,
|
||||
};
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{ConstBool, ConstU32, Nothing},
|
||||
};
|
||||
use pallet_contracts::{
|
||||
migration::v12, weights::SubstrateWeight, Config, DebugInfo, DefaultAddressGenerator, Frame,
|
||||
Schedule,
|
||||
migration::{v12, v13, v14},
|
||||
weights::SubstrateWeight,
|
||||
Config, DebugInfo, DefaultAddressGenerator, Frame, Schedule,
|
||||
};
|
||||
use sp_runtime::Perbill;
|
||||
|
||||
@@ -54,5 +55,10 @@ impl Config for Runtime {
|
||||
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
|
||||
type MaxDelegateDependencies = ConstU32<32>;
|
||||
type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
|
||||
type Migrations = (v12::Migration<Runtime>,);
|
||||
type Migrations = (
|
||||
v12::Migration<Runtime, Balances>,
|
||||
v13::Migration<Runtime>,
|
||||
v14::Migration<Runtime, Balances>,
|
||||
);
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ impl pallet_balances::Config for Runtime {
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type RuntimeHoldReason = RuntimeHoldReason;
|
||||
type FreezeIdentifier = ();
|
||||
type MaxHolds = ConstU32<0>;
|
||||
type MaxHolds = ConstU32<1>;
|
||||
type MaxFreezes = ConstU32<0>;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ construct_runtime!(
|
||||
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 33,
|
||||
|
||||
// Smart Contracts.
|
||||
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 40,
|
||||
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>, HoldReason} = 40,
|
||||
|
||||
// Handy utilities.
|
||||
Utility: pallet_utility::{Pallet, Call, Event} = 50,
|
||||
|
||||
Reference in New Issue
Block a user