Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BridgeHub Rococo<>Wococo parachains story #1671

Closed
4 tasks
bkontur opened this issue Dec 1, 2022 · 4 comments
Closed
4 tasks

BridgeHub Rococo<>Wococo parachains story #1671

bkontur opened this issue Dec 1, 2022 · 4 comments

Comments

@bkontur
Copy link
Contributor

bkontur commented Dec 1, 2022

Base

Cumulus github with BridgeHub runtimes: https://github.com/paritytech/cumulus/tree/bridge-hub-rococo-wococo/parachains/runtimes/bridge-hubs

Local setup

See: https://github.com/paritytech/cumulus/tree/bridge-hub-rococo-wococo/parachains/runtimes/bridge-hubs#how-to-test-locally-rococo---wococo

Live environment

Deployment

With help of DevOps guys
https://github.com/paritytech/devops/issues/1934
https://github.com/paritytech/devops/issues/1935
https://github.com/paritytech/devops/issues/2190

Parachain collators + validators

Rococo:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-rpc.polkadot.io#/explorer

BridgeHubRococo:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-bridge-hub-rpc.polkadot.io#/explorer

Logs: here

Rockmine2:
https://polkadot.js.org/apps/?rpc=wss%253A%252F%252Fws-rococo-rockmine2-collator-node-0.parity-testnet.parity.io#/explorer


Wococo: (needs VPN - https://github.com/paritytech/devops/issues/2030)
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwococo-rpc-node-0.parity-testnet.parity.io#/explorer

BridgeHubWococo:
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwococo-bridge-hub-rpc.polkadot.io#/explorer

Logs: here

Wockmint: (needs VPN - https://github.com/paritytech/devops/issues/2030)
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fws-wococo-wockmint-collator-node-0.parity-testnet.parity.io#/explorer

Relayers

Logs: here

Deployed version: here

Monitoring/alerts

TODO: #1715

Monitoring: BridgeHubRococo -> BridgeHubWococo
Monitoring: BridgeHubWococo -> BridgeHubRococo

Relayer accounts

BridgeHubRococo: 5HWAWSumAEhLPM4YDATQDy9nnQKcsptPAwsWWBSq757LHc92
BridgeHubWococo: 5HHUmazpcoj5cAmR3exskbQTxxCCx8UB1ZYtwbY2tbD2Pvfb

Initialize bridges

Init bridge: Rococo -> Wococo

  1. Generate initialize init-bridge call as hex-encoded-data:
# Rococo -> Wococo
RUST_LOG=bridge=info \
	./target/release/substrate-relay init-bridge rococo-to-bridge-hub-wococo \
	--source-host rococo-rpc.polkadot.io \
	--source-port 443 \
	--source-secure \
	--target-host wococo-bridge-hub-rpc.polkadot.io \
	--target-port 443 \
	--target-secure \
	--target-signer //Bob \
	--dry-run
	
...

2022-12-02 09:08:38 +00 INFO bridge Initialize bridge call encoded as hex string: "0x2b01a37c1b5293813f58e6bea02f7ea4d9eee33e31b554dd4d0c5a104bf1c2ac7f18d2e0ba00498b872b0d88cc6acbecc8253774b2141a4dba43b56f500311eec9509d9fa0c2a8089ce6d6c37ea0ac422c90633a2f785e1c437710d2701b4127c3786c05968b0c0642414245b501030c0000006bf5961000000000022e08f43a744704af45d5cc15f743447e1c60bc1844fcf10498bd35f95c155b932ddbdef752d4e243f3041adef735b96ade469de91a3c14cabb3c460b478009afe9554b970190e22078f195586d01a059e81d192665996bd857ca77e27b7507044245454684038ed09b99986d82689eabc5a6f8870a32bccbcfae45e09cf66009cd4507ce8ba605424142450101b2b1ec8a5bbd4ab438ab28556880b76fa3b913c9d4d384e51596667e2e734447117ff8f49a7e5449b6c8582e9ccff2056ad6994f36fea5676538f49d664af48599014af2c3900e86698c9a59ded8d6fb6b1b4fe281dd1b3fb62dc58a33f891316194010000000000000048d622274c618d1de601f96e1148639183967170b019e9d0134dcf8b89e8facd0100000000000000f1405664bfa9310089790d7aab5894d8e30ca1f1aeb7994dbec2bc8d5d826d35010000000000000015ec9f0a904039c0daa30700572903c2538bcc69e7cd05aba932536100bb265801000000000000009dfad25e3f733d9dff34afecefaa1b77f6cbf0d50a0a3323dac062006cfa047e0100000000000000f780cc7a4601765527ddfc0a355af59fe67d850ad1cdea77167a1a32a4737add0100000000000000a43dfad33f130db360153695966cb3f71d8c65e0b8dec508961a5822dc0e7457010000000000000094d61cd14c2c1e6cfba05ab8693689be1b14cb7d52d25cc1c1fbcfd5984190f20100000000000000157b463a2c1bfa8429ff7bedeb6326fe9230965cafaba9e3cbda9120551aa98701000000000000000cf7ff3172f9873155238837a94f858cb57f03027574e982951ab7712088d2110100000000000000c2a0abaeffc00574c7d66c75c41bcdb14e64508715e2125cd873a99d8ca8e0c801000000000000008d5d134dd85deabb01a05be7d1ed6f17e6bafed9f48193c3febd8adafa38f73c0100000000000000450207b0b133ab6dfd7493a07a72b7630d8b17e6b286102c609ba7faaf4eef980100000000000000fdf65064676c50f4a9eff15de6f615e1ab74f2be3ab8ef9e614b322565feb72801000000000000003179c9edafc77e9d27f2fd5a3680ac76597db4deb6fb139d811efea7d8e316830100000000000000ecb77f5fd1a9e4f917482be42071678b27182bd069d38eb23d95f909d558bf8501000000000000009100cca66e97448270c1613dda4aea891799e298f0304f63c7598bd1e9d1bcf60100000000000000a923c54ba6732f91e2073af197be39316d3bd542dba9f2125798cc44c3e08429010000000000000073323358276ba078834e0de9d029fc47e6f9e922d3ade68799db2ff7e1f922da0100000000000000d4720a55ff923e2bbef28ba3dfb68de0c0fcd4f7a3f64b735b0fb394653075a70100000000000000d837abc2aebcee552d307064f49e7f3b57d4c3468db478d68e5f1d369bd28a10010000000000000016bffef762cbbd715d48c2a26b538bd7ca9800cdb3b42caede775af1816568870100000000000000b1e4039d4d18856a932e9018ef3e1cdce1d569316a8b2c0a5c46f491267c15f60100000000000000454d995c144b773e91bb4405234670d50ddcd83e1c39e66ae0d5cbc8d27fc57b0100000000000000fa7398bbddec1cb3b779f97b5e17f8fb2c2be48b7a0d82e20e0c990a7d14d5af0100000000000000d3935c2443bf4abcfa337e870cfce8336d45b6fe5e15ee7f0435d3aff642ca9201000000000000009dad2968765126add25c08991df3c865de826b45db042f02f3d808d2a47f9a270100000000000000a6a8bf0d4d3edeb08e4e384c662b31cff3eebf11f3361275eeca63fb181dc2e601000000000000009bd818fb112faa4d982dad41472236b681f2d84fbe56d1a81120cf459230adc301000000000000001f963cd0a8bc3fdbac5e8fcc421fe16c773652f41886d3550339736e234d9e290100000000000000053281a06f7c8497ab053950182dab16d2589890e31ecb5ab496664d0ac8e809010000000000000055501a656846dd0f057d3e4f9b87a383d9ac43b7b2e7dfb13162682ba225ac180100000000000000ad5a6f0366439dbe2b876d3fc5ab2c152f36864219901b03f9e4d732c83b9f3901000000000000008be60c4ce8b33ba95b1e3908f2b2dcd1d93f6d43471758189b30a3ce659b5c690100000000000000b5832cdea9012225a5cb0ef0d1133d05ef394dc56076129475cc0831e7880ced0100000000000000f2910cb0d55d239e0da5692d4d6740c01bb223c0ae3eba6180ebd3cdfb6905b20100000000000000babdad2233cb7a959002e9ed0c64cee97e1164cf8776ff7d8c3be9bdc887fb9f010000000000000032539369eb9e36811b0fbd00d04cd8916754850533d436db15b07191313ceeca01000000000000004be925719a1283486a316ffd3f21ebe2e0585eccd7b8b406dfcc5294ff0873100100000000000000a7137c860ff3273b35ffd5a665449bf1d01df9e7397bdb19be6871a956ecaa3e01000000000000006acca8ca31c558ba5b38654891eda7e6bb3009b055e2602c75950721863c4e5b01000000000000005494fc32fc21392523e4011cb5f146116ea6d536daff1904851d8211f27b64e40100000000000000d103538a0fb4b83403ddaa46381524dae1b9a6355722a52a25a5a86e6a9623bb0100000000000000194991a7daf5cb4e36e6809d7a782c6456c5644d0e80698a2a75cd957d4dd9bc0100000000000000f2ef21701d94bf5bb92e704337552374bdda21c2d50009ca0c349bccdc61b20e0100000000000000f9e20006a5d473073535980df7258f64e09c882594c3dcb757745833f42c69d701000000000000006bc7129876142b90492f4ae6ca6c8379307841edb6532991715b3baa39d011370100000000000000c14ede7ebf0fd72ee5788cfdf985b0b89a1d38b357fd19c1633db1bfb63659df01000000000000005b57c3f7f27e66c55e2b35f4827fd7f2bb0d04b3cffd3c08acb111552ab53dc80100000000000000221c4df5d02ebfbdac9ad16a42f1318233864119620a559b8a6718efe722e2ff0100000000000000b55a84c5e77046ee55ecc7c50fa550d4609f7819ada2f07e6339b02a9f3d30780100000000000000476b4a47651b6d4de93c4ed6db7c805a6dbae5f6aa69bfb7fc5e4217e60bcca10100000000000000198366bfac6c77980aa4ca6b218f7790376d5fd7feccd2cef4a7e563b1a9826c01000000000000001fd8f64c0edd7371f616d60af0990383f1a475310e882d23bc3357a52611af530100000000000000acd0a0d3b8cb6f6de7d5b3f15d5e0664f93184b7b106b09952ca4e08263305a70100000000000000c8337a0c744d7c66a2f632ad51272bbce6ac4c29db2825cce2593d46b38024400100000000000000f028ea5c139d31e573932e7b11ebeff8fd4bf59eb440251b70a12086621a1bc20100000000000000f642b282acb8af2ffe353f9d9723a061d99130991cce553bbe4ba64bf9353efc0100000000000000b8e1d04b76ee6764fb550911f078a8305664ce6e4ce61d16db1f53941cfeea0901000000000000006de921b84ce584bbdf941966db76429be8e68ad11577eb6efd9fe6d5dbe9a2b601000000000000003464d72146d2e61a57b23c70c64ac9dfa8e34f6a069f7f1ae3a866ca04baec1201000000000000003eeff4cbb930feda2dcf3f90500f989c2b117f24c45d8451aee64f6750ef4e49010000000000000018f723e6eee609ddcd1d73a009712f1fb5e70501f05e8d423875c6a7946218490100000000000000530b8c5588d8a9b456b81ec74a2dac348eaf68725c7743cd7be0a2a5e07a0f5c0100000000000000ca55a2d4918863a70fe978fe218f57c96814333b9f122fb24c4feeab4f9307110100000000000000684b34073d8309743a74aac835f2e4a7d9ac30386d2aaba0b2d85b67f4ffd93501000000000000006abbfbaa35c35ce445c03080498bccdcb533f6b5c1cc7eacaf70b595309fd09c0100000000000000d0bfe807d119ed56434988f83a38dede8845d2c59d2a16e5ee1c9709f4dacbe90100000000000000ddc516f6691154abf98f2b1cbdbfa7459513da08a1c851e8fe23839ac94ab50c01000000000000000fd3dc1601742070c095b166104a89d9124fc1f202b207c3c06c7f8b68379b710100000000000000155e5cc6ca049df54339a489b7021324af342e9bbf91090be4fd40ec4dcc53590100000000000000c099440239e6381cbd8ca7cafbdf558bc12aa9112752984e25b8976f149c126e010000000000000016c4bd1bd3673933d6521963c69cc0a6fbad24191a85dd80157907d4afd3c7eb01000000000000003df8ce08c9e982cb270cd967e9b1882550ff7e4074dc6f6154d676511fa5523901000000000000001e733457e260efaa18a154fa0a67d204778574f3c01209935e09b8ce155e8aa40100000000000000c9c2bd52717de0867bd61ac20a611ca881999889048e482ac16335c9b9e35f5b010000000000000030544c116feb15fa0614832ef7c8d02c622a080517de51d3e0a82b1d9255119501000000000000005c553da43bdc0f08f343154fff666cb9fabcdd47de400e3f22602f44c39181c30100000000000000a669e85b0d79fdc32caa2b27ba2382da2bd77c680507aee8688007462eaf5ff80100000000000000ff0f2635570b3defec2003ffc1be9f2fe59f96de193d02b342cf7c0828badeac0100000000000000bc3da530f4c42721104b7d6be84611a6edfa461484bc2e33438a610b7dcbccf30100000000000000eee16bc3e7e0b0964b7788eeb9a4a71dcc9106eb31bcc951d844819bc8769fe60100000000000000fabd190fa3dde08e74af4c51b3cc002b02994849b2bdfd718e07da254f3ad0260100000000000000b8baf2a45da1fb0775b3ae713a01d97513cb49b9f2decd5ea03976984862dba00100000000000000fe3e59dca3b93dd5e661b2801b1cf6c4c4340ce44e2d49399718b43bd4c05f430100000000000000e51981a891b7e89978a9d131ba2a4df357e0a3ec4d60201681c9ff95f497fdbc01000000000000009cab9c09ade77f53d8eea2cb226402edc99a6241fc65f47240a2ec92b6b340180100000000000000099fce0230e171e3ebfcfca75b296acd7e218d5114a7ac92bf754d89f40e7f5301000000000000002c541c48f485902b5573ce7bf7593007c2a79d99d1a61803d7e09d85f7873c7801000000000000004953c8d4e582af3b8aede41703673498628219f3e9879ac94fabae7c74bd3fe301000000000000008998cca932a373215494f6e472854b8e374c6cd496cf2128b5b144861cbe1796010000000000000073d45a34743a537468a4b4bd092bc114699817aee2f53a00ebb98c2b44285397010000000000000097fc19f15db1ae42dd7ed4b0a4eba56302d95dbdc0619d292d0b7f0b631c8eab0100000000000000106c908f4ed2a5a2e53238ef0a3f9dd2289debe3c4bb14c99cf0ddc5c6462c1c0100000000000000d264aabdebeb25fdd7406b75474418adc620229bbe10bbf3402e22b658630bd10100000000000000c9dea0598312f4b3e3195aeb22599b1b5b939e06eecb83a7551db6795924cb110100000000000000978af807f0dde9caef6a8314bfa23ab6eb54d015f429c5fecf00de4ba344c699010000000000000047577e49beb2fbbf65687d82c9f93b2dd69c1f428a13d8c5ee2c1b4de564e42d0100000000000000d51118895f1e8af6dfc22a85f5e502211e6e77da2ccaefc33083551307d4af160100000000000000887b01a63bf9071a1dfcffa22da654dc59cf5da7387f2d173d3004d7b1f0063401000000000000004ffbd404012a4db6631e48ee6f477fd9289cb7b1763c3c469e497940ebbbc37001000000000000000e6d7d1afbcc6547b92995a394ba0daed07a2420be08220a5a1336c6731f0bfa0100000000000000501400000000000000"
  1. Check hex-encoded-data here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwococo-bridge-hub-rpc.polkadot.io#/extrinsics/decode

  2. Simulate governance as submit extrinsic XCM::Transact with hex-encoded-data for para_id=1014 from Wococo relay node

Init bridge: Wococo -> Rococo

  1. Generate initialize init-bridge call as hex-encoded-data: (needs VPN, because of Wococo relay node access)
# Wococo -> Rococo
RUST_LOG=bridge=info \
	./target/release/substrate-relay init-bridge wococo-to-bridge-hub-rococo \
	--source-host wococo-rpc-node-0.parity-testnet.parity.io \
	--source-port 443 \
	--source-secure \
	--target-host rococo-bridge-hub-rpc.polkadot.io \
	--target-port 443 \
	--target-secure \
	--target-signer //Bob \
	--dry-run

...

2022-12-02 09:22:59 +00 INFO bridge Initialize bridge call encoded as hex string: "0x29015e75f306eada2423b0a676d0e8cc28f0059510f8ca29daa0308dbf4d173a8075deb7cb00ddb9a1f71ff1c9dfc03b11f7e68f9ed3094af3f7961d55594828b62913bc3ad38365ea274e4e97b396f5ca95d6aba5dc02bb7d1b3f1fe3a24990de9eb2d210f10c0642414245b5010301000000fbf5961000000000ee0510819803a94637a211640fa8b366ea6a694e05570e9b8897664e988d4762b13ecd3faa3cc0373d48d39471035ca85a9ae9ed339ab3e1c04c1eeaf6b8140cd10126b67589c433526a5df0e199def2d248ca6bff3362addacaf873ec9c3e07044245454684031a019fdc07315f20c3988aaa62e8b4355aadae056077787d82f16689e7f20d38054241424501018a1b07be48279131ad2c7e681c8b0d9721b67e963fb3ac67f9ae753c35e6964677bae180d9e3fada6ee5b41b98ebfec303412210c067bf22d26e539de89f3a8a100e6d7d1afbcc6547b92995a394ba0daed07a2420be08220a5a1336c6731f0bfa0100000000000000fcd5f87a6fd5707a25122a01b4dac0a8482259df7d42a9a096606df1320df08d0100000000000000e1b68fbd84333e31486c08e6153d9a1415b2e7e71b413702b7d64e9b631184a1010000000000000036be9069cdb4a8a07ecd51f257875150f0a8a1be44a10d9d98dabf10a030aef40100000000000000b91500000000000000"
  1. Check hex-encoded-data here: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frococo-bridge-hub-rpc.polkadot.io#/extrinsics/decode

  2. Simulate governance as submit extrinsic XCM::Transact with hex-encoded-data for para_id=1013 from Rococo relay node

Redeploy relayer

  • On the bridges repo add a tag that points to the commit that you need to deploy
git tag [tag_name] -a
git push upstream [tag_name]
  • A new docker image named paritytech/bridges-common-relay:[tag-name] will be automatically generated right after adding the tag. You can check for it here.
  • Reopen this devops issue and ask the devops team to deploy the new version docker image for the relayer.

Use-cases

Send xcm:Transact or xcm:Trap between Rococo:Rockmine2 and Wococo:Wockmint

Open HRMP channels: (https://github.com/paritytech/devops/issues/2190)
Calls from Rococo relay chain:
force_open_hrmp_channel(1013, 1015, 5, 102400)
force_open_hrmp_channel(1015, 1013, 5, 102400)

Calls from Wococo relay chain:
force_open_hrmp_channel(1014, 1000, 4, 524288)
force_open_hrmp_channel(1000, 1014, 4, 524288)

Asset transfer between Rococo:Rockmine2 and Wococo:Wockmint

There is a kubernetes cron job deployed in testnet infra for Rococo/Wococo, which basically uses script transfer-asset-from-statemine-rococo from Cumulus repo.
This script periodically calls dedicated extrinsic transfer_asset_via_bridge for from the PR.
The script transfers assets between accounts:
From Rockmine2: GegTpZJMyzkntLN7NJhRfHDk4GWukLbGSsag6PHrLSrCK4h to Wockmint: 5Ge7YcbctWCP1CccugzxWDn9hFnTxvTh3bL6PNy4ubNJmp7Y.


Issues/TODOs:

@bkontur
Copy link
Contributor Author

bkontur commented Dec 2, 2022

Added section Initialize bridges with command/data for trigger initialize bridge-hubs on Live

https://github.com/paritytech/devops/issues/1934#issuecomment-1334993205

@bkontur
Copy link
Contributor Author

bkontur commented Dec 6, 2022

Accounts prepared.
Initialize bridges were successfully triggered (as governance-like) on live BridgeHubs.
Now waiting to DevOps to run complex relayer: https://github.com/paritytech/devops/issues/1935#issuecomment-1339045499

@bkontur
Copy link
Contributor Author

bkontur commented Dec 14, 2022

complex relayer is running on live.
Started to onboard new parachain Rockmine2/Wockmint https://github.com/paritytech/devops/issues/2190

  • to test end-to-end xcm-v3
  • to test asset moving

@bkontur
Copy link
Contributor Author

bkontur commented May 23, 2023

deployed live

@bkontur bkontur closed this as completed May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant