mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
Use the relay-headers-and-messages command (#1913)
* Bridge hubs readme: fixes and additions * Use the relay-headers-and-messages command * cargo fmt
This commit is contained in:
committed by
Branislav Kontur
parent
ac92420a0c
commit
ffa4172b09
@@ -22,22 +22,25 @@ Every _BridgeHub_ is meant to be **_common good parachain_** with main responsib
|
||||
mkdir -p ~/local_bridge_testing/bin
|
||||
mkdir -p ~/local_bridge_testing/logs
|
||||
|
||||
# 1. Install zombienet
|
||||
Go to: https://github.com/paritytech/zombienet/releases
|
||||
Copy the apropriate binary (zombienet-linux) from the latest release to ~/local_bridge_testing/bin
|
||||
|
||||
# 1. Build polkadot binary
|
||||
# 2. Build polkadot binary
|
||||
git clone https://github.com/paritytech/polkadot.git
|
||||
cd polkadot
|
||||
cargo build --release
|
||||
cp target/release/polkadot ~/local_bridge_testing/bin/polkadot
|
||||
|
||||
# 2. Build cumulus polkadot-parachain binary
|
||||
# 3. Build cumulus polkadot-parachain binary
|
||||
cd <cumulus-git-repo-dir>
|
||||
cargo build --release --locked -p polkadot-parachain@0.9.300
|
||||
cp target/release/polkadot-parachain ~/local_bridge_testing/bin/polkadot-parachain
|
||||
|
||||
# 3. Build substrate-relay binary
|
||||
# 4. Build substrate-relay binary
|
||||
git clone https://github.com/paritytech/parity-bridges-common.git
|
||||
cd parity-bridges-common
|
||||
cargo build -p substrate-relay
|
||||
cargo build --release -p substrate-relay
|
||||
cp target/release/substrate-relay ~/local_bridge_testing/bin/substrate-relay
|
||||
```
|
||||
|
||||
@@ -45,16 +48,16 @@ cp target/release/substrate-relay ~/local_bridge_testing/bin/substrate-relay
|
||||
|
||||
```
|
||||
# Rococo + BridgeHubWococo
|
||||
POLKADOT_BINARY_PATH=../../polkadot/target/release/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY_PATH=./target/release/polkadot-parachain \
|
||||
./zombienet-linux --provider native spawn ./zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./zombienet/bridge-hubs/bridge_hub_rococo_local_network.toml
|
||||
```
|
||||
|
||||
```
|
||||
# Wococo + BridgeHubWococo
|
||||
POLKADOT_BINARY_PATH=../../polkadot/target/release/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY_PATH=./target/release/polkadot-parachain \
|
||||
./zombienet-linux --provider native spawn ./zombienet/bridge-hubs/bridge_hub_wococo_local_network.toml
|
||||
POLKADOT_BINARY_PATH=~/local_bridge_testing/bin/polkadot \
|
||||
POLKADOT_PARACHAIN_BINARY_PATH=~/local_bridge_testing/bin/polkadot-parachain \
|
||||
~/local_bridge_testing/bin/zombienet-linux --provider native spawn ./zombienet/bridge-hubs/bridge_hub_wococo_local_network.toml
|
||||
```
|
||||
|
||||
### Run chains (Rococo + BridgeHub, Wococo + BridgeHub) from `./scripts/bridges_rococo_wococo.sh`
|
||||
@@ -106,68 +109,43 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
--target-signer //Bob
|
||||
```
|
||||
|
||||
**2. Relay (Grandpa relay-chain) headers**
|
||||
|
||||
**source-host/source-port** - WS-port of collator's inner RelayChain validator
|
||||
**target-host/target-port** - WS-port of BridgeHub collator
|
||||
**2. Relay relay-chain headers, parachain headers and messages**
|
||||
|
||||
```
|
||||
# Rococo -> Wococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-headers rococo-to-bridge-hub-wococo \
|
||||
--source-host localhost \
|
||||
--source-port 9942 \
|
||||
--target-host localhost \
|
||||
--target-port 8945 \
|
||||
--target-signer //Bob \
|
||||
--target-transactions-mortality=4
|
||||
|
||||
# Wococo -> Rococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-headers wococo-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 9945 \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Bob \
|
||||
--target-transactions-mortality=4
|
||||
~/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-messages-pallet-owner //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-messages-pallet-owner //Bob \
|
||||
--bridge-hub-wococo-transactions-mortality 4 \
|
||||
--lane 00000001
|
||||
```
|
||||
|
||||
**Check parachain collators:**
|
||||
**Check relay-chain headers relaying:**
|
||||
- Rococo parachain:
|
||||
- https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate
|
||||
- Pallet: **bridgeWococoGrandpa**
|
||||
- Keys: **bestFinalized()**
|
||||
- https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate
|
||||
- Pallet: **bridgeWococoGrandpa**
|
||||
- Keys: **bestFinalized()**
|
||||
- Wococo parachain:
|
||||
- https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8945#/chainstate
|
||||
- Pallet: **bridgeRococoGrandpa**
|
||||
- Keys: **bestFinalized()**
|
||||
|
||||
**3. Relay (BridgeHub parachain) headers**
|
||||
|
||||
```
|
||||
# Rococo -> Wococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-parachains bridge-hub-rococo-to-bridge-hub-wococo \
|
||||
--source-host localhost \
|
||||
--source-port 9942 \
|
||||
--target-host localhost \
|
||||
--target-port 8945 \
|
||||
--target-signer //Bob \
|
||||
--target-transactions-mortality=4
|
||||
|
||||
# Wococo -> Rococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-parachains bridge-hub-wococo-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 9945 \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Bob \
|
||||
--target-transactions-mortality=4
|
||||
```
|
||||
|
||||
**Check parachain collators:**
|
||||
**Check parachain headers relaying:**
|
||||
- Rococo parachain:
|
||||
- https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A8943#/chainstate
|
||||
- Pallet: **bridgeWococoParachain**
|
||||
@@ -177,36 +155,6 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
- Pallet: **bridgeRococoParachain**
|
||||
- Keys: **bestParaHeads()**
|
||||
|
||||
**4. Relay (XCM) messages**
|
||||
|
||||
```
|
||||
# Rococo -> Wococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-messages bridge-hub-rococo-to-bridge-hub-wococo \
|
||||
--source-host localhost \
|
||||
--source-port 8943 \
|
||||
--source-signer //Charlie \
|
||||
--target-host localhost \
|
||||
--target-port 8945 \
|
||||
--target-signer //Charlie \
|
||||
--target-transactions-mortality=4 \
|
||||
--lane 00000002
|
||||
```
|
||||
|
||||
```
|
||||
# Wococo -> Rococo
|
||||
RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
|
||||
~/local_bridge_testing/bin/substrate-relay relay-messages bridge-hub-wococo-to-bridge-hub-rococo \
|
||||
--source-host localhost \
|
||||
--source-port 8945 \
|
||||
--source-signer //Charlie \
|
||||
--target-host localhost \
|
||||
--target-port 8943 \
|
||||
--target-signer //Charlie \
|
||||
--target-transactions-mortality=4 \
|
||||
--lane 00000001
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Git subtree `./bridges`
|
||||
|
||||
@@ -31,10 +31,9 @@ use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom,
|
||||
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin,
|
||||
FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset,
|
||||
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
|
||||
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
|
||||
UsingComponents,
|
||||
FixedWeightBounds, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
|
||||
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
|
||||
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents,
|
||||
};
|
||||
use xcm_executor::XcmExecutor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user