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
+2 -2
View File
@@ -6,7 +6,7 @@ action-review-team: ci
rules:
- name: Runtime files
check_type: changed_files
condition: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$
condition: ^parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$
all_distinct:
- min_approvals: 1
teams:
@@ -20,7 +20,7 @@ rules:
condition:
include: .*
# excluding files from 'Runtime files' and 'CI files' rules and `Bridges subtree files`
exclude: ^parachains/runtimes/assets/(statemine|statemint)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
exclude: ^parachains/runtimes/assets/(asset-hub-kusama|asset-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/bridge-hubs/(bridge-hub-kusama|bridge-hub-polkadot)/src/[^/]+\.rs$|^parachains/runtimes/collectives/collectives-polkadot/src/[^/]+\.rs$|^parachains/common/src/[^/]+\.rs$|^\.gitlab-ci\.yml|^scripts/ci/.*|^\.github/.*
min_approvals: 2
teams:
- core-devs
@@ -14,7 +14,7 @@ on:
required: true
chain:
description: The name of the chain under test. Usually, you would pass a local chain
default: statemine-local
default: asset-hub-kusama-local
required: true
jobs:
@@ -28,14 +28,14 @@ jobs:
fail-fast: false
matrix:
include:
- runtime: statemine
local: statemine-local
- runtime: asset-hub-kusama
local: asset-hub-kusama-local
relay: kusama-local
- runtime: asset-hub-polkadot
local: asset-hub-polkadot-local
relay: polkadot-local
- runtime: statemint
local: statemint-local
relay: polkadot-local
- runtime: westmint
local: westmint-local
- runtime: asset-hub-westend
local: asset-hub-westend-local
relay: polkadot-local
- runtime: contracts-rococo
local: contracts-rococo-local
+6 -6
View File
@@ -45,11 +45,11 @@ jobs:
matrix:
include:
- category: assets
runtime: statemine
runtime: asset-hub-kusama
- category: assets
runtime: statemint
runtime: asset-hub-polkadot
- category: assets
runtime: westmint
runtime: asset-hub-westend
- category: bridge-hubs
runtime: bridge-hub-polkadot
- category: bridge-hubs
@@ -223,11 +223,11 @@ jobs:
matrix:
include:
- category: assets
runtime: statemine
runtime: asset-hub-kusama
- category: assets
runtime: statemint
runtime: asset-hub-polkadot
- category: assets
runtime: westmint
runtime: asset-hub-westend
- category: bridge-hubs
runtime: bridge-hub-polkadot
- category: bridge-hubs
+3 -3
View File
@@ -32,11 +32,11 @@ jobs:
matrix:
include:
- category: assets
runtime: statemine
runtime: asset-hub-kusama
- category: assets
runtime: statemint
runtime: asset-hub-polkadot
- category: assets
runtime: westmint
runtime: asset-hub-westend
- category: bridge-hubs
runtime: bridge-hub-polkadot
- category: bridge-hubs
+265 -265
View File
@@ -364,6 +364,266 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
[[package]]
name = "asset-hub-kusama-integration-tests"
version = "1.0.0"
dependencies = [
"asset-hub-kusama-runtime",
"frame-support",
"frame-system",
"integration-tests-common",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime",
"polkadot-runtime-parachains",
"sp-core",
"sp-runtime",
"sp-weights",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "asset-hub-kusama-runtime"
version = "0.9.420"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"kusama-runtime-constants",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-state-trie-migration",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"sp-weights",
"substrate-wasm-builder",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "asset-hub-polkadot-integration-tests"
version = "1.0.0"
dependencies = [
"asset-hub-polkadot-runtime",
"frame-support",
"frame-system",
"integration-tests-common",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime",
"polkadot-runtime-parachains",
"sp-core",
"sp-runtime",
"sp-weights",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "asset-hub-polkadot-runtime"
version = "0.9.420"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"polkadot-runtime-constants",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"sp-weights",
"substrate-wasm-builder",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "asset-hub-westend-runtime"
version = "0.9.420"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nft-fractionalization",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"substrate-wasm-builder",
"westend-runtime-constants",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "asset-test-utils"
version = "1.0.0"
@@ -4881,6 +5141,8 @@ dependencies = [
name = "integration-tests-common"
version = "1.0.0"
dependencies = [
"asset-hub-kusama-runtime",
"asset-hub-polkadot-runtime",
"bridge-hub-kusama-runtime",
"bridge-hub-polkadot-runtime",
"collectives-polkadot-runtime",
@@ -4911,8 +5173,6 @@ dependencies = [
"sp-core",
"sp-runtime",
"sp-weights",
"statemine-runtime",
"statemint-runtime",
"xcm",
"xcm-emulator",
"xcm-executor",
@@ -9454,6 +9714,9 @@ name = "polkadot-parachain-bin"
version = "0.9.420"
dependencies = [
"assert_cmd",
"asset-hub-kusama-runtime",
"asset-hub-polkadot-runtime",
"asset-hub-westend-runtime",
"async-trait",
"bridge-hub-kusama-runtime",
"bridge-hub-polkadot-runtime",
@@ -9517,8 +9780,6 @@ dependencies = [
"sp-session",
"sp-timestamp",
"sp-transaction-pool",
"statemine-runtime",
"statemint-runtime",
"substrate-build-script-utils",
"substrate-frame-rpc-system",
"substrate-prometheus-endpoint",
@@ -9527,7 +9788,6 @@ dependencies = [
"tokio",
"try-runtime-cli",
"wait-timeout",
"westmint-runtime",
"xcm",
]
@@ -13599,197 +13859,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "statemine-it"
version = "1.0.0"
dependencies = [
"frame-support",
"frame-system",
"integration-tests-common",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime",
"polkadot-runtime-parachains",
"sp-core",
"sp-runtime",
"sp-weights",
"statemine-runtime",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "statemine-runtime"
version = "2.0.0"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"kusama-runtime-constants",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-state-trie-migration",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"sp-weights",
"substrate-wasm-builder",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "statemint-it"
version = "1.0.0"
dependencies = [
"frame-support",
"frame-system",
"integration-tests-common",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
"penpal-runtime",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime",
"polkadot-runtime-parachains",
"sp-core",
"sp-runtime",
"sp-weights",
"statemint-runtime",
"xcm",
"xcm-emulator",
"xcm-executor",
]
[[package]]
name = "statemint-runtime"
version = "1.0.0"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"polkadot-runtime-constants",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"sp-weights",
"substrate-wasm-builder",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
@@ -15709,75 +15778,6 @@ dependencies = [
"sp-weights",
]
[[package]]
name = "westmint-runtime"
version = "1.0.0"
dependencies = [
"asset-test-utils",
"assets-common",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-core",
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
"frame-system-benchmarking",
"frame-system-rpc-runtime-api",
"frame-try-runtime",
"hex-literal 0.4.1",
"log",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-collator-selection",
"pallet-multisig",
"pallet-nft-fractionalization",
"pallet-nfts",
"pallet-nfts-runtime-api",
"pallet-proxy",
"pallet-session",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pallet-uniques",
"pallet-utility",
"pallet-xcm",
"pallet-xcm-benchmarks",
"parachain-info",
"parachains-common",
"parity-scale-codec",
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
"scale-info",
"smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
"sp-core",
"sp-inherents",
"sp-offchain",
"sp-runtime",
"sp-session",
"sp-std",
"sp-transaction-pool",
"sp-version",
"substrate-wasm-builder",
"westend-runtime-constants",
"xcm",
"xcm-builder",
"xcm-executor",
]
[[package]]
name = "which"
version = "4.2.2"
+5 -5
View File
@@ -42,9 +42,9 @@ members = [
"parachains/runtimes/starters/shell",
"parachains/runtimes/starters/seedling",
"parachains/runtimes/assets/common",
"parachains/runtimes/assets/statemint",
"parachains/runtimes/assets/statemine",
"parachains/runtimes/assets/westmint",
"parachains/runtimes/assets/asset-hub-polkadot",
"parachains/runtimes/assets/asset-hub-kusama",
"parachains/runtimes/assets/asset-hub-westend",
"parachains/runtimes/bridge-hubs/bridge-hub-rococo",
"parachains/runtimes/bridge-hubs/bridge-hub-kusama",
"parachains/runtimes/bridge-hubs/bridge-hub-polkadot",
@@ -53,8 +53,8 @@ members = [
"parachains/runtimes/glutton/glutton-kusama",
"parachains/runtimes/testing/penpal",
"parachains/integration-tests/emulated/common",
"parachains/integration-tests/emulated/assets/statemine",
"parachains/integration-tests/emulated/assets/statemint",
"parachains/integration-tests/emulated/assets/asset-hub-kusama",
"parachains/integration-tests/emulated/assets/asset-hub-polkadot",
"test/client",
"test/relay-sproof-builder",
"test/relay-validation-worker-provider",
+6 -8
View File
@@ -167,16 +167,14 @@ cargo build --release --bin polkadot-parachain
![image](https://user-images.githubusercontent.com/2915325/99548884-1be13580-2987-11eb-9a8b-20be658d34f9.png)
## Statemint 🪙
## Asset Hub 🪙
This repository also contains the Statemint runtime (as well as the canary runtime Statemine and the
test runtime Westmint).
Statemint is a system parachain providing an asset store for the Polkadot ecosystem.
This repository also contains the Asset Hub runtimes. Asset Hub is a system parachain providing an
asset store for the Polkadot ecosystem.
### Build & Launch a Node
To run a Statemine or Westmint node (Statemint is not deployed, yet) you will need to compile the
`polkadot-parachain` binary:
To run an Asset Hub node, you will need to compile the `polkadot-parachain` binary:
```bash
cargo build --release --locked --bin polkadot-parachain
@@ -185,7 +183,7 @@ cargo build --release --locked --bin polkadot-parachain
Once the executable is built, launch the parachain node via:
```bash
CHAIN=westmint # or statemine
CHAIN=asset-hub-westend # or asset-hub-kusama
./target/release/polkadot-parachain --chain $CHAIN
```
@@ -244,7 +242,7 @@ Once the executable is built, launch collators for each parachain (repeat once e
### Parachains
* [Statemint](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-statemint-rpc.polkadot.io#/explorer)
* [Asset Hub](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-statemint-rpc.polkadot.io#/explorer)
* [Contracts on Rococo](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-contracts-rpc.polkadot.io#/explorer)
* [RILT](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo.kilt.io#/explorer)
@@ -24,9 +24,9 @@ You won't be able to directly use bridge hub transactions to send XCM messages o
to use other parachains transactions, which will use HRMP to deliver messages to the Bridge Hub. The Bridge Hub will
just queue these messages in its outbound lane, which is dedicated to deliver messages between two parachains.
Our first planned bridge will connect the Polkadot' Statemint and Kusama' Statemine. Bridge between those two
parachains would allow Statemint accounts to hold wrapped KSM tokens and Statemine accounts to hold wrapped DOT
tokens.
Our first planned bridge will connect the Polkadot and Kusama Asset Hubs. A bridge between those two
parachains would allow Asset Hub Polkadot accounts to hold wrapped KSM tokens and Asset Hub Kusama
accounts to hold wrapped DOT tokens.
For that bridge (pair of parachains under different consensus systems) we'll be using the lane 00000000. Later,
when other parachains will join the bridge, they will be using other lanes for their messages.
@@ -93,13 +93,13 @@ Obviously, there should be someone who is paying relayer rewards. We want bridge
can't use fees for rewards. Instead, the parachains using the bridge, use sovereign accounts on both sides
of the bridge to cover relayer rewards.
Bridged Parachains will have sovereign accounts at bridge hubs. For example, the Statemine (Kusama Parachain) will
have an account at the Polkadot Bridge Hub. The Statemint (Polkadot Parachain) will have an account at the Kusama
Bridged Parachains will have sovereign accounts at bridge hubs. For example, the Kusama Asset Hub will
have an account at the Polkadot Bridge Hub. The Polkadot Asset Hub will have an account at the Kusama
Bridge Hub. The sovereign accounts are used as a source of funds when the relayer is calling the
`pallet_bridge_relayers::claim_rewards`.
Since messages lane is only used by the pair of parachains, there's no collision between different bridges. E.g.
Statemine will only reward relayers that are delivering messages from Statemine. The Statemine sovereign account
Kusama Asset Hub will only reward relayers that are delivering messages from Kusama Asset Hub. The Kusama Asset Hub sovereign account
is not used to cover rewards of bridging with some other Polkadot Parachain.
### Multiple Relayers and Rewards
@@ -16,7 +16,7 @@
</p>
<p>
In our architecture, the lane that is used to relay messages over the bridge is determined by
the XCM source and destinations. So e.g. bridge between Statemint and Statemine (and opposite direction)
the XCM source and destinations. So e.g. bridge between Asset Hubs Polkadot and Kusama (and opposite direction)
will use the lane 00000000, bridge between some other Polkadot Parachain and some other Kusama Parachain
will use the lane 00000001 and so on.
</p>
@@ -24,29 +24,29 @@
flowchart LR
subgraph Polkadot Consensus
polkadot(((Polkadot)))
statemint(((Statemint)))
asset_hub_polkadot(((Polkadot Asset Hub)))
polkadot_bh(((Polkadot Bridge Hub)))
polkadot---statemint
polkadot---asset_hub_polkadot
polkadot---polkadot_bh
statemint-->|Send Message Using HRMP|polkadot_bh
asset_hub_polkadot-->|Send Message Using HRMP|polkadot_bh
polkadot_bh-->|Send Message Using HRMP|statemint
statemint-->|Dispatch the Message|statemint
polkadot_bh-->|Send Message Using HRMP|asset_hub_polkadot
asset_hub_polkadot-->|Dispatch the Message|asset_hub_polkadot
end
subgraph Kusama Consensus
kusama_bh(((Kusama Bridge Hub)))
statemine(((Statemine)))
asset_hub_kusama(((Kusama Asset Hub)))
kusama(((Kusama)))
kusama---statemine
kusama---asset_hub_kusama
kusama---kusama_bh
kusama_bh-->|Send Message Using HRMP|statemine
statemine-->|Dispatch the Message|statemine
kusama_bh-->|Send Message Using HRMP|asset_hub_kusama
asset_hub_kusama-->|Dispatch the Message|asset_hub_kusama
statemine-->|Send Message Using HRMP|kusama_bh
asset_hub_kusama-->|Send Message Using HRMP|kusama_bh
end
polkadot_bh&lt;===&gt;|Message is relayed to the Bridged Chain using lane 00000000|kusama_bh
+2 -2
View File
@@ -33,8 +33,8 @@ is the runtime developer who defines what message lane and message mean for this
In our [Kusama<>Polkadot bridge](../../docs/polkadot-kusama-bridge-overview.md) we are using lane
as a channel of communication between two parachains of different relay chains. For example, lane
`[0, 0, 0, 0]` is used for Statemint <> Statemine communications. Other lanes may be used to bridge
another parachains.
`[0, 0, 0, 0]` is used for Polkadot <> Kusama Asset Hub communications. Other lanes may be used to
bridge other parachains.
## Message Workflow
@@ -76,8 +76,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";
/// AssetHubWestend chain id.
pub const ASSET_HUB_WESTEND_CHAIN_ID: ChainId = *b"ahwe";
/// Rococo chain id.
pub const ROCOCO_CHAIN_ID: ChainId = *b"roco";
+11 -11
View File
@@ -37,8 +37,8 @@ performed during the release process.
### <a name="burnin"></a>Burn In
Ensure that Parity DevOps has run the new release on Westmint and Statemine collators for 12h prior to publishing the
release.
Ensure that Parity DevOps has run the new release on Westend and Kusama Asset Hub collators for 12h
prior to publishing the release.
### Build Artifacts
@@ -84,15 +84,15 @@ To verify the order has not changed, manually start the following [Github Action
To run it, in the _Run Workflow_ dropdown:
1. **Use workflow from**: to ignore, leave `master` as default
2. **The WebSocket url of the reference node**:
- Statemint: `wss://statemint-rpc.polkadot.io`
- Statemine: `wss://statemine-rpc.polkadot.io`
- Westmint: `wss://westmint-rpc.polkadot.io`
- Asset Hub Polkadot: `wss://statemint-rpc.polkadot.io`
- Asset Hub Kusama: `wss://statemine-rpc.polkadot.io`
- Asset Hub Westend: `wss://westmint-rpc.polkadot.io`
3. **A url to a Linux binary for the node containing the runtime to test**: Paste the URL of the latest release-candidate binary from the draft-release on Github. The binary has to previously be uploaded to S3 (Github url link to the binary is constantly changing)
- E.g: https://releases.parity.io/cumulus/v0.9.270-rc3/polkadot-parachain
4. **The name of the chain under test. Usually, you would pass a local chain**:
- Statemint: `statemint-local`
- Statemine: `statemine-local`
- Westmint: `westmint-local`
- Asset Hub Polkadot: `asset-hub-polkadot-local`
- Asset Hub Kusama: `asset-hub-kusama-local`
- Asset Hub Westend: `asset-hub-westend-local`
5. Click **Run workflow**
When the workflow is done, click on it and download the zip artifact, inside you'll find an `output.txt` file. The things to look for in the output are lines like:
@@ -114,7 +114,7 @@ The Benchmarks can now be started from the CI. First find the CI pipeline from [
### Integration Tests
Until https://github.com/paritytech/ci_cd/issues/499 is done, tests will have to be run manually.
1. Go to https://github.com/paritytech/parachains-integration-tests and checkout to the release branch.
1. Go to https://github.com/paritytech/parachains-integration-tests and check out the release branch.
E.g. https://github.com/paritytech/parachains-integration-tests/tree/release-v9270-v0.9.27
for `release-parachains-v0.9.270`
2. Clone `release-parachains-<version>` branch from Cumulus
@@ -126,5 +126,5 @@ In case the branch does not exists (it is a manual process): cherry pick parityt
6. `cargo build --release --features fast-runtime`
7. Copy `./target/polkadot` into `./bin` (in Cumulus)
8. Run the tests:
- Statemint: `yarn zombienet-test -c ./examples/statemint/config.toml -t ./examples/statemint`
- Statemine: `yarn zombienet-test -c ./examples/statemine/config.toml -t ./examples/statemine`
- Asset Hub Polkadot: `yarn zombienet-test -c ./examples/statemint/config.toml -t ./examples/statemint`
- Asset Hub Kusama: `yarn zombienet-test -c ./examples/statemine/config.toml -t ./examples/statemine`
@@ -6,7 +6,7 @@ edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/cumulus/"
description = "FRAME sessions pallet benchmarking for statemint"
description = "FRAME sessions pallet benchmarking"
readme = "README.md"
[package.metadata.docs.rs]
@@ -1,6 +1,6 @@
{
"name": "Statemine",
"id": "statemine",
"name": "Kusama Asset Hub",
"id": "asset-hub-kusama",
"chainType": "Live",
"bootNodes": [
"/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWHGksh2JFMaW8AkZvyhVpmiXUJnCQbngExTLMdq753ZQR"
@@ -1,6 +1,6 @@
{
"name": "Statemine",
"id": "statemine",
"name": "Kusama Asset Hub",
"id": "asset-hub-kusama",
"chainType": "Live",
"bootNodes": [
"/ip4/34.77.217.152/tcp/30334/p2p/12D3KooWF63ZxKtZMYs5247WQA8fcTiGJb2osXykc31cmjwNLwem",
@@ -1,6 +1,6 @@
{
"name": "Statemint",
"id": "statemint",
"name": "Polkadot Asset Hub",
"id": "asset-hub-polkadot",
"chainType": "Live",
"bootNodes": [
"/ip4/34.65.251.121/tcp/30334/p2p/12D3KooWG3GrM6XKMM4gp3cvemdwUvu96ziYoJmqmetLZBXE8bSa",
@@ -1,6 +1,6 @@
{
"name": "Statemint",
"id": "statemint",
"name": "Polkadot Asset Hub",
"id": "asset-hub-polkadot",
"chainType": "Live",
"bootNodes": [
"/ip4/34.65.251.121/tcp/30334/p2p/12D3KooWG3GrM6XKMM4gp3cvemdwUvu96ziYoJmqmetLZBXE8bSa",
@@ -1,6 +1,6 @@
{
"name": "Rockmine",
"id": "statemine-rococo",
"name": "Rococo Asset Hub",
"id": "asset-hub-rococo",
"chainType": "Live",
"bootNodes": [
"/dns/rococo-rockmine-collator-node-0.parity-testnet.parity.io/tcp/30333/p2p/12D3KooWRrZMndHAopzao34uGsN7srjS3gh9nAjTGKLSyJeU31Lg",
@@ -1,6 +1,6 @@
{
"name": "Westmint",
"id": "westmint",
"name": "Westend Asset Hub",
"id": "asset-hub-westend",
"chainType": "Live",
"bootNodes": [
"/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWQWfQ6EBNgik1sW5by9vYagzrdsohc6NafeGPU4upnLRp"
@@ -1,6 +1,6 @@
{
"name": "Westmint",
"id": "westmint",
"name": "Westend Asset Hub",
"id": "asset-hub-westend",
"chainType": "Live",
"bootNodes": [
"/dns/westend-westmint-collator-node-0.parity-testnet.parity.io/tcp/30333/p2p/12D3KooWJaAfPyiye7ZQBuHengTJJoMrcaz7Jj1UzHiKdNxA1Nkd",
+4 -4
View File
@@ -54,12 +54,12 @@ mod types {
// Aura consensus authority.
pub type AuraId = sp_consensus_aura::sr25519::AuthorityId;
// Aura consensus authority used by Statemint.
// Aura consensus authority used by Asset Hub Polkadot.
//
// Because of registering the authorities with an ed25519 key before switching from Shell
// to Statemint, we were required to deploy a hotfix that changed Statemint to ed22519.
// In the future that may change again.
pub type StatemintAuraId = sp_consensus_aura::ed25519::AuthorityId;
// to Asset Hub Polkadot, we were required to deploy a hotfix that changed Asset Hub Polkadot's
// Aura keys to ed22519. In the future that may change again.
pub type AssetHubPolkadotAuraId = sp_consensus_aura::ed25519::AuthorityId;
// Id used for identifying assets.
pub type AssetIdForTrustBackedAssets = u32;
@@ -26,7 +26,7 @@ chain = "kusama-local"
[[parachains]]
id = 1000
chain = "statemine-local"
chain = "asset-hub-kusama-local"
cumulus_based = true
[[parachains.collators]]
@@ -26,7 +26,7 @@ chain = "polkadot-local"
[[parachains]]
id = 1000
chain = "statemint-local"
chain = "asset-hub-polkadot-local"
cumulus_based = true
[[parachains.collators]]
@@ -1,9 +1,9 @@
[package]
name = "statemint-it"
name = "asset-hub-kusama-integration-tests"
version = "1.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Statemint parachain runtime integration tests with xcm-emulator"
description = "Asset Hub Kusama runtime integration tests with xcm-emulator"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
@@ -29,7 +29,7 @@ pallet-xcm = { default-features = false, git = "https://github.com/paritytech/po
# Cumulus
parachains-common = { path = "../../../../common" }
penpal-runtime = { path = "../../../../runtimes/testing/penpal" }
statemint-runtime = { path = "../../../../runtimes/assets/statemint" }
asset-hub-kusama-runtime = { path = "../../../../runtimes/assets/asset-hub-kusama" }
# Local
xcm-emulator = { default-features = false, path = "../../../../../xcm/xcm-emulator" }
@@ -8,13 +8,13 @@ pub use integration_tests_common::{
kusama::ED as KUSAMA_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
AccountId, BHKusama, BHKusamaPallet, BHKusamaReceiver, BHKusamaSender, BHPolkadot,
BHPolkadotPallet, BHPolkadotReceiver, BHPolkadotSender, Collectives, CollectivesPallet,
CollectivesReceiver, CollectivesSender, Kusama, KusamaMockNet, KusamaPallet, KusamaReceiver,
KusamaSender, PenpalKusama, PenpalKusamaReceiver, PenpalKusamaSender, PenpalPolkadot,
PenpalPolkadotReceiver, PenpalPolkadotSender, Polkadot, PolkadotMockNet, PolkadotPallet,
PolkadotReceiver, PolkadotSender, Statemine, StateminePallet, StatemineReceiver,
StatemineSender,
AccountId, AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender,
BHKusama, BHKusamaPallet, BHKusamaReceiver, BHKusamaSender, BHPolkadot, BHPolkadotPallet,
BHPolkadotReceiver, BHPolkadotSender, Collectives, CollectivesPallet, CollectivesReceiver,
CollectivesSender, Kusama, KusamaMockNet, KusamaPallet, KusamaReceiver, KusamaSender,
PenpalKusama, PenpalKusamaReceiver, PenpalKusamaSender, PenpalPolkadot, PenpalPolkadotReceiver,
PenpalPolkadotSender, Polkadot, PolkadotMockNet, PolkadotPallet, PolkadotReceiver,
PolkadotSender,
};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use xcm::{
@@ -5,13 +5,14 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
// Init tests variables
let amount = KUSAMA_ED * 1000;
let relay_sender_balance_before = Kusama::account_data_of(KusamaSender::get()).free;
let para_receiver_balance_before = Statemine::account_data_of(StatemineReceiver::get()).free;
let para_receiver_balance_before =
AssetHubKusama::account_data_of(AssetHubKusamaReceiver::get()).free;
let origin = <Kusama as Relay>::RuntimeOrigin::signed(KusamaSender::get());
let assets_para_destination: VersionedMultiLocation =
Kusama::child_location_of(Statemine::para_id()).into();
Kusama::child_location_of(AssetHubKusama::para_id()).into();
let beneficiary: VersionedMultiLocation =
AccountId32 { network: None, id: StatemineReceiver::get().into() }.into();
AccountId32 { network: None, id: AssetHubKusamaReceiver::get().into() }.into();
let native_assets: VersionedMultiAssets = (Here, amount).into();
let fee_asset_item = 0;
let weight_limit = WeightLimit::Unlimited;
@@ -40,11 +41,11 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
});
// Receive XCM message in Assets Parachain
Statemine::execute_with(|| {
type RuntimeEvent = <Statemine as Para>::RuntimeEvent;
AssetHubKusama::execute_with(|| {
type RuntimeEvent = <AssetHubKusama as Para>::RuntimeEvent;
assert_expected_events!(
Statemine,
AssetHubKusama,
vec![
RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward {
outcome: Outcome::Incomplete(_, Error::UntrustedReserveLocation),
@@ -56,7 +57,8 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
// Check if balances are updated accordingly in Relay Chain and Assets Parachain
let relay_sender_balance_after = Kusama::account_data_of(KusamaSender::get()).free;
let para_sender_balance_after = Statemine::account_data_of(StatemineReceiver::get()).free;
let para_sender_balance_after =
AssetHubKusama::account_data_of(AssetHubKusamaReceiver::get()).free;
assert_eq!(relay_sender_balance_before - amount, relay_sender_balance_after);
assert_eq!(para_sender_balance_after, para_receiver_balance_before);
@@ -5,13 +5,14 @@ fn teleport_native_assets_from_relay_to_assets_para() {
// Init tests variables
let amount = KUSAMA_ED * 1000;
let relay_sender_balance_before = Kusama::account_data_of(KusamaSender::get()).free;
let para_receiver_balance_before = Statemine::account_data_of(StatemineReceiver::get()).free;
let para_receiver_balance_before =
AssetHubKusama::account_data_of(AssetHubKusamaReceiver::get()).free;
let origin = <Kusama as Relay>::RuntimeOrigin::signed(KusamaSender::get());
let assets_para_destination: VersionedMultiLocation =
Kusama::child_location_of(Statemine::para_id()).into();
Kusama::child_location_of(AssetHubKusama::para_id()).into();
let beneficiary: VersionedMultiLocation =
AccountId32 { network: None, id: StatemineReceiver::get().into() }.into();
AccountId32 { network: None, id: AssetHubKusamaReceiver::get().into() }.into();
let native_assets: VersionedMultiAssets = (Here, amount).into();
let fee_asset_item = 0;
let weight_limit = WeightLimit::Unlimited;
@@ -40,14 +41,14 @@ fn teleport_native_assets_from_relay_to_assets_para() {
});
// Receive XCM message in Assets Parachain
Statemine::execute_with(|| {
type RuntimeEvent = <Statemine as Para>::RuntimeEvent;
AssetHubKusama::execute_with(|| {
type RuntimeEvent = <AssetHubKusama as Para>::RuntimeEvent;
assert_expected_events!(
Statemine,
AssetHubKusama,
vec![
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
who: *who == StatemineReceiver::get().into(),
who: *who == AssetHubKusamaReceiver::get().into(),
},
]
);
@@ -55,7 +56,8 @@ fn teleport_native_assets_from_relay_to_assets_para() {
// Check if balances are updated accordingly in Relay Chain and Assets Parachain
let relay_sender_balance_after = Kusama::account_data_of(KusamaSender::get()).free;
let para_sender_balance_after = Statemine::account_data_of(StatemineReceiver::get()).free;
let para_sender_balance_after =
AssetHubKusama::account_data_of(AssetHubKusamaReceiver::get()).free;
assert_eq!(relay_sender_balance_before - amount, relay_sender_balance_after);
assert!(para_sender_balance_after > para_receiver_balance_before);
@@ -6,14 +6,14 @@ fn transact_sudo_from_relay_to_assets_para() {
// Call to be executed in Assets Parachain
const ASSET_ID: u32 = 1;
let call = <Statemine as Para>::RuntimeCall::Assets(pallet_assets::Call::<
<Statemine as Para>::Runtime,
let call = <AssetHubKusama as Para>::RuntimeCall::Assets(pallet_assets::Call::<
<AssetHubKusama as Para>::Runtime,
Instance1,
>::force_create {
id: ASSET_ID.into(),
is_sufficient: true,
min_balance: 1000,
owner: StatemineSender::get().into(),
owner: AssetHubKusamaSender::get().into(),
})
.encode()
.into();
@@ -21,7 +21,7 @@ fn transact_sudo_from_relay_to_assets_para() {
// XcmPallet send arguments
let sudo_origin = <Kusama as Relay>::RuntimeOrigin::root();
let assets_para_destination: VersionedMultiLocation =
Kusama::child_location_of(Statemine::para_id()).into();
Kusama::child_location_of(AssetHubKusama::para_id()).into();
let weight_limit = WeightLimit::Unlimited;
let require_weight_at_most = Weight::from_parts(1000000000, 200000);
@@ -52,7 +52,7 @@ fn transact_sudo_from_relay_to_assets_para() {
});
// Receive XCM message in Assets Parachain
Statemine::execute_with(|| {
assert!(<Statemine as StateminePallet>::Assets::asset_exists(ASSET_ID));
AssetHubKusama::execute_with(|| {
assert!(<AssetHubKusama as AssetHubKusamaPallet>::Assets::asset_exists(ASSET_ID));
});
}
@@ -1,9 +1,9 @@
[package]
name = "statemine-it"
name = "asset-hub-polkadot-integration-tests"
version = "1.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Statemine parachain runtime integration tests with xcm-emulator"
description = "Asset Hub Polkadot runtime integration tests with xcm-emulator"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
@@ -29,7 +29,7 @@ pallet-xcm = { default-features = false, git = "https://github.com/paritytech/po
# Cumulus
parachains-common = { path = "../../../../common" }
penpal-runtime = { path = "../../../../runtimes/testing/penpal" }
statemine-runtime = { path = "../../../../runtimes/assets/statemine" }
asset-hub-polkadot-runtime = { path = "../../../../runtimes/assets/asset-hub-polkadot" }
# Local
xcm-emulator = { default-features = false, path = "../../../../../xcm/xcm-emulator" }
@@ -8,13 +8,14 @@ pub use integration_tests_common::{
polkadot::ED as POLKADOT_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
AccountId, BHKusama, BHKusamaPallet, BHKusamaReceiver, BHKusamaSender, BHPolkadot,
BHPolkadotPallet, BHPolkadotReceiver, BHPolkadotSender, Collectives, CollectivesPallet,
CollectivesReceiver, CollectivesSender, Kusama, KusamaMockNet, KusamaPallet, KusamaReceiver,
KusamaSender, PenpalKusama, PenpalKusamaReceiver, PenpalKusamaSender, PenpalPolkadot,
PenpalPolkadotReceiver, PenpalPolkadotSender, Polkadot, PolkadotMockNet, PolkadotPallet,
PolkadotReceiver, PolkadotSender, Statemine, StateminePallet, StatemineReceiver,
StatemineSender, Statemint, StatemintPallet, StatemintReceiver, StatemintSender,
AccountId, AssetHubKusama, AssetHubKusamaPallet, AssetHubKusamaReceiver, AssetHubKusamaSender,
AssetHubPolkadot, AssetHubPolkadotPallet, AssetHubPolkadotReceiver, AssetHubPolkadotSender,
BHKusama, BHKusamaPallet, BHKusamaReceiver, BHKusamaSender, BHPolkadot, BHPolkadotPallet,
BHPolkadotReceiver, BHPolkadotSender, Collectives, CollectivesPallet, CollectivesReceiver,
CollectivesSender, Kusama, KusamaMockNet, KusamaPallet, KusamaReceiver, KusamaSender,
PenpalKusama, PenpalKusamaReceiver, PenpalKusamaSender, PenpalPolkadot, PenpalPolkadotReceiver,
PenpalPolkadotSender, Polkadot, PolkadotMockNet, PolkadotPallet, PolkadotReceiver,
PolkadotSender,
};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use xcm::{
@@ -5,13 +5,14 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
// Init tests variables
let amount = POLKADOT_ED * 1000;
let relay_sender_balance_before = Polkadot::account_data_of(PolkadotSender::get()).free;
let para_receiver_balance_before = Statemint::account_data_of(StatemintReceiver::get()).free;
let para_receiver_balance_before =
AssetHubPolkadot::account_data_of(AssetHubPolkadotReceiver::get()).free;
let origin = <Polkadot as Relay>::RuntimeOrigin::signed(PolkadotSender::get());
let assets_para_destination: VersionedMultiLocation =
Polkadot::child_location_of(Statemint::para_id()).into();
Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
let beneficiary: VersionedMultiLocation =
AccountId32 { network: None, id: StatemintReceiver::get().into() }.into();
AccountId32 { network: None, id: AssetHubPolkadotReceiver::get().into() }.into();
let native_assets: VersionedMultiAssets = (Here, amount).into();
let fee_asset_item = 0;
let weight_limit = WeightLimit::Unlimited;
@@ -40,11 +41,11 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
});
// Receive XCM message in Assets Parachain
Statemint::execute_with(|| {
type RuntimeEvent = <Statemint as Para>::RuntimeEvent;
AssetHubPolkadot::execute_with(|| {
type RuntimeEvent = <AssetHubPolkadot as Para>::RuntimeEvent;
assert_expected_events!(
Statemint,
AssetHubPolkadot,
vec![
RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward {
outcome: Outcome::Incomplete(_, Error::UntrustedReserveLocation),
@@ -56,7 +57,8 @@ fn reserve_transfer_native_asset_from_relay_to_assets() {
// Check if balances are updated accordingly in Relay Chain and Assets Parachain
let relay_sender_balance_after = Polkadot::account_data_of(PolkadotSender::get()).free;
let para_sender_balance_after = Statemint::account_data_of(StatemintReceiver::get()).free;
let para_sender_balance_after =
AssetHubPolkadot::account_data_of(AssetHubPolkadotReceiver::get()).free;
assert_eq!(relay_sender_balance_before - amount, relay_sender_balance_after);
assert_eq!(para_sender_balance_after, para_receiver_balance_before);
@@ -5,13 +5,14 @@ fn teleport_native_assets_from_relay_to_assets_para() {
// Init tests variables
let amount = POLKADOT_ED * 1000;
let relay_sender_balance_before = Polkadot::account_data_of(PolkadotSender::get()).free;
let para_receiver_balance_before = Statemint::account_data_of(StatemintReceiver::get()).free;
let para_receiver_balance_before =
AssetHubPolkadot::account_data_of(AssetHubPolkadotReceiver::get()).free;
let origin = <Polkadot as Relay>::RuntimeOrigin::signed(PolkadotSender::get());
let assets_para_destination: VersionedMultiLocation =
Polkadot::child_location_of(Statemint::para_id()).into();
Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
let beneficiary: VersionedMultiLocation =
AccountId32 { network: None, id: StatemintReceiver::get().into() }.into();
AccountId32 { network: None, id: AssetHubPolkadotReceiver::get().into() }.into();
let native_assets: VersionedMultiAssets = (Here, amount).into();
let fee_asset_item = 0;
let weight_limit = WeightLimit::Unlimited;
@@ -38,14 +39,14 @@ fn teleport_native_assets_from_relay_to_assets_para() {
});
// Receive XCM message in Assets Parachain
Statemint::execute_with(|| {
type RuntimeEvent = <Statemint as Para>::RuntimeEvent;
AssetHubPolkadot::execute_with(|| {
type RuntimeEvent = <AssetHubPolkadot as Para>::RuntimeEvent;
assert_expected_events!(
Statemint,
AssetHubPolkadot,
vec![
RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => {
who: *who == StatemintReceiver::get().into(),
who: *who == AssetHubPolkadotReceiver::get().into(),
},
]
);
@@ -53,7 +54,8 @@ fn teleport_native_assets_from_relay_to_assets_para() {
// Check if balances are updated accordingly in Relay Chain and Assets Parachain
let relay_sender_balance_after = Polkadot::account_data_of(PolkadotSender::get()).free;
let para_sender_balance_after = Statemint::account_data_of(StatemintReceiver::get()).free;
let para_sender_balance_after =
AssetHubPolkadot::account_data_of(AssetHubPolkadotReceiver::get()).free;
assert_eq!(relay_sender_balance_before - amount, relay_sender_balance_after);
assert!(para_sender_balance_after > para_receiver_balance_before);
@@ -6,14 +6,14 @@ fn transact_sudo_from_relay_to_assets_para() {
// Call to be executed in Assets Parachain
const ASSET_ID: u32 = 1;
let call = <Statemint as Para>::RuntimeCall::Assets(pallet_assets::Call::<
<Statemint as Para>::Runtime,
let call = <AssetHubPolkadot as Para>::RuntimeCall::Assets(pallet_assets::Call::<
<AssetHubPolkadot as Para>::Runtime,
Instance1,
>::force_create {
id: ASSET_ID.into(),
is_sufficient: true,
min_balance: 1000,
owner: StatemintSender::get().into(),
owner: AssetHubPolkadotSender::get().into(),
})
.encode()
.into();
@@ -21,7 +21,7 @@ fn transact_sudo_from_relay_to_assets_para() {
// XcmPallet send arguments
let sudo_origin = <Polkadot as Relay>::RuntimeOrigin::root();
let assets_para_destination: VersionedMultiLocation =
Polkadot::child_location_of(Statemint::para_id()).into();
Polkadot::child_location_of(AssetHubPolkadot::para_id()).into();
let weight_limit = WeightLimit::Unlimited;
let require_weight_at_most = Weight::from_parts(1000000000, 200000);
@@ -52,7 +52,7 @@ fn transact_sudo_from_relay_to_assets_para() {
});
// Receive XCM message in Assets Parachain
Statemint::execute_with(|| {
assert!(<Statemint as StatemintPallet>::Assets::asset_exists(ASSET_ID));
AssetHubPolkadot::execute_with(|| {
assert!(<AssetHubPolkadot as AssetHubPolkadotPallet>::Assets::asset_exists(ASSET_ID));
});
}
@@ -41,8 +41,8 @@ parachains-common = { path = "../../../common" }
parachain-info = { path = "../../../pallets/parachain-info" }
cumulus-primitives-core = { path = "../../../../primitives/core" }
penpal-runtime = { path = "../../../runtimes/testing/penpal" }
statemint-runtime = { path = "../../../runtimes/assets/statemint" }
statemine-runtime = { path = "../../../runtimes/assets/statemine" }
asset-hub-polkadot-runtime = { path = "../../../runtimes/assets/asset-hub-polkadot" }
asset-hub-kusama-runtime = { path = "../../../runtimes/assets/asset-hub-kusama" }
collectives-polkadot-runtime = { path = "../../../runtimes/collectives/collectives-polkadot" }
bridge-hub-kusama-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-kusama" }
bridge-hub-polkadot-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-polkadot" }
@@ -1,6 +1,6 @@
use grandpa::AuthorityId as GrandpaId;
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
pub use parachains_common::{AccountId, AuraId, Balance, BlockNumber, StatemintAuraId};
pub use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
use polkadot_primitives::{AssignmentId, ValidatorId};
pub use polkadot_runtime_parachains::configuration::HostConfiguration;
use polkadot_service::chain_spec::get_authority_keys_from_seed_no_beefy;
@@ -71,15 +71,15 @@ pub mod accounts {
pub mod collators {
use super::*;
pub fn invulnerables_statemint() -> Vec<(AccountId, StatemintAuraId)> {
pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> {
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_from_seed::<StatemintAuraId>("Alice"),
get_from_seed::<AssetHubPolkadotAuraId>("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_from_seed::<StatemintAuraId>("Bob"),
get_from_seed::<AssetHubPolkadotAuraId>("Bob"),
),
]
}
@@ -305,29 +305,31 @@ pub mod kusama {
}
}
// Statemint
pub mod statemint {
// Asset Hub Polkadot
pub mod asset_hub_polkadot {
use super::*;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = statemint_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = asset_hub_polkadot_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = statemint_runtime::GenesisConfig {
system: statemint_runtime::SystemConfig {
code: statemint_runtime::WASM_BINARY
let genesis_config = asset_hub_polkadot_runtime::GenesisConfig {
system: asset_hub_polkadot_runtime::SystemConfig {
code: asset_hub_polkadot_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
},
balances: statemint_runtime::BalancesConfig {
balances: asset_hub_polkadot_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096))
.collect(),
},
parachain_info: statemint_runtime::ParachainInfoConfig { parachain_id: PARA_ID.into() },
collator_selection: statemint_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables_statemint()
parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
},
collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables_asset_hub_polkadot()
.iter()
.cloned()
.map(|(acc, _)| acc)
@@ -335,14 +337,14 @@ pub mod statemint {
candidacy_bond: ED * 16,
..Default::default()
},
session: statemint_runtime::SessionConfig {
keys: collators::invulnerables_statemint()
session: asset_hub_polkadot_runtime::SessionConfig {
keys: collators::invulnerables_asset_hub_polkadot()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
statemint_runtime::SessionKeys { aura }, // session keys
asset_hub_polkadot_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
@@ -350,7 +352,7 @@ pub mod statemint {
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: statemint_runtime::PolkadotXcmConfig {
polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
};
@@ -359,28 +361,30 @@ pub mod statemint {
}
}
// Statemint
pub mod statemine {
// Asset Hub Kusama
pub mod asset_hub_kusama {
use super::*;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = statemine_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
pub const ED: Balance = asset_hub_kusama_runtime::constants::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = statemine_runtime::GenesisConfig {
system: statemine_runtime::SystemConfig {
code: statemine_runtime::WASM_BINARY
let genesis_config = asset_hub_kusama_runtime::GenesisConfig {
system: asset_hub_kusama_runtime::SystemConfig {
code: asset_hub_kusama_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
},
balances: statemine_runtime::BalancesConfig {
balances: asset_hub_kusama_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096))
.collect(),
},
parachain_info: statemine_runtime::ParachainInfoConfig { parachain_id: PARA_ID.into() },
collator_selection: statemine_runtime::CollatorSelectionConfig {
parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
},
collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables()
.iter()
.cloned()
@@ -389,14 +393,14 @@ pub mod statemine {
candidacy_bond: ED * 16,
..Default::default()
},
session: statemine_runtime::SessionConfig {
session: asset_hub_kusama_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
statemine_runtime::SessionKeys { aura }, // session keys
asset_hub_kusama_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
@@ -404,7 +408,7 @@ pub mod statemine {
aura: Default::default(),
aura_ext: Default::default(),
parachain_system: Default::default(),
polkadot_xcm: statemine_runtime::PolkadotXcmConfig {
polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
};
@@ -2,11 +2,11 @@ pub mod constants;
pub use constants::{
accounts::{ALICE, BOB},
bridge_hub_kusama, bridge_hub_polkadot, collectives, kusama, penpal, polkadot, statemine,
statemint,
asset_hub_kusama, asset_hub_polkadot, bridge_hub_kusama, bridge_hub_polkadot, collectives,
kusama, penpal, polkadot,
};
use frame_support::{parameter_types, sp_io, sp_tracing};
pub use parachains_common::{AccountId, AuraId, Balance, BlockNumber, StatemintAuraId};
pub use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance, BlockNumber};
pub use sp_core::{sr25519, storage::Storage, Get};
use xcm::prelude::*;
use xcm_emulator::{
@@ -56,25 +56,25 @@ decl_test_relay_chains! {
decl_test_parachains! {
// Polkadot
pub struct Statemint {
genesis = statemint::genesis(),
pub struct AssetHubPolkadot {
genesis = asset_hub_polkadot::genesis(),
on_init = (),
runtime = {
Runtime: statemint_runtime::Runtime,
RuntimeOrigin: statemint_runtime::RuntimeOrigin,
RuntimeCall: statemint_runtime::RuntimeCall,
RuntimeEvent: statemint_runtime::RuntimeEvent,
XcmpMessageHandler: statemint_runtime::XcmpQueue,
DmpMessageHandler: statemint_runtime::DmpQueue,
LocationToAccountId: statemint_runtime::xcm_config::LocationToAccountId,
System: statemint_runtime::System,
Balances: statemint_runtime::Balances,
ParachainSystem: statemint_runtime::ParachainSystem,
ParachainInfo: statemint_runtime::ParachainInfo,
Runtime: asset_hub_polkadot_runtime::Runtime,
RuntimeOrigin: asset_hub_polkadot_runtime::RuntimeOrigin,
RuntimeCall: asset_hub_polkadot_runtime::RuntimeCall,
RuntimeEvent: asset_hub_polkadot_runtime::RuntimeEvent,
XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue,
LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId,
System: asset_hub_polkadot_runtime::System,
Balances: asset_hub_polkadot_runtime::Balances,
ParachainSystem: asset_hub_polkadot_runtime::ParachainSystem,
ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo,
},
pallets_extra = {
PolkadotXcm: statemint_runtime::PolkadotXcm,
Assets: statemint_runtime::Assets,
PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm,
Assets: asset_hub_polkadot_runtime::Assets,
}
},
pub struct PenpalPolkadot {
@@ -99,26 +99,26 @@ decl_test_parachains! {
}
},
// Kusama
pub struct Statemine {
genesis = statemine::genesis(),
pub struct AssetHubKusama {
genesis = asset_hub_kusama::genesis(),
on_init = (),
runtime = {
Runtime: statemine_runtime::Runtime,
RuntimeOrigin: statemine_runtime::RuntimeOrigin,
RuntimeCall: statemine_runtime::RuntimeCall,
RuntimeEvent: statemine_runtime::RuntimeEvent,
XcmpMessageHandler: statemine_runtime::XcmpQueue,
DmpMessageHandler: statemine_runtime::DmpQueue,
LocationToAccountId: statemine_runtime::xcm_config::LocationToAccountId,
System: statemine_runtime::System,
Balances: statemine_runtime::Balances,
ParachainSystem: statemine_runtime::ParachainSystem,
ParachainInfo: statemine_runtime::ParachainInfo,
Runtime: asset_hub_kusama_runtime::Runtime,
RuntimeOrigin: asset_hub_kusama_runtime::RuntimeOrigin,
RuntimeCall: asset_hub_kusama_runtime::RuntimeCall,
RuntimeEvent: asset_hub_kusama_runtime::RuntimeEvent,
XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue,
LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId,
System: asset_hub_kusama_runtime::System,
Balances: asset_hub_kusama_runtime::Balances,
ParachainSystem: asset_hub_kusama_runtime::ParachainSystem,
ParachainInfo: asset_hub_kusama_runtime::ParachainInfo,
},
pallets_extra = {
PolkadotXcm: statemine_runtime::PolkadotXcm,
Assets: statemine_runtime::Assets,
ForeignAssets: statemine_runtime::Assets,
PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm,
Assets: asset_hub_kusama_runtime::Assets,
ForeignAssets: asset_hub_kusama_runtime::Assets,
}
},
pub struct PenpalKusama {
@@ -208,7 +208,7 @@ decl_test_networks! {
pub struct PolkadotMockNet {
relay_chain = Polkadot,
parachains = vec![
Statemint,
AssetHubPolkadot,
PenpalPolkadot,
Collectives,
BHPolkadot,
@@ -217,7 +217,7 @@ decl_test_networks! {
pub struct KusamaMockNet {
relay_chain = Kusama,
parachains = vec![
Statemine,
AssetHubKusama,
PenpalKusama,
BHKusama,
],
@@ -231,12 +231,12 @@ parameter_types! {
// Kusama
pub KusamaSender: AccountId = Kusama::account_id_of(ALICE);
pub KusamaReceiver: AccountId = Kusama::account_id_of(BOB);
// Statemint
pub StatemintSender: AccountId = Statemint::account_id_of(ALICE);
pub StatemintReceiver: AccountId = Statemint::account_id_of(BOB);
// Statemine
pub StatemineSender: AccountId = Statemine::account_id_of(ALICE);
pub StatemineReceiver: AccountId = Statemine::account_id_of(BOB);
// Asset Hub Polkadot
pub AssetHubPolkadotSender: AccountId = AssetHubPolkadot::account_id_of(ALICE);
pub AssetHubPolkadotReceiver: AccountId = AssetHubPolkadot::account_id_of(BOB);
// Asset Hub Kusama
pub AssetHubKusamaSender: AccountId = AssetHubKusama::account_id_of(ALICE);
pub AssetHubKusamaReceiver: AccountId = AssetHubKusama::account_id_of(BOB);
// Penpal Polkadot
pub PenpalPolkadotSender: AccountId = PenpalPolkadot::account_id_of(ALICE);
pub PenpalPolkadotReceiver: AccountId = PenpalPolkadot::account_id_of(BOB);
+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)]

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