mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 20:17:57 +00:00
Update Substrate & Polkadot (#540)
This commit is contained in:
Generated
+621
-474
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,7 @@ use polkadot_node_primitives::{
|
||||
BlockData, Collation, CollationGenerationConfig, CollationResult, PoV,
|
||||
};
|
||||
use polkadot_node_subsystem::messages::{CollationGenerationMessage, CollatorProtocolMessage};
|
||||
use polkadot_overseer::OverseerHandler;
|
||||
use polkadot_overseer::Handle as OverseerHandle;
|
||||
use polkadot_primitives::v1::{CollatorPair, Hash as PHash, HeadData, Id as ParaId};
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
@@ -275,7 +275,7 @@ pub struct StartCollatorParams<Block: BlockT, RA, BS, Spawner> {
|
||||
pub runtime_api: Arc<RA>,
|
||||
pub block_status: Arc<BS>,
|
||||
pub announce_block: Arc<dyn Fn(Block::Hash, Option<Vec<u8>>) + Send + Sync>,
|
||||
pub overseer_handler: OverseerHandler,
|
||||
pub overseer_handle: OverseerHandle,
|
||||
pub spawner: Spawner,
|
||||
pub key: CollatorPair,
|
||||
pub parachain_consensus: Box<dyn ParachainConsensus<Block>>,
|
||||
@@ -287,7 +287,7 @@ pub async fn start_collator<Block, RA, BS, Spawner>(
|
||||
para_id,
|
||||
block_status,
|
||||
announce_block,
|
||||
mut overseer_handler,
|
||||
mut overseer_handle,
|
||||
spawner,
|
||||
key,
|
||||
parachain_consensus,
|
||||
@@ -321,14 +321,14 @@ pub async fn start_collator<Block, RA, BS, Spawner>(
|
||||
}),
|
||||
};
|
||||
|
||||
overseer_handler
|
||||
overseer_handle
|
||||
.send_msg(
|
||||
CollationGenerationMessage::Initialize(config),
|
||||
"StartCollator",
|
||||
)
|
||||
.await;
|
||||
|
||||
overseer_handler
|
||||
overseer_handle
|
||||
.send_msg(CollatorProtocolMessage::CollateOn(para_id), "StartCollator")
|
||||
.await;
|
||||
}
|
||||
@@ -420,7 +420,7 @@ mod tests {
|
||||
runtime_api: client.clone(),
|
||||
block_status: client.clone(),
|
||||
announce_block: Arc::new(announce_block),
|
||||
overseer_handler: handler,
|
||||
overseer_handle: handler,
|
||||
spawner,
|
||||
para_id,
|
||||
key: CollatorPair::generate().0,
|
||||
|
||||
@@ -18,7 +18,7 @@ use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
use polkadot_node_primitives::AvailableData;
|
||||
use polkadot_node_subsystem::messages::AvailabilityRecoveryMessage;
|
||||
use polkadot_overseer::OverseerHandler;
|
||||
use polkadot_overseer::Handle as OverseerHandle;
|
||||
|
||||
use futures::{channel::oneshot, stream::FuturesUnordered, Future, FutureExt, StreamExt};
|
||||
|
||||
@@ -34,15 +34,15 @@ pub(crate) struct ActiveCandidateRecovery<Block: BlockT> {
|
||||
>,
|
||||
/// The block hashes of the candidates currently being recovered.
|
||||
candidates: HashSet<Block::Hash>,
|
||||
overseer_handler: OverseerHandler,
|
||||
overseer_handle: OverseerHandle,
|
||||
}
|
||||
|
||||
impl<Block: BlockT> ActiveCandidateRecovery<Block> {
|
||||
pub fn new(overseer_handler: OverseerHandler) -> Self {
|
||||
pub fn new(overseer_handle: OverseerHandle) -> Self {
|
||||
Self {
|
||||
recoveries: Default::default(),
|
||||
candidates: Default::default(),
|
||||
overseer_handler,
|
||||
overseer_handle,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ impl<Block: BlockT> ActiveCandidateRecovery<Block> {
|
||||
) {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
self.overseer_handler
|
||||
self.overseer_handle
|
||||
.send_msg(
|
||||
AvailabilityRecoveryMessage::RecoverAvailableData(
|
||||
pending_candidate.receipt,
|
||||
|
||||
@@ -54,7 +54,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
use polkadot_node_primitives::{AvailableData, POV_BOMB_LIMIT};
|
||||
use polkadot_overseer::OverseerHandler;
|
||||
use polkadot_overseer::Handle as OverseerHandle;
|
||||
use polkadot_primitives::v1::{
|
||||
Block as PBlock, CandidateReceipt, CommittedCandidateReceipt, Id as ParaId, ParachainHost,
|
||||
SessionIndex,
|
||||
@@ -117,7 +117,7 @@ where
|
||||
{
|
||||
/// Create a new instance.
|
||||
pub fn new(
|
||||
overseer_handler: OverseerHandler,
|
||||
overseer_handle: OverseerHandle,
|
||||
relay_chain_slot_duration: Duration,
|
||||
parachain_client: Arc<PC>,
|
||||
parachain_import_queue: IQ,
|
||||
@@ -127,7 +127,7 @@ where
|
||||
Self {
|
||||
pending_candidates: HashMap::new(),
|
||||
next_candidate_to_recover: Default::default(),
|
||||
active_candidate_recovery: ActiveCandidateRecovery::new(overseer_handler),
|
||||
active_candidate_recovery: ActiveCandidateRecovery::new(overseer_handle),
|
||||
relay_chain_slot_duration,
|
||||
waiting_for_parent: HashMap::new(),
|
||||
parachain_client,
|
||||
@@ -354,6 +354,7 @@ where
|
||||
origin: None,
|
||||
skip_execution: false,
|
||||
state: None,
|
||||
indexed_body: None,
|
||||
});
|
||||
|
||||
if let Some(waiting) = self.waiting_for_parent.remove(&block_hash) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
use cumulus_client_consensus_common::ParachainConsensus;
|
||||
use cumulus_primitives_core::{CollectCollationInfo, ParaId};
|
||||
use polkadot_overseer::OverseerHandler;
|
||||
use polkadot_overseer::Handle as OverseerHandle;
|
||||
use polkadot_primitives::v1::{Block as PBlock, CollatorPair};
|
||||
use polkadot_service::{AbstractClient, Client as PClient, ClientHandle, RuntimeApiCollection};
|
||||
use sc_client_api::{
|
||||
@@ -124,7 +124,7 @@ where
|
||||
client: client.clone(),
|
||||
import_queue,
|
||||
task_manager,
|
||||
overseer_handler: relay_chain_full_node
|
||||
overseer_handle: relay_chain_full_node
|
||||
.overseer_handler
|
||||
.clone()
|
||||
.ok_or_else(|| "Polkadot full node did not provided an `OverseerHandler`!")?,
|
||||
@@ -135,7 +135,7 @@ where
|
||||
runtime_api: client.clone(),
|
||||
block_status,
|
||||
announce_block,
|
||||
overseer_handler: relay_chain_full_node
|
||||
overseer_handle: relay_chain_full_node
|
||||
.overseer_handler
|
||||
.clone()
|
||||
.ok_or_else(|| "Polkadot full node did not provided an `OverseerHandler`!")?,
|
||||
@@ -248,7 +248,7 @@ struct StartPoVRecovery<'a, Block: BlockT, Client, IQ> {
|
||||
para_id: ParaId,
|
||||
client: Arc<Client>,
|
||||
task_manager: &'a mut TaskManager,
|
||||
overseer_handler: OverseerHandler,
|
||||
overseer_handle: OverseerHandle,
|
||||
import_queue: IQ,
|
||||
_phantom: PhantomData<Block>,
|
||||
}
|
||||
@@ -276,7 +276,7 @@ where
|
||||
PClient: AbstractClient<PBlock, PBackend, Api = Api> + 'static,
|
||||
{
|
||||
let pov_recovery = cumulus_client_pov_recovery::PoVRecovery::new(
|
||||
self.overseer_handler,
|
||||
self.overseer_handle,
|
||||
sc_consensus_babe::Config::get_or_compute(&*client)?.slot_duration(),
|
||||
self.client,
|
||||
self.import_queue,
|
||||
|
||||
@@ -16,25 +16,25 @@ targets = ['x86_64-unknown-linux-gnu']
|
||||
log = { version = "0.4.0", default-features = false }
|
||||
codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = '2.0.0' }
|
||||
serde = { version = "1.0.119", default-features = false }
|
||||
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-staking = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-authorship = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-session = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-staking = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-authorship = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-session = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-io = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-tracing = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '0.9.0' }
|
||||
pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-aura = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-io = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-tracing = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-timestamp = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-aura = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
[features]
|
||||
default = ['std']
|
||||
|
||||
@@ -55,7 +55,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl system::Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
|
||||
@@ -396,7 +396,7 @@ mod tests {
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type SystemWeightInfo = ();
|
||||
type SS58Prefix = ();
|
||||
type OnSetCode = ();
|
||||
|
||||
@@ -88,7 +88,7 @@ impl frame_system::Config for Test {
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type SystemWeightInfo = ();
|
||||
type SS58Prefix = ();
|
||||
type OnSetCode = ParachainSetCode<Self>;
|
||||
|
||||
@@ -13,19 +13,19 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-staking = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-session = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-staking = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
pallet-session = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { version = "1.0.119" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -25,11 +25,11 @@ xcm-executor = { git = "https://github.com/paritytech/polkadot", default-feature
|
||||
cumulus-primitives-core = { path = "../../primitives/core", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-io = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
sp-io = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
cumulus-pallet-parachain-system = { path = "../parachain-system" }
|
||||
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master" }
|
||||
pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '3.0.0' }
|
||||
pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = "master" }
|
||||
|
||||
[features]
|
||||
default = [ "std" ]
|
||||
|
||||
@@ -53,7 +53,7 @@ parameter_types! {
|
||||
type AccountId = u64;
|
||||
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
|
||||
@@ -179,7 +179,7 @@ impl frame_system::Config for Runtime {
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type SystemWeightInfo = ();
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
|
||||
@@ -145,7 +145,7 @@ impl frame_system::Config for Runtime {
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type SystemWeightInfo = ();
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
|
||||
@@ -99,7 +99,7 @@ mod tests {
|
||||
}
|
||||
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
|
||||
@@ -145,7 +145,7 @@ parameter_types! {
|
||||
|
||||
// Configure FRAME pallets to include in runtime.
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -145,7 +145,7 @@ parameter_types! {
|
||||
|
||||
// Configure FRAME pallets to include in runtime.
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
type AccountId = AccountId;
|
||||
|
||||
@@ -184,7 +184,7 @@ impl frame_system::Config for Runtime {
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type SystemWeightInfo = ();
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
|
||||
Reference in New Issue
Block a user