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 <>
This commit is contained in:
Bastian Köcher
2023-08-31 23:53:29 +02:00
committed by GitHub
parent ea5792508e
commit a33d7922f8
114 changed files with 249 additions and 260 deletions
Generated
+61 -61
View File
@@ -710,7 +710,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-core", "sp-core",
@@ -770,7 +770,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"primitive-types", "primitive-types",
"scale-info", "scale-info",
@@ -810,7 +810,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-core", "sp-core",
@@ -866,7 +866,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-constants", "polkadot-runtime-constants",
"scale-info", "scale-info",
@@ -909,7 +909,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-core", "sp-core",
@@ -967,7 +967,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"primitive-types", "primitive-types",
"scale-info", "scale-info",
@@ -1015,7 +1015,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parachains-runtimes-test-utils", "parachains-runtimes-test-utils",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"sp-consensus-aura", "sp-consensus-aura",
"sp-core", "sp-core",
"sp-io", "sp-io",
@@ -1865,7 +1865,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"serde", "serde",
@@ -1927,7 +1927,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-constants", "polkadot-runtime-constants",
"scale-info", "scale-info",
@@ -1969,7 +1969,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-core", "sp-core",
@@ -2033,7 +2033,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"rococo-runtime-constants", "rococo-runtime-constants",
"scale-info", "scale-info",
@@ -2597,7 +2597,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-core", "sp-core",
@@ -2653,7 +2653,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-constants", "polkadot-runtime-constants",
"scale-info", "scale-info",
@@ -2864,7 +2864,7 @@ dependencies = [
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"smallvec", "smallvec",
@@ -3442,7 +3442,7 @@ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-test-client", "polkadot-test-client",
"portpicker", "portpicker",
@@ -3577,7 +3577,7 @@ dependencies = [
"lazy_static", "lazy_static",
"log", "log",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"sc-client-api", "sc-client-api",
"scale-info", "scale-info",
"sp-core", "sp-core",
@@ -3706,7 +3706,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"scale-info", "scale-info",
"sp-api", "sp-api",
@@ -3896,7 +3896,7 @@ dependencies = [
"pallet-balances", "pallet-balances",
"pallet-transaction-payment", "pallet-transaction-payment",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"sc-block-builder", "sc-block-builder",
"sc-consensus", "sc-consensus",
@@ -6462,7 +6462,7 @@ dependencies = [
"paste", "paste",
"penpal-runtime", "penpal-runtime",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime", "polkadot-runtime",
"polkadot-runtime-constants", "polkadot-runtime-constants",
@@ -10828,7 +10828,7 @@ dependencies = [
"log", "log",
"pallet-balances", "pallet-balances",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"scale-info", "scale-info",
"serde", "serde",
@@ -10989,7 +10989,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"parachain-info", "parachain-info",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
"smallvec", "smallvec",
@@ -11061,7 +11061,7 @@ dependencies = [
"parachain-info", "parachain-info",
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"sp-consensus-aura", "sp-consensus-aura",
"sp-core", "sp-core",
"sp-io", "sp-io",
@@ -11314,7 +11314,7 @@ dependencies = [
"parachain-info", "parachain-info",
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"scale-info", "scale-info",
@@ -11949,7 +11949,7 @@ dependencies = [
"polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-test-helpers",
"polkadot-node-subsystem-util", "polkadot-node-subsystem-util",
"polkadot-overseer", "polkadot-overseer",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-primitives-test-helpers", "polkadot-primitives-test-helpers",
"sp-core", "sp-core",
@@ -12106,7 +12106,7 @@ dependencies = [
"polkadot-node-core-pvf-prepare-worker", "polkadot-node-core-pvf-prepare-worker",
"polkadot-node-metrics", "polkadot-node-metrics",
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"rand 0.8.5", "rand 0.8.5",
"slotmap", "slotmap",
@@ -12155,7 +12155,7 @@ dependencies = [
"landlock", "landlock",
"libc", "libc",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"sc-executor", "sc-executor",
"sc-executor-common", "sc-executor-common",
@@ -12177,7 +12177,7 @@ dependencies = [
"futures", "futures",
"parity-scale-codec", "parity-scale-codec",
"polkadot-node-core-pvf-common", "polkadot-node-core-pvf-common",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"rayon", "rayon",
"sp-core", "sp-core",
@@ -12195,7 +12195,7 @@ dependencies = [
"libc", "libc",
"parity-scale-codec", "parity-scale-codec",
"polkadot-node-core-pvf-common", "polkadot-node-core-pvf-common",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"rayon", "rayon",
"sc-executor", "sc-executor",
@@ -12305,7 +12305,7 @@ dependencies = [
"futures", "futures",
"parity-scale-codec", "parity-scale-codec",
"polkadot-erasure-coding", "polkadot-erasure-coding",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"schnorrkel 0.9.1", "schnorrkel 0.9.1",
"serde", "serde",
@@ -12436,22 +12436,6 @@ dependencies = [
"tracing-gum", "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]] [[package]]
name = "polkadot-parachain-bin" name = "polkadot-parachain-bin"
version = "1.0.0" version = "1.0.0"
@@ -12535,6 +12519,22 @@ dependencies = [
"wait-timeout", "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]] [[package]]
name = "polkadot-performance-test" name = "polkadot-performance-test"
version = "1.0.0" version = "1.0.0"
@@ -12560,7 +12560,7 @@ dependencies = [
"hex-literal 0.4.1", "hex-literal 0.4.1",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"scale-info", "scale-info",
"serde", "serde",
"sp-api", "sp-api",
@@ -12825,7 +12825,7 @@ dependencies = [
"pallet-timestamp", "pallet-timestamp",
"pallet-vesting", "pallet-vesting",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-primitives-test-helpers", "polkadot-primitives-test-helpers",
"polkadot-runtime-metrics", "polkadot-runtime-metrics",
@@ -12912,7 +12912,7 @@ dependencies = [
"polkadot-node-subsystem-types", "polkadot-node-subsystem-types",
"polkadot-node-subsystem-util", "polkadot-node-subsystem-util",
"polkadot-overseer", "polkadot-overseer",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-rpc", "polkadot-rpc",
"polkadot-runtime", "polkadot-runtime",
@@ -13115,7 +13115,7 @@ dependencies = [
"pallet-vesting", "pallet-vesting",
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -13164,7 +13164,7 @@ dependencies = [
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-overseer", "polkadot-overseer",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-rpc", "polkadot-rpc",
"polkadot-runtime-common", "polkadot-runtime-common",
@@ -14138,7 +14138,7 @@ dependencies = [
"parachain-info", "parachain-info",
"parachains-common", "parachains-common",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"scale-info", "scale-info",
"sp-api", "sp-api",
"sp-block-builder", "sp-block-builder",
@@ -14212,7 +14212,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"pallet-xcm-benchmarks", "pallet-xcm-benchmarks",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -17938,7 +17938,7 @@ dependencies = [
"pallet-transaction-payment", "pallet-transaction-payment",
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"polkadot-test-runtime", "polkadot-test-runtime",
@@ -18580,7 +18580,7 @@ version = "1.0.0"
dependencies = [ dependencies = [
"dlmalloc", "dlmalloc",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"sp-io", "sp-io",
"sp-std", "sp-std",
"substrate-wasm-builder", "substrate-wasm-builder",
@@ -18600,7 +18600,7 @@ dependencies = [
"polkadot-node-core-pvf", "polkadot-node-core-pvf",
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-service", "polkadot-service",
"polkadot-test-service", "polkadot-test-service",
@@ -18629,7 +18629,7 @@ dependencies = [
"dlmalloc", "dlmalloc",
"log", "log",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"sp-io", "sp-io",
"sp-std", "sp-std",
"substrate-wasm-builder", "substrate-wasm-builder",
@@ -18649,7 +18649,7 @@ dependencies = [
"polkadot-node-core-pvf", "polkadot-node-core-pvf",
"polkadot-node-primitives", "polkadot-node-primitives",
"polkadot-node-subsystem", "polkadot-node-subsystem",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-service", "polkadot-service",
"polkadot-test-service", "polkadot-test-service",
@@ -20463,7 +20463,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"pallet-xcm-benchmarks", "pallet-xcm-benchmarks",
"parity-scale-codec", "parity-scale-codec",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-primitives", "polkadot-primitives",
"polkadot-runtime-common", "polkadot-runtime-common",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
@@ -20927,7 +20927,7 @@ dependencies = [
"parity-scale-codec", "parity-scale-codec",
"paste", "paste",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"sp-io", "sp-io",
"sp-std", "sp-std",
@@ -20949,7 +20949,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"scale-info", "scale-info",
"sp-core", "sp-core",
@@ -20976,7 +20976,7 @@ dependencies = [
"pallet-xcm", "pallet-xcm",
"parity-scale-codec", "parity-scale-codec",
"polkadot-core-primitives", "polkadot-core-primitives",
"polkadot-parachain", "polkadot-parachain-primitives",
"polkadot-runtime-parachains", "polkadot-runtime-parachains",
"scale-info", "scale-info",
"sp-core", "sp-core",
@@ -37,7 +37,8 @@ use parity_util_mem::MallocSizeOf;
/// Parachain id. /// 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( #[derive(
Clone, Clone,
CompactAs, CompactAs,
@@ -64,7 +65,7 @@ impl From<u32> for ParaId {
/// Parachain head. /// 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. /// The parachain head means (at least in Cumulus) a SCALE-encoded parachain header.
#[derive( #[derive(
+1 -1
View File
@@ -23,7 +23,7 @@ sp-state-machine = { path = "../../../substrate/primitives/state-machine" }
# Polkadot # Polkadot
polkadot-node-primitives = { path = "../../../polkadot/node/primitives" } polkadot-node-primitives = { path = "../../../polkadot/node/primitives" }
polkadot-parachain = { path = "../../../polkadot/parachain" } polkadot-parachain-primitives = { path = "../../../polkadot/parachain" }
polkadot-primitives = { path = "../../../polkadot/primitives" } polkadot-primitives = { path = "../../../polkadot/primitives" }
# Cumulus # Cumulus
+1 -1
View File
@@ -28,7 +28,7 @@ use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
use cumulus_relay_chain_interface::RelayChainInterface; use cumulus_relay_chain_interface::RelayChainInterface;
use polkadot_node_primitives::{CollationSecondedSignal, Statement}; use polkadot_node_primitives::{CollationSecondedSignal, Statement};
use polkadot_parachain::primitives::HeadData; use polkadot_parachain_primitives::primitives::HeadData;
use polkadot_primitives::{ use polkadot_primitives::{
CandidateReceipt, CompactStatement, Hash as PHash, Id as ParaId, OccupiedCoreAssumption, CandidateReceipt, CompactStatement, Hash as PHash, Id as ParaId, OccupiedCoreAssumption,
SigningContext, UncheckedSigned, SigningContext, UncheckedSigned,
+5 -3
View File
@@ -125,8 +125,10 @@ impl RelayChainInterface for DummyRelayChainInterface {
if self.data.lock().has_pending_availability { if self.data.lock().has_pending_availability {
Ok(Some(CommittedCandidateReceipt { Ok(Some(CommittedCandidateReceipt {
descriptor: CandidateDescriptor { descriptor: CandidateDescriptor {
para_head: polkadot_parachain::primitives::HeadData(default_header().encode()) para_head: polkadot_parachain_primitives::primitives::HeadData(
.hash(), default_header().encode(),
)
.hash(),
para_id: 0u32.into(), para_id: 0u32.into(),
relay_parent: PHash::random(), relay_parent: PHash::random(),
collator: CollatorPair::generate().0.public(), collator: CollatorPair::generate().0.public(),
@@ -315,7 +317,7 @@ async fn make_gossip_message_and_header(
pov_hash: PHash::random(), pov_hash: PHash::random(),
erasure_root: PHash::random(), erasure_root: PHash::random(),
signature: sp_core::sr25519::Signature([0u8; 64]).into(), 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()), validation_code_hash: ValidationCodeHash::from(PHash::random()),
}, },
}; };
+3 -3
View File
@@ -28,7 +28,7 @@ sp-trie = { path = "../../../substrate/primitives/trie", default-features = fals
sp-version = { path = "../../../substrate/primitives/version", default-features = false} sp-version = { path = "../../../substrate/primitives/version", default-features = false}
# Polkadot # 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} xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false}
# Cumulus # Cumulus
@@ -62,7 +62,7 @@ std = [
"frame-support/std", "frame-support/std",
"frame-system/std", "frame-system/std",
"log/std", "log/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"scale-info/std", "scale-info/std",
"sp-core/std", "sp-core/std",
"sp-externalities/std", "sp-externalities/std",
@@ -79,7 +79,7 @@ std = [
runtime-benchmarks = [ runtime-benchmarks = [
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
] ]
@@ -142,7 +142,7 @@ pub fn register_validate_block(input: proc_macro::TokenStream) -> proc_macro::To
#check_inherents, #check_inherents,
>(params); >(params);
#crate_::validate_block::polkadot_parachain::write_result(&res) #crate_::validate_block::polkadot_parachain_primitives::write_result(&res)
} }
} }
} }
+2 -2
View File
@@ -44,7 +44,7 @@ use frame_support::{
weights::Weight, weights::Weight,
}; };
use frame_system::{ensure_none, ensure_root, pallet_prelude::HeaderFor}; 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 scale_info::TypeInfo;
use sp_runtime::{ use sp_runtime::{
traits::{Block as BlockT, BlockNumberProvider, Hash}, traits::{Block as BlockT, BlockNumberProvider, Hash},
@@ -1429,7 +1429,7 @@ impl<T: Config> Pallet<T> {
pub fn initialize_for_set_code_benchmark(max_code_size: u32) { pub fn initialize_for_set_code_benchmark(max_code_size: u32) {
// insert dummy ValidationData // insert dummy ValidationData
let vfp = PersistedValidationData { 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_number: 1,
relay_parent_storage_root: Default::default(), relay_parent_storage_root: Default::default(),
max_pov_size: 1_000, max_pov_size: 1_000,
@@ -22,7 +22,9 @@ use cumulus_primitives_core::{
}; };
use cumulus_primitives_parachain_inherent::ParachainInherentData; use cumulus_primitives_parachain_inherent::ParachainInherentData;
use polkadot_parachain::primitives::{HeadData, RelayChainBlockNumber, ValidationResult}; use polkadot_parachain_primitives::primitives::{
HeadData, RelayChainBlockNumber, ValidationResult,
};
use codec::Encode; use codec::Encode;
@@ -34,7 +34,7 @@ pub use bytes;
pub use codec::decode_from_bytes; pub use codec::decode_from_bytes;
#[cfg(not(feature = "std"))] #[cfg(not(feature = "std"))]
#[doc(hidden)] #[doc(hidden)]
pub use polkadot_parachain; pub use polkadot_parachain_primitives;
#[cfg(not(feature = "std"))] #[cfg(not(feature = "std"))]
#[doc(hidden)] #[doc(hidden)]
pub use sp_runtime::traits::GetRuntimeBlockType; pub use sp_runtime::traits::GetRuntimeBlockType;
@@ -42,15 +42,16 @@ pub use sp_runtime::traits::GetRuntimeBlockType;
#[doc(hidden)] #[doc(hidden)]
pub use sp_std; pub use sp_std;
/// Basically the same as [`ValidationParams`](polkadot_parachain::primitives::ValidationParams), /// Basically the same as
/// but a little bit optimized for our use case here. /// [`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 /// `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 memory of the input parameter of the exported `validate_blocks` function.
/// ///
/// The layout of this type must match exactly the layout of /// The layout of this type must match exactly the layout of
/// [`ValidationParams`](polkadot_parachain::primitives::ValidationParams) to have the same /// [`ValidationParams`](polkadot_parachain_primitives::primitives::ValidationParams) to have the
/// SCALE encoding. /// same SCALE encoding.
#[derive(codec::Decode)] #[derive(codec::Decode)]
#[cfg_attr(feature = "std", derive(codec::Encode))] #[cfg_attr(feature = "std", derive(codec::Encode))]
#[doc(hidden)] #[doc(hidden)]
@@ -54,7 +54,7 @@ sp-version = { path = "../../../substrate/primitives/version", default-features
# Polkadot # Polkadot
pallet-xcm = { path = "../../../polkadot/xcm/pallet-xcm", 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} polkadot-runtime-common = { path = "../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -104,7 +104,7 @@ std = [
"pallet-transaction-payment/std", "pallet-transaction-payment/std",
"pallet-xcm/std", "pallet-xcm/std",
"parachain-info/std", "parachain-info/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
@@ -139,7 +139,7 @@ runtime-benchmarks = [
"pallet-sudo/runtime-benchmarks", "pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -9,7 +9,7 @@ use frame_support::{
}; };
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling; use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_common::impls::ToAuthor; use polkadot_runtime_common::impls::ToAuthor;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -22,7 +22,7 @@ pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conv
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", 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-parachains = { path = "../../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" } polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
@@ -42,7 +42,7 @@ pub use integration_tests_common::{
}; };
pub use parachains_common::Balance; pub use parachains_common::Balance;
pub use polkadot_core_primitives::InboundDownwardMessage; 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 polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{ pub use xcm::{
prelude::*, prelude::*,
@@ -20,7 +20,7 @@ pallet-assets = { path = "../../../../../../substrate/frame/assets", default-fea
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", 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-parachains = { path = "../../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" } polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
@@ -40,7 +40,7 @@ pub use integration_tests_common::{
}; };
pub use parachains_common::{AccountId, Balance}; pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage; 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 polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{ pub use xcm::{
prelude::*, prelude::*,
@@ -22,7 +22,7 @@ pallet-asset-conversion = { path = "../../../../../../substrate/frame/asset-conv
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", 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-parachains = { path = "../../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" } polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
@@ -39,7 +39,7 @@ pub use integration_tests_common::{
}; };
pub use parachains_common::{AccountId, Balance}; pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage; 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 polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{ pub use xcm::{
prelude::*, prelude::*,
@@ -20,7 +20,7 @@ pallet-assets = { path = "../../../../../../substrate/frame/assets", default-fea
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", 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-parachains = { path = "../../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" } polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
@@ -43,7 +43,7 @@ pub use integration_tests_common::{
}; };
pub use parachains_common::{AccountId, Balance}; pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage; 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 polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{ pub use xcm::{
prelude::*, prelude::*,
@@ -22,7 +22,7 @@ pallet-salary = { path = "../../../../../../substrate/frame/salary", default-fea
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", 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-parachains = { path = "../../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" } polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
@@ -40,7 +40,7 @@ pub use integration_tests_common::{
}; };
pub use parachains_common::{AccountId, Balance}; pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage; 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 polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{ pub use xcm::{
prelude::*, prelude::*,
@@ -30,7 +30,7 @@ beefy-primitives = { package = "sp-consensus-beefy", path = "../../../../../subs
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", 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-service = { path = "../../../../../polkadot/node/service", default-features = false, features = ["full-node"] } polkadot-service = { path = "../../../../../polkadot/node/service", default-features = false, features = ["full-node"] }
polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false} polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../polkadot/runtime/parachains" } polkadot-runtime-parachains = { path = "../../../../../polkadot/runtime/parachains" }
@@ -90,7 +90,7 @@ runtime-benchmarks = [
"pallet-staking/runtime-benchmarks", "pallet-staking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"penpal-runtime/runtime-benchmarks", "penpal-runtime/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
"polkadot-runtime/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks",
@@ -18,7 +18,7 @@ use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
use grandpa::AuthorityId as GrandpaId; use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber}; 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_primitives::{AssignmentId, ValidatorId};
use polkadot_runtime_parachains::{ use polkadot_runtime_parachains::{
configuration::HostConfiguration, configuration::HostConfiguration,
@@ -34,7 +34,7 @@ use frame_support::{
pub use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler}; pub use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler};
pub use parachains_common::{AccountId, Balance}; pub use parachains_common::{AccountId, Balance};
pub use paste; 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; use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV6;
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId}; pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use sp_core::{sr25519, storage::Storage, Get}; pub use sp_core::{sr25519, storage::Storage, Get};
@@ -59,7 +59,7 @@ kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/cons
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -118,7 +118,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -200,7 +200,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
@@ -32,7 +32,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier}; 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 sp_runtime::traits::ConvertInto;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -53,7 +53,7 @@ sp-weights = { path = "../../../../../substrate/primitives/weights", default-fea
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false} polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
@@ -105,7 +105,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -180,7 +180,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"polkadot-runtime-constants/std", "polkadot-runtime-constants/std",
"scale-info/std", "scale-info/std",
@@ -28,7 +28,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier}; 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 sp_runtime::traits::ConvertInto;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -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 = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants", default-features = false} westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
@@ -110,7 +110,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -189,7 +189,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
@@ -32,7 +32,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::AssetFeeAsExistentialDepositMultiplier}; 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 sp_runtime::traits::ConvertInto;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -38,7 +38,7 @@ parachains-runtimes-test-utils = { path = "../../test-utils", default-features =
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", 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} 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] [dev-dependencies]
hex-literal = "0.4.1" hex-literal = "0.4.1"
@@ -66,7 +66,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"parachains-runtimes-test-utils/std", "parachains-runtimes-test-utils/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"sp-consensus-aura/std", "sp-consensus-aura/std",
"sp-core/std", "sp-core/std",
"sp-io/std", "sp-io/std",
@@ -52,7 +52,7 @@ kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/cons
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -110,7 +110,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
"serde", "serde",
@@ -148,7 +148,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -25,7 +25,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; 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::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
@@ -52,7 +52,7 @@ polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -109,7 +109,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"polkadot-runtime-constants/std", "polkadot-runtime-constants/std",
"scale-info/std", "scale-info/std",
@@ -148,7 +148,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -25,7 +25,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; 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::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
@@ -52,7 +52,7 @@ rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/cons
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
pallet-xcm-benchmarks = { path = "../../../../../polkadot/xcm/pallet-xcm-benchmarks", default-features = false, optional = true } 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-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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -144,7 +144,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"rococo-runtime-constants/std", "rococo-runtime-constants/std",
"scale-info/std", "scale-info/std",
@@ -188,7 +188,7 @@ runtime-benchmarks = [
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -31,7 +31,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom};
use polkadot_parachain::primitives::Sibling; use polkadot_parachain_primitives::primitives::Sibling;
use sp_core::Get; use sp_core::Get;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -55,7 +55,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea
# Polkadot # Polkadot
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", 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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false} polkadot-runtime-constants = { path = "../../../../../polkadot/runtime/polkadot/constants", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
@@ -106,7 +106,7 @@ runtime-benchmarks = [
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -186,7 +186,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"polkadot-runtime-constants/std", "polkadot-runtime-constants/std",
"scale-info/std", "scale-info/std",
@@ -25,7 +25,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use parachains_common::{impls::ToStakingPot, xcm_config::ConcreteNativeAssetFrom}; 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::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
@@ -55,7 +55,7 @@ pallet-contracts-primitives = { path = "../../../../../substrate/frame/contracts
kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false} kusama-runtime-constants = { path = "../../../../../polkadot/runtime/kusama/constants", default-features = false}
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false} pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", 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-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -113,7 +113,7 @@ std = [
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
@@ -151,7 +151,7 @@ runtime-benchmarks = [
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks", "pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
@@ -24,7 +24,7 @@ use frame_support::{
}; };
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling; use polkadot_parachain_primitives::primitives::Sibling;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
@@ -38,7 +38,7 @@ parachain-info = { path = "../../pallets/parachain-info", default-features = fal
xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false}
xcm-executor = { package = "staging-xcm-executor", path = "../../../../polkadot/xcm/xcm-executor", 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} 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] [dev-dependencies]
hex-literal = "0.4.1" hex-literal = "0.4.1"
@@ -65,7 +65,7 @@ std = [
"pallet-xcm/std", "pallet-xcm/std",
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"sp-consensus-aura/std", "sp-consensus-aura/std",
"sp-core/std", "sp-core/std",
"sp-io/std", "sp-io/std",
@@ -29,7 +29,7 @@ use frame_support::{
}; };
use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor}; use frame_system::pallet_prelude::{BlockNumberFor, HeaderFor};
use parachains_common::{AccountId, SLOT_DURATION}; use parachains_common::{AccountId, SLOT_DURATION};
use polkadot_parachain::primitives::{ use polkadot_parachain_primitives::primitives::{
HeadData, HrmpChannelId, RelayChainBlockNumber, XcmpMessageFormat, HeadData, HrmpChannelId, RelayChainBlockNumber, XcmpMessageFormat,
}; };
use sp_consensus_aura::{SlotDuration, AURA_ENGINE_ID}; use sp_consensus_aura::{SlotDuration, AURA_ENGINE_ID};
@@ -56,7 +56,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea
# Polkadot # Polkadot
polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false} polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false}
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", 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} polkadot-runtime-common = { path = "../../../../../polkadot/runtime/common", default-features = false}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-builder = { package = "staging-xcm-builder", path = "../../../../../polkadot/xcm/xcm-builder", default-features = false}
@@ -109,7 +109,7 @@ std = [
"pallet-xcm/std", "pallet-xcm/std",
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-primitives/std", "polkadot-primitives/std",
"polkadot-runtime-common/std", "polkadot-runtime-common/std",
"scale-info/std", "scale-info/std",
@@ -147,7 +147,7 @@ runtime-benchmarks = [
"pallet-sudo/runtime-benchmarks", "pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
@@ -39,7 +39,7 @@ use frame_support::{
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_asset_tx_payment::HandleCredit; use pallet_asset_tx_payment::HandleCredit;
use pallet_xcm::XcmPassthrough; use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling; use polkadot_parachain_primitives::primitives::Sibling;
use polkadot_runtime_common::impls::ToAuthor; use polkadot_runtime_common::impls::ToAuthor;
use sp_runtime::traits::Zero; use sp_runtime::traits::Zero;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
@@ -37,7 +37,7 @@ sp-version = { path = "../../../../../substrate/primitives/version", default-fea
# Polkadot # Polkadot
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", 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}
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", 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-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} xcm-executor = { package = "staging-xcm-executor", path = "../../../../../polkadot/xcm/xcm-executor", default-features = false}
@@ -84,7 +84,7 @@ std = [
"pallet-xcm/std", "pallet-xcm/std",
"parachain-info/std", "parachain-info/std",
"parachains-common/std", "parachains-common/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
"sp-block-builder/std", "sp-block-builder/std",
@@ -113,7 +113,7 @@ runtime-benchmarks = [
"pallet-sudo/runtime-benchmarks", "pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks", "xcm-executor/runtime-benchmarks",
@@ -76,7 +76,7 @@ use xcm_executor::traits::JustTry;
// XCM imports // XCM imports
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough};
use polkadot_parachain::primitives::Sibling; use polkadot_parachain_primitives::primitives::Sibling;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom,
+2 -2
View File
@@ -16,7 +16,7 @@ sp-trie = { path = "../../../substrate/primitives/trie", default-features = fals
# Polkadot # Polkadot
polkadot-core-primitives = { path = "../../../polkadot/core-primitives", 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-primitives = { path = "../../../polkadot/primitives", default-features = false} polkadot-primitives = { path = "../../../polkadot/primitives", default-features = false}
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false} xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false}
@@ -25,7 +25,7 @@ default = [ "std" ]
std = [ std = [
"codec/std", "codec/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-primitives/std", "polkadot-primitives/std",
"scale-info/std", "scale-info/std",
"sp-api/std", "sp-api/std",
+2 -2
View File
@@ -19,13 +19,13 @@
#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode}; use codec::{Decode, Encode};
use polkadot_parachain::primitives::HeadData; use polkadot_parachain_primitives::primitives::HeadData;
use scale_info::TypeInfo; use scale_info::TypeInfo;
use sp_runtime::RuntimeDebug; use sp_runtime::RuntimeDebug;
use sp_std::prelude::*; use sp_std::prelude::*;
pub use polkadot_core_primitives::InboundDownwardMessage; 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, DmpMessageHandler, Id as ParaId, IsSystem, UpwardMessage, ValidationParams, XcmpMessageFormat,
XcmpMessageHandler, XcmpMessageHandler,
}; };
+1 -1
View File
@@ -29,7 +29,7 @@ pallet-balances = { path = "../../../substrate/frame/balances" }
# Polkadot # Polkadot
polkadot-primitives = { path = "../../../polkadot/primitives" } polkadot-primitives = { path = "../../../polkadot/primitives" }
polkadot-parachain = { path = "../../../polkadot/parachain" } polkadot-parachain-primitives = { path = "../../../polkadot/parachain" }
# Cumulus # Cumulus
cumulus-test-runtime = { path = "../runtime" } cumulus-test-runtime = { path = "../runtime" }
+3 -1
View File
@@ -31,7 +31,9 @@ use sp_runtime::{generic::Era, BuildStorage, SaturatedConversion};
pub use block_builder::*; pub use block_builder::*;
pub use cumulus_test_runtime as runtime; 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 sc_executor::error::Result as ExecutorResult;
pub use substrate_test_client::*; pub use substrate_test_client::*;
+1 -1
View File
@@ -973,7 +973,7 @@ macro_rules! decl_test_networks {
fn process_downward_messages() { fn process_downward_messages() {
use $crate::{DmpMessageHandler, Bounded}; use $crate::{DmpMessageHandler, Bounded};
use polkadot_parachain::primitives::RelayChainBlockNumber; use polkadot_parachain_primitives::primitives::RelayChainBlockNumber;
while let Some((to_para_id, messages)) while let Some((to_para_id, messages))
= $crate::DOWNWARD_MESSAGES.with(|b| b.borrow_mut().get_mut(Self::name()).unwrap().pop_front()) { = $crate::DOWNWARD_MESSAGES.with(|b| b.borrow_mut().get_mut(Self::name()).unwrap().pop_front()) {
@@ -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"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["bit-vec", "derive"] }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-parachain = { path = "../../../parachain" } polkadot-parachain-primitives = { path = "../../../parachain" }
polkadot-node-primitives = { path = "../../primitives" } polkadot-node-primitives = { path = "../../primitives" }
polkadot-node-subsystem = { path = "../../subsystem" } polkadot-node-subsystem = { path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" } polkadot-node-subsystem-util = { path = "../../subsystem-util" }
@@ -40,7 +40,9 @@ use polkadot_node_subsystem::{
SubsystemSender, SubsystemSender,
}; };
use polkadot_node_subsystem_util::executor_params_at_relay_parent; 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::{ use polkadot_primitives::{
CandidateCommitments, CandidateDescriptor, CandidateReceipt, ExecutorParams, Hash, CandidateCommitments, CandidateDescriptor, CandidateReceipt, ExecutorParams, Hash,
OccupiedCoreAssumption, PersistedValidationData, PvfExecTimeoutKind, PvfPrepTimeoutKind, OccupiedCoreAssumption, PersistedValidationData, PvfExecTimeoutKind, PvfPrepTimeoutKind,
@@ -111,10 +113,7 @@ pub struct CandidateValidationSubsystem {
} }
impl CandidateValidationSubsystem { impl CandidateValidationSubsystem {
/// Create a new `CandidateValidationSubsystem` with the given task spawner and isolation /// Create a new `CandidateValidationSubsystem`.
/// strategy.
///
/// Check out [`IsolationStrategy`] to get more details.
pub fn with_config( pub fn with_config(
config: Option<Config>, config: Option<Config>,
metrics: Metrics, metrics: Metrics,
+1 -1
View File
@@ -25,7 +25,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } 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-core-primitives = { path = "../../../core-primitives" }
polkadot-node-core-pvf-common = { path = "common" } polkadot-node-core-pvf-common = { path = "common" }
polkadot-node-metrics = { path = "../../metrics" } polkadot-node-metrics = { path = "../../metrics" }
+1 -1
View File
@@ -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"] } 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" } polkadot-primitives = { path = "../../../../primitives" }
sc-executor = { path = "../../../../../substrate/client/executor" } sc-executor = { path = "../../../../../substrate/client/executor" }
+1 -1
View File
@@ -16,7 +16,7 @@
use crate::error::InternalValidationError; use crate::error::InternalValidationError;
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, Encode};
use polkadot_parachain::primitives::ValidationResult; use polkadot_parachain_primitives::primitives::ValidationResult;
use polkadot_primitives::ExecutorParams; use polkadot_primitives::ExecutorParams;
use std::time::Duration; use std::time::Duration;
+1 -1
View File
@@ -16,7 +16,7 @@
use crate::prepare::PrepareJobKind; use crate::prepare::PrepareJobKind;
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, Encode};
use polkadot_parachain::primitives::ValidationCodeHash; use polkadot_parachain_primitives::primitives::ValidationCodeHash;
use polkadot_primitives::ExecutorParams; use polkadot_primitives::ExecutorParams;
use sp_core::blake2_256; use sp_core::blake2_256;
use std::{ use std::{
@@ -16,7 +16,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
polkadot-node-core-pvf-common = { path = "../common" } polkadot-node-core-pvf-common = { path = "../common" }
polkadot-parachain = { path = "../../../../parachain" } polkadot-parachain-primitives = { path = "../../../../parachain" }
polkadot-primitives = { path = "../../../../primitives" } polkadot-primitives = { path = "../../../../primitives" }
sp-core = { path = "../../../../../substrate/primitives/core" } sp-core = { path = "../../../../../substrate/primitives/core" }
@@ -37,7 +37,7 @@ use polkadot_node_core_pvf_common::{
worker_event_loop, worker_event_loop,
}, },
}; };
use polkadot_parachain::primitives::ValidationResult; use polkadot_parachain_primitives::primitives::ValidationResult;
use std::{ use std::{
path::PathBuf, path::PathBuf,
sync::{mpsc::channel, Arc}, sync::{mpsc::channel, Arc},
@@ -17,7 +17,7 @@ tokio = { version = "1.24.2", features = ["fs", "process"] }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
polkadot-node-core-pvf-common = { path = "../common" } polkadot-node-core-pvf-common = { path = "../common" }
polkadot-parachain = { path = "../../../../parachain" } polkadot-parachain-primitives = { path = "../../../../parachain" }
polkadot-primitives = { path = "../../../../primitives" } polkadot-primitives = { path = "../../../../primitives" }
sc-executor = { path = "../../../../../substrate/client/executor" } sc-executor = { path = "../../../../../substrate/client/executor" }
+1 -1
View File
@@ -58,7 +58,7 @@
use crate::host::PrepareResultSender; use crate::host::PrepareResultSender;
use always_assert::always; use always_assert::always;
use polkadot_node_core_pvf_common::{error::PrepareError, prepare::PrepareStats, pvf::PvfPrepData}; 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 polkadot_primitives::ExecutorParamsHash;
use std::{ use std::{
collections::HashMap, collections::HashMap,
+1 -1
View File
@@ -28,7 +28,7 @@ pub enum ValidationError {
} }
/// A description of an error raised during executing a PVF and can be attributed to the combination /// 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)] #[derive(Debug, Clone)]
pub enum InvalidCandidate { pub enum InvalidCandidate {
/// PVF preparation ended up with a deterministic error. /// PVF preparation ended up with a deterministic error.
@@ -32,7 +32,7 @@ use polkadot_node_core_pvf_common::{
execute::{Handshake, Response}, execute::{Handshake, Response},
framed_recv, framed_send, framed_recv, framed_send,
}; };
use polkadot_parachain::primitives::ValidationResult; use polkadot_parachain_primitives::primitives::ValidationResult;
use polkadot_primitives::ExecutorParams; use polkadot_primitives::ExecutorParams;
use std::{path::Path, time::Duration}; use std::{path::Path, time::Duration};
use tokio::{io, net::UnixStream}; use tokio::{io, net::UnixStream};
+1 -1
View File
@@ -35,7 +35,7 @@ use polkadot_node_core_pvf_common::{
error::{PrepareError, PrepareResult}, error::{PrepareError, PrepareResult},
pvf::PvfPrepData, pvf::PvfPrepData,
}; };
use polkadot_parachain::primitives::ValidationResult; use polkadot_parachain_primitives::primitives::ValidationResult;
use std::{ use std::{
collections::HashMap, collections::HashMap,
path::{Path, PathBuf}, path::{Path, PathBuf},
+3 -3
View File
@@ -33,8 +33,8 @@
//! compile) in order to pre-check its validity. //! compile) in order to pre-check its validity.
//! //!
//! (b) PVF execution. This accepts the PVF //! (b) PVF execution. This accepts the PVF
//! [`params`][`polkadot_parachain::primitives::ValidationParams`] and the `Pvf` code, prepares //! [`params`][`polkadot_parachain_primitives::primitives::ValidationParams`] and the `Pvf`
//! (verifies and compiles) the code, and then executes PVF with the `params`. //! 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 //! (c) Heads up. This request allows to signal that the given PVF may be needed soon and that it
//! should be prepared for execution. //! 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 //! 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 //! combination of a path to the compiled artifact and the
//! [`params`][`polkadot_parachain::primitives::ValidationParams`]. //! [`params`][`polkadot_parachain_primitives::primitives::ValidationParams`].
mod artifacts; mod artifacts;
mod error; mod error;
+1 -1
View File
@@ -17,7 +17,7 @@
use super::TestHost; use super::TestHost;
use adder::{hash_state, BlockData, HeadData}; use adder::{hash_state, BlockData, HeadData};
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, Encode};
use polkadot_parachain::primitives::{ use polkadot_parachain_primitives::primitives::{
BlockData as GenericBlockData, HeadData as GenericHeadData, RelayChainBlockNumber, BlockData as GenericBlockData, HeadData as GenericHeadData, RelayChainBlockNumber,
ValidationParams, ValidationParams,
}; };
+1 -1
View File
@@ -21,7 +21,7 @@ use polkadot_node_core_pvf::{
start, Config, InvalidCandidate, Metrics, PrepareJobKind, PvfPrepData, ValidationError, start, Config, InvalidCandidate, Metrics, PrepareJobKind, PvfPrepData, ValidationError,
ValidationHost, JOB_TIMEOUT_WALL_CLOCK_FACTOR, 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; use polkadot_primitives::ExecutorParams;
#[cfg(feature = "ci-only-tests")] #[cfg(feature = "ci-only-tests")]
@@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. // along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! [`ApprovalDistributionSubsystem`] implementation. //! [`ApprovalDistribution`] implementation.
//! //!
//! https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html //! <https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html>
#![warn(missing_docs)] #![warn(missing_docs)]
@@ -21,8 +21,8 @@
//! - a sender //! - a sender
//! - and a receiver //! - and a receiver
//! //!
//! The sender is responsible for getting our vote out, see [`sender`]. The receiver handles //! The sender is responsible for getting our vote out, see `sender`. The receiver handles
//! incoming [`DisputeRequest`]s and offers spam protection, see [`receiver`]. //! incoming [`DisputeRequest`](v1::DisputeRequest)s and offers spam protection, see `receiver`.
use std::time::Duration; use std::time::Duration;
+1 -1
View File
@@ -17,7 +17,7 @@ sp-consensus-babe = { path = "../../../substrate/primitives/consensus/babe" }
sp-keystore = { path = "../../../substrate/primitives/keystore" } sp-keystore = { path = "../../../substrate/primitives/keystore" }
sp-maybe-compressed-blob = { path = "../../../substrate/primitives/maybe-compressed-blob" } sp-maybe-compressed-blob = { path = "../../../substrate/primitives/maybe-compressed-blob" }
sp-runtime = { path = "../../../substrate/primitives/runtime" } 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" schnorrkel = "0.9.1"
thiserror = "1.0.31" thiserror = "1.0.31"
serde = { version = "1.0.188", features = ["derive"] } serde = { version = "1.0.188", features = ["derive"] }
+3 -1
View File
@@ -39,7 +39,9 @@ pub use sp_consensus_babe::{
AllowedSlots as BabeAllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch, 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; pub mod approval;
+2 -2
View File
@@ -94,7 +94,7 @@ is_executable = "1.0.1"
polkadot-core-primitives = { path = "../../core-primitives" } polkadot-core-primitives = { path = "../../core-primitives" }
polkadot-node-core-parachains-inherent = { path = "../core/parachains-inherent" } polkadot-node-core-parachains-inherent = { path = "../core/parachains-inherent" }
polkadot-overseer = { path = "../overseer" } polkadot-overseer = { path = "../overseer" }
polkadot-parachain = { path = "../../parachain" } polkadot-parachain-primitives = { path = "../../parachain" }
polkadot-primitives = { path = "../../primitives" } polkadot-primitives = { path = "../../primitives" }
polkadot-node-primitives = { path = "../primitives" } polkadot-node-primitives = { path = "../primitives" }
polkadot-rpc = { path = "../../rpc" } polkadot-rpc = { path = "../../rpc" }
@@ -200,7 +200,7 @@ runtime-benchmarks = [
"pallet-babe/runtime-benchmarks", "pallet-babe/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks", "pallet-im-online/runtime-benchmarks",
"pallet-staking/runtime-benchmarks", "pallet-staking/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
@@ -338,7 +338,7 @@ pub fn subsystem_test_harness<M, OverseerFactory, Overseer, TestFactory, Test>(
}); });
} }
/// 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 /// It forwards all communication from the overseer to the internal message
/// channel. /// channel.
+2 -2
View File
@@ -17,7 +17,7 @@ tokio = "1.24.2"
# Polkadot dependencies # Polkadot dependencies
polkadot-overseer = { path = "../../overseer" } polkadot-overseer = { path = "../../overseer" }
polkadot-primitives = { path = "../../../primitives" } polkadot-primitives = { path = "../../../primitives" }
polkadot-parachain = { path = "../../../parachain" } polkadot-parachain-primitives = { path = "../../../parachain" }
polkadot-rpc = { path = "../../../rpc" } polkadot-rpc = { path = "../../../rpc" }
polkadot-runtime-common = { path = "../../../runtime/common" } polkadot-runtime-common = { path = "../../../runtime/common" }
polkadot-service = { path = "../../service" } polkadot-service = { path = "../../service" }
@@ -68,7 +68,7 @@ runtime-benchmarks= [
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks", "pallet-balances/runtime-benchmarks",
"pallet-staking/runtime-benchmarks", "pallet-staking/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
+1 -1
View File
@@ -1,5 +1,5 @@
[package] [package]
name = "polkadot-parachain" name = "polkadot-parachain-primitives"
description = "Types and utilities for creating and working with parachains" description = "Types and utilities for creating and working with parachains"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
@@ -9,7 +9,7 @@ authors.workspace = true
publish = false publish = false
[dependencies] [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"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
sp-std = { path = "../../../../substrate/primitives/std", default-features = false } sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
tiny-keccak = { version = "2.0.2", features = ["keccak"] } tiny-keccak = { version = "2.0.2", features = ["keccak"] }
@@ -39,7 +39,7 @@ sc-service = { path = "../../../../../substrate/client/service" }
polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true } polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true }
[dev-dependencies] [dev-dependencies]
polkadot-parachain = { path = "../../.." } polkadot-parachain-primitives = { path = "../../.." }
polkadot-test-service = { path = "../../../../node/test/service" } polkadot-test-service = { path = "../../../../node/test/service" }
substrate-test-utils = { path = "../../../../../substrate/test-utils" } substrate-test-utils = { path = "../../../../../substrate/test-utils" }
@@ -249,7 +249,7 @@ mod tests {
use super::*; use super::*;
use futures::executor::block_on; use futures::executor::block_on;
use polkadot_parachain::primitives::{ValidationParams, ValidationResult}; use polkadot_parachain_primitives::primitives::{ValidationParams, ValidationResult};
use polkadot_primitives::PersistedValidationData; use polkadot_primitives::PersistedValidationData;
#[test] #[test]
@@ -9,7 +9,7 @@ edition.workspace = true
license.workspace = true license.workspace = true
[dependencies] [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"] } parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
sp-std = { path = "../../../../substrate/primitives/std", default-features = false } sp-std = { path = "../../../../substrate/primitives/std", default-features = false }
tiny-keccak = { version = "2.0.2", features = ["keccak"] } tiny-keccak = { version = "2.0.2", features = ["keccak"] }
@@ -39,7 +39,7 @@ sc-service = { path = "../../../../../substrate/client/service" }
polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true } polkadot-node-core-pvf = { path = "../../../../node/core/pvf", features = ["test-utils"], optional = true }
[dev-dependencies] [dev-dependencies]
polkadot-parachain = { path = "../../.." } polkadot-parachain-primitives = { path = "../../.." }
polkadot-test-service = { path = "../../../../node/test/service" } polkadot-test-service = { path = "../../../../node/test/service" }
# For the puppet worker, depend on ourselves with the test-utils feature. # For the puppet worker, depend on ourselves with the test-utils feature.
test-parachain-undying-collator = { path = "", features = ["test-utils"] } test-parachain-undying-collator = { path = "", features = ["test-utils"] }
@@ -338,7 +338,7 @@ use sp_core::traits::SpawnNamed;
mod tests { mod tests {
use super::*; use super::*;
use futures::executor::block_on; use futures::executor::block_on;
use polkadot_parachain::primitives::{ValidationParams, ValidationResult}; use polkadot_parachain_primitives::primitives::{ValidationParams, ValidationResult};
use polkadot_primitives::{Hash, PersistedValidationData}; use polkadot_primitives::{Hash, PersistedValidationData};
#[test] #[test]
+3 -3
View File
@@ -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 } sp-std = { package = "sp-std", path = "../../substrate/primitives/std", default-features = false }
polkadot-core-primitives = { path = "../core-primitives", 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] [features]
default = [ "std" ] default = [ "std" ]
@@ -36,7 +36,7 @@ std = [
"inherents/std", "inherents/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-core-primitives/std", "polkadot-core-primitives/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"primitives/std", "primitives/std",
"runtime_primitives/std", "runtime_primitives/std",
"scale-info/std", "scale-info/std",
@@ -51,7 +51,7 @@ std = [
"sp-std/std", "sp-std/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"runtime_primitives/runtime-benchmarks", "runtime_primitives/runtime-benchmarks",
"sp-staking/runtime-benchmarks", "sp-staking/runtime-benchmarks",
] ]
+1 -1
View File
@@ -121,7 +121,7 @@ use crate::{
}; };
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, Encode};
use polkadot_core_primitives as pcp; 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::*}; use sp_std::{collections::btree_map::BTreeMap, prelude::*};
sp_api::decl_runtime_apis! { sp_api::decl_runtime_apis! {
+1 -1
View File
@@ -42,7 +42,7 @@ pub use polkadot_core_primitives::v2::{
}; };
// Export some polkadot-parachain primitives // Export some polkadot-parachain primitives
pub use polkadot_parachain::primitives::{ pub use polkadot_parachain_primitives::primitives::{
HeadData, HorizontalMessages, HrmpChannelId, Id, UpwardMessage, UpwardMessages, ValidationCode, HeadData, HorizontalMessages, HrmpChannelId, Id, UpwardMessage, UpwardMessages, ValidationCode,
ValidationCodeHash, LOWEST_PUBLIC_ID, LOWEST_USER_ID, ValidationCodeHash, LOWEST_PUBLIC_ID, LOWEST_USER_ID,
}; };
@@ -31,7 +31,7 @@ digraph {
CandidateDescriptor:collator -> CollatorId:w CandidateDescriptor:collator -> CollatorId:w
CandidateDescriptor:persisted_validation_data_hash -> PersistedValidationDataHash 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"] CollatorId [label="polkadot_primitives::v2::CollatorId"]
PoVHash [label = "Hash", shape="doublecircle", fill="gray90"] PoVHash [label = "Hash", shape="doublecircle", fill="gray90"]
@@ -128,11 +128,11 @@ digraph {
</table> </table>
>] >]
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:horizontal_messages -> "polkadot_core_primitives::v2::OutboundHrmpMessage":w
CandidateCommitments:head_data -> HeadData:w CandidateCommitments:head_data -> HeadData:w
CandidateCommitments:horizontal_messages -> "polkadot_parachain::primitives::Id":w CandidateCommitments:horizontal_messages -> "polkadot_parachain_primitives::primitives::Id":w
CandidateCommitments:new_validation_code -> "polkadot_parachain::primitives::ValidationCode":w CandidateCommitments:new_validation_code -> "polkadot_parachain_primitives::primitives::ValidationCode":w
PoV [label = < PoV [label = <
<table> <table>
@@ -141,7 +141,7 @@ digraph {
</table> </table>
>] >]
PoV:block_data -> "polkadot_parachain::primitives::BlockData":w PoV:block_data -> "polkadot_parachain_primitives::primitives::BlockData":w
BackedCandidate [label = < BackedCandidate [label = <
<table> <table>
@@ -155,7 +155,7 @@ digraph {
BackedCandidate:candidate -> CommittedCandidateReceipt:name BackedCandidate:candidate -> CommittedCandidateReceipt:name
BackedCandidate:validity_votes -> "polkadot_primitives:v0:ValidityAttestation":w BackedCandidate:validity_votes -> "polkadot_primitives:v0:ValidityAttestation":w
HeadData [label = "polkadot_parachain::primitives::HeadData"] HeadData [label = "polkadot_parachain_primitives::primitives::HeadData"]
CoreIndex [label = < CoreIndex [label = <
<table> <table>
+3 -3
View File
@@ -47,7 +47,7 @@ primitives = { package = "polkadot-primitives", path = "../../primitives", defau
rand = { version = "0.8.5", default-features = false } rand = { version = "0.8.5", default-features = false }
rand_chacha = { version = "0.3.1", default-features = false } rand_chacha = { version = "0.3.1", default-features = false }
static_assertions = { version = "1.1.0", optional = true } 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} polkadot-runtime-metrics = { path = "../metrics", default-features = false}
[dev-dependencies] [dev-dependencies]
@@ -82,7 +82,7 @@ std = [
"pallet-timestamp/std", "pallet-timestamp/std",
"pallet-vesting/std", "pallet-vesting/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-metrics/std", "polkadot-runtime-metrics/std",
"primitives/std", "primitives/std",
"rustc-hex/std", "rustc-hex/std",
@@ -110,7 +110,7 @@ runtime-benchmarks = [
"pallet-staking/runtime-benchmarks", "pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks", "pallet-vesting/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"primitives/runtime-benchmarks", "primitives/runtime-benchmarks",
"sp-application-crypto", "sp-application-crypto",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
@@ -22,7 +22,9 @@ use crate::{inclusion::MAX_UPWARD_MESSAGE_SIZE_BOUND, shared};
use frame_support::{pallet_prelude::*, DefaultNoBound}; use frame_support::{pallet_prelude::*, DefaultNoBound};
use frame_system::pallet_prelude::*; use frame_system::pallet_prelude::*;
use parity_scale_codec::{Decode, Encode}; 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::{ use primitives::{
vstaging::AsyncBackingParams, Balance, ExecutorParams, SessionIndex, LEGACY_MIN_BACKING_VOTES, 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, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
+1 -1
View File
@@ -21,7 +21,7 @@ use crate::{
use frame_support::{pallet_prelude::*, traits::ReservableCurrency, DefaultNoBound}; use frame_support::{pallet_prelude::*, traits::ReservableCurrency, DefaultNoBound};
use frame_system::pallet_prelude::*; use frame_system::pallet_prelude::*;
use parity_scale_codec::{Decode, Encode}; use parity_scale_codec::{Decode, Encode};
use polkadot_parachain::primitives::HorizontalMessages; use polkadot_parachain_primitives::primitives::HorizontalMessages;
use primitives::{ use primitives::{
Balance, Hash, HrmpChannelId, Id as ParaId, InboundHrmpMessage, OutboundHrmpMessage, Balance, Hash, HrmpChannelId, Id as ParaId, InboundHrmpMessage, OutboundHrmpMessage,
SessionIndex, SessionIndex,
+3 -3
View File
@@ -87,7 +87,7 @@ hex-literal = { version = "0.4.1" }
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features=["experimental"] } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features=["experimental"] }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false } runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", 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 = { package = "staging-xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", 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-benchmarks?/std",
"pallet-xcm/std", "pallet-xcm/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"primitives/std", "primitives/std",
"rococo-runtime-constants/std", "rococo-runtime-constants/std",
"runtime-common/std", "runtime-common/std",
@@ -226,7 +226,7 @@ runtime-benchmarks = [
"pallet-vesting/runtime-benchmarks", "pallet-vesting/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"primitives/runtime-benchmarks", "primitives/runtime-benchmarks",
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks", "runtime-parachains/runtime-benchmarks",
+3 -3
View File
@@ -59,7 +59,7 @@ pallet-vesting = { path = "../../../substrate/frame/vesting", default-features =
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
pallet-xcm = { path = "../../xcm/pallet-xcm", 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 } polkadot-runtime-parachains = { path = "../parachains", default-features = false }
xcm-builder = { package = "staging-xcm-builder", path = "../../xcm/xcm-builder", 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 } xcm-executor = { package = "staging-xcm-executor", path = "../../xcm/xcm-executor", default-features = false }
@@ -114,7 +114,7 @@ std = [
"pallet-vesting/std", "pallet-vesting/std",
"pallet-xcm/std", "pallet-xcm/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"polkadot-runtime-parachains/std", "polkadot-runtime-parachains/std",
"primitives/std", "primitives/std",
"runtime-common/std", "runtime-common/std",
@@ -152,7 +152,7 @@ runtime-benchmarks = [
"pallet-timestamp/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks", "pallet-vesting/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
"primitives/runtime-benchmarks", "primitives/runtime-benchmarks",
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
+3 -3
View File
@@ -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"] } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false, features=["experimental"] }
primitives = { package = "polkadot-primitives", path = "../../primitives", 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 }
runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false } runtime-parachains = { package = "polkadot-runtime-parachains", path = "../parachains", default-features = false }
xcm = { package = "staging-xcm", path = "../../xcm", default-features = false } xcm = { package = "staging-xcm", path = "../../xcm", default-features = false }
@@ -184,7 +184,7 @@ std = [
"pallet-xcm-benchmarks?/std", "pallet-xcm-benchmarks?/std",
"pallet-xcm/std", "pallet-xcm/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"primitives/std", "primitives/std",
"runtime-common/std", "runtime-common/std",
"runtime-parachains/std", "runtime-parachains/std",
@@ -254,7 +254,7 @@ runtime-benchmarks = [
"pallet-vesting/runtime-benchmarks", "pallet-vesting/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"primitives/runtime-benchmarks", "primitives/runtime-benchmarks",
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks", "runtime-parachains/runtime-benchmarks",
+2 -2
View File
@@ -27,7 +27,7 @@ xcm-executor = { package = "staging-xcm-executor", path = "../xcm-executor", def
[dev-dependencies] [dev-dependencies]
pallet-balances = { path = "../../../substrate/frame/balances" } pallet-balances = { path = "../../../substrate/frame/balances" }
polkadot-runtime-parachains = { path = "../../runtime/parachains" } polkadot-runtime-parachains = { path = "../../runtime/parachains" }
polkadot-parachain = { path = "../../parachain" } polkadot-parachain-primitives = { path = "../../parachain" }
xcm-builder = { package = "staging-xcm-builder", path = "../xcm-builder" } xcm-builder = { package = "staging-xcm-builder", path = "../xcm-builder" }
[features] [features]
@@ -54,7 +54,7 @@ runtime-benchmarks = [
"frame-support/runtime-benchmarks", "frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks", "frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks", "pallet-balances/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
"sp-runtime/runtime-benchmarks", "sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks", "xcm-builder/runtime-benchmarks",
+1 -1
View File
@@ -21,7 +21,7 @@ use frame_support::{
weights::Weight, weights::Weight,
}; };
use frame_system::EnsureRoot; 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 polkadot_runtime_parachains::origin;
use sp_core::H256; use sp_core::H256;
use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage}; use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage};
+1 -1
View File
@@ -24,7 +24,7 @@ use frame_support::{
traits::{Currency, Hooks}, traits::{Currency, Hooks},
weights::Weight, 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 sp_runtime::traits::{AccountIdConversion, BlakeTwo256, Hash};
use xcm::{latest::QueryResponseInfo, prelude::*}; use xcm::{latest::QueryResponseInfo, prelude::*};
use xcm_builder::AllowKnownQueryResponses; use xcm_builder::AllowKnownQueryResponses;
-8
View File
@@ -239,14 +239,12 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation};
/// # fn main() {
/// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild)); /// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild));
/// assert_eq!( /// assert_eq!(
/// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))), /// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))),
/// Some(&OnlyChild), /// Some(&OnlyChild),
/// ); /// );
/// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None); /// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None);
/// # }
/// ``` /// ```
pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> {
if self.parents != prefix.parents { if self.parents != prefix.parents {
@@ -280,11 +278,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation};
/// # fn main() {
/// let mut m = MultiLocation::new(1, X1(Parachain(21))); /// let mut m = MultiLocation::new(1, X1(Parachain(21)));
/// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(())); /// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); /// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn append_with(&mut self, suffix: Junctions) -> Result<(), Junctions> { pub fn append_with(&mut self, suffix: Junctions) -> Result<(), Junctions> {
if self.interior.len().saturating_add(suffix.len()) > MAX_JUNCTIONS { if self.interior.len().saturating_add(suffix.len()) > MAX_JUNCTIONS {
@@ -303,11 +299,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation}; /// # use staging_xcm::v2::{Junctions::*, Junction::*, MultiLocation};
/// # fn main() {
/// let mut m = MultiLocation::new(2, X1(PalletInstance(3))); /// 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.prepend_with(MultiLocation::new(1, X2(Parachain(21), OnlyChild))), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3)))); /// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn prepend_with(&mut self, mut prefix: MultiLocation) -> Result<(), MultiLocation> { pub fn prepend_with(&mut self, mut prefix: MultiLocation) -> Result<(), MultiLocation> {
// prefix self (suffix) // prefix self (suffix)
@@ -840,11 +834,9 @@ impl Junctions {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v2::{Junctions::*, Junction::*}; /// # use staging_xcm::v2::{Junctions::*, Junction::*};
/// # fn main() {
/// let mut m = X3(Parachain(2), PalletInstance(3), OnlyChild); /// 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(&X2(Parachain(2), PalletInstance(3))), Some(&OnlyChild));
/// assert_eq!(m.match_and_split(&X1(Parachain(2))), None); /// assert_eq!(m.match_and_split(&X1(Parachain(2))), None);
/// # }
/// ``` /// ```
pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> {
if prefix.len() + 1 != self.len() || !self.starts_with(prefix) { if prefix.len() + 1 != self.len() || !self.starts_with(prefix) {
-4
View File
@@ -438,11 +438,9 @@ impl Junctions {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// # fn main() {
/// let mut m = X1(Parachain(21)); /// let mut m = X1(Parachain(21));
/// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(())); /// assert_eq!(m.append_with(X1(PalletInstance(3))), Ok(()));
/// assert_eq!(m, X2(Parachain(21), PalletInstance(3))); /// assert_eq!(m, X2(Parachain(21), PalletInstance(3)));
/// # }
/// ``` /// ```
pub fn append_with(&mut self, suffix: impl Into<Junctions>) -> Result<(), Junctions> { pub fn append_with(&mut self, suffix: impl Into<Junctions>) -> Result<(), Junctions> {
let suffix = suffix.into(); let suffix = suffix.into();
@@ -569,11 +567,9 @@ impl Junctions {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*}; /// # use staging_xcm::v3::{Junctions::*, Junction::*};
/// # fn main() {
/// let mut m = X3(Parachain(2), PalletInstance(3), OnlyChild); /// 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(&X2(Parachain(2), PalletInstance(3))), Some(&OnlyChild));
/// assert_eq!(m.match_and_split(&X1(Parachain(2))), None); /// assert_eq!(m.match_and_split(&X1(Parachain(2))), None);
/// # }
/// ``` /// ```
pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> { pub fn match_and_split(&self, prefix: &Junctions) -> Option<&Junction> {
if prefix.len() + 1 != self.len() { if prefix.len() + 1 != self.len() {
-10
View File
@@ -266,14 +266,12 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation};
/// # fn main() {
/// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild)); /// let mut m = MultiLocation::new(1, X2(PalletInstance(3), OnlyChild));
/// assert_eq!( /// assert_eq!(
/// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))), /// m.match_and_split(&MultiLocation::new(1, X1(PalletInstance(3)))),
/// Some(&OnlyChild), /// Some(&OnlyChild),
/// ); /// );
/// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None); /// assert_eq!(m.match_and_split(&MultiLocation::new(1, Here)), None);
/// # }
/// ``` /// ```
pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> { pub fn match_and_split(&self, prefix: &MultiLocation) -> Option<&Junction> {
if self.parents != prefix.parents { if self.parents != prefix.parents {
@@ -293,11 +291,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # fn main() {
/// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into(); /// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into();
/// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(())); /// assert_eq!(m.append_with((Parent, PalletInstance(3))), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); /// assert_eq!(m, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn append_with(&mut self, suffix: impl Into<Self>) -> Result<(), Self> { pub fn append_with(&mut self, suffix: impl Into<Self>) -> Result<(), Self> {
let prefix = core::mem::replace(self, suffix.into()); let prefix = core::mem::replace(self, suffix.into());
@@ -314,11 +310,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # fn main() {
/// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into(); /// let mut m: MultiLocation = (Parent, Parachain(21), 69u64).into();
/// let r = m.appended_with((Parent, PalletInstance(3))).unwrap(); /// let r = m.appended_with((Parent, PalletInstance(3))).unwrap();
/// assert_eq!(r, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3)))); /// assert_eq!(r, MultiLocation::new(1, X2(Parachain(21), PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn appended_with(mut self, suffix: impl Into<Self>) -> Result<Self, (Self, Self)> { pub fn appended_with(mut self, suffix: impl Into<Self>) -> Result<Self, (Self, Self)> {
match self.append_with(suffix) { match self.append_with(suffix) {
@@ -334,11 +328,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # fn main() {
/// let mut m: MultiLocation = (Parent, Parent, PalletInstance(3)).into(); /// let mut m: MultiLocation = (Parent, Parent, PalletInstance(3)).into();
/// assert_eq!(m.prepend_with((Parent, Parachain(21), OnlyChild)), Ok(())); /// assert_eq!(m.prepend_with((Parent, Parachain(21), OnlyChild)), Ok(()));
/// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3)))); /// assert_eq!(m, MultiLocation::new(1, X1(PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn prepend_with(&mut self, prefix: impl Into<Self>) -> Result<(), Self> { pub fn prepend_with(&mut self, prefix: impl Into<Self>) -> Result<(), Self> {
// prefix self (suffix) // prefix self (suffix)
@@ -383,11 +375,9 @@ impl MultiLocation {
/// # Example /// # Example
/// ```rust /// ```rust
/// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent}; /// # use staging_xcm::v3::{Junctions::*, Junction::*, MultiLocation, Parent};
/// # fn main() {
/// let m: MultiLocation = (Parent, Parent, PalletInstance(3)).into(); /// let m: MultiLocation = (Parent, Parent, PalletInstance(3)).into();
/// let r = m.prepended_with((Parent, Parachain(21), OnlyChild)).unwrap(); /// let r = m.prepended_with((Parent, Parachain(21), OnlyChild)).unwrap();
/// assert_eq!(r, MultiLocation::new(1, X1(PalletInstance(3)))); /// assert_eq!(r, MultiLocation::new(1, X1(PalletInstance(3))));
/// # }
/// ``` /// ```
pub fn prepended_with(mut self, prefix: impl Into<Self>) -> Result<Self, (Self, Self)> { pub fn prepended_with(mut self, prefix: impl Into<Self>) -> Result<Self, (Self, Self)> {
match self.prepend_with(prefix) { match self.prepend_with(prefix) {
+3 -3
View File
@@ -23,7 +23,7 @@ pallet-transaction-payment = { path = "../../../substrate/frame/transaction-paym
log = { version = "0.4.17", default-features = false } log = { version = "0.4.17", default-features = false }
# Polkadot dependencies # Polkadot dependencies
polkadot-parachain = { path = "../../parachain", default-features = false } polkadot-parachain-primitives = { path = "../../parachain", default-features = false }
[dev-dependencies] [dev-dependencies]
primitive-types = "0.12.1" primitive-types = "0.12.1"
@@ -45,7 +45,7 @@ runtime-benchmarks = [
"pallet-balances/runtime-benchmarks", "pallet-balances/runtime-benchmarks",
"pallet-salary/runtime-benchmarks", "pallet-salary/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks", "pallet-xcm/runtime-benchmarks",
"polkadot-parachain/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks",
"polkadot-test-runtime/runtime-benchmarks", "polkadot-test-runtime/runtime-benchmarks",
"primitives/runtime-benchmarks", "primitives/runtime-benchmarks",
@@ -58,7 +58,7 @@ std = [
"log/std", "log/std",
"pallet-transaction-payment/std", "pallet-transaction-payment/std",
"parity-scale-codec/std", "parity-scale-codec/std",
"polkadot-parachain/std", "polkadot-parachain-primitives/std",
"scale-info/std", "scale-info/std",
"sp-arithmetic/std", "sp-arithmetic/std",
"sp-io/std", "sp-io/std",

Some files were not shown because too many files have changed in this diff Show More