diff --git a/cumulus/Cargo.lock b/cumulus/Cargo.lock index 096cf62b3d6c6c723902712852dfdbdbd540f322..6d34b3fca95437f4e184a4f2d4f8e3812e31b584 100644 --- a/cumulus/Cargo.lock +++ b/cumulus/Cargo.lock @@ -1445,7 +1445,7 @@ dependencies = [ "futures 0.3.14", "parity-scale-codec", "parking_lot 0.10.2", - "polkadot-service", + "polkadot-client", "sc-client-api", "sc-consensus-aura", "sc-consensus-slots", @@ -1508,7 +1508,7 @@ dependencies = [ "futures 0.3.14", "parity-scale-codec", "parking_lot 0.10.2", - "polkadot-service", + "polkadot-client", "sc-client-api", "sp-api", "sp-block-builder", @@ -1532,10 +1532,10 @@ dependencies = [ "futures-timer 3.0.2", "parity-scale-codec", "parking_lot 0.10.2", + "polkadot-client", "polkadot-node-primitives", "polkadot-parachain", "polkadot-primitives", - "polkadot-service", "polkadot-statement-table", "polkadot-test-client", "sc-cli", @@ -1565,10 +1565,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-parachain", "polkadot-primitives", - "polkadot-service", - "polkadot-statement-table", "polkadot-test-client", "rand 0.8.3", "sc-cli", @@ -1762,7 +1759,7 @@ dependencies = [ "async-trait", "cumulus-primitives-core", "parity-scale-codec", - "polkadot-service", + "polkadot-client", "sc-client-api", "sp-api", "sp-core", diff --git a/cumulus/client/consensus/aura/Cargo.toml b/cumulus/client/consensus/aura/Cargo.toml index dcfd2956a3f5210fd1dad088a02ee790e3682847..ed62a384654e4c8ed3c785300a9111e92ad1d19a 100644 --- a/cumulus/client/consensus/aura/Cargo.toml +++ b/cumulus/client/consensus/aura/Cargo.toml @@ -24,7 +24,7 @@ sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "mast substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot dependencies -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "master" } # Cumulus dependencies cumulus-client-consensus-common = { path = "../common" } diff --git a/cumulus/client/consensus/aura/src/lib.rs b/cumulus/client/consensus/aura/src/lib.rs index 638c08bec232475a44ea669ebf75a02e7fd8f51a..2e7ef612e4b6fa7b006747c6edba2a6330cd934b 100644 --- a/cumulus/client/consensus/aura/src/lib.rs +++ b/cumulus/client/consensus/aura/src/lib.rs @@ -31,7 +31,7 @@ use cumulus_primitives_core::{ PersistedValidationData, }; use futures::lock::Mutex; -use polkadot_service::ClientHandle; +use polkadot_client::ClientHandle; use sc_client_api::{backend::AuxStore, Backend, BlockOf}; use sc_consensus_slots::{BackoffAuthoringBlocksStrategy, SlotInfo}; use sc_telemetry::TelemetryHandle; @@ -243,7 +243,7 @@ pub struct BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO> { pub proposer_factory: PF, pub create_inherent_data_providers: CIDP, pub block_import: BI, - pub relay_chain_client: polkadot_service::Client, + pub relay_chain_client: polkadot_client::Client, pub relay_chain_backend: Arc<RBackend>, pub para_client: Arc<Client>, pub backoff_authoring_blocks: Option<BS>, @@ -334,8 +334,8 @@ where /// Aura consensus builder. /// /// Builds a [`AuraConsensus`] for a parachain. As this requires -/// a concrete relay chain client instance, the builder takes a [`polkadot_service::Client`] -/// that wraps this concrete instance. By using [`polkadot_service::ExecuteWithClient`] +/// a concrete relay chain client instance, the builder takes a [`polkadot_client::Client`] +/// that wraps this concrete instance. By using [`polkadot_client::ExecuteWithClient`] /// the builder gets access to this concrete instance. struct AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Error> { _phantom: PhantomData<(Block, Error, P)>, @@ -343,7 +343,7 @@ struct AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er create_inherent_data_providers: CIDP, block_import: BI, relay_chain_backend: Arc<RBackend>, - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, para_client: Arc<Client>, backoff_authoring_blocks: Option<BS>, sync_oracle: SO, @@ -399,7 +399,7 @@ where proposer_factory: PF, block_import: BI, create_inherent_data_providers: CIDP, - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, relay_chain_backend: Arc<RBackend>, para_client: Arc<Client>, backoff_authoring_blocks: Option<BS>, @@ -434,7 +434,7 @@ where } } -impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error> polkadot_service::ExecuteWithClient +impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error> polkadot_client::ExecuteWithClient for AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Error> where Block: BlockT, @@ -481,8 +481,8 @@ where <Api as sp_api::ApiExt<PBlock>>::StateBackend: sp_api::StateBackend<HashFor<PBlock>>, PBackend: Backend<PBlock>, PBackend::State: sp_api::StateBackend<sp_runtime::traits::BlakeTwo256>, - Api: polkadot_service::RuntimeApiCollection<StateBackend = PBackend::State>, - PClient: polkadot_service::AbstractClient<PBlock, PBackend, Api = Api> + 'static, + Api: polkadot_client::RuntimeApiCollection<StateBackend = PBackend::State>, + PClient: polkadot_client::AbstractClient<PBlock, PBackend, Api = Api> + 'static, { Box::new(AuraConsensus::new::<P, _, _, _, _, _, _>( self.para_client, diff --git a/cumulus/client/consensus/relay-chain/Cargo.toml b/cumulus/client/consensus/relay-chain/Cargo.toml index db69dd59ce643c83f672c920a677af484cf88925..cb782025b712150999c298d80b0149191b004d09 100644 --- a/cumulus/client/consensus/relay-chain/Cargo.toml +++ b/cumulus/client/consensus/relay-chain/Cargo.toml @@ -18,7 +18,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot dependencies -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "master" } # Cumulus dependencies cumulus-client-consensus-common = { path = "../common" } diff --git a/cumulus/client/consensus/relay-chain/src/lib.rs b/cumulus/client/consensus/relay-chain/src/lib.rs index 971d9b33a0fb403acb50482799010cb6c730fb44..4384042c9c9bd311625327c686e3a269108e0501 100644 --- a/cumulus/client/consensus/relay-chain/src/lib.rs +++ b/cumulus/client/consensus/relay-chain/src/lib.rs @@ -41,7 +41,7 @@ use cumulus_primitives_core::{ ParaId, PersistedValidationData, }; use parking_lot::Mutex; -use polkadot_service::ClientHandle; +use polkadot_client::ClientHandle; use sc_client_api::Backend; use sp_api::ProvideRuntimeApi; use sp_consensus::{ @@ -237,7 +237,7 @@ pub struct BuildRelayChainConsensusParams<PF, BI, RBackend, CIDP> { pub proposer_factory: PF, pub create_inherent_data_providers: CIDP, pub block_import: BI, - pub relay_chain_client: polkadot_service::Client, + pub relay_chain_client: polkadot_client::Client, pub relay_chain_backend: Arc<RBackend>, } @@ -283,8 +283,8 @@ where /// Relay chain consensus builder. /// /// Builds a [`RelayChainConsensus`] for a parachain. As this requires -/// a concrete relay chain client instance, the builder takes a [`polkadot_service::Client`] -/// that wraps this concrete instanace. By using [`polkadot_service::ExecuteWithClient`] +/// a concrete relay chain client instance, the builder takes a [`polkadot_client::Client`] +/// that wraps this concrete instanace. By using [`polkadot_client::ExecuteWithClient`] /// the builder gets access to this concrete instance. struct RelayChainConsensusBuilder<Block, PF, BI, RBackend, CIDP> { para_id: ParaId, @@ -293,7 +293,7 @@ struct RelayChainConsensusBuilder<Block, PF, BI, RBackend, CIDP> { create_inherent_data_providers: CIDP, block_import: BI, relay_chain_backend: Arc<RBackend>, - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, } impl<Block, PF, BI, RBackend, CIDP> RelayChainConsensusBuilder<Block, PF, BI, RBackend, CIDP> @@ -318,7 +318,7 @@ where proposer_factory: PF, block_import: BI, create_inherent_data_providers: CIDP, - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, relay_chain_backend: Arc<RBackend>, ) -> Self { Self { @@ -338,7 +338,7 @@ where } } -impl<Block, PF, BI, RBackend, CIDP> polkadot_service::ExecuteWithClient +impl<Block, PF, BI, RBackend, CIDP> polkadot_client::ExecuteWithClient for RelayChainConsensusBuilder<Block, PF, BI, RBackend, CIDP> where Block: BlockT, @@ -362,8 +362,8 @@ where <Api as sp_api::ApiExt<PBlock>>::StateBackend: sp_api::StateBackend<HashFor<PBlock>>, PBackend: Backend<PBlock>, PBackend::State: sp_api::StateBackend<sp_runtime::traits::BlakeTwo256>, - Api: polkadot_service::RuntimeApiCollection<StateBackend = PBackend::State>, - PClient: polkadot_service::AbstractClient<PBlock, PBackend, Api = Api> + 'static, + Api: polkadot_client::RuntimeApiCollection<StateBackend = PBackend::State>, + PClient: polkadot_client::AbstractClient<PBlock, PBackend, Api = Api> + 'static, { Box::new(RelayChainConsensus::new( self.para_id, diff --git a/cumulus/client/network/Cargo.toml b/cumulus/client/network/Cargo.toml index f7a9d5a4cdd3e6d313ab07dd07c542c610945682..a63d9a90e5f928c8b1d42c4d140b4c1b258a2618 100644 --- a/cumulus/client/network/Cargo.toml +++ b/cumulus/client/network/Cargo.toml @@ -18,7 +18,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-statement-table = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" } # other deps diff --git a/cumulus/client/network/src/lib.rs b/cumulus/client/network/src/lib.rs index a0d6959df18c157afd382b8c3650e3295b9fa461..685007e18063607dcab1d230fb6a6ede14ec8f60 100644 --- a/cumulus/client/network/src/lib.rs +++ b/cumulus/client/network/src/lib.rs @@ -39,7 +39,7 @@ use polkadot_primitives::v1::{ Block as PBlock, Hash as PHash, CandidateReceipt, CompactStatement, Id as ParaId, OccupiedCoreAssumption, ParachainHost, UncheckedSigned, SigningContext, }; -use polkadot_service::ClientHandle; +use polkadot_client::ClientHandle; use codec::{Decode, Encode}; use futures::{ @@ -414,7 +414,7 @@ where /// /// Returns a boxed [`BlockAnnounceValidator`]. pub fn build_block_announce_validator<Block: BlockT, B>( - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, para_id: ParaId, relay_chain_sync_oracle: Box<dyn SyncOracle + Send>, relay_chain_backend: Arc<B>, @@ -436,12 +436,12 @@ where /// Block announce validator builder. /// /// Builds a [`BlockAnnounceValidator`] for a parachain. As this requires -/// a concrete relay chain client instance, the builder takes a [`polkadot_service::Client`] -/// that wraps this concrete instanace. By using [`polkadot_service::ExecuteWithClient`] +/// a concrete relay chain client instance, the builder takes a [`polkadot_client::Client`] +/// that wraps this concrete instanace. By using [`polkadot_client::ExecuteWithClient`] /// the builder gets access to this concrete instance. struct BlockAnnounceValidatorBuilder<Block, B> { phantom: PhantomData<Block>, - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, para_id: ParaId, relay_chain_sync_oracle: Box<dyn SyncOracle + Send>, relay_chain_backend: Arc<B>, @@ -455,7 +455,7 @@ where { /// Create a new instance of the builder. fn new( - relay_chain_client: polkadot_service::Client, + relay_chain_client: polkadot_client::Client, para_id: ParaId, relay_chain_sync_oracle: Box<dyn SyncOracle + Send>, relay_chain_backend: Arc<B>, @@ -475,7 +475,7 @@ where } } -impl<Block: BlockT, B> polkadot_service::ExecuteWithClient +impl<Block: BlockT, B> polkadot_client::ExecuteWithClient for BlockAnnounceValidatorBuilder<Block, B> where B: Backend<PBlock> + Send + 'static, @@ -490,8 +490,8 @@ where sp_api::StateBackend<sp_runtime::traits::BlakeTwo256>, PBackend: Backend<PBlock>, PBackend::State: sp_api::StateBackend<sp_runtime::traits::BlakeTwo256>, - Api: polkadot_service::RuntimeApiCollection<StateBackend = PBackend::State>, - PClient: polkadot_service::AbstractClient<PBlock, PBackend, Api = Api> + 'static, + Api: polkadot_client::RuntimeApiCollection<StateBackend = PBackend::State>, + PClient: polkadot_client::AbstractClient<PBlock, PBackend, Api = Api> + 'static, { Box::new(BlockAnnounceValidator::new( client.clone(), diff --git a/cumulus/client/pov-recovery/Cargo.toml b/cumulus/client/pov-recovery/Cargo.toml index 8fdfcafbe7c3ddc3e0638eadbda536a2273cd89d..0af05ea452f98baa383016e76f2e33e4c1f614cd 100644 --- a/cumulus/client/pov-recovery/Cargo.toml +++ b/cumulus/client/pov-recovery/Cargo.toml @@ -16,10 +16,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas # Polkadot deps polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-statement-table = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-node-subsystem = { git = "https://github.com/paritytech/polkadot", branch = "master" } diff --git a/cumulus/primitives/parachain-inherent/Cargo.toml b/cumulus/primitives/parachain-inherent/Cargo.toml index 5f3449783699ae667d9724fdbbdf1b0f2f795d70..eccb234143cc328081ee5e010f8a81c053bd6a49 100644 --- a/cumulus/primitives/parachain-inherent/Cargo.toml +++ b/cumulus/primitives/parachain-inherent/Cargo.toml @@ -16,7 +16,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", default-features = sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true } # Polkadot dependencies -polkadot-service = { git = "https://github.com/paritytech/polkadot", optional = true, branch = "master" } +polkadot-client = { git = "https://github.com/paritytech/polkadot", optional = true, branch = "master" } # Cumulus dependencies cumulus-primitives-core = { path = "../core", default-features = false } @@ -41,5 +41,5 @@ std = [ "sp-runtime", "sc-client-api", "sp-api", - "polkadot-service", + "polkadot-client", ] diff --git a/cumulus/primitives/parachain-inherent/src/client_side.rs b/cumulus/primitives/parachain-inherent/src/client_side.rs index 787782b35541983c8c07c775c7b22eeaa43af035..7f183639a36d363d7f9387de8568f27437cbd1a3 100644 --- a/cumulus/primitives/parachain-inherent/src/client_side.rs +++ b/cumulus/primitives/parachain-inherent/src/client_side.rs @@ -26,7 +26,7 @@ use cumulus_primitives_core::{ }, InboundDownwardMessage, InboundHrmpMessage, ParaId, PersistedValidationData, }; -use polkadot_service::{Client, ClientHandle, ExecuteWithClient}; +use polkadot_client::{Client, ClientHandle, ExecuteWithClient}; use sc_client_api::Backend; use sp_api::ProvideRuntimeApi; use sp_runtime::generic::BlockId;