Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
7d4319d
Bump futures from 0.3.26 to 0.3.27 (#2359)
dependabot[bot] Mar 27, 2023
ea6598c
Bump clap from 4.1.11 to 4.1.13 (#2388)
dependabot[bot] Mar 27, 2023
35d79f3
Remove HeaderBackend from RelayChainRPCClient (#2385)
skunert Mar 28, 2023
0ef1444
Bump scale-info from 2.3.1 to 2.4.0 (#2386)
dependabot[bot] Mar 28, 2023
066db6b
Bump serde_json from 1.0.94 to 1.0.95 (#2387)
dependabot[bot] Mar 28, 2023
1d8208b
Companion: wasm-builder support stable Rust (#2393)
bkchr Mar 29, 2023
559f3ca
Bump thiserror from 1.0.38 to 1.0.40 (#2396)
dependabot[bot] Mar 29, 2023
69dd6ae
Bump syn from 1.0.109 to 2.0.9 (#2397)
dependabot[bot] Mar 29, 2023
247e843
Bump serde from 1.0.156 to 1.0.159 (#2395)
dependabot[bot] Mar 29, 2023
2ce882f
Companion for https://github.com/paritytech/substrate/pull/13725 (#2401)
altonen Mar 30, 2023
3ce4e83
Bump syn from 2.0.9 to 2.0.11 (#2405)
dependabot[bot] Mar 30, 2023
693e973
Bump scale-info from 2.4.0 to 2.5.0 (#2404)
dependabot[bot] Mar 30, 2023
f5340e7
Bump tempfile from 3.4.0 to 3.5.0 (#2406)
dependabot[bot] Mar 30, 2023
337bd17
bump zombienet version (#2411)
pepoviola Mar 30, 2023
826e1aa
Bump tokio from 1.26.0 to 1.27.0 (#2413)
dependabot[bot] Mar 31, 2023
a4188ea
Merge remote-tracking branch 'origin/master' into bridge-hub-rococo-w…
Mar 31, 2023
93d9b6a
Bump syn from 2.0.11 to 2.0.12 (#2414)
dependabot[bot] Mar 31, 2023
b1cd3d5
Bump proc-macro2 from 1.0.52 to 1.0.54 (#2415)
dependabot[bot] Mar 31, 2023
9106fa8
Companion PR for contract deletion updates (#2409)
pgherveou Mar 31, 2023
e5035c8
Allow arbitrary key-values in RelayStateSproofBuilder (#2407)
tmpolaczyk Mar 31, 2023
e5d994b
help text examples + clean up (#2418)
skunert Apr 1, 2023
e67094e
Bump futures from 0.3.27 to 0.3.28 (#2420)
dependabot[bot] Apr 1, 2023
6bdcf1f
Bump clap from 4.1.13 to 4.1.14 (#2421)
dependabot[bot] Apr 1, 2023
66bfb2c
Update Substrate & Polkadot (#2422)
bkchr Apr 3, 2023
d12c6d0
Bump syn from 2.0.12 to 2.0.13 (#2428)
dependabot[bot] Apr 3, 2023
697f0cd
Bump hex-literal from 0.3.4 to 0.4.0 (#2426)
dependabot[bot] Apr 3, 2023
2b4467c
Updated scripts for transfer assets
bkontur Mar 27, 2023
53c6b8d
Companion for #6986 (#2416)
bkontur Apr 4, 2023
5ed3677
[backport] weights 9400 (#2425)
EgorPopelyaev Apr 4, 2023
88ead41
Cleanup: Remove polkadot-service dependency from minimal node (#2430)
skunert Apr 4, 2023
2cbaa39
Co #13699: Remove old calls (#2431)
ggwpez Apr 4, 2023
b49628f
[Backport] version bumps 9400 (#2424)
EgorPopelyaev Apr 5, 2023
d8d5781
Merge branch 'master' into bridge-hub-rococo-wococo
bkontur Apr 5, 2023
25b7b44
Cargo.lock
bkontur Apr 5, 2023
98f6ca7
Bump hex-literal from 0.4.0 to 0.4.1 (#2434)
dependabot[bot] Apr 5, 2023
a5a79db
Updated bridge-hub-polkadot.json (#2435)
bkontur Apr 6, 2023
b0715f9
The Polkadot Fellowship import (#2236)
muharem Apr 9, 2023
dcedafb
Script updates for `ping-via-bridge-from-statemine-rococo`
bkontur Apr 11, 2023
03763dd
Companion for #13302 (#2357)
lexnv Apr 11, 2023
b4a50e2
use stable rust toolchain in ci
Apr 11, 2023
4733416
Bump syn from 2.0.13 to 2.0.14 (#2446)
dependabot[bot] Apr 12, 2023
5a0ebad
Bump serde from 1.0.159 to 1.0.160 (#2445)
dependabot[bot] Apr 12, 2023
a9a6c30
Added `transfer-asset-from-statemine-rococo`
bkontur Apr 12, 2023
030db02
Invoke cargo build commands with `--locked` (#2444)
Apr 12, 2023
8252d87
Finished scripts
bkontur Apr 12, 2023
c70f503
README.md
bkontur Apr 12, 2023
df9ed24
Bump actions/checkout from 3.1.0 to 3.5.1 (#2448)
dependabot[bot] Apr 12, 2023
977587b
Merge remote-tracking branch 'origin/master' into bridge-hub-rococo-w…
Apr 13, 2023
574f425
Bump serde_json from 1.0.95 to 1.0.96 (#2453)
dependabot[bot] Apr 13, 2023
b42855d
Bump actions/checkout from 3.5.1 to 3.5.2 (#2452)
dependabot[bot] Apr 14, 2023
f776496
Merge remote-tracking branch 'origin/master' into bridge-hub-rococo-w…
bkontur Apr 14, 2023
6a12724
Compile fix + log xcm trace all
bkontur Apr 14, 2023
a26ebb2
Bump syn from 2.0.14 to 2.0.15 (#2454)
dependabot[bot] Apr 14, 2023
863e94d
Bump assert_cmd from 2.0.10 to 2.0.11 (#2457)
dependabot[bot] Apr 15, 2023
795fe4e
Initial version of bridges pallet as subtree of https://github.com/pa…
bkontur Apr 14, 2023
f891b32
Merge remote-tracking branch 'origin/master' into bridge-hub-rococo-w…
bkontur Apr 17, 2023
3a8b6ea
Squashed 'bridges/' changes from ecddd4a31..d30927c08
bkontur Apr 17, 2023
4156016
Merge commit '3a8b6ea5290368cb0dbf39e76555d15d380fc194' into bridge-h…
bkontur Apr 17, 2023
20f7a55
Fixes
bkontur Apr 17, 2023
a9e2773
Squashed 'bridges/' content from commit d30927c08
bkontur Apr 17, 2023
71a1d47
Merge commit 'a9e27730296e3269b82cd315aed9d635610f076c' as 'bridges'
bkontur Apr 17, 2023
8f67dc5
Merge branch 'bridge-hub-subtree' into bridge-hub-rococo-wococo
bkontur Apr 17, 2023
1e489dd
Updated REAMDE.md and BRIDGES.md (inspired by original https://github…
bkontur Apr 17, 2023
0670d9f
Squashed 'bridges/' changes from d30927c08..d3970944b
bkontur Apr 17, 2023
71aad1e
Merge commit '0670d9fa5ae67f6f01028440318a723d1b330720' into bridge-h…
bkontur Apr 17, 2023
5b20c4e
Merge branch 'bridge-hub-subtree' into bridge-hub-rococo-wococo
bkontur Apr 17, 2023
60502b2
Merge branch 'bridge-hub-rococo-wococo' into alistair/merge-from-upst…
alistair-singh Apr 17, 2023
95c088b
updated lock file
alistair-singh Apr 17, 2023
7ca7ba4
Merge branch 'snowbridge' into alistair/merge-from-upstream
alistair-singh Apr 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finished scripts
  • Loading branch information
bkontur committed Apr 12, 2023
commit 8252d87105ff32a253a6f34fe221696e121b2ef9
12 changes: 6 additions & 6 deletions parachains/runtimes/bridge-hubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \

### Send messages (Rococo, Wococo)

#### Transfer assets via bridge
#### Local (zombienet) run

1. allow bridge transfer on statemine/westmint (governance-like):
```
Expand Down Expand Up @@ -203,11 +203,11 @@ RUST_LOG=runtime=trace,rpc=trace,bridge=trace \
./scripts/bridges_rococo_wococo.sh ping-via-bridge-from-statemine-rococo
```

- open explorers: (see https://github.com/paritytech/parity-bridges-common/issues/1671)
- Rockmine2 (see `polkadotXcm.Sent`)
- BridgeHubRococo (see `bridgeWococoMessages.MessageAccepted`)
- BridgeHubWococo (see `bridgeRococoMessages.MessagesReceived`)
- Wockmint (see `xcmpQueue.Success` for `transfer-asset` and `xcmpQueue.Fail` for `ping-via-bridge`)
- open explorers:
- Rockmine2 (see events `xcmpQueue.XcmpMessageSent`, `bridgeTransfer.ReserveAssetsDeposited`, `bridgeTransfer.TransferInitiated`) https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io#/explorer
- BridgeHubRococo (see `bridgeWococoMessages.MessageAccepted`) https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-bridge-hub-rpc.polkadot.io#/explorer
- BridgeHubWococo (see `bridgeRococoMessages.MessagesReceived`) https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwococo-bridge-hub-rpc.polkadot.io#/explorer
- Wockmint (see `xcmpQueue.Success` for `transfer-asset` and `xcmpQueue.Fail` for `ping-via-bridge`) https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws-wococo-wockmint-collator-node-0.parity-testnet.parity.io#/explorer
- BridgeHubRococo (see `bridgeWococoMessages.MessagesDelivered`)

## How to test local BridgeHubKusama
Expand Down
71 changes: 52 additions & 19 deletions scripts/bridges_rococo_wococo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
#!/bin/bash

# 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"
# 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"

# Address: GegTpZJMyzkntLN7NJhRfHDk4GWukLbGSsag6PHrLSrCK4h
ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO="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"

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
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
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!"
exit 1
fi
}

function ensure_binaries() {
if [[ ! -f ~/local_bridge_testing/bin/polkadot ]]; then
echo " Required polkadot binary '~/local_bridge_testing/bin/polkadot' does not exist!"
Expand Down Expand Up @@ -160,10 +189,6 @@ function send_governance_transact() {
"${message}"
}

STATEMINE_ACCOUNT_SEED_FOR_LOCAL="//Alice"
# Address: GegTpZJMyzkntLN7NJhRfHDk4GWukLbGSsag6PHrLSrCK4h
ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO="scatter feed race company oxygen trip extra elbow slot bundle auto canoe"

function allow_assets_transfer_send() {
local relay_url=$1
local relay_chain_seed=$2
Expand Down Expand Up @@ -351,12 +376,13 @@ function remove_assets_transfer_send() {
function transfer_asset_via_bridge() {
local url=$1
local seed=$2
local target_account=$3
echo " calling transfer_asset_via_bridge:"
echo " url: ${url}"
echo " seed: ${seed}"
echo " target_account: ${target_account}"
echo " params:"


local assets=$(jq --null-input \
'
{
Expand All @@ -377,12 +403,12 @@ function transfer_asset_via_bridge() {
'
)


## // TODO:check-parameter - find dynamic way to decode some account to bytes: "id": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
## AccountId32::from_str("5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY").unwrap().0` -> [u8; 32]
## [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]
local tmp_output_file=$(mktemp)
address_to_account_id_bytes "$target_account" "${tmp_output_file}"
local hex_encoded_data=$(cat $tmp_output_file)

local destination=$(jq --null-input \
--argjson hex_encoded_data "$hex_encoded_data" \
'
{
"V3": {
Expand All @@ -397,7 +423,7 @@ function transfer_asset_via_bridge() {
},
{
"AccountId32": {
"id": [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]
"id": $hex_encoded_data
}
}
]
Expand Down Expand Up @@ -427,16 +453,19 @@ function transfer_asset_via_bridge() {
function ping_via_bridge() {
local url=$1
local seed=$2
echo " calling transfer_asset_via_bridge:"
local target_account=$3
echo " calling ping_via_bridge:"
echo " url: ${url}"
echo " seed: ${seed}"
echo " target_account: ${target_account}"
echo " params:"

## // TODO:check-parameter - find dynamic way to decode some account to bytes: "id": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
## AccountId32::from_str("5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY").unwrap().0` -> [u8; 32]
## [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]
local tmp_output_file=$(mktemp)
address_to_account_id_bytes "$target_account" "${tmp_output_file}"
local hex_encoded_data=$(cat $tmp_output_file)

local destination=$(jq --null-input \
--argjson hex_encoded_data "$hex_encoded_data" \
'
{
"V3": {
Expand All @@ -451,7 +480,7 @@ function ping_via_bridge() {
},
{
"AccountId32": {
"id": [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]
"id": $hex_encoded_data
}
}
]
Expand Down Expand Up @@ -591,25 +620,29 @@ case "$1" in
ensure_polkadot_js_api
transfer_asset_via_bridge \
"ws://127.0.0.1:9910" \
"//Alice"
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL"
;;
transfer-asset-from-statemine-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}"
"$ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO"
;;
ping-via-bridge-from-statemine-local)
ensure_polkadot_js_api
ping_via_bridge \
"ws://127.0.0.1:9910" \
"${STATEMINE_ACCOUNT_SEED_FOR_LOCAL}"
"$STATEMINE_ACCOUNT_SEED_FOR_LOCAL" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_LOCAL"
;;
ping-via-bridge-from-statemine-rococo)
ensure_polkadot_js_api
ping_via_bridge \
"wss://ws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io" \
"${ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO}"
"${ROCKMINE2_ACCOUNT_SEED_FOR_ROCOCO}" \
"$WOCKMINT_ACCOUNT_ADDRESS_FOR_ROCOCO"
;;
drip)
transfer_balance \
Expand Down