From e8f84469b0481644bf273f726ac8dae2710875fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Thu, 31 Aug 2023 23:53:29 +0200 Subject: [PATCH] Rename `polkadot-parachain` to `polkadot-parachain-primitives` (#1334) * Rename `polkadot-parachain` to `polkadot-parachain-primitives` While doing this it also fixes some last `rustdoc` issues and fixes another Cargo warning related to `pallet-paged-list`. * Fix compilation * ".git/.scripts/commands/fmt/fmt.sh" * Fix XCM docs --------- Co-authored-by: command-bot <> --- Cargo.lock | 122 +++++++++--------- .../polkadot-core/src/parachains.rs | 5 +- cumulus/client/network/Cargo.toml | 2 +- cumulus/client/network/src/lib.rs | 2 +- cumulus/client/network/src/tests.rs | 8 +- cumulus/pallets/parachain-system/Cargo.toml | 6 +- .../parachain-system/proc-macro/src/lib.rs | 2 +- cumulus/pallets/parachain-system/src/lib.rs | 4 +- .../src/validate_block/implementation.rs | 4 +- .../src/validate_block/mod.rs | 11 +- cumulus/parachain-template/runtime/Cargo.toml | 6 +- .../runtime/src/xcm_config.rs | 2 +- .../assets/asset-hub-kusama/Cargo.toml | 2 +- .../assets/asset-hub-kusama/src/lib.rs | 2 +- .../assets/asset-hub-polkadot/Cargo.toml | 2 +- .../assets/asset-hub-polkadot/src/lib.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 2 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../bridges/bridge-hub-rococo/Cargo.toml | 2 +- .../bridges/bridge-hub-rococo/src/lib.rs | 2 +- .../collectives-polkadot/Cargo.toml | 2 +- .../collectives-polkadot/src/lib.rs | 2 +- .../emulated/common/Cargo.toml | 4 +- .../emulated/common/src/constants.rs | 2 +- .../emulated/common/src/lib.rs | 2 +- .../assets/asset-hub-kusama/Cargo.toml | 6 +- .../assets/asset-hub-kusama/src/xcm_config.rs | 2 +- .../assets/asset-hub-polkadot/Cargo.toml | 6 +- .../asset-hub-polkadot/src/xcm_config.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 6 +- .../asset-hub-westend/src/xcm_config.rs | 2 +- .../runtimes/assets/test-utils/Cargo.toml | 4 +- .../bridge-hubs/bridge-hub-kusama/Cargo.toml | 6 +- .../bridge-hub-kusama/src/xcm_config.rs | 2 +- .../bridge-hub-polkadot/Cargo.toml | 6 +- .../bridge-hub-polkadot/src/xcm_config.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 6 +- .../bridge-hub-rococo/src/xcm_config.rs | 2 +- .../collectives-polkadot/Cargo.toml | 6 +- .../collectives-polkadot/src/xcm_config.rs | 2 +- .../contracts/contracts-rococo/Cargo.toml | 6 +- .../contracts-rococo/src/xcm_config.rs | 2 +- .../parachains/runtimes/test-utils/Cargo.toml | 4 +- .../parachains/runtimes/test-utils/src/lib.rs | 2 +- .../runtimes/testing/penpal/Cargo.toml | 6 +- .../runtimes/testing/penpal/src/xcm_config.rs | 2 +- .../testing/rococo-parachain/Cargo.toml | 6 +- .../testing/rococo-parachain/src/lib.rs | 2 +- cumulus/primitives/core/Cargo.toml | 4 +- cumulus/primitives/core/src/lib.rs | 4 +- cumulus/test/client/Cargo.toml | 2 +- cumulus/test/client/src/lib.rs | 4 +- cumulus/xcm/xcm-emulator/src/lib.rs | 2 +- .../node/core/candidate-validation/Cargo.toml | 2 +- .../node/core/candidate-validation/src/lib.rs | 9 +- polkadot/node/core/pvf/Cargo.toml | 2 +- polkadot/node/core/pvf/common/Cargo.toml | 2 +- polkadot/node/core/pvf/common/src/execute.rs | 2 +- polkadot/node/core/pvf/common/src/pvf.rs | 2 +- .../node/core/pvf/execute-worker/Cargo.toml | 2 +- .../node/core/pvf/execute-worker/src/lib.rs | 2 +- .../node/core/pvf/prepare-worker/Cargo.toml | 2 +- polkadot/node/core/pvf/src/artifacts.rs | 2 +- polkadot/node/core/pvf/src/error.rs | 2 +- .../node/core/pvf/src/execute/worker_intf.rs | 2 +- polkadot/node/core/pvf/src/host.rs | 2 +- polkadot/node/core/pvf/src/lib.rs | 6 +- polkadot/node/core/pvf/tests/it/adder.rs | 2 +- polkadot/node/core/pvf/tests/it/main.rs | 2 +- .../network/approval-distribution/src/lib.rs | 4 +- .../network/dispute-distribution/src/lib.rs | 4 +- polkadot/node/primitives/Cargo.toml | 2 +- polkadot/node/primitives/src/lib.rs | 4 +- polkadot/node/service/Cargo.toml | 4 +- .../node/subsystem-test-helpers/src/lib.rs | 2 +- polkadot/node/test/service/Cargo.toml | 4 +- polkadot/parachain/Cargo.toml | 2 +- .../test-parachains/adder/Cargo.toml | 2 +- .../test-parachains/adder/collator/Cargo.toml | 2 +- .../test-parachains/adder/collator/src/lib.rs | 2 +- .../test-parachains/undying/Cargo.toml | 2 +- .../undying/collator/Cargo.toml | 2 +- .../undying/collator/src/lib.rs | 2 +- polkadot/primitives/Cargo.toml | 6 +- polkadot/primitives/src/runtime_api.rs | 2 +- polkadot/primitives/src/v5/mod.rs | 2 +- .../implementers-guide/src/types/README.md | 12 +- polkadot/runtime/parachains/Cargo.toml | 6 +- .../runtime/parachains/src/configuration.rs | 4 +- polkadot/runtime/parachains/src/hrmp.rs | 2 +- polkadot/runtime/rococo/Cargo.toml | 6 +- polkadot/runtime/test-runtime/Cargo.toml | 6 +- polkadot/runtime/westend/Cargo.toml | 6 +- polkadot/xcm/pallet-xcm/Cargo.toml | 4 +- polkadot/xcm/pallet-xcm/src/mock.rs | 2 +- polkadot/xcm/pallet-xcm/src/tests.rs | 2 +- polkadot/xcm/src/v2/multilocation.rs | 8 -- polkadot/xcm/src/v3/junctions.rs | 4 - polkadot/xcm/src/v3/multilocation.rs | 10 -- polkadot/xcm/xcm-builder/Cargo.toml | 6 +- polkadot/xcm/xcm-builder/src/barriers.rs | 2 +- .../xcm/xcm-builder/src/origin_conversion.rs | 2 +- polkadot/xcm/xcm-builder/tests/mock/mod.rs | 2 +- polkadot/xcm/xcm-builder/tests/scenarios.rs | 2 +- polkadot/xcm/xcm-simulator/Cargo.toml | 2 +- polkadot/xcm/xcm-simulator/example/Cargo.toml | 4 +- .../xcm-simulator/example/src/parachain.rs | 2 +- .../xcm-simulator/example/src/relay_chain.rs | 2 +- polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml | 4 +- polkadot/xcm/xcm-simulator/fuzzer/src/fuzz.rs | 2 +- .../xcm/xcm-simulator/fuzzer/src/parachain.rs | 2 +- .../xcm-simulator/fuzzer/src/relay_chain.rs | 2 +- polkadot/xcm/xcm-simulator/src/lib.rs | 2 +- substrate/frame/paged-list/fuzzer/Cargo.toml | 2 +- 114 files changed, 249 insertions(+), 260 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9ea938e9caa57..c99790ba28be9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -710,7 +710,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "sp-core", @@ -770,7 +770,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "primitive-types", "scale-info", @@ -810,7 +810,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "sp-core", @@ -866,7 +866,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", @@ -909,7 +909,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "sp-core", @@ -967,7 +967,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "primitive-types", "scale-info", @@ -1015,7 +1015,7 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "sp-consensus-aura", "sp-core", "sp-io", @@ -1865,7 +1865,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "serde", @@ -1927,7 +1927,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", @@ -1969,7 +1969,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "sp-core", @@ -2033,7 +2033,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "rococo-runtime-constants", "scale-info", @@ -2597,7 +2597,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "sp-core", @@ -2653,7 +2653,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", @@ -2864,7 +2864,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "smallvec", @@ -3442,7 +3442,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-test-client", "portpicker", @@ -3577,7 +3577,7 @@ dependencies = [ "lazy_static", "log", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "sc-client-api", "scale-info", "sp-core", @@ -3706,7 +3706,7 @@ version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", "sp-api", @@ -3896,7 +3896,7 @@ dependencies = [ "pallet-balances", "pallet-transaction-payment", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-block-builder", "sc-consensus", @@ -6462,7 +6462,7 @@ dependencies = [ "paste", "penpal-runtime", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants", @@ -10828,7 +10828,7 @@ dependencies = [ "log", "pallet-balances", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", "serde", @@ -10989,7 +10989,7 @@ dependencies = [ "pallet-xcm", "parachain-info", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "smallvec", @@ -11061,7 +11061,7 @@ dependencies = [ "parachain-info", "parachains-common", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "sp-consensus-aura", "sp-core", "sp-io", @@ -11314,7 +11314,7 @@ dependencies = [ "parachain-info", "parachains-common", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "scale-info", @@ -11949,7 +11949,7 @@ dependencies = [ "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-core", @@ -12106,7 +12106,7 @@ dependencies = [ "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "rand 0.8.5", "slotmap", @@ -12155,7 +12155,7 @@ dependencies = [ "landlock", "libc", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-executor", "sc-executor-common", @@ -12177,7 +12177,7 @@ dependencies = [ "futures", "parity-scale-codec", "polkadot-node-core-pvf-common", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "rayon", "sp-core", @@ -12195,7 +12195,7 @@ dependencies = [ "libc", "parity-scale-codec", "polkadot-node-core-pvf-common", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "rayon", "sc-executor", @@ -12305,7 +12305,7 @@ dependencies = [ "futures", "parity-scale-codec", "polkadot-erasure-coding", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "schnorrkel 0.9.1", "serde", @@ -12436,22 +12436,6 @@ dependencies = [ "tracing-gum", ] -[[package]] -name = "polkadot-parachain" -version = "1.0.0" -dependencies = [ - "bounded-collections", - "derive_more", - "frame-support", - "parity-scale-codec", - "polkadot-core-primitives", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "polkadot-parachain-bin" version = "1.0.0" @@ -12535,6 +12519,22 @@ dependencies = [ "wait-timeout", ] +[[package]] +name = "polkadot-parachain-primitives" +version = "1.0.0" +dependencies = [ + "bounded-collections", + "derive_more", + "frame-support", + "parity-scale-codec", + "polkadot-core-primitives", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "polkadot-performance-test" version = "1.0.0" @@ -12560,7 +12560,7 @@ dependencies = [ "hex-literal 0.4.1", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "serde", "sp-api", @@ -12825,7 +12825,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", @@ -12912,7 +12912,7 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", @@ -13115,7 +13115,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -13164,7 +13164,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime-common", @@ -14138,7 +14138,7 @@ dependencies = [ "parachain-info", "parachains-common", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "sp-api", "sp-block-builder", @@ -14212,7 +14212,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -17938,7 +17938,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", "polkadot-test-runtime", @@ -18580,7 +18580,7 @@ version = "1.0.0" dependencies = [ "dlmalloc", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "sp-io", "sp-std", "substrate-wasm-builder", @@ -18600,7 +18600,7 @@ dependencies = [ "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-service", "polkadot-test-service", @@ -18629,7 +18629,7 @@ dependencies = [ "dlmalloc", "log", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "sp-io", "sp-std", "substrate-wasm-builder", @@ -18649,7 +18649,7 @@ dependencies = [ "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-service", "polkadot-test-service", @@ -20463,7 +20463,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -20927,7 +20927,7 @@ dependencies = [ "parity-scale-codec", "paste", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", "sp-std", @@ -20949,7 +20949,7 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", "sp-core", @@ -20976,7 +20976,7 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", "sp-core", diff --git a/cumulus/bridges/primitives/polkadot-core/src/parachains.rs b/cumulus/bridges/primitives/polkadot-core/src/parachains.rs index 3cf8eca0c6b6d..223956171f864 100644 --- a/cumulus/bridges/primitives/polkadot-core/src/parachains.rs +++ b/cumulus/bridges/primitives/polkadot-core/src/parachains.rs @@ -37,7 +37,8 @@ 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, @@ -64,7 +65,7 @@ impl From 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( diff --git a/cumulus/client/network/Cargo.toml b/cumulus/client/network/Cargo.toml index 99a567a950c17..eaaf497ac3edc 100644 --- a/cumulus/client/network/Cargo.toml +++ b/cumulus/client/network/Cargo.toml @@ -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 diff --git a/cumulus/client/network/src/lib.rs b/cumulus/client/network/src/lib.rs index 1c70b823411aa..ebd557b805c5d 100644 --- a/cumulus/client/network/src/lib.rs +++ b/cumulus/client/network/src/lib.rs @@ -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, diff --git a/cumulus/client/network/src/tests.rs b/cumulus/client/network/src/tests.rs index af7747622ef05..e03f470753bb6 100644 --- a/cumulus/client/network/src/tests.rs +++ b/cumulus/client/network/src/tests.rs @@ -125,8 +125,10 @@ 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()) - .hash(), + para_head: polkadot_parachain_primitives::primitives::HeadData( + default_header().encode(), + ) + .hash(), para_id: 0u32.into(), relay_parent: PHash::random(), collator: CollatorPair::generate().0.public(), @@ -315,7 +317,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()), }, }; diff --git a/cumulus/pallets/parachain-system/Cargo.toml b/cumulus/pallets/parachain-system/Cargo.toml index b72a7924be546..3063083c0ee49 100644 --- a/cumulus/pallets/parachain-system/Cargo.toml +++ b/cumulus/pallets/parachain-system/Cargo.toml @@ -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 @@ -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", @@ -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", ] diff --git a/cumulus/pallets/parachain-system/proc-macro/src/lib.rs b/cumulus/pallets/parachain-system/proc-macro/src/lib.rs index ece9348f43ee9..8ab5d81efdcf4 100644 --- a/cumulus/pallets/parachain-system/proc-macro/src/lib.rs +++ b/cumulus/pallets/parachain-system/proc-macro/src/lib.rs @@ -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) } } } diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 0ab2abb188113..a8e9a0bf9ae44 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -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}, @@ -1429,7 +1429,7 @@ impl Pallet { 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, diff --git a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs index 8001b4cc8acb7..ce3b724420f1c 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs @@ -22,7 +22,9 @@ 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; diff --git a/cumulus/pallets/parachain-system/src/validate_block/mod.rs b/cumulus/pallets/parachain-system/src/validate_block/mod.rs index ab8ea43ec7c65..db149401638aa 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/mod.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/mod.rs @@ -34,7 +34,7 @@ pub use bytes; pub use codec::decode_from_bytes; #[cfg(not(feature = "std"))] #[doc(hidden)] -pub use polkadot_parachain; +pub use polkadot_parachain_primitives; #[cfg(not(feature = "std"))] #[doc(hidden)] pub use sp_runtime::traits::GetRuntimeBlockType; @@ -42,15 +42,16 @@ pub use sp_runtime::traits::GetRuntimeBlockType; #[doc(hidden)] pub use sp_std; -/// Basically the same as [`ValidationParams`](polkadot_parachain::primitives::ValidationParams), -/// but a little bit optimized for our use case here. +/// 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 -/// SCALE encoding. +/// [`ValidationParams`](polkadot_parachain_primitives::primitives::ValidationParams) to have the +/// same SCALE encoding. #[derive(codec::Decode)] #[cfg_attr(feature = "std", derive(codec::Encode))] #[doc(hidden)] diff --git a/cumulus/parachain-template/runtime/Cargo.toml b/cumulus/parachain-template/runtime/Cargo.toml index 0a7801c99bc29..f26b7be23533a 100644 --- a/cumulus/parachain-template/runtime/Cargo.toml +++ b/cumulus/parachain-template/runtime/Cargo.toml @@ -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} @@ -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", @@ -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", diff --git a/cumulus/parachain-template/runtime/src/xcm_config.rs b/cumulus/parachain-template/runtime/src/xcm_config.rs index ff996d4dde306..353f68d22e350 100644 --- a/cumulus/parachain-template/runtime/src/xcm_config.rs +++ b/cumulus/parachain-template/runtime/src/xcm_config.rs @@ -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::{ diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml index 78d6b0925bb32..b179c6467843e 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/Cargo.toml @@ -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} diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs index d16d8548ba4a3..696e0a5cf76e9 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-kusama/src/lib.rs @@ -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::*, diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml index 0d415f8d74ffa..4a0ca2e243a52 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/Cargo.toml @@ -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} diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs index 44004813f18a5..176e3def1f214 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-polkadot/src/lib.rs @@ -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::*, diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml index 847ab2fa9f80b..64522e309a25a 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml @@ -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} diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs index f09fed97b8f0d..b7eba63df1082 100644 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs @@ -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::*, diff --git a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/Cargo.toml index 4a4bdeb9b1f83..7b909562f151c 100644 --- a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/Cargo.toml @@ -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} diff --git a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/lib.rs index 4689c076b5185..52c17122c5758 100644 --- a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/lib.rs @@ -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::*, diff --git a/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/Cargo.toml b/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/Cargo.toml index d23c511a706af..0882dd9d408c9 100644 --- a/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/Cargo.toml @@ -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} diff --git a/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/src/lib.rs b/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/src/lib.rs index 9fbee683fed6f..aae8ab2111ea8 100644 --- a/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/collectives/collectives-polkadot/src/lib.rs @@ -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::*, diff --git a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml index 97a5868adc607..382826873eb4e 100644 --- a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml @@ -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" } @@ -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", diff --git a/cumulus/parachains/integration-tests/emulated/common/src/constants.rs b/cumulus/parachains/integration-tests/emulated/common/src/constants.rs index 569436f06a09a..b32d86d3b07f7 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/constants.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/constants.rs @@ -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, diff --git a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs index 6201b0ef71941..a5d80cafd7fef 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs @@ -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}; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml index 1eca60a81e540..53555499842fd 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/Cargo.toml @@ -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} @@ -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", @@ -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", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs index 7a28840adcb1d..0c197598f8895 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs @@ -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::{ diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml index 813a0a33c2a63..dfc3d5416cc3c 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml @@ -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} @@ -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", @@ -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", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs index 05110b65622e7..d59507e4bd07d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs @@ -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::{ diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 14f1e541091fc..8c25842cbf381 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -56,7 +56,7 @@ primitive-types = { version = "0.12.1", default-features = false, features = ["c 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} westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} @@ -110,7 +110,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", @@ -189,7 +189,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", diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index 121f97531933a..6981c290c98ce 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -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::{ diff --git a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml index 332a3f8a7f123..7fee710f000c0 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml @@ -38,7 +38,7 @@ parachains-runtimes-test-utils = { path = "../../test-utils", default-features = xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false} 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} [dev-dependencies] hex-literal = "0.4.1" @@ -66,7 +66,7 @@ std = [ "parachain-info/std", "parachains-common/std", "parachains-runtimes-test-utils/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "sp-consensus-aura/std", "sp-core/std", "sp-io/std", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml index b1695f4abcdb6..91eb7adc61fee 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -52,7 +52,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} @@ -110,7 +110,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", "serde", @@ -148,7 +148,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", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 4e295be542e97..696462be9c45c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml index 1dfa84f338fbe..52a866b709714 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -52,7 +52,7 @@ polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/ 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} @@ -109,7 +109,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", @@ -148,7 +148,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", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index d4b97ce2d292f..0965600c24681 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 93fc1d824307a..d65fb9b72cd1c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -52,7 +52,7 @@ rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/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} @@ -144,7 +144,7 @@ std = [ "parachain-info/std", "parachains-common/std", "polkadot-core-primitives/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", "rococo-runtime-constants/std", "scale-info/std", @@ -188,7 +188,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", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index ddba163df59b4..e3d8645d49e7e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -31,7 +31,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use sp_core::Get; use xcm::latest::prelude::*; use xcm_builder::{ diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml index be9c0fc9952c8..1f17a0ef0e69e 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/Cargo.toml @@ -55,7 +55,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea # Polkadot pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} 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} @@ -106,7 +106,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/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", @@ -186,7 +186,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", diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 98a3710e42acf..b4db73e3ab440 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index ea24392657f03..2e298e05ec76b 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -55,7 +55,7 @@ pallet-contracts-primitives = { path = "../../../../../substrate/frame/contracts kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} 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} @@ -113,7 +113,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", @@ -151,7 +151,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-utility/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", diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index 8040ff7493582..7433b8e94d6c1 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -24,7 +24,7 @@ use frame_support::{ }; use frame_system::EnsureRoot; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, diff --git a/cumulus/parachains/runtimes/test-utils/Cargo.toml b/cumulus/parachains/runtimes/test-utils/Cargo.toml index 76be24b611835..681e5e64d4128 100644 --- a/cumulus/parachains/runtimes/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/test-utils/Cargo.toml @@ -38,7 +38,7 @@ parachain-info = { path = "../../pallets/parachain-info", default-features = fal xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false} xcm-executor = { package = "staging-xcm-executor", path = "../../../../polkadot/xcm/xcm-executor", default-features = false} 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} [dev-dependencies] hex-literal = "0.4.1" @@ -65,7 +65,7 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "sp-consensus-aura/std", "sp-core/std", "sp-io/std", diff --git a/cumulus/parachains/runtimes/test-utils/src/lib.rs b/cumulus/parachains/runtimes/test-utils/src/lib.rs index 89bc7c4906eab..8289a80baa11a 100644 --- a/cumulus/parachains/runtimes/test-utils/src/lib.rs +++ b/cumulus/parachains/runtimes/test-utils/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ }; use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor}; use parachains_common::{AccountId, SLOT_DURATION}; -use polkadot_parachain::primitives::{ +use polkadot_parachain_primitives::primitives::{ HeadData, HrmpChannelId, RelayChainBlockNumber, XcmpMessageFormat, }; use sp_consensus_aura::{SlotDuration, AURA_ENGINE_ID}; diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index 711d2542f128e..99caf2f27d039 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -56,7 +56,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea # Polkadot polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false} 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} @@ -109,7 +109,7 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "polkadot-primitives/std", "polkadot-runtime-common/std", "scale-info/std", @@ -147,7 +147,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-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 694f9c1ade310..97d2e63370ead 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -39,7 +39,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_asset_tx_payment::HandleCredit; use pallet_xcm::XcmPassthrough; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; use sp_runtime::traits::Zero; use xcm::latest::prelude::*; diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index 43f25d72e333d..863b9edd72581 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -37,7 +37,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea # 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} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false} xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false} @@ -84,7 +84,7 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "scale-info/std", "sp-api/std", "sp-block-builder/std", @@ -113,7 +113,7 @@ runtime-benchmarks = [ "pallet-sudo/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 084372589d94c..362ad0383a231 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -76,7 +76,7 @@ use xcm_executor::traits::JustTry; // XCM imports use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; -use polkadot_parachain::primitives::Sibling; +use polkadot_parachain_primitives::primitives::Sibling; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, diff --git a/cumulus/primitives/core/Cargo.toml b/cumulus/primitives/core/Cargo.toml index 761ca04d152f5..fc7573be13835 100644 --- a/cumulus/primitives/core/Cargo.toml +++ b/cumulus/primitives/core/Cargo.toml @@ -16,7 +16,7 @@ sp-trie = { path = "../../../substrate/primitives/trie", default-features = fals # 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-primitives = { path = "../../../polkadot/primitives", default-features = false} xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false} @@ -25,7 +25,7 @@ default = [ "std" ] std = [ "codec/std", "polkadot-core-primitives/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "polkadot-primitives/std", "scale-info/std", "sp-api/std", diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index d697713f39a72..faaef09b26e17 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -19,13 +19,13 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; -use polkadot_parachain::primitives::HeadData; +use polkadot_parachain_primitives::primitives::HeadData; use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; pub use polkadot_core_primitives::InboundDownwardMessage; -pub use polkadot_parachain::primitives::{ +pub use polkadot_parachain_primitives::primitives::{ DmpMessageHandler, Id as ParaId, IsSystem, UpwardMessage, ValidationParams, XcmpMessageFormat, XcmpMessageHandler, }; diff --git a/cumulus/test/client/Cargo.toml b/cumulus/test/client/Cargo.toml index 4e07be3368e20..290cfd7e4d899 100644 --- a/cumulus/test/client/Cargo.toml +++ b/cumulus/test/client/Cargo.toml @@ -29,7 +29,7 @@ pallet-balances = { path = "../../../substrate/frame/balances" } # Polkadot polkadot-primitives = { path = "../../../polkadot/primitives" } -polkadot-parachain = { path = "../../../polkadot/parachain" } +polkadot-parachain-primitives = { path = "../../../polkadot/parachain" } # Cumulus cumulus-test-runtime = { path = "../runtime" } diff --git a/cumulus/test/client/src/lib.rs b/cumulus/test/client/src/lib.rs index f59aa09e66699..61249bdb066ad 100644 --- a/cumulus/test/client/src/lib.rs +++ b/cumulus/test/client/src/lib.rs @@ -31,7 +31,9 @@ use sp_runtime::{generic::Era, BuildStorage, SaturatedConversion}; pub use block_builder::*; pub use cumulus_test_runtime as runtime; -pub use polkadot_parachain::primitives::{BlockData, HeadData, ValidationParams, ValidationResult}; +pub use polkadot_parachain_primitives::primitives::{ + BlockData, HeadData, ValidationParams, ValidationResult, +}; pub use sc_executor::error::Result as ExecutorResult; pub use substrate_test_client::*; diff --git a/cumulus/xcm/xcm-emulator/src/lib.rs b/cumulus/xcm/xcm-emulator/src/lib.rs index b882e7a9f0b88..79fe496f26b0a 100644 --- a/cumulus/xcm/xcm-emulator/src/lib.rs +++ b/cumulus/xcm/xcm-emulator/src/lib.rs @@ -973,7 +973,7 @@ macro_rules! decl_test_networks { fn process_downward_messages() { use $crate::{DmpMessageHandler, Bounded}; - use polkadot_parachain::primitives::RelayChainBlockNumber; + use polkadot_parachain_primitives::primitives::RelayChainBlockNumber; while let Some((to_para_id, messages)) = $crate::DOWNWARD_MESSAGES.with(|b| b.borrow_mut().get_mut(Self::name()).unwrap().pop_front()) { diff --git a/polkadot/node/core/candidate-validation/Cargo.toml b/polkadot/node/core/candidate-validation/Cargo.toml index 3935c91d8977e..a2e88778532f7 100644 --- a/polkadot/node/core/candidate-validation/Cargo.toml +++ b/polkadot/node/core/candidate-validation/Cargo.toml @@ -16,7 +16,7 @@ sp-maybe-compressed-blob = { package = "sp-maybe-compressed-blob", path = "../.. parity-scale-codec = { version = "3.6.1", default-features = false, features = ["bit-vec", "derive"] } polkadot-primitives = { path = "../../../primitives" } -polkadot-parachain = { path = "../../../parachain" } +polkadot-parachain-primitives = { path = "../../../parachain" } polkadot-node-primitives = { path = "../../primitives" } polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem-util = { path = "../../subsystem-util" } diff --git a/polkadot/node/core/candidate-validation/src/lib.rs b/polkadot/node/core/candidate-validation/src/lib.rs index f53f2a6aee066..0da2853340d3f 100644 --- a/polkadot/node/core/candidate-validation/src/lib.rs +++ b/polkadot/node/core/candidate-validation/src/lib.rs @@ -40,7 +40,9 @@ use polkadot_node_subsystem::{ SubsystemSender, }; use polkadot_node_subsystem_util::executor_params_at_relay_parent; -use polkadot_parachain::primitives::{ValidationParams, ValidationResult as WasmValidationResult}; +use polkadot_parachain_primitives::primitives::{ + ValidationParams, ValidationResult as WasmValidationResult, +}; use polkadot_primitives::{ CandidateCommitments, CandidateDescriptor, CandidateReceipt, ExecutorParams, Hash, OccupiedCoreAssumption, PersistedValidationData, PvfExecTimeoutKind, PvfPrepTimeoutKind, @@ -111,10 +113,7 @@ pub struct CandidateValidationSubsystem { } impl CandidateValidationSubsystem { - /// Create a new `CandidateValidationSubsystem` with the given task spawner and isolation - /// strategy. - /// - /// Check out [`IsolationStrategy`] to get more details. + /// Create a new `CandidateValidationSubsystem`. pub fn with_config( config: Option, metrics: Metrics, diff --git a/polkadot/node/core/pvf/Cargo.toml b/polkadot/node/core/pvf/Cargo.toml index f28d00d26906d..a265139d95c01 100644 --- a/polkadot/node/core/pvf/Cargo.toml +++ b/polkadot/node/core/pvf/Cargo.toml @@ -25,7 +25,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } -polkadot-parachain = { path = "../../../parachain" } +polkadot-parachain-primitives = { path = "../../../parachain" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-node-core-pvf-common = { path = "common" } polkadot-node-metrics = { path = "../../metrics" } diff --git a/polkadot/node/core/pvf/common/Cargo.toml b/polkadot/node/core/pvf/common/Cargo.toml index 620e2148623f3..621f7e24f72be 100644 --- a/polkadot/node/core/pvf/common/Cargo.toml +++ b/polkadot/node/core/pvf/common/Cargo.toml @@ -15,7 +15,7 @@ tokio = { version = "1.24.2", features = ["fs", "process", "io-util"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } -polkadot-parachain = { path = "../../../../parachain" } +polkadot-parachain-primitives = { path = "../../../../parachain" } polkadot-primitives = { path = "../../../../primitives" } sc-executor = { path = "../../../../../substrate/client/executor" } diff --git a/polkadot/node/core/pvf/common/src/execute.rs b/polkadot/node/core/pvf/common/src/execute.rs index de5ce39f78381..399b847791a91 100644 --- a/polkadot/node/core/pvf/common/src/execute.rs +++ b/polkadot/node/core/pvf/common/src/execute.rs @@ -16,7 +16,7 @@ use crate::error::InternalValidationError; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::ValidationResult; +use polkadot_parachain_primitives::primitives::ValidationResult; use polkadot_primitives::ExecutorParams; use std::time::Duration; diff --git a/polkadot/node/core/pvf/common/src/pvf.rs b/polkadot/node/core/pvf/common/src/pvf.rs index e31264713a571..0cc86434c1952 100644 --- a/polkadot/node/core/pvf/common/src/pvf.rs +++ b/polkadot/node/core/pvf/common/src/pvf.rs @@ -16,7 +16,7 @@ use crate::prepare::PrepareJobKind; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::ValidationCodeHash; +use polkadot_parachain_primitives::primitives::ValidationCodeHash; use polkadot_primitives::ExecutorParams; use sp_core::blake2_256; use std::{ diff --git a/polkadot/node/core/pvf/execute-worker/Cargo.toml b/polkadot/node/core/pvf/execute-worker/Cargo.toml index a9619015594fa..23678d95696e7 100644 --- a/polkadot/node/core/pvf/execute-worker/Cargo.toml +++ b/polkadot/node/core/pvf/execute-worker/Cargo.toml @@ -16,7 +16,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } polkadot-node-core-pvf-common = { path = "../common" } -polkadot-parachain = { path = "../../../../parachain" } +polkadot-parachain-primitives = { path = "../../../../parachain" } polkadot-primitives = { path = "../../../../primitives" } sp-core = { path = "../../../../../substrate/primitives/core" } diff --git a/polkadot/node/core/pvf/execute-worker/src/lib.rs b/polkadot/node/core/pvf/execute-worker/src/lib.rs index 7a14de18a82fa..36793a5c71eca 100644 --- a/polkadot/node/core/pvf/execute-worker/src/lib.rs +++ b/polkadot/node/core/pvf/execute-worker/src/lib.rs @@ -37,7 +37,7 @@ use polkadot_node_core_pvf_common::{ worker_event_loop, }, }; -use polkadot_parachain::primitives::ValidationResult; +use polkadot_parachain_primitives::primitives::ValidationResult; use std::{ path::PathBuf, sync::{mpsc::channel, Arc}, diff --git a/polkadot/node/core/pvf/prepare-worker/Cargo.toml b/polkadot/node/core/pvf/prepare-worker/Cargo.toml index 61d197af07acc..e7a12cd9a809c 100644 --- a/polkadot/node/core/pvf/prepare-worker/Cargo.toml +++ b/polkadot/node/core/pvf/prepare-worker/Cargo.toml @@ -17,7 +17,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } polkadot-node-core-pvf-common = { path = "../common" } -polkadot-parachain = { path = "../../../../parachain" } +polkadot-parachain-primitives = { path = "../../../../parachain" } polkadot-primitives = { path = "../../../../primitives" } sc-executor = { path = "../../../../../substrate/client/executor" } diff --git a/polkadot/node/core/pvf/src/artifacts.rs b/polkadot/node/core/pvf/src/artifacts.rs index a180af15db277..dc5921df96884 100644 --- a/polkadot/node/core/pvf/src/artifacts.rs +++ b/polkadot/node/core/pvf/src/artifacts.rs @@ -58,7 +58,7 @@ use crate::host::PrepareResultSender; use always_assert::always; use polkadot_node_core_pvf_common::{error::PrepareError, prepare::PrepareStats, pvf::PvfPrepData}; -use polkadot_parachain::primitives::ValidationCodeHash; +use polkadot_parachain_primitives::primitives::ValidationCodeHash; use polkadot_primitives::ExecutorParamsHash; use std::{ collections::HashMap, diff --git a/polkadot/node/core/pvf/src/error.rs b/polkadot/node/core/pvf/src/error.rs index cb35ec9e9d9a4..87ef0b54a0406 100644 --- a/polkadot/node/core/pvf/src/error.rs +++ b/polkadot/node/core/pvf/src/error.rs @@ -28,7 +28,7 @@ pub enum ValidationError { } /// A description of an error raised during executing a PVF and can be attributed to the combination -/// of the candidate [`polkadot_parachain::primitives::ValidationParams`] and the PVF. +/// of the candidate [`polkadot_parachain_primitives::primitives::ValidationParams`] and the PVF. #[derive(Debug, Clone)] pub enum InvalidCandidate { /// PVF preparation ended up with a deterministic error. diff --git a/polkadot/node/core/pvf/src/execute/worker_intf.rs b/polkadot/node/core/pvf/src/execute/worker_intf.rs index 948abd2261d72..d66444a8102d9 100644 --- a/polkadot/node/core/pvf/src/execute/worker_intf.rs +++ b/polkadot/node/core/pvf/src/execute/worker_intf.rs @@ -32,7 +32,7 @@ use polkadot_node_core_pvf_common::{ execute::{Handshake, Response}, framed_recv, framed_send, }; -use polkadot_parachain::primitives::ValidationResult; +use polkadot_parachain_primitives::primitives::ValidationResult; use polkadot_primitives::ExecutorParams; use std::{path::Path, time::Duration}; use tokio::{io, net::UnixStream}; diff --git a/polkadot/node/core/pvf/src/host.rs b/polkadot/node/core/pvf/src/host.rs index 9f3b7e23fd89e..5290b2760f423 100644 --- a/polkadot/node/core/pvf/src/host.rs +++ b/polkadot/node/core/pvf/src/host.rs @@ -35,7 +35,7 @@ use polkadot_node_core_pvf_common::{ error::{PrepareError, PrepareResult}, pvf::PvfPrepData, }; -use polkadot_parachain::primitives::ValidationResult; +use polkadot_parachain_primitives::primitives::ValidationResult; use std::{ collections::HashMap, path::{Path, PathBuf}, diff --git a/polkadot/node/core/pvf/src/lib.rs b/polkadot/node/core/pvf/src/lib.rs index 1da0593835fb4..c3a7a4613139e 100644 --- a/polkadot/node/core/pvf/src/lib.rs +++ b/polkadot/node/core/pvf/src/lib.rs @@ -33,8 +33,8 @@ //! compile) in order to pre-check its validity. //! //! (b) PVF execution. This accepts the PVF -//! [`params`][`polkadot_parachain::primitives::ValidationParams`] and the `Pvf` code, prepares -//! (verifies and compiles) the code, and then executes PVF with the `params`. +//! [`params`][`polkadot_parachain_primitives::primitives::ValidationParams`] and the `Pvf` +//! code, prepares (verifies and compiles) the code, and then executes PVF with the `params`. //! //! (c) Heads up. This request allows to signal that the given PVF may be needed soon and that it //! should be prepared for execution. @@ -86,7 +86,7 @@ //! //! The execute workers will be fed by the requests from the execution queue, which is basically a //! combination of a path to the compiled artifact and the -//! [`params`][`polkadot_parachain::primitives::ValidationParams`]. +//! [`params`][`polkadot_parachain_primitives::primitives::ValidationParams`]. mod artifacts; mod error; diff --git a/polkadot/node/core/pvf/tests/it/adder.rs b/polkadot/node/core/pvf/tests/it/adder.rs index a4c2e21bdeaa7..bad7a66054c9e 100644 --- a/polkadot/node/core/pvf/tests/it/adder.rs +++ b/polkadot/node/core/pvf/tests/it/adder.rs @@ -17,7 +17,7 @@ use super::TestHost; use adder::{hash_state, BlockData, HeadData}; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::{ +use polkadot_parachain_primitives::primitives::{ BlockData as GenericBlockData, HeadData as GenericHeadData, RelayChainBlockNumber, ValidationParams, }; diff --git a/polkadot/node/core/pvf/tests/it/main.rs b/polkadot/node/core/pvf/tests/it/main.rs index 72c459c2f6321..8574bc16c5da5 100644 --- a/polkadot/node/core/pvf/tests/it/main.rs +++ b/polkadot/node/core/pvf/tests/it/main.rs @@ -21,7 +21,7 @@ use polkadot_node_core_pvf::{ start, Config, InvalidCandidate, Metrics, PrepareJobKind, PvfPrepData, ValidationError, ValidationHost, JOB_TIMEOUT_WALL_CLOCK_FACTOR, }; -use polkadot_parachain::primitives::{BlockData, ValidationParams, ValidationResult}; +use polkadot_parachain_primitives::primitives::{BlockData, ValidationParams, ValidationResult}; use polkadot_primitives::ExecutorParams; #[cfg(feature = "ci-only-tests")] diff --git a/polkadot/node/network/approval-distribution/src/lib.rs b/polkadot/node/network/approval-distribution/src/lib.rs index ac525ea6faf3b..70c20437d125d 100644 --- a/polkadot/node/network/approval-distribution/src/lib.rs +++ b/polkadot/node/network/approval-distribution/src/lib.rs @@ -14,9 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -//! [`ApprovalDistributionSubsystem`] implementation. +//! [`ApprovalDistribution`] implementation. //! -//! https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html +//! #![warn(missing_docs)] diff --git a/polkadot/node/network/dispute-distribution/src/lib.rs b/polkadot/node/network/dispute-distribution/src/lib.rs index 071dc3c3343b2..2b4466fc2fc55 100644 --- a/polkadot/node/network/dispute-distribution/src/lib.rs +++ b/polkadot/node/network/dispute-distribution/src/lib.rs @@ -21,8 +21,8 @@ //! - a sender //! - and a receiver //! -//! The sender is responsible for getting our vote out, see [`sender`]. The receiver handles -//! incoming [`DisputeRequest`]s and offers spam protection, see [`receiver`]. +//! The sender is responsible for getting our vote out, see `sender`. The receiver handles +//! incoming [`DisputeRequest`](v1::DisputeRequest)s and offers spam protection, see `receiver`. use std::time::Duration; diff --git a/polkadot/node/primitives/Cargo.toml b/polkadot/node/primitives/Cargo.toml index e7101c875e722..ef03c02f7bc67 100644 --- a/polkadot/node/primitives/Cargo.toml +++ b/polkadot/node/primitives/Cargo.toml @@ -17,7 +17,7 @@ sp-consensus-babe = { path = "../../../substrate/primitives/consensus/babe" } sp-keystore = { path = "../../../substrate/primitives/keystore" } sp-maybe-compressed-blob = { path = "../../../substrate/primitives/maybe-compressed-blob" } sp-runtime = { path = "../../../substrate/primitives/runtime" } -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } schnorrkel = "0.9.1" thiserror = "1.0.31" serde = { version = "1.0.188", features = ["derive"] } diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index b1e5639479609..463c7f960ba08 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -39,7 +39,9 @@ pub use sp_consensus_babe::{ AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, }; -pub use polkadot_parachain::primitives::{BlockData, HorizontalMessages, UpwardMessages}; +pub use polkadot_parachain_primitives::primitives::{ + BlockData, HorizontalMessages, UpwardMessages, +}; pub mod approval; diff --git a/polkadot/node/service/Cargo.toml b/polkadot/node/service/Cargo.toml index 6a8c09821bec4..90881aa051a0f 100644 --- a/polkadot/node/service/Cargo.toml +++ b/polkadot/node/service/Cargo.toml @@ -94,7 +94,7 @@ is_executable = "1.0.1" polkadot-core-primitives = { path = "../../core-primitives" } polkadot-node-core-parachains-inherent = { path = "../core/parachains-inherent" } polkadot-overseer = { path = "../overseer" } -polkadot-parachain = { path = "../../parachain" } +polkadot-parachain-primitives = { path = "../../parachain" } polkadot-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../primitives" } polkadot-rpc = { path = "../../rpc" } @@ -200,7 +200,7 @@ runtime-benchmarks = [ "pallet-babe/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-staking/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", diff --git a/polkadot/node/subsystem-test-helpers/src/lib.rs b/polkadot/node/subsystem-test-helpers/src/lib.rs index 339b99a4b5ac0..6f0c3016c7aee 100644 --- a/polkadot/node/subsystem-test-helpers/src/lib.rs +++ b/polkadot/node/subsystem-test-helpers/src/lib.rs @@ -338,7 +338,7 @@ pub fn subsystem_test_harness( }); } -/// A forward subsystem that implements [`Subsystem`]. +/// A forward subsystem that implements [`Subsystem`](overseer::Subsystem). /// /// It forwards all communication from the overseer to the internal message /// channel. diff --git a/polkadot/node/test/service/Cargo.toml b/polkadot/node/test/service/Cargo.toml index 2c8f06496697b..d730a601d5a76 100644 --- a/polkadot/node/test/service/Cargo.toml +++ b/polkadot/node/test/service/Cargo.toml @@ -17,7 +17,7 @@ tokio = "1.24.2" # Polkadot dependencies polkadot-overseer = { path = "../../overseer" } polkadot-primitives = { path = "../../../primitives" } -polkadot-parachain = { path = "../../../parachain" } +polkadot-parachain-primitives = { path = "../../../parachain" } polkadot-rpc = { path = "../../../rpc" } polkadot-runtime-common = { path = "../../../runtime/common" } polkadot-service = { path = "../../service" } @@ -68,7 +68,7 @@ runtime-benchmarks= [ "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-staking/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", diff --git a/polkadot/parachain/Cargo.toml b/polkadot/parachain/Cargo.toml index 86db6cb9bab02..c44ba02e3aeb0 100644 --- a/polkadot/parachain/Cargo.toml +++ b/polkadot/parachain/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "polkadot-parachain" +name = "polkadot-parachain-primitives" description = "Types and utilities for creating and working with parachains" authors.workspace = true edition.workspace = true diff --git a/polkadot/parachain/test-parachains/adder/Cargo.toml b/polkadot/parachain/test-parachains/adder/Cargo.toml index 49e10dbd49278..f22b5ccfdcc98 100644 --- a/polkadot/parachain/test-parachains/adder/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/Cargo.toml @@ -9,7 +9,7 @@ authors.workspace = true publish = false [dependencies] -parachain = { package = "polkadot-parachain", path = "../..", default-features = false, features = [ "wasm-api" ] } +parachain = { package = "polkadot-parachain-primitives", path = "../..", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } sp-std = { path = "../../../../substrate/primitives/std", default-features = false } tiny-keccak = { version = "2.0.2", features = ["keccak"] } diff --git a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml index 1a013fa0b1e6d..a570788e9e84c 100644 --- a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml @@ -39,7 +39,7 @@ sc-service = { path = "../../../../../substrate/client/service" } polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true } [dev-dependencies] -polkadot-parachain = { path = "../../.." } +polkadot-parachain-primitives = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } substrate-test-utils = { path = "../../../../../substrate/test-utils" } diff --git a/polkadot/parachain/test-parachains/adder/collator/src/lib.rs b/polkadot/parachain/test-parachains/adder/collator/src/lib.rs index 1ac561dda2bad..5f62ae34caefa 100644 --- a/polkadot/parachain/test-parachains/adder/collator/src/lib.rs +++ b/polkadot/parachain/test-parachains/adder/collator/src/lib.rs @@ -249,7 +249,7 @@ mod tests { use super::*; use futures::executor::block_on; - use polkadot_parachain::primitives::{ValidationParams, ValidationResult}; + use polkadot_parachain_primitives::primitives::{ValidationParams, ValidationResult}; use polkadot_primitives::PersistedValidationData; #[test] diff --git a/polkadot/parachain/test-parachains/undying/Cargo.toml b/polkadot/parachain/test-parachains/undying/Cargo.toml index 2766fb4e8a663..8690da5a4bdd3 100644 --- a/polkadot/parachain/test-parachains/undying/Cargo.toml +++ b/polkadot/parachain/test-parachains/undying/Cargo.toml @@ -9,7 +9,7 @@ edition.workspace = true license.workspace = true [dependencies] -parachain = { package = "polkadot-parachain", path = "../..", default-features = false, features = [ "wasm-api" ] } +parachain = { package = "polkadot-parachain-primitives", path = "../..", default-features = false, features = [ "wasm-api" ] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } sp-std = { path = "../../../../substrate/primitives/std", default-features = false } tiny-keccak = { version = "2.0.2", features = ["keccak"] } diff --git a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml index 2cb44fd25a6eb..781e4e3134fe8 100644 --- a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml @@ -39,7 +39,7 @@ sc-service = { path = "../../../../../substrate/client/service" } polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true } [dev-dependencies] -polkadot-parachain = { path = "../../.." } +polkadot-parachain-primitives = { path = "../../.." } polkadot-test-service = { path = "../../../../node/test/service" } # For the puppet worker, depend on ourselves with the test-utils feature. test-parachain-undying-collator = { path = "", features = ["test-utils"] } diff --git a/polkadot/parachain/test-parachains/undying/collator/src/lib.rs b/polkadot/parachain/test-parachains/undying/collator/src/lib.rs index e0ecc6b0997d7..3c869233182f8 100644 --- a/polkadot/parachain/test-parachains/undying/collator/src/lib.rs +++ b/polkadot/parachain/test-parachains/undying/collator/src/lib.rs @@ -338,7 +338,7 @@ use sp_core::traits::SpawnNamed; mod tests { use super::*; use futures::executor::block_on; - use polkadot_parachain::primitives::{ValidationParams, ValidationResult}; + use polkadot_parachain_primitives::primitives::{ValidationParams, ValidationResult}; use polkadot_primitives::{Hash, PersistedValidationData}; #[test] diff --git a/polkadot/primitives/Cargo.toml b/polkadot/primitives/Cargo.toml index c29159d18f90f..9d17b70b81743 100644 --- a/polkadot/primitives/Cargo.toml +++ b/polkadot/primitives/Cargo.toml @@ -26,7 +26,7 @@ sp-staking = { path = "../../substrate/primitives/staking", default-features = f sp-std = { package = "sp-std", path = "../../substrate/primitives/std", default-features = false } polkadot-core-primitives = { path = "../core-primitives", default-features = false } -polkadot-parachain = { path = "../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../parachain", default-features = false } [features] default = [ "std" ] @@ -36,7 +36,7 @@ std = [ "inherents/std", "parity-scale-codec/std", "polkadot-core-primitives/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "primitives/std", "runtime_primitives/std", "scale-info/std", @@ -51,7 +51,7 @@ std = [ "sp-std/std", ] runtime-benchmarks = [ - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "runtime_primitives/runtime-benchmarks", "sp-staking/runtime-benchmarks", ] diff --git a/polkadot/primitives/src/runtime_api.rs b/polkadot/primitives/src/runtime_api.rs index 86aca6c9bc6f5..e5f1aa4276ef5 100644 --- a/polkadot/primitives/src/runtime_api.rs +++ b/polkadot/primitives/src/runtime_api.rs @@ -121,7 +121,7 @@ use crate::{ }; use parity_scale_codec::{Decode, Encode}; use polkadot_core_primitives as pcp; -use polkadot_parachain::primitives as ppp; +use polkadot_parachain_primitives::primitives as ppp; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; sp_api::decl_runtime_apis! { diff --git a/polkadot/primitives/src/v5/mod.rs b/polkadot/primitives/src/v5/mod.rs index a41bfcdef8414..eed4cc2b36ba6 100644 --- a/polkadot/primitives/src/v5/mod.rs +++ b/polkadot/primitives/src/v5/mod.rs @@ -42,7 +42,7 @@ pub use polkadot_core_primitives::v2::{ }; // Export some polkadot-parachain primitives -pub use polkadot_parachain::primitives::{ +pub use polkadot_parachain_primitives::primitives::{ HeadData, HorizontalMessages, HrmpChannelId, Id, UpwardMessage, UpwardMessages, ValidationCode, ValidationCodeHash, LOWEST_PUBLIC_ID, LOWEST_USER_ID, }; diff --git a/polkadot/roadmap/implementers-guide/src/types/README.md b/polkadot/roadmap/implementers-guide/src/types/README.md index 807130a5e66b2..87092bf3a0053 100644 --- a/polkadot/roadmap/implementers-guide/src/types/README.md +++ b/polkadot/roadmap/implementers-guide/src/types/README.md @@ -31,7 +31,7 @@ digraph { CandidateDescriptor:collator -> CollatorId:w CandidateDescriptor:persisted_validation_data_hash -> PersistedValidationDataHash - Id [label="polkadot_parachain::primitives::Id"] + Id [label="polkadot_parachain_primitives::primitives::Id"] CollatorId [label="polkadot_primitives::v2::CollatorId"] PoVHash [label = "Hash", shape="doublecircle", fill="gray90"] @@ -128,11 +128,11 @@ digraph { >] - CandidateCommitments:upward_messages -> "polkadot_parachain::primitives::UpwardMessage":w + CandidateCommitments:upward_messages -> "polkadot_parachain_primitives::primitives::UpwardMessage":w CandidateCommitments:horizontal_messages -> "polkadot_core_primitives::v2::OutboundHrmpMessage":w CandidateCommitments:head_data -> HeadData:w - CandidateCommitments:horizontal_messages -> "polkadot_parachain::primitives::Id":w - CandidateCommitments:new_validation_code -> "polkadot_parachain::primitives::ValidationCode":w + CandidateCommitments:horizontal_messages -> "polkadot_parachain_primitives::primitives::Id":w + CandidateCommitments:new_validation_code -> "polkadot_parachain_primitives::primitives::ValidationCode":w PoV [label = < @@ -141,7 +141,7 @@ digraph {
>] - PoV:block_data -> "polkadot_parachain::primitives::BlockData":w + PoV:block_data -> "polkadot_parachain_primitives::primitives::BlockData":w BackedCandidate [label = < @@ -155,7 +155,7 @@ digraph { BackedCandidate:candidate -> CommittedCandidateReceipt:name BackedCandidate:validity_votes -> "polkadot_primitives:v0:ValidityAttestation":w - HeadData [label = "polkadot_parachain::primitives::HeadData"] + HeadData [label = "polkadot_parachain_primitives::primitives::HeadData"] CoreIndex [label = <
diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index 8531741395f1a..9a8bd5017e074 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -47,7 +47,7 @@ primitives = { package = "polkadot-primitives", path = "../../primitives", defau rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } static_assertions = { version = "1.1.0", optional = true } -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } polkadot-runtime-metrics = { path = "../metrics", default-features = false} [dev-dependencies] @@ -82,7 +82,7 @@ std = [ "pallet-timestamp/std", "pallet-vesting/std", "parity-scale-codec/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "polkadot-runtime-metrics/std", "primitives/std", "rustc-hex/std", @@ -110,7 +110,7 @@ runtime-benchmarks = [ "pallet-staking/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "primitives/runtime-benchmarks", "sp-application-crypto", "sp-runtime/runtime-benchmarks", diff --git a/polkadot/runtime/parachains/src/configuration.rs b/polkadot/runtime/parachains/src/configuration.rs index 77c15c5672f16..0c66bb5bdf961 100644 --- a/polkadot/runtime/parachains/src/configuration.rs +++ b/polkadot/runtime/parachains/src/configuration.rs @@ -22,7 +22,9 @@ use crate::{inclusion::MAX_UPWARD_MESSAGE_SIZE_BOUND, shared}; use frame_support::{pallet_prelude::*, DefaultNoBound}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::{MAX_HORIZONTAL_MESSAGE_NUM, MAX_UPWARD_MESSAGE_NUM}; +use polkadot_parachain_primitives::primitives::{ + MAX_HORIZONTAL_MESSAGE_NUM, MAX_UPWARD_MESSAGE_NUM, +}; use primitives::{ vstaging::AsyncBackingParams, Balance, ExecutorParams, SessionIndex, LEGACY_MIN_BACKING_VOTES, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE, diff --git a/polkadot/runtime/parachains/src/hrmp.rs b/polkadot/runtime/parachains/src/hrmp.rs index 3a4d2df4b689f..cdb38ba6a8eaf 100644 --- a/polkadot/runtime/parachains/src/hrmp.rs +++ b/polkadot/runtime/parachains/src/hrmp.rs @@ -21,7 +21,7 @@ use crate::{ use frame_support::{pallet_prelude::*, traits::ReservableCurrency, DefaultNoBound}; use frame_system::pallet_prelude::*; use parity_scale_codec::{Decode, Encode}; -use polkadot_parachain::primitives::HorizontalMessages; +use polkadot_parachain_primitives::primitives::HorizontalMessages; use primitives::{ Balance, Hash, HrmpChannelId, Id as ParaId, InboundHrmpMessage, OutboundHrmpMessage, SessionIndex, diff --git a/polkadot/runtime/rococo/Cargo.toml b/polkadot/runtime/rococo/Cargo.toml index aa94d5914d66c..6af9407a5879b 100644 --- a/polkadot/runtime/rococo/Cargo.toml +++ b/polkadot/runtime/rococo/Cargo.toml @@ -87,7 +87,7 @@ hex-literal = { version = "0.4.1" } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features=["experimental"] } runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } xcm = { package = "staging-xcm", path = "../../xcm", default-features = false } xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false } @@ -165,7 +165,7 @@ std = [ "pallet-xcm-benchmarks?/std", "pallet-xcm/std", "parity-scale-codec/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "primitives/std", "rococo-runtime-constants/std", "runtime-common/std", @@ -226,7 +226,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "primitives/runtime-benchmarks", "runtime-common/runtime-benchmarks", "runtime-parachains/runtime-benchmarks", diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index 2d24c0077bf9c..1e411bc901ced 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -59,7 +59,7 @@ pallet-vesting = { path = "../../../substrate/frame/vesting", default-features = runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } pallet-xcm = { path = "../../xcm/pallet-xcm", default-features = false } -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } polkadot-runtime-parachains = { path = "../parachains", default-features = false } xcm-builder = { package = "staging-xcm-builder", path = "../../xcm/xcm-builder", default-features = false } xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false } @@ -114,7 +114,7 @@ std = [ "pallet-vesting/std", "pallet-xcm/std", "parity-scale-codec/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "polkadot-runtime-parachains/std", "primitives/std", "runtime-common/std", @@ -152,7 +152,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "primitives/runtime-benchmarks", "runtime-common/runtime-benchmarks", diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index dc5bdaf6559d2..5a47288297bef 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -97,7 +97,7 @@ hex-literal = { version = "0.4.1", optional = true } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features=["experimental"] } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false } xcm = { package = "staging-xcm", path = "../../xcm", default-features = false } @@ -184,7 +184,7 @@ std = [ "pallet-xcm-benchmarks?/std", "pallet-xcm/std", "parity-scale-codec/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "primitives/std", "runtime-common/std", "runtime-parachains/std", @@ -254,7 +254,7 @@ runtime-benchmarks = [ "pallet-vesting/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "primitives/runtime-benchmarks", "runtime-common/runtime-benchmarks", "runtime-parachains/runtime-benchmarks", diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index 6c010fd9343cf..17ee9840e8f47 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -27,7 +27,7 @@ xcm-executor = { package = "staging-xcm-executor", path = "../xcm-executor", def [dev-dependencies] pallet-balances = { path = "../../../substrate/frame/balances" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } -polkadot-parachain = { path = "../../parachain" } +polkadot-parachain-primitives = { path = "../../parachain" } xcm-builder = { package = "staging-xcm-builder", path = "../xcm-builder" } [features] @@ -54,7 +54,7 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/polkadot/xcm/pallet-xcm/src/mock.rs b/polkadot/xcm/pallet-xcm/src/mock.rs index b56b1af82defd..b09bcb80ed671 100644 --- a/polkadot/xcm/pallet-xcm/src/mock.rs +++ b/polkadot/xcm/pallet-xcm/src/mock.rs @@ -21,7 +21,7 @@ use frame_support::{ weights::Weight, }; use frame_system::EnsureRoot; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::origin; use sp_core::H256; use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; diff --git a/polkadot/xcm/pallet-xcm/src/tests.rs b/polkadot/xcm/pallet-xcm/src/tests.rs index 6ff9f1d893c89..486887598c782 100644 --- a/polkadot/xcm/pallet-xcm/src/tests.rs +++ b/polkadot/xcm/pallet-xcm/src/tests.rs @@ -24,7 +24,7 @@ use frame_support::{ traits::{Currency, Hooks}, weights::Weight, }; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use sp_runtime::traits::{AccountIdConversion, BlakeTwo256, Hash}; use xcm::{latest::QueryResponseInfo, prelude::*}; use xcm_builder::AllowKnownQueryResponses; diff --git a/polkadot/xcm/src/v2/multilocation.rs b/polkadot/xcm/src/v2/multilocation.rs index 4a65a419045fa..7d6bdece335f5 100644 --- a/polkadot/xcm/src/v2/multilocation.rs +++ b/polkadot/xcm/src/v2/multilocation.rs @@ -239,14 +239,12 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; - /// # fn main() { /// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild)); /// assert_eq!( /// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))), /// Some(&OnlyChild), /// ); /// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None); - /// # } /// ``` pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { if self.parents != prefix.parents { @@ -280,11 +278,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; - /// # fn main() { /// let mut m = MultiLocation::new(1, X1(Parachain(21))); /// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(())); /// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); - /// # } /// ``` pub fn append_with(&mut self, suffix: Junctions) -> Result<(), Junctions> { if self.interior.len().saturating_add(suffix.len()) > MAX_JUNCTIONS { @@ -303,11 +299,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; - /// # fn main() { /// let mut m = MultiLocation::new(2, X1(PalletInstance(3))); /// assert_eq!(m.prepend_with(MultiLocation::new(1, X2(Parachain(21), OnlyChild))), Ok(())); /// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3)))); - /// # } /// ``` pub fn prepend_with(&mut self, mut prefix: MultiLocation) -> Result<(), MultiLocation> { // prefix self (suffix) @@ -840,11 +834,9 @@ impl Junctions { /// # Example /// ```rust /// # use staging_xcm::v2::{Junctions::*, Junction::*}; - /// # fn main() { /// let mut m = X3(Parachain(2), PalletInstance(3), OnlyChild); /// assert_eq!(m.match_and_split(&X2(Parachain(2), PalletInstance(3))), Some(&OnlyChild)); /// assert_eq!(m.match_and_split(&X1(Parachain(2))), None); - /// # } /// ``` pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { diff --git a/polkadot/xcm/src/v3/junctions.rs b/polkadot/xcm/src/v3/junctions.rs index c2826c4969e1d..f7624c91c8612 100644 --- a/polkadot/xcm/src/v3/junctions.rs +++ b/polkadot/xcm/src/v3/junctions.rs @@ -438,11 +438,9 @@ impl Junctions { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation}; - /// # fn main() { /// let mut m = X1(Parachain(21)); /// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(())); /// assert_eq!(m, X2(Parachain(21), PalletInstance(3))); - /// # } /// ``` pub fn append_with(&mut self, suffix: impl Into) -> Result<(), Junctions> { let suffix = suffix.into(); @@ -569,11 +567,9 @@ impl Junctions { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*}; - /// # fn main() { /// let mut m = X3(Parachain(2), PalletInstance(3), OnlyChild); /// assert_eq!(m.match_and_split(&X2(Parachain(2), PalletInstance(3))), Some(&OnlyChild)); /// assert_eq!(m.match_and_split(&X1(Parachain(2))), None); - /// # } /// ``` pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { if prefix.len() + 1 != self.len() { diff --git a/polkadot/xcm/src/v3/multilocation.rs b/polkadot/xcm/src/v3/multilocation.rs index 7ac377d5c0648..8a1575d9bc950 100644 --- a/polkadot/xcm/src/v3/multilocation.rs +++ b/polkadot/xcm/src/v3/multilocation.rs @@ -266,14 +266,12 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation}; - /// # fn main() { /// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild)); /// assert_eq!( /// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))), /// Some(&OnlyChild), /// ); /// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None); - /// # } /// ``` pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { if self.parents != prefix.parents { @@ -293,11 +291,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; - /// # fn main() { /// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into(); /// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(())); /// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); - /// # } /// ``` pub fn append_with(&mut self, suffix: impl Into) -> Result<(), Self> { let prefix = core::mem::replace(self, suffix.into()); @@ -314,11 +310,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; - /// # fn main() { /// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into(); /// let r = m.appended_with((Parent, PalletInstance(3))).unwrap(); /// assert_eq!(r, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); - /// # } /// ``` pub fn appended_with(mut self, suffix: impl Into) -> Result { match self.append_with(suffix) { @@ -334,11 +328,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; - /// # fn main() { /// let mut m: MultiLocation = (Parent, Parent, PalletInstance(3)).into(); /// assert_eq!(m.prepend_with((Parent, Parachain(21), OnlyChild)), Ok(())); /// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3)))); - /// # } /// ``` pub fn prepend_with(&mut self, prefix: impl Into) -> Result<(), Self> { // prefix self (suffix) @@ -383,11 +375,9 @@ impl MultiLocation { /// # Example /// ```rust /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; - /// # fn main() { /// let m: MultiLocation = (Parent, Parent, PalletInstance(3)).into(); /// let r = m.prepended_with((Parent, Parachain(21), OnlyChild)).unwrap(); /// assert_eq!(r, MultiLocation::new(1, X1(PalletInstance(3)))); - /// # } /// ``` pub fn prepended_with(mut self, prefix: impl Into) -> Result { match self.prepend_with(prefix) { diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index 11911d377cd9d..1f0e1cf347758 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -23,7 +23,7 @@ pallet-transaction-payment = { path = "../../../substrate/frame/transaction-paym log = { version = "0.4.17", default-features = false } # Polkadot dependencies -polkadot-parachain = { path = "../../parachain", default-features = false } +polkadot-parachain-primitives = { path = "../../parachain", default-features = false } [dev-dependencies] primitive-types = "0.12.1" @@ -45,7 +45,7 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "pallet-salary/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "polkadot-test-runtime/runtime-benchmarks", "primitives/runtime-benchmarks", @@ -58,7 +58,7 @@ std = [ "log/std", "pallet-transaction-payment/std", "parity-scale-codec/std", - "polkadot-parachain/std", + "polkadot-parachain-primitives/std", "scale-info/std", "sp-arithmetic/std", "sp-io/std", diff --git a/polkadot/xcm/xcm-builder/src/barriers.rs b/polkadot/xcm/xcm-builder/src/barriers.rs index 353e111b813b6..0d04e0971bf7b 100644 --- a/polkadot/xcm/xcm-builder/src/barriers.rs +++ b/polkadot/xcm/xcm-builder/src/barriers.rs @@ -21,7 +21,7 @@ use frame_support::{ ensure, traits::{Contains, Get, ProcessMessageError}, }; -use polkadot_parachain::primitives::IsSystem; +use polkadot_parachain_primitives::primitives::IsSystem; use sp_std::{cell::Cell, marker::PhantomData, ops::ControlFlow, result::Result}; use xcm::prelude::*; use xcm_executor::traits::{CheckSuspension, OnResponse, Properties, ShouldExecute}; diff --git a/polkadot/xcm/xcm-builder/src/origin_conversion.rs b/polkadot/xcm/xcm-builder/src/origin_conversion.rs index 112b26869a998..cced7dedf62d2 100644 --- a/polkadot/xcm/xcm-builder/src/origin_conversion.rs +++ b/polkadot/xcm/xcm-builder/src/origin_conversion.rs @@ -18,7 +18,7 @@ use frame_support::traits::{EnsureOrigin, Get, GetBacking, OriginTrait}; use frame_system::RawOrigin as SystemRawOrigin; -use polkadot_parachain::primitives::IsSystem; +use polkadot_parachain_primitives::primitives::IsSystem; use sp_runtime::traits::TryConvert; use sp_std::marker::PhantomData; use xcm::latest::{BodyId, BodyPart, Junction, Junctions::*, MultiLocation, NetworkId, OriginKind}; diff --git a/polkadot/xcm/xcm-builder/tests/mock/mod.rs b/polkadot/xcm/xcm-builder/tests/mock/mod.rs index 56502c445c2dc..363748940ca62 100644 --- a/polkadot/xcm/xcm-builder/tests/mock/mod.rs +++ b/polkadot/xcm/xcm-builder/tests/mock/mod.rs @@ -25,7 +25,7 @@ use primitive_types::H256; use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; use sp_std::cell::RefCell; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{configuration, origin, shared}; use xcm::latest::{opaque, prelude::*}; use xcm_executor::XcmExecutor; diff --git a/polkadot/xcm/xcm-builder/tests/scenarios.rs b/polkadot/xcm/xcm-builder/tests/scenarios.rs index 3e735720aa762..426efcaccdbaf 100644 --- a/polkadot/xcm/xcm-builder/tests/scenarios.rs +++ b/polkadot/xcm/xcm-builder/tests/scenarios.rs @@ -20,7 +20,7 @@ use mock::{ fake_message_hash, kusama_like_with_balances, AccountId, Balance, Balances, BaseXcmWeight, System, XcmConfig, CENTS, }; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use sp_runtime::traits::AccountIdConversion; use xcm::latest::prelude::*; use xcm_executor::XcmExecutor; diff --git a/polkadot/xcm/xcm-simulator/Cargo.toml b/polkadot/xcm/xcm-simulator/Cargo.toml index fb9a8f6856292..eedcfa0032af4 100644 --- a/polkadot/xcm/xcm-simulator/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/Cargo.toml @@ -18,5 +18,5 @@ xcm = { package = "staging-xcm", path = ".." } xcm-executor = { package = "staging-xcm-executor", path = "../xcm-executor" } xcm-builder = { package = "staging-xcm-builder", path = "../xcm-builder" } polkadot-core-primitives = { path = "../../core-primitives" } -polkadot-parachain = { path = "../../parachain" } +polkadot-parachain-primitives = { path = "../../parachain" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } diff --git a/polkadot/xcm/xcm-simulator/example/Cargo.toml b/polkadot/xcm/xcm-simulator/example/Cargo.toml index e29c1c0d1f2ce..9c48b11f6226f 100644 --- a/polkadot/xcm/xcm-simulator/example/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/example/Cargo.toml @@ -29,7 +29,7 @@ xcm-builder = { package = "staging-xcm-builder", path = "../../xcm-builder" } pallet-xcm = { path = "../../pallet-xcm" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } -polkadot-parachain = { path = "../../../parachain" } +polkadot-parachain-primitives = { path = "../../../parachain" } [features] default = [] @@ -40,7 +40,7 @@ runtime-benchmarks = [ "pallet-message-queue/runtime-benchmarks", "pallet-uniques/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/polkadot/xcm/xcm-simulator/example/src/parachain.rs b/polkadot/xcm/xcm-simulator/example/src/parachain.rs index 9c4cbe8fcb2d8..bc7cba313828b 100644 --- a/polkadot/xcm/xcm-simulator/example/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/parachain.rs @@ -34,7 +34,7 @@ use sp_std::prelude::*; use pallet_xcm::XcmPassthrough; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -use polkadot_parachain::primitives::{ +use polkadot_parachain_primitives::primitives::{ DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler, }; use xcm::{latest::prelude::*, VersionedXcm}; diff --git a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs index 6f0e92dc91b9a..4e9195a8454f5 100644 --- a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs @@ -26,7 +26,7 @@ use frame_system::EnsureRoot; use sp_core::{ConstU32, H256}; use sp_runtime::{traits::IdentityLookup, AccountId32}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{ configuration, inclusion::{AggregateMessageOrigin, UmpQueueId}, diff --git a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml index a6258a83f9ff9..0ca57e680d1dd 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -29,7 +29,7 @@ xcm-builder = { package = "staging-xcm-builder", path = "../../xcm-builder" } pallet-xcm = { path = "../../pallet-xcm" } polkadot-core-primitives = { path = "../../../core-primitives" } polkadot-runtime-parachains = { path = "../../../runtime/parachains" } -polkadot-parachain = { path = "../../../parachain" } +polkadot-parachain-primitives = { path = "../../../parachain" } [features] runtime-benchmarks = [ @@ -38,7 +38,7 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polkadot-parachain/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/fuzz.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/fuzz.rs index 441b9f4d28616..0893c7c086f8b 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/fuzz.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/fuzz.rs @@ -19,7 +19,7 @@ mod relay_chain; use codec::DecodeLimit; use polkadot_core_primitives::AccountId; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use sp_runtime::{traits::AccountIdConversion, BuildStorage}; use xcm_simulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt}; diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs index 3d0b1c82f6911..95f875eca06e5 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -33,7 +33,7 @@ use sp_std::prelude::*; use pallet_xcm::XcmPassthrough; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -use polkadot_parachain::primitives::{ +use polkadot_parachain_primitives::primitives::{ DmpMessageHandler, Id as ParaId, Sibling, XcmpMessageFormat, XcmpMessageHandler, }; use xcm::{latest::prelude::*, VersionedXcm}; diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index 32f3b8aa83fba..a29ead9e6c3be 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -26,7 +26,7 @@ use frame_system::EnsureRoot; use sp_core::{ConstU32, H256}; use sp_runtime::{traits::IdentityLookup, AccountId32}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{ configuration, inclusion::{AggregateMessageOrigin, UmpQueueId}, diff --git a/polkadot/xcm/xcm-simulator/src/lib.rs b/polkadot/xcm/xcm-simulator/src/lib.rs index cf56784f7d4e2..add1b90f415d5 100644 --- a/polkadot/xcm/xcm-simulator/src/lib.rs +++ b/polkadot/xcm/xcm-simulator/src/lib.rs @@ -27,7 +27,7 @@ pub use sp_io::{hashing::blake2_256, TestExternalities}; pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, marker::PhantomData}; pub use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -pub use polkadot_parachain::primitives::{ +pub use polkadot_parachain_primitives::primitives::{ DmpMessageHandler as DmpMessageHandlerT, Id as ParaId, XcmpMessageFormat, XcmpMessageHandler as XcmpMessageHandlerT, }; diff --git a/substrate/frame/paged-list/fuzzer/Cargo.toml b/substrate/frame/paged-list/fuzzer/Cargo.toml index a6f499d0da12e..d96c0348cf43c 100644 --- a/substrate/frame/paged-list/fuzzer/Cargo.toml +++ b/substrate/frame/paged-list/fuzzer/Cargo.toml @@ -10,7 +10,7 @@ description = "Fuzz storage types of pallet-paged-list" publish = false [[bin]] -name = "pallet-paged-list" +name = "pallet-paged-list-fuzzer" path = "src/paged_list.rs" [dependencies]