Rename Statemint to Asset Hub (#2633)

* change dir names

* cargo toml updates

* fix crate imports for build

* change chain spec names and PR review rule

* update cli to accept asset-hub

* find/replace benchmark commands

* integration tests

* bridges docs

* more integration tests

* AuraId

* other statemint tidying

* rename statemint mod

* chain spec mod

* rename e2e test dirs

* one more Runtime::Statemine

* benchmark westmint

* rename chain spec name and id

* rename chain spec files

* more tidying in scripts/docs/tests

* rename old dir if exists

* Force people to manually do the move.

(Safer as there could be additional considerations with their setup)

* review touchups

* more renaming

* Update polkadot-parachain/src/command.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* better error message

* do not break on-chain spec_name

* log info message that path has been renamed

* better penpal docs

---------

Co-authored-by: gilescope <gilescope@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: parity-processbot <>
This commit is contained in:
joe petrowski
2023-06-02 11:58:19 +02:00
committed by GitHub
parent cad48b7136
commit 6007549589
161 changed files with 1123 additions and 1025 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
# Assets Parachain
Implementation of _Statemint_, a blockchain to support generic assets in the Polkadot and Kusama
networks.
Implementation of Asset Hub, a blockchain to support generic assets in the Polkadot and Kusama
networks. Asset Hub was formerly known as "Statemint".
Statemint allows users to:
Asset Hub allows users to:
- Deploy promise-backed assets, both fungible and non-fungible, with a DOT/KSM deposit.
- Set admin roles to manage assets and asset classes.
@@ -13,11 +13,11 @@ Statemint allows users to:
- Transfer (and approve transfer) assets.
- Interact with the chain via its transactional API or XCM.
Statemint must stay fully aligned with the Relay Chain it is connected to. As such, it will accept
Asset Hub must stay fully aligned with the Relay Chain it is connected to. As such, it will accept
the Relay Chain's governance origins as its own.
See
[the article on Statemint as common good parachain](https://www.parity.io/blog/statemint-generic-assets-chain-proposing-a-common-good-parachain-to-polkadot-governance/)
[the article on Asset Hub as common good parachain](https://www.parity.io/blog/statemint-generic-assets-chain-proposing-a-common-good-parachain-to-polkadot-governance/)
for a higher level description.
Wallets, custodians, etc. should see
@@ -1,9 +1,9 @@
[package]
name = "statemine-runtime"
version = "2.0.0"
name = "asset-hub-kusama-runtime"
version = "0.9.420"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Kusama variant of Statemint parachain runtime"
description = "Kusama variant of Asset Hub parachain runtime"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
@@ -73,7 +73,7 @@ pub mod fee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemine, we map to 1/10 of that, or 1/100 CENT
// in Asset Hub, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! # Statemine Runtime
//! # Asset Hub Kusama Runtime
//!
//! Statemine is the canary network for its Polkadot cousin, Statemint.
//! Asset Hub Kusama, formerly known as "Statemine", is the canary network for its Polkadot cousin.
#![cfg_attr(not(feature = "std"), no_std)]
#![recursion_limit = "256"]
@@ -94,6 +94,9 @@ impl_opaque_keys! {
#[cfg(feature = "state-trie-version-1")]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
// Note: "statemine" is the legacy name for this chain. It has been renamed to
// "asset-hub-kusama". Many wallets/tools depend on the `spec_name`, so it remains "statemine"
// for the time being. Wallets/tools should update to treat "asset-hub-kusama" equally.
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
@@ -107,6 +110,9 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
#[cfg(not(feature = "state-trie-version-1"))]
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
// Note: "statemine" is the legacy name for this change. It has been renamed to
// "asset-hub-kusama". Many wallets/tools depend on the `spec_name`, so it remains "statemine"
// for the time being. Wallets/tools should update to treat "asset-hub-kusama" equally.
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=cumulus_pallet_xcmp_queue
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/cumulus_pallet_xcmp_queue.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/cumulus_pallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=frame_system
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/frame_system.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/frame_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-03-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_assets
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_assets.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_assets.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_balances
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_balances.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_collator_selection
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_collator_selection.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_collator_selection.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_multisig
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_multisig.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_nfts
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_nfts.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_nfts.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_proxy
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_proxy.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_session
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_session.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_timestamp
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_timestamp.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_uniques
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_uniques.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_utility
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_utility.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_xcm.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/pallet_xcm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -56,8 +56,8 @@ impl WeighMultiAssets for MultiAssets {
}
}
pub struct WestmintXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
pub struct AssetHubKusamaXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for AssetHubKusamaXcmWeight<Call> {
fn withdraw_asset(assets: &MultiAssets) -> Weight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
}
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::fungible
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=statemine-dev
// --chain=asset-hub-kusama-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::generic
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/asset-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -376,8 +376,8 @@ impl xcm_executor::Config for XcmConfig {
type XcmSender = XcmRouter;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Statemine does not recognize a reserve location for any asset. This does not prevent
// Statemine acting _as_ a reserve location for KSM and assets created under `pallet-assets`.
// Asset Hub Kusama does not recognize a reserve location for any asset. This does not prevent
// Asset Hub acting _as_ a reserve location for KSM and assets created under `pallet-assets`.
// For KSM, users must use teleport where allowed (e.g. with the Relay Chain).
type IsReserve = ();
// We allow:
@@ -390,7 +390,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = WeightInfoBounds<
crate::weights::xcm::StatemineXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubKusamaXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -454,7 +454,7 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = WeightInfoBounds<
crate::weights::xcm::StatemineXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubKusamaXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -1,3 +1,13 @@
use asset_hub_kusama_runtime::xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation,
};
pub use asset_hub_kusama_runtime::{
constants::fee::WeightToFee,
xcm_config::{CheckingAccount, ForeignCreatorsSovereignAccountOf, XcmConfig},
AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance,
MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, RuntimeCall,
RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance,
};
use asset_test_utils::{CollatorSessionKeys, ExtBuilder, RuntimeHelper};
use codec::{Decode, Encode};
use cumulus_primitives_utility::ChargeWeightInFungibles;
@@ -7,16 +17,6 @@ use frame_support::{
weights::{Weight, WeightToFee as WeightToFeeT},
};
use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance};
use statemine_runtime::xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation,
};
pub use statemine_runtime::{
constants::fee::WeightToFee,
xcm_config::{CheckingAccount, ForeignCreatorsSovereignAccountOf, XcmConfig},
AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance,
MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime, RuntimeCall,
RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance,
};
use xcm::latest::prelude::*;
use xcm_executor::traits::{Convert, Identity, JustTry, WeightTrader};
@@ -1,9 +1,9 @@
[package]
name = "statemint-runtime"
version = "1.0.0"
name = "asset-hub-polkadot-runtime"
version = "0.9.420"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Statemint parachain runtime"
description = "Asset Hub Polkadot parachain runtime"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
@@ -74,7 +74,7 @@ pub mod fee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in Polkadot, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemint, we map to 1/10 of that, or 1/100 CENT
// in Asset Hub, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
@@ -13,10 +13,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! # Statemint Runtime
//! # Asset Hub Polkadot Runtime
//!
//! Statemint is a parachain that provides an interface to create, manage, and use assets. Assets
//! may be fungible or non-fungible.
//! Asset Hub Polkadot is a parachain that provides an interface to create, manage, and use assets.
//! Assets may be fungible or non-fungible.
//!
//! ## Renaming
//!
//! This chain was originally known as "Statemint". You may see references to Statemint, Statemine,
//! and Westmint throughout the codebase. These are synonymous with "Asset Hub Polkadot, Kusama, and
//! Westend", respectively.
//!
//! ## Assets
//!
@@ -27,22 +33,22 @@
//!
//! ### Native Balances
//!
//! Statemint uses its parent DOT token as its native asset.
//! Asset Hub Polkadot uses its parent DOT token as its native asset.
//!
//! ### Governance
//!
//! As a common good parachain, Statemint defers its governance (namely, its `Root` origin), to its
//! As a system parachain, Asset Hub defers its governance (namely, its `Root` origin), to its
//! Relay Chain parent, Polkadot.
//!
//! ### Collator Selection
//!
//! Statemint uses `pallet-collator-selection`, a simple first-come-first-served registration
//! Asset Hub uses `pallet-collator-selection`, a simple first-come-first-served registration
//! system where collators can reserve a small bond to join the block producer set. There is no
//! slashing.
//!
//! ### XCM
//!
//! Because Statemint is fully under the control of the Relay Chain, it is meant to be a
//! Because Asset Hub is fully under the control of the Relay Chain, it is meant to be a
//! `TrustedTeleporter`. It can also serve as a reserve location to other parachains for DOT as well
//! as other local assets.
@@ -93,8 +99,8 @@ use pallet_nfts::PalletFeatures;
pub use parachains_common as common;
use parachains_common::{
impls::{AssetsToBlockAuthor, DealWithFees},
opaque, AccountId, AssetIdForTrustBackedAssets, Balance, BlockNumber, Hash, Header, Index,
Signature, StatemintAuraId as AuraId, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS,
opaque, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance,
BlockNumber, Hash, Header, Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS,
MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
};
use xcm_config::{
@@ -122,6 +128,9 @@ impl_opaque_keys! {
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
// Note: "statemint" is the legacy name for this chain. It has been renamed to
// "asset-hub-polkadot". Many wallets/tools depend on the `spec_name`, so it remains "statemint"
// for the time being. Wallets/tools should update to treat "asset-hub-polkadot" equally.
spec_name: create_runtime_str!("statemint"),
impl_name: create_runtime_str!("statemint"),
authoring_version: 1,
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=cumulus_pallet_xcmp_queue
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/cumulus_pallet_xcmp_queue.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=frame_system
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/frame_system.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/frame_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_assets
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_assets.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_assets.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_balances
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_balances.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_collator_selection
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_collator_selection.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_collator_selection.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_multisig
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_multisig.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-kusama-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemine-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_nfts
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_nfts.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_nfts.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_proxy
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_proxy.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_session
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_session.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_timestamp
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_timestamp.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_uniques
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_uniques.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_utility
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_utility.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_xcm.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/pallet_xcm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -56,8 +56,8 @@ impl WeighMultiAssets for MultiAssets {
}
}
pub struct StatemineXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
pub struct AssetHubPolkadotXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for AssetHubPolkadotXcmWeight<Call> {
fn withdraw_asset(assets: &MultiAssets) -> Weight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
}
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::fungible
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=statemint-dev
// --chain=asset-hub-polkadot-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::generic
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/statemint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/asset-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -378,8 +378,8 @@ impl xcm_executor::Config for XcmConfig {
type XcmSender = XcmRouter;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Statemint does not recognize a reserve location for any asset. This does not prevent
// Statemint acting _as_ a reserve location for DOT and assets created under `pallet-assets`.
// Asset Hub Polkadot does not recognize a reserve location for any asset. This does not prevent
// Asset Hub acting _as_ a reserve location for DOT and assets created under `pallet-assets`.
// For DOT, users must use teleport where allowed (e.g. with the Relay Chain).
type IsReserve = ();
// We allow:
@@ -392,7 +392,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = WeightInfoBounds<
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubPolkadotXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -456,7 +456,7 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = WeightInfoBounds<
crate::weights::xcm::StatemintXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubPolkadotXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -1,3 +1,12 @@
use asset_hub_polkadot_runtime::xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation,
ForeignCreatorsSovereignAccountOf, TrustBackedAssetsPalletLocation, XcmConfig,
};
pub use asset_hub_polkadot_runtime::{
constants::fee::WeightToFee, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets,
ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime,
RuntimeCall, RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance,
};
use asset_test_utils::{CollatorSessionKeys, ExtBuilder, RuntimeHelper};
use codec::{Decode, Encode};
use cumulus_primitives_utility::ChargeWeightInFungibles;
@@ -7,16 +16,7 @@ use frame_support::{
weights::{Weight, WeightToFee as WeightToFeeT},
};
use parachains_common::{
AccountId, AssetIdForTrustBackedAssets, Balance, StatemintAuraId as AuraId,
};
use statemint_runtime::xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, CheckingAccount, DotLocation,
ForeignCreatorsSovereignAccountOf, TrustBackedAssetsPalletLocation, XcmConfig,
};
pub use statemint_runtime::{
constants::fee::WeightToFee, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets,
ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, Runtime,
RuntimeCall, RuntimeEvent, SessionKeys, System, TrustBackedAssetsInstance,
AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance,
};
use xcm::latest::prelude::*;
use xcm_executor::traits::{Convert, Identity, JustTry, WeightTrader};
@@ -73,7 +73,7 @@ fn test_asset_xcm_trader() {
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
// We are going to buy 400e9 weight
// Because of the ED being higher in statemine
// Because of the ED being higher in kusama's asset hub
// and not to complicate things, we use a little
// bit more of weight
let bought = Weight::from_parts(400_000_000_000u64, 0);
@@ -152,7 +152,7 @@ fn test_asset_xcm_trader_with_refund() {
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
// We are going to buy 400e9 weight
// Because of the ED being higher in statemine
// Because of the ED being higher in kusama's asset hub
// and not to complicate things, we use a little
// bit more of weight
let bought = Weight::from_parts(400_000_000_000u64, 0);
@@ -225,7 +225,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() {
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
// We are going to buy 50e9 weight
// Because of the ED being higher in statemine
// Because of the ED being higher in kusama's asset hub
// and not to complicate things, we use a little
// bit more of weight
let bought = Weight::from_parts(50_000_000_000u64, 0);
@@ -351,7 +351,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() {
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
// We are going to buy 400e9 weight
// Because of the ED being higher in statemine
// Because of the ED being higher in kusama's asset hub
// and not to complicate things, we use a little
// bit more of weight
let bought = Weight::from_parts(400_000_000_000u64, 0);
@@ -1,9 +1,9 @@
[package]
name = "westmint-runtime"
version = "1.0.0"
name = "asset-hub-westend-runtime"
version = "0.9.420"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Westend variant of Statemint parachain runtime"
description = "Westend variant of Asset Hub parachain runtime"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
@@ -76,7 +76,7 @@ pub mod fee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in Westend, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Westmint, we map to 1/10 of that, or 1/100 CENT
// in Asset Hub, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! # Westmint Runtime
//! # Asset Hub Westend Runtime
//!
//! Westmint is the testnet for Statemint.
//! Testnet for Asset Hub Polkadot.
#![cfg_attr(not(feature = "std"), no_std)]
#![recursion_limit = "256"]
@@ -93,6 +93,9 @@ impl_opaque_keys! {
#[sp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
// Note: "westmint" is the legacy name for this chain. It has been renamed to
// "asset-hub-westend". Many wallets/tools depend on the `spec_name`, so it remains "westmint"
// for the time being. Wallets/tools should update to treat "asset-hub-westend" equally.
spec_name: create_runtime_str!("westmint"),
impl_name: create_runtime_str!("westmint"),
authoring_version: 1,
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=cumulus_pallet_xcmp_queue
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/cumulus_pallet_xcmp_queue.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/cumulus_pallet_xcmp_queue.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=frame_system
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/frame_system.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/frame_system.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-03-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_assets
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_assets.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_assets.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_balances
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_balances.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_balances.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_collator_selection
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_collator_selection.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_collator_selection.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_multisig
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_multisig.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_multisig.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_nft_fractionalization
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_nft_fractionalization.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_nft_fractionalization.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_nfts
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_nfts.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_nfts.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_proxy
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_proxy.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_proxy.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_session
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_session.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_session.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_timestamp
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_timestamp.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_timestamp.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_uniques
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_uniques.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_utility
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_utility.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_utility.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,13 +20,13 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm
@@ -35,7 +35,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_xcm.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_xcm.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -56,8 +56,8 @@ impl WeighMultiAssets for MultiAssets {
}
}
pub struct StatemintXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
pub struct AssetHubWestendXcmWeight<Call>(core::marker::PhantomData<Call>);
impl<Call> XcmWeightInfo<Call> for AssetHubWestendXcmWeight<Call> {
fn withdraw_asset(assets: &MultiAssets) -> Weight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
}
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::fungible
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -20,14 +20,14 @@
//! DATE: 2023-05-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm6`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
// Executed Command:
// ./artifacts/polkadot-parachain
// benchmark
// pallet
// --template=./templates/xcm-bench-template.hbs
// --chain=westmint-dev
// --chain=asset-hub-westend-dev
// --execution=wasm
// --wasm-execution=compiled
// --pallet=pallet_xcm_benchmarks::generic
@@ -36,7 +36,7 @@
// --repeat=20
// --json
// --header=./file_header.txt
// --output=./parachains/runtimes/assets/westmint/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/pallet_xcm_benchmarks_generic.rs
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -377,8 +377,8 @@ impl xcm_executor::Config for XcmConfig {
type XcmSender = XcmRouter;
type AssetTransactor = AssetTransactors;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
// Westmint does not recognize a reserve location for any asset. This does not prevent
// Westmint acting _as_ a reserve location for WND and assets created under `pallet-assets`.
// Asset Hub Westend does not recognize a reserve location for any asset. This does not prevent
// Asset Hub acting _as_ a reserve location for WND and assets created under `pallet-assets`.
// For WND, users must use teleport where allowed (e.g. with the Relay Chain).
type IsReserve = ();
// We allow:
@@ -391,7 +391,7 @@ impl xcm_executor::Config for XcmConfig {
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = WeightInfoBounds<
crate::weights::xcm::WestmintXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubWestendXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -451,7 +451,7 @@ impl pallet_xcm::Config for Runtime {
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = WeightInfoBounds<
crate::weights::xcm::WestmintXcmWeight<RuntimeCall>,
crate::weights::xcm::AssetHubWestendXcmWeight<RuntimeCall>,
RuntimeCall,
MaxInstructions,
>;
@@ -1,3 +1,16 @@
pub use asset_hub_westend_runtime::{
constants::fee::WeightToFee,
xcm_config::{CheckingAccount, TrustBackedAssetsPalletLocation, XcmConfig},
AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance,
ParachainSystem, Runtime, SessionKeys, System, TrustBackedAssetsInstance,
};
use asset_hub_westend_runtime::{
xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, ForeignCreatorsSovereignAccountOf,
WestendLocation,
},
MetadataDepositBase, MetadataDepositPerByte, RuntimeCall, RuntimeEvent,
};
use asset_test_utils::{CollatorSessionKeys, ExtBuilder, RuntimeHelper, XcmReceivedFrom};
use codec::{Decode, DecodeLimit, Encode};
use cumulus_primitives_utility::ChargeWeightInFungibles;
@@ -8,19 +21,6 @@ use frame_support::{
};
use parachains_common::{AccountId, AssetIdForTrustBackedAssets, AuraId, Balance};
use std::convert::Into;
pub use westmint_runtime::{
constants::fee::WeightToFee,
xcm_config::{CheckingAccount, TrustBackedAssetsPalletLocation, XcmConfig},
AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance,
ParachainSystem, Runtime, SessionKeys, System, TrustBackedAssetsInstance,
};
use westmint_runtime::{
xcm_config::{
AssetFeeAsExistentialDepositMultiplierFeeCharger, ForeignCreatorsSovereignAccountOf,
WestendLocation,
},
MetadataDepositBase, MetadataDepositPerByte, RuntimeCall, RuntimeEvent,
};
use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH};
use xcm_executor::{
traits::{Convert, Identity, JustTry, WeightTrader},
@@ -3,7 +3,7 @@ name = "asset-test-utils"
version = "1.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Statemint parachain runtime"
description = "Test utils for Asset Hub runtimes."
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
@@ -78,7 +78,7 @@ cargo build --release -p substrate-relay
cp target/release/substrate-relay ~/local_bridge_testing/bin/substrate-relay
---
# 5. Build polkadot-parachain-mint binary with statemine/westmint for moving assets
# 5. Build polkadot-parachain-mint binary with `asset-hub-kusama`/`asset-hub-westend` for moving assets
cd <cumulus-git-repo-dir>
# TODO:check-parameter - change this when merged to master
git checkout -b bko-transfer-asset-via-bridge --track origin/bko-transfer-asset-via-bridge
@@ -195,26 +195,26 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
#### Local zombienet run
1. allow bridge transfer on statemine/westmint (governance-like):
1. allow bridge transfer on kusama/westend asset hubs (governance-like):
```
./scripts/bridges_rococo_wococo.sh allow-transfers-local
```
2. do (asset) transfer from statemine to westmint
2. do (asset) transfer from kusama's asset hub to westend's asset hub:
```
./scripts/bridges_rococo_wococo.sh transfer-asset-from-statemine-local
./scripts/bridges_rococo_wococo.sh transfer-asset-from-asset-hub-kusama-local
```
3. do (ping) transfer from statemine to westmint
3. do (ping) transfer from kusama's asset hub to westend's asset hub
```
./scripts/bridges_rococo_wococo.sh ping-via-bridge-from-statemine-local
./scripts/bridges_rococo_wococo.sh ping-via-bridge-from-asset-hub-kusama-local
```
- open explorers: (see zombienets)
- Statemine (see events `xcmpQueue.XcmpMessageSent`, `bridgeTransfer.ReserveAssetsDeposited`, `bridgeTransfer.TransferInitiated`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9910#/explorer
- Kusama Asset Hub (see events `xcmpQueue.XcmpMessageSent`, `bridgeTransfer.ReserveAssetsDeposited`, `bridgeTransfer.TransferInitiated`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9910#/explorer
- BridgeHubRococo (see `bridgeWococoMessages.MessageAccepted`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
- BridgeHubWococo (see `bridgeRococoMessages.MessagesReceived`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8945#/explorer
- Westmint (see `xcmpQueue.Success` for `transfer-asset` and `xcmpQueue.Fail` for `ping-via-bridge`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9010#/explorer
- Westend Asset Hub (see `xcmpQueue.Success` for `transfer-asset` and `xcmpQueue.Fail` for `ping-via-bridge`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9010#/explorer
- BridgeHubRococo (see `bridgeWococoMessages.MessagesDelivered`) https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:8943#/explorer
#### Live Rockmine2 to Wockmint
@@ -222,9 +222,9 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
```
cd <cumulus-git-repo-dir>
./scripts/bridges_rococo_wococo.sh transfer-asset-from-statemine-rococo
./scripts/bridges_rococo_wococo.sh transfer-asset-from-asset-hub-rococo
or
./scripts/bridges_rococo_wococo.sh ping-via-bridge-from-statemine-rococo
./scripts/bridges_rococo_wococo.sh ping-via-bridge-from-asset-hub-rococo
```
- open explorers:
@@ -76,7 +76,7 @@ pub mod fee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in Kusama, extrinsic base weight (smallest non-zero weight) is mapped to 1/10 CENT:
// in Statemine, we map to 1/10 of that, or 1/100 CENT
// in Rococo Contracts, we map to 1/10 of that, or 1/100 CENT
let p = super::currency::CENTS;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
@@ -1,4 +1,4 @@
// Copyright 2019-2022 Parity Technologies (UK) Ltd.
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
@@ -14,11 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! The Penpal runtime is designed as a test runtime that can be created using an arbitrary parachain id.
//! (and as such multiple parachains can be on the same relay node - though make sure you have enough relay
//! nodes running to support this or you will get the not scheduled on a core error message.)
//! The PenPal runtime is designed as a test runtime that can be created with an arbitrary `ParaId`,
//! such that multiple instances of the parachain can be on the same parent relay. Ensure that you
//! have enough nodes running to support this or you will get scheduling errors.
//!
//! The penpal runtime's primary use is as a partner when testing statemine/t with reserve asset transfers.
//! The PenPal runtime's primary use is for testing interactions between System parachains and
//! other chains that are not trusted teleporters.
#![cfg_attr(not(feature = "std"), no_std)]
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]
@@ -19,8 +19,8 @@
//! This configuration dictates how the Penpal chain will communicate with other chains.
//!
//! One of the main uses of the penpal chain will be to be a benefactor of reserve asset transfers
//! with statemine as the reserve. At present no derivative tokens are minted on receipt of a
//! ReserveAssetTransferDeposited message but that will but the intension will be to support this soon.
//! with Asset Hub as the reserve. At present no derivative tokens are minted on receipt of a
//! `ReserveAssetTransferDeposited` message but that will but the intension will be to support this soon.
use super::{
AccountId, AllPalletsWithSystem, AssetId as AssetIdPalletAssets, Assets, Balance, Balances,
ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
@@ -94,7 +94,7 @@ pub type FungiblesTransactor = FungiblesAdapter<
ConvertedConcreteId<
AssetIdPalletAssets,
Balance,
AsPrefixedGeneralIndex<CommonGoodAssetsPalletLocation, AssetIdPalletAssets, JustTry>,
AsPrefixedGeneralIndex<SystemAssetHubAssetsPalletLocation, AssetIdPalletAssets, JustTry>,
JustTry,
>,
// Convert an XCM MultiLocation into a local account id:
@@ -256,15 +256,16 @@ impl ContainsPair<MultiAsset, MultiLocation> for MultiNativeAsset {
}
parameter_types! {
pub CommonGoodAssetsLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
/// The location that this chain recognizes as the Relay network's Asset Hub.
pub SystemAssetHubLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
// ALWAYS ensure that the index in PalletInstance stays up-to-date with
// Statemint's Assets pallet index
pub CommonGoodAssetsPalletLocation: MultiLocation =
// the Relay Chain's Asset Hub's Assets pallet index
pub SystemAssetHubAssetsPalletLocation: MultiLocation =
MultiLocation::new(1, X2(Parachain(1000), PalletInstance(50)));
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
}
pub type Reserves = (NativeAsset, AssetsFrom<CommonGoodAssetsLocation>);
pub type Reserves = (NativeAsset, AssetsFrom<SystemAssetHubLocation>);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
@@ -321,7 +321,11 @@ pub type FungiblesTransactor = FungiblesAdapter<
ConvertedConcreteId<
AssetIdForTrustBackedAssets,
u64,
AsPrefixedGeneralIndex<StatemintAssetsPalletLocation, AssetIdForTrustBackedAssets, JustTry>,
AsPrefixedGeneralIndex<
SystemAssetHubAssetsPalletLocation,
AssetIdForTrustBackedAssets,
JustTry,
>,
JustTry,
>,
// Convert an XCM MultiLocation into a local account id:
@@ -370,11 +374,13 @@ parameter_types! {
}
match_types! {
// The parent or the parent's unit plurality.
pub type ParentOrParentsUnitPlurality: impl Contains<MultiLocation> = {
MultiLocation { parents: 1, interior: Here } |
MultiLocation { parents: 1, interior: X1(Plurality { id: BodyId::Unit, .. }) }
};
pub type Statemint: impl Contains<MultiLocation> = {
// The location recognized as the Relay network's Asset Hub.
pub type AssetHub: impl Contains<MultiLocation> = {
MultiLocation { parents: 1, interior: X1(Parachain(1000)) }
};
}
@@ -382,9 +388,10 @@ match_types! {
pub type Barrier = (
TakeWeightCredit,
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent & its unit plurality gets free execution.
AllowExplicitUnpaidExecutionFrom<ParentOrParentsUnitPlurality>,
// ^^^ Parent & its unit plurality gets free execution
AllowExplicitUnpaidExecutionFrom<Statemint>,
// The network's Asset Hub gets free execution.
AllowExplicitUnpaidExecutionFrom<AssetHub>,
// Expected responses are OK.
AllowKnownQueryResponses<PolkadotXcm>,
// Subscriptions for version tracking are OK.
@@ -393,14 +400,14 @@ pub type Barrier = (
parameter_types! {
pub MaxAssetsIntoHolding: u32 = 64;
pub StatemintLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
pub SystemAssetHubLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000)));
// ALWAYS ensure that the index in PalletInstance stays up-to-date with
// Statemint's Assets pallet index
pub StatemintAssetsPalletLocation: MultiLocation =
// the Relay Chain's Asset Hub's Assets pallet index
pub SystemAssetHubAssetsPalletLocation: MultiLocation =
MultiLocation::new(1, X2(Parachain(1000), PalletInstance(50)));
}
pub type Reserves = (NativeAsset, AssetsFrom<StatemintLocation>);
pub type Reserves = (NativeAsset, AssetsFrom<SystemAssetHubLocation>);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {