mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 20:11:06 +00:00
Simplify local run + readme
This commit is contained in:
@@ -66,13 +66,19 @@ POLKADOT_PARACHAIN_BINARY_PATH_FOR_WOCKMINT=~/local_bridge_testing/bin/polkadot-
|
||||
|
||||
**Accounts of BridgeHub parachains:**
|
||||
- `Bob` is pallet owner of all bridge pallets
|
||||
- `Alice` is `Sudo`
|
||||
|
||||
**1. Init bridges**
|
||||
#### Run with script (alternative 1)
|
||||
```
|
||||
cd <cumulus-git-repo-dir>
|
||||
./scripts/bridges_rococo_wococo.sh run-relay
|
||||
```
|
||||
|
||||
#### Run with binary (alternative 2)
|
||||
Need to wait for parachain activation (start producing blocks), then run:
|
||||
|
||||
```
|
||||
# 1. Init bridges:
|
||||
|
||||
# Rococo -> Wococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge rococo-to-bridge-hub-wococo \
|
||||
@@ -90,11 +96,8 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Bob
|
||||
```
|
||||
|
||||
**2. Relay relay-chain headers, parachain headers and messages**
|
||||
|
||||
```
|
||||
# 2. Relay relay-chain headers, parachain headers and messages**
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-headers-and-messages bridge-hub-rococo-bridge-hub-wococo \
|
||||
--rococo-host localhost \
|
||||
|
||||
@@ -68,6 +68,49 @@ function check_parachain_collator() {
|
||||
echo ""
|
||||
}
|
||||
|
||||
function init_ro_wo() {
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge rococo-to-bridge-hub-wococo \
|
||||
--source-host localhost \
|
||||
--source-port 9942 \
|
||||
--target-host localhost \
|
||||
--target-port 8945 \
|
||||
--target-signer //Bob
|
||||
}
|
||||
|
||||
function init_wo_ro() {
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge wococo-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 9945 \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Bob
|
||||
}
|
||||
|
||||
function run_relay() {
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-headers-and-messages bridge-hub-rococo-bridge-hub-wococo \
|
||||
--rococo-host localhost \
|
||||
--rococo-port 9942 \
|
||||
--bridge-hub-rococo-host localhost \
|
||||
--bridge-hub-rococo-port 8943 \
|
||||
--bridge-hub-rococo-signer //Charlie \
|
||||
--wococo-headers-to-bridge-hub-rococo-signer //Bob \
|
||||
--wococo-parachains-to-bridge-hub-rococo-signer //Bob \
|
||||
--bridge-hub-rococo-transactions-mortality 4 \
|
||||
--wococo-host localhost \
|
||||
--wococo-port 9945 \
|
||||
--bridge-hub-wococo-host localhost \
|
||||
--bridge-hub-wococo-port 8945 \
|
||||
--bridge-hub-wococo-signer //Charlie \
|
||||
--rococo-headers-to-bridge-hub-wococo-signer //Bob \
|
||||
--rococo-parachains-to-bridge-hub-wococo-signer //Bob \
|
||||
--bridge-hub-wococo-transactions-mortality 4 \
|
||||
--lane 00000001 \
|
||||
--lane 00000002
|
||||
}
|
||||
|
||||
ensure_binaries
|
||||
|
||||
case "$1" in
|
||||
@@ -135,27 +178,20 @@ case "$1" in
|
||||
;;
|
||||
init-ro-wo)
|
||||
# Init bridge Rococo->Wococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge rococo-to-bridge-hub-wococo \
|
||||
--source-host localhost \
|
||||
--source-port 9942 \
|
||||
--target-host localhost \
|
||||
--target-port 8945 \
|
||||
--target-signer //Bob
|
||||
init_ro_wo
|
||||
;;
|
||||
init-wo-ro)
|
||||
# Init bridge Wococo->Rococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay init-bridge wococo-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 9945 \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Bob
|
||||
init_wo_ro
|
||||
;;
|
||||
run-relay)
|
||||
init_ro_wo
|
||||
init_wo_ro
|
||||
run_relay
|
||||
;;
|
||||
stop)
|
||||
pkill -f polkadot
|
||||
pkill -f parachain
|
||||
;;
|
||||
*) echo "A command is require. Supported commands: start-rococo, start-wococo, init-ro-wo, init-wo-ro, stop"; exit 1;;
|
||||
*) echo "A command is require. Supported commands: start-rococo, start-wococo, init-ro-wo, init-wo-ro, run-relay, stop"; exit 1;;
|
||||
esac
|
||||
|
||||
@@ -66,7 +66,7 @@ cumulus_based = true
|
||||
ws_port = 9910
|
||||
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ROCKMINE}}"
|
||||
extra_args = [
|
||||
"-lparachain=debug,xcm::weight=trace,xcm::filter_asset_location=trace,xcm::send_xcm=trace,xcm::barriers=trace,xcm::barrier=trace,xcm::execute_xcm=trace,xcm::contains=trace,xcm::execute_xcm_in_credit,xcm::process_instruction=trace,xcm::currency_adapter=trace,xcm::origin_conversion=trace,xcm::fungibles_adapter=trace,xcm::process=trace,xcm::execute=trace",
|
||||
"-lparachain=debug,xcm::weight=trace,xcm::filter_asset_location=trace,xcm::send_xcm=trace,xcm::barriers=trace,xcm::barrier=trace,xcm::execute_xcm=trace,xcm::contains=trace,xcm::execute_xcm_in_credit,xcm::process_instruction=trace,xcm::currency_adapter=trace,xcm::origin_conversion=trace,xcm::fungibles_adapter=trace,xcm::process=trace,xcm::execute=trace,runtime::bridge-assets-transfer=trace",
|
||||
"--no-mdns", "--bootnodes {{'rockmine-collator2'|zombie('multiAddress')}}",
|
||||
"-- --port 51333 --rpc-port 58933 --ws-port 58943 --no-mdns", "--bootnodes {{'alice-validator'|zombie('multiAddress')}}"
|
||||
]
|
||||
@@ -75,7 +75,7 @@ cumulus_based = true
|
||||
name = "rockmine-collator2"
|
||||
command = "{{POLKADOT_PARACHAIN_BINARY_PATH_FOR_ROCKMINE}}"
|
||||
extra_args = [
|
||||
"-lparachain=debug,xcm::weight=trace,xcm::filter_asset_location=trace,xcm::send_xcm=trace,xcm::barriers=trace,xcm::barrier=trace,xcm::execute_xcm=trace,xcm::contains=trace,xcm::execute_xcm_in_credit,xcm::process_instruction=trace,xcm::currency_adapter=trace,xcm::origin_conversion=trace,xcm::fungibles_adapter=trace,xcm::process=trace,xcm::execute=trace",
|
||||
"-lparachain=debug,xcm::weight=trace,xcm::filter_asset_location=trace,xcm::send_xcm=trace,xcm::barriers=trace,xcm::barrier=trace,xcm::execute_xcm=trace,xcm::contains=trace,xcm::execute_xcm_in_credit,xcm::process_instruction=trace,xcm::currency_adapter=trace,xcm::origin_conversion=trace,xcm::fungibles_adapter=trace,xcm::process=trace,xcm::execute=trace,runtime::bridge-assets-transfer=trace",
|
||||
"--no-mdns", "--bootnodes {{'rockmine-collator1'|zombie('multiAddress')}}",
|
||||
"-- --port 51433 --rpc-port 58833 --ws-port 58843 --no-mdns", "--bootnodes {{'alice-validator'|zombie('multiAddress')}}"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user