Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename polkadot-parachain to polkadot-parachain-primitives #1334

Merged
merged 8 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
122 changes: 61 additions & 61 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cumulus/bridges/primitives/polkadot-core/src/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use parity_util_mem::MallocSizeOf;

/// Parachain id.
///
/// This is an equivalent of the `polkadot_parachain::Id`, which is a compact-encoded `u32`.
/// This is an equivalent of the `polkadot_parachain_primitives::Id`, which is a compact-encoded `u32`.
#[derive(
Clone,
CompactAs,
Expand All @@ -64,7 +64,7 @@ impl From<u32> for ParaId {

/// Parachain head.
///
/// This is an equivalent of the `polkadot_parachain::HeadData`.
/// This is an equivalent of the `polkadot_parachain_primitives::HeadData`.
///
/// The parachain head means (at least in Cumulus) a SCALE-encoded parachain header.
#[derive(
Expand Down
2 changes: 1 addition & 1 deletion cumulus/client/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sp-state-machine = { path = "../../../substrate/primitives/state-machine" }

# Polkadot
polkadot-node-primitives = { path = "../../../polkadot/node/primitives" }
polkadot-parachain = { path = "../../../polkadot/parachain" }
polkadot-parachain-primitives = { path = "../../../polkadot/parachain" }
polkadot-primitives = { path = "../../../polkadot/primitives" }

# Cumulus
Expand Down
2 changes: 1 addition & 1 deletion cumulus/client/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use sp_runtime::traits::{Block as BlockT, Header as HeaderT};

use cumulus_relay_chain_interface::RelayChainInterface;
use polkadot_node_primitives::{CollationSecondedSignal, Statement};
use polkadot_parachain::primitives::HeadData;
use polkadot_parachain_primitives::primitives::HeadData;
use polkadot_primitives::{
CandidateReceipt, CompactStatement, Hash as PHash, Id as ParaId, OccupiedCoreAssumption,
SigningContext, UncheckedSigned,
Expand Down
4 changes: 2 additions & 2 deletions cumulus/client/network/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl RelayChainInterface for DummyRelayChainInterface {
if self.data.lock().has_pending_availability {
Ok(Some(CommittedCandidateReceipt {
descriptor: CandidateDescriptor {
para_head: polkadot_parachain::primitives::HeadData(default_header().encode())
para_head: polkadot_parachain_primitives::primitives::HeadData(default_header().encode())
.hash(),
para_id: 0u32.into(),
relay_parent: PHash::random(),
Expand Down Expand Up @@ -315,7 +315,7 @@ async fn make_gossip_message_and_header(
pov_hash: PHash::random(),
erasure_root: PHash::random(),
signature: sp_core::sr25519::Signature([0u8; 64]).into(),
para_head: polkadot_parachain::primitives::HeadData(header.encode()).hash(),
para_head: polkadot_parachain_primitives::primitives::HeadData(header.encode()).hash(),
validation_code_hash: ValidationCodeHash::from(PHash::random()),
},
};
Expand Down
6 changes: 3 additions & 3 deletions cumulus/pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sp-trie = { path = "../../../substrate/primitives/trie", default-features = fals
sp-version = { path = "../../../substrate/primitives/version", default-features = false}

# Polkadot
polkadot-parachain = { path = "../../../polkadot/parachain", default-features = false, features = [ "wasm-api" ]}
polkadot-parachain-primitives = { path = "../../../polkadot/parachain", default-features = false, features = [ "wasm-api" ]}
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false}

# Cumulus
Expand Down Expand Up @@ -62,7 +62,7 @@ std = [
"frame-support/std",
"frame-system/std",
"log/std",
"polkadot-parachain/std",
"polkadot-parachain-primitives/std",
"scale-info/std",
"sp-core/std",
"sp-externalities/std",
Expand All @@ -79,7 +79,7 @@ std = [
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]

Expand Down
2 changes: 1 addition & 1 deletion cumulus/pallets/parachain-system/proc-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn register_validate_block(input: proc_macro::TokenStream) -> proc_macro::To
#check_inherents,
>(params);

#crate_::validate_block::polkadot_parachain::write_result(&res)
#crate_::validate_block::polkadot_parachain_primitives::write_result(&res)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions cumulus/pallets/parachain-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use frame_support::{
weights::Weight,
};
use frame_system::{ensure_none, ensure_root, pallet_prelude::HeaderFor};
use polkadot_parachain::primitives::RelayChainBlockNumber;
use polkadot_parachain_primitives::primitives::RelayChainBlockNumber;
use scale_info::TypeInfo;
use sp_runtime::{
traits::{Block as BlockT, BlockNumberProvider, Hash},
Expand Down Expand Up @@ -1429,7 +1429,7 @@ impl<T: Config> Pallet<T> {
pub fn initialize_for_set_code_benchmark(max_code_size: u32) {
// insert dummy ValidationData
let vfp = PersistedValidationData {
parent_head: polkadot_parachain::primitives::HeadData(Default::default()),
parent_head: polkadot_parachain_primitives::primitives::HeadData(Default::default()),
relay_parent_number: 1,
relay_parent_storage_root: Default::default(),
max_pov_size: 1_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use cumulus_primitives_core::{
};
use cumulus_primitives_parachain_inherent::ParachainInherentData;

use polkadot_parachain::primitives::{HeadData, RelayChainBlockNumber, ValidationResult};
use polkadot_parachain_primitives::primitives::{HeadData, RelayChainBlockNumber, ValidationResult};

use codec::Encode;

Expand Down
4 changes: 2 additions & 2 deletions cumulus/pallets/parachain-system/src/validate_block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ pub use sp_runtime::traits::GetRuntimeBlockType;
#[doc(hidden)]
pub use sp_std;

/// Basically the same as [`ValidationParams`](polkadot_parachain::primitives::ValidationParams),
/// Basically the same as [`ValidationParams`](polkadot_parachain_primitives::primitives::ValidationParams),
/// but a little bit optimized for our use case here.
///
/// `block_data` and `head_data` are represented as [`bytes::Bytes`] to make them reuse
/// the memory of the input parameter of the exported `validate_blocks` function.
///
/// The layout of this type must match exactly the layout of
/// [`ValidationParams`](polkadot_parachain::primitives::ValidationParams) to have the same
/// [`ValidationParams`](polkadot_parachain_primitives::primitives::ValidationParams) to have the same
/// SCALE encoding.
#[derive(codec::Decode)]
#[cfg_attr(feature = "std", derive(codec::Encode))]
Expand Down
6 changes: 3 additions & 3 deletions cumulus/parachain-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sp-version = { path = "../../../substrate/primitives/version", default-features

# Polkadot
pallet-xcm = { path = "../../../polkadot/xcm/pallet-xcm", default-features = false}
polkadot-parachain = { path = "../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../polkadot/parachain", default-features = false}
polkadot-runtime-common = { path = "../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false}
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false}
Expand Down Expand Up @@ -104,7 +104,7 @@ std = [
"pallet-transaction-payment/std",
"pallet-xcm/std",
"parachain-info/std",
"polkadot-parachain/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"scale-info/std",
"sp-api/std",
Expand Down Expand Up @@ -139,7 +139,7 @@ runtime-benchmarks = [
"pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion cumulus/parachain-template/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use frame_support::{
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_common::impls::ToAuthor;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conv

# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub use integration_tests_common::{
};
pub use parachains_common::Balance;
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pallet-assets = { path = "../../../../../../substrate/frame/assets", default-fea

# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub use integration_tests_common::{
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conv

# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub use integration_tests_common::{
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pallet-assets = { path = "../../../../../../substrate/frame/assets", default-fea

# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub use integration_tests_common::{
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pallet-salary = { path = "../../../../../../substrate/frame/salary", default-fea

# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub use integration_tests_common::{
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain::primitives::{HrmpChannelId, Id};
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ beefy-primitives = { package = "sp-consensus-beefy", path = "../../../../../subs

# Polkadot
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-service = { path = "../../../../../polkadot/node/service", default-features = false, features = ["full-node"] }
polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../polkadot/runtime/parachains" }
Expand Down Expand Up @@ -90,7 +90,7 @@ runtime-benchmarks = [
"pallet-staking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"penpal-runtime/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
"polkadot-runtime/runtime-benchmarks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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};
use polkadot_parachain::primitives::{HeadData, ValidationCode};
use polkadot_parachain_primitives::primitives::{HeadData, ValidationCode};
use polkadot_primitives::{AssignmentId, ValidatorId};
use polkadot_runtime_parachains::{
configuration::HostConfiguration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use frame_support::{
pub use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler};
pub use parachains_common::{AccountId, Balance};
pub use paste;
use polkadot_parachain::primitives::HrmpChannelId;
use polkadot_parachain_primitives::primitives::HrmpChannelId;
use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV6;
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use sp_core::{sr25519, storage::Storage, Get};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/cons
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
Expand Down Expand Up @@ -118,7 +118,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down Expand Up @@ -200,7 +200,7 @@ std = [
"parachain-info/std",
"parachains-common/std",
"polkadot-core-primitives/std",
"polkadot-parachain/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"scale-info/std",
"sp-api/std",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use frame_support::{
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier};
use polkadot_parachain::primitives::Sibling;
use polkadot_parachain_primitives::primitives::Sibling;
use sp_runtime::traits::ConvertInto;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ sp-weights = { path = "../../../../../substrate/primitives/weights", default-fea
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true }
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
Expand Down Expand Up @@ -105,7 +105,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
Expand Down Expand Up @@ -180,7 +180,7 @@ std = [
"parachain-info/std",
"parachains-common/std",
"polkadot-core-primitives/std",
"polkadot-parachain/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"polkadot-runtime-constants/std",
"scale-info/std",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use frame_support::{
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier};
use polkadot_parachain::primitives::Sibling;
use polkadot_parachain_primitives::primitives::Sibling;
use sp_runtime::traits::ConvertInto;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down
Loading
Loading