More backports from Cumulus subtree to polkadot-staging (#2283)

* more backports from Cumulus subtree

* spelling

* fmt

* trigger CI

* Revert "trigger CI"

This reverts commit b009d732aa26d006a7f2b48878ee864c338c49d5.

* Revert "Revert "trigger CI""

This reverts commit 715606a75948124962b14dbb260cf3aed01bc665.

* Revert "Revert "Revert "trigger CI"""

This reverts commit dc0d2233da86fd12a77216008e59bd38fcbb2fac.
This commit is contained in:
Svyatoslav Nikolsky
2023-07-20 14:23:36 +03:00
committed by Bastian Köcher
parent 4d42bb22f3
commit 57550eb867
12 changed files with 43 additions and 42 deletions
+10 -10
View File
@@ -56,13 +56,13 @@ impl ChainWithGrandpa for Westend {
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
}
/// Westmint parachain definition
/// `AssetHubWestend` parachain definition
#[derive(Debug, Clone, Copy)]
pub struct Westmint;
pub struct AssetHubWestend;
// Westmint seems to use the same configuration as all Polkadot-like chains, so we'll use Westend
// primitives here.
impl Chain for Westmint {
// AssetHubWestend seems to use the same configuration as all Polkadot-like chains, so we'll use
// Westend primitives here.
impl Chain for AssetHubWestend {
type BlockNumber = BlockNumber;
type Hash = Hash;
type Hasher = Hasher;
@@ -82,8 +82,8 @@ impl Chain for Westmint {
}
}
impl Parachain for Westmint {
const PARACHAIN_ID: u32 = WESTMINT_PARACHAIN_ID;
impl Parachain for AssetHubWestend {
const PARACHAIN_ID: u32 = ASSET_HUB_WESTEND_PARACHAIN_ID;
}
/// Name of the parachains pallet at the Westend runtime.
@@ -100,9 +100,9 @@ pub const WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME: &str = "BridgeWestendParachains
/// reserve.
pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128;
/// Identifier of Westmint parachain at the Westend relay chain.
pub const WESTMINT_PARACHAIN_ID: u32 = 1000;
/// Identifier of `AssetHubWestend` parachain at the Westend relay chain.
pub const ASSET_HUB_WESTEND_PARACHAIN_ID: u32 = 1000;
decl_bridge_finality_runtime_apis!(westend);
decl_bridge_finality_runtime_apis!(westmint);
decl_bridge_finality_runtime_apis!(AssetHubWestend);
+3 -3
View File
@@ -19,9 +19,9 @@ bp-runtime = { path = "../runtime", default-features = false }
# Substrate Dependencies
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["serde"] }
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["serde"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["serde"] }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies]
+1 -1
View File
@@ -3,7 +3,7 @@ name = "bp-parachains"
description = "Primitives of parachains module."
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
+1 -1
View File
@@ -20,7 +20,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "mas
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = ["serde"] }
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
+2 -2
View File
@@ -77,8 +77,8 @@ pub const KUSAMA_CHAIN_ID: ChainId = *b"ksma";
/// Westend chain id.
pub const WESTEND_CHAIN_ID: ChainId = *b"wend";
/// Westend chain id.
pub const WESTMINT_CHAIN_ID: ChainId = *b"wmnt";
/// `AssetHubWestmint` chain id.
pub const ASSET_HUB_WESTEND_CHAIN_ID: ChainId = *b"ahwe";
/// Rococo chain id.
pub const ROCOCO_CHAIN_ID: ChainId = *b"roco";