Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update Substrate & Polkadot #540

Merged
merged 1 commit into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,063 changes: 605 additions & 458 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions client/collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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>>,
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions client/pov-recovery/src/active_candidate_recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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,
}
}

Expand All @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions client/pov-recovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions client/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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`!")?,
Expand All @@ -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`!")?,
Expand Down Expand Up @@ -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>,
}
Expand Down Expand Up @@ -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,
Expand Down
32 changes: 16 additions & 16 deletions pallets/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ();
Expand Down
2 changes: 1 addition & 1 deletion pallets/dmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ();
Expand Down
2 changes: 1 addition & 1 deletion pallets/parachain-system/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down
20 changes: 10 additions & 10 deletions pallets/session-benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions pallets/xcmp-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
2 changes: 1 addition & 1 deletion pallets/xcmp-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ();
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/statemint-common/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/statemint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/westmint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion test/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down