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
+3 -3
View File
@@ -8,9 +8,9 @@ __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
${__dir}/benchmarks-ci.sh collectives collectives-polkadot target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets statemine target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets statemint target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets westmint target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets asset-hub-kusama target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets asset-hub-polkadot target/$target $steps $repeat
${__dir}/benchmarks-ci.sh assets asset-hub-westend target/$target $steps $repeat
${__dir}/benchmarks-ci.sh bridge-hubs bridge-hub-polkadot target/$target $steps $repeat
${__dir}/benchmarks-ci.sh bridge-hubs bridge-hub-kusama target/$target $steps $repeat
+39 -39
View File
@@ -2,10 +2,10 @@
# Address: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
# AccountId: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]
STATEMINE_ACCOUNT_SEED_FOR_LOCAL="//Alice"
ASSET_HUB_KUSAMA_ACCOUNT_SEED_FOR_LOCAL="//Alice"
# Address: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
# AccountId: [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]
WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
ASSET_HUB_WOCOCO_ACCOUNT_SEED_FOR_LOCAL="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
# SovereignAccount for `MultiLocation { parents: 2, interior: X2(GlobalConsensus(Rococo), Parachain(1000)) }` => 5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ
#
@@ -16,23 +16,23 @@ WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGK
# MultiLocation { parents: 2, interior: X2(GlobalConsensus(Kusama), Parachain(1000)) }).unwrap()
# ).to_ss58check_with_version(42_u16.into())
# );
ROCOCO_STATEMINE_1000_SOVEREIGN_ACCOUNT="5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ"
ASSET_HUB_ROCOCO_1000_SOVEREIGN_ACCOUNT="5CfNu7eH3SJvqqPt3aJh38T8dcFvhGzEohp9tsd41ANhXDnQ"
# Address: GegTpZJMyzkntLN7NJhRfHDk4GWukLbGSsag6PHrLSrCK4h
ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO="scatter feed race company oxygen trip extra elbow slot bundle auto canoe"
ASSET_HUB2_ROCOCO_1000_SOVEREIGN_ACCOUNT="scatter feed race company oxygen trip extra elbow slot bundle auto canoe"
# Adress: 5Ge7YcbctWCP1CccugzxWDn9hFnTxvTh3bL6PNy4ubNJmp7Y / H9jCvwVWsDJkrS4gPp1QB99qr4hmbGsVyAqn3F2PPaoWyU3
# AccountId: [202, 107, 198, 135, 15, 25, 193, 165, 172, 73, 137, 218, 115, 177, 204, 0, 5, 155, 215, 86, 208, 51, 50, 130, 190, 110, 184, 143, 124, 50, 160, 20]
WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO="5Ge7YcbctWCP1CccugzxWDn9hFnTxvTh3bL6PNy4ubNJmp7Y"
WOCKMINT_ACCOUNT_SEED_FOR_WOCOCO="tone spirit magnet sunset cannon poverty forget lock river east blouse random"
ASSET_HUB_WOCOCO_ACCOUNT_ADDRESS_FOR_ROCOCO="5Ge7YcbctWCP1CccugzxWDn9hFnTxvTh3bL6PNy4ubNJmp7Y"
ASSET_HUB_WOCOCO_ACCOUNT_SEED_FOR_WOCOCO="tone spirit magnet sunset cannon poverty forget lock river east blouse random"
function address_to_account_id_bytes() {
local address=$1
local output=$2
echo "address_to_account_id_bytes - address: $address, output: $output"
if [ $address == "$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL" ]; then
if [ $address == "$ASSET_HUB_WOCOCO_ACCOUNT_SEED_FOR_LOCAL" ]; then
jq --null-input '[212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125]' > $output
elif [ $address == "$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO" ]; then
elif [ $address == "$ASSET_HUB_WOCOCO_ACCOUNT_ADDRESS_FOR_ROCOCO" ]; then
jq --null-input '[202, 107, 198, 135, 15, 25, 193, 165, 172, 73, 137, 218, 115, 177, 204, 0, 5, 155, 215, 86, 208, 51, 50, 130, 190, 110, 184, 143, 124, 50, 160, 20]' > $output
else
echo -n "Sorry, unknown address: $address - please, add bytes here or function for that!"
@@ -382,7 +382,7 @@ function remove_assets_transfer_send() {
}
# TODO: we need to fill sovereign account for bridge-hub, because, small ammouts does not match ExistentialDeposit, so no reserve pass
# SA for BH: MultiLocation { parents: 1, interior: X1(Parachain(1013)) } - 5Eg2fntRRwLinojmk3sh5xscp7F3S6Zzm5oDVtoLTALKiypR on Statemine
# SA for BH: MultiLocation { parents: 1, interior: X1(Parachain(1013)) } - 5Eg2fntRRwLinojmk3sh5xscp7F3S6Zzm5oDVtoLTALKiypR on Kusama Asset Hub
function transfer_asset_via_bridge() {
local url=$1
@@ -583,12 +583,12 @@ case "$1" in
run_relay
;;
allow-transfers-local)
# this allows send transfers on statemine (by governance-like)
./$0 "allow-transfer-on-statemine-local"
# this allows receive transfers on westmint (by governance-like)
./$0 "allow-transfer-on-westmint-local"
# this allows send transfers on asset hub kusama local (by governance-like)
./$0 "allow-transfer-on-asset-hub-kusama-local"
# this allows receive transfers on asset hub westend local (by governance-like)
./$0 "allow-transfer-on-asset-hub-westend-local"
;;
allow-transfer-on-statemine-local)
allow-transfer-on-asset-hub-kusama-local)
ensure_polkadot_js_api
allow_assets_transfer_send \
"ws://127.0.0.1:9942" \
@@ -598,7 +598,7 @@ case "$1" in
1013 \
"Wococo" 1000
;;
allow-transfer-on-westmint-local)
allow-transfer-on-asset-hub-westend-local)
ensure_polkadot_js_api
allow_assets_transfer_receive \
"ws://127.0.0.1:9945" \
@@ -611,18 +611,18 @@ case "$1" in
transfer_balance \
"ws://127.0.0.1:9010" \
"//Alice" \
"$ROCOCO_STATEMINE_1000_SOVEREIGN_ACCOUNT" \
"$ASSET_HUB_ROCOCO_1000_SOVEREIGN_ACCOUNT" \
$((1000000000 + 50000000000 * 20)) # ExistentialDeposit + maxTargetLocationFee * 20
# create foreign assets for native Statemine token (yes, Kusama, because we are using Statemine runtime on rococo)
# create foreign assets for native Kusama token (yes, Kusama, because we are using Kusama Asset Hub runtime on rococo)
force_create_foreign_asset \
"ws://127.0.0.1:9945" \
"//Alice" \
1000 \
"ws://127.0.0.1:9010" \
"Kusama" \
"$ROCOCO_STATEMINE_1000_SOVEREIGN_ACCOUNT"
"$ASSET_HUB_ROCOCO_1000_SOVEREIGN_ACCOUNT"
;;
remove-assets-transfer-from-statemine-local)
remove-assets-transfer-from-asset-hub-kusama-local)
ensure_polkadot_js_api
remove_assets_transfer_send \
"ws://127.0.0.1:9942" \
@@ -631,43 +631,43 @@ case "$1" in
"ws://127.0.0.1:9910" \
"Wococo"
;;
transfer-asset-from-statemine-local)
transfer-asset-from-asset-hub-kusama-local)
ensure_polkadot_js_api
transfer_asset_via_bridge \
"ws://127.0.0.1:9910" \
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL" \
"$ASSET_HUB_KUSAMA_ACCOUNT_SEED_FOR_LOCAL" \
"$ASSET_HUB_WOCOCO_ACCOUNT_SEED_FOR_LOCAL" \
"Wococo"
;;
ping-via-bridge-from-statemine-local)
ping-via-bridge-from-asset-hub-kusama-local)
ensure_polkadot_js_api
ping_via_bridge \
"ws://127.0.0.1:9910" \
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL" \
"$ASSET_HUB_KUSAMA_ACCOUNT_SEED_FOR_LOCAL" \
"$ASSET_HUB_WOCOCO_ACCOUNT_SEED_FOR_LOCAL" \
"Wococo"
;;
transfer-asset-from-statemine-rococo)
transfer-asset-from-asset-hub-rococo)
ensure_polkadot_js_api
transfer_asset_via_bridge \
"wss://ws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io" \
"$ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO" \
"$ASSET_HUB2_ROCOCO_1000_SOVEREIGN_ACCOUNT" \
"$ASSET_HUB_WOCOCO_ACCOUNT_ADDRESS_FOR_ROCOCO" \
"Wococo"
;;
ping-via-bridge-from-statemine-rococo)
ping-via-bridge-from-asset-hub-rococo)
ensure_polkadot_js_api
ping_via_bridge \
"wss://ws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io" \
"${ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO}" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO" \
"${ASSET_HUB2_ROCOCO_1000_SOVEREIGN_ACCOUNT}" \
"$ASSET_HUB_WOCOCO_ACCOUNT_ADDRESS_FOR_ROCOCO" \
"Wococo"
;;
drip)
transfer_balance \
"ws://127.0.0.1:9010" \
"//Alice" \
"$ROCOCO_STATEMINE_1000_SOVEREIGN_ACCOUNT" \
"$ASSET_HUB_ROCOCO_1000_SOVEREIGN_ACCOUNT" \
$((1000000000 + 50000000000 * 20))
;;
stop)
@@ -682,14 +682,14 @@ case "$1" in
Local (zombienet) run:
- run-relay
- allow-transfers-local
- allow-transfer-on-statemine-local
- allow-transfer-on-westmint-local
- remove-assets-transfer-from-statemine-local
- transfer-asset-from-statemine-local
- ping-via-bridge-from-statemine-local
- allow-transfer-on-asset-hub-kusama-local
- allow-transfer-on-asset-hub-westend-local
- remove-assets-transfer-from-asset-hub-kusama-local
- transfer-asset-from-asset-hub-kusama-local
- ping-via-bridge-from-asset-hub-kusama-local
Live Rococo/Wococo run:
- transfer-asset-from-statemine-rococo
- ping-via-bridge-from-statemine-rococo";
- transfer-asset-from-asset-hub-rococo
- ping-via-bridge-from-asset-hub-rococo";
exit 1
;;
esac
@@ -22,13 +22,13 @@ benchmarks-assets:
before_script:
- !reference [.docker-env, before_script]
script:
- ./scripts/benchmarks-ci.sh assets statemine ./artifacts
- ./scripts/benchmarks-ci.sh assets statemint ./artifacts
- ./scripts/benchmarks-ci.sh assets westmint ./artifacts
- ./scripts/benchmarks-ci.sh assets asset-hub-kusama ./artifacts
- ./scripts/benchmarks-ci.sh assets asset-hub-polkadot ./artifacts
- ./scripts/benchmarks-ci.sh assets asset-hub-westend ./artifacts
- export CURRENT_TIME=$(date '+%s')
- export BRANCHNAME="weights-statemint-${CI_COMMIT_BRANCH}-${CURRENT_TIME}"
- export BRANCHNAME="weights-asset-hub-polkadot-${CI_COMMIT_BRANCH}-${CURRENT_TIME}"
- !reference [.git-commit-push, script]
- ./scripts/ci/create-benchmark-pr.sh "[benchmarks] Update weights for statemine/t" "$BRANCHNAME"
- ./scripts/ci/create-benchmark-pr.sh "[benchmarks] Update weights for asset-hub-kusama/t" "$BRANCHNAME"
- rm -f ./artifacts/polkadot-parachain
- rm -f ./artifacts/test-parachain
after_script:
+1 -1
View File
@@ -58,7 +58,7 @@ if [[ "$rpc_endpoint" =~ "localhost" ]]; then
check_collator
echo -e "Make sure you have a collator running with the correct version at $rpc_endpoint."
echo -e "If you don't, NOW is the time to start it with:"
echo -e "target/release/polkadot-parachain --chain parachains/chain-specs/shell-statemint.json --tmp\n"
echo -e "target/release/polkadot-parachain --chain parachains/chain-specs/shell.json --tmp\n"
read -p "You can abort with CTRL+C if this is not correct, otherwise press ENTER "
fi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
tests=(
statemine
statemint
asset-hub-kusama
asset-hub-polkadot
)
rm -R logs &> /dev/null