Skip to content
Snippets Groups Projects
  1. Sep 24, 2024
    • Branislav Kontur's avatar
      Bridges lane id agnostic for backwards compatibility (#5649) · 710e74dd
      Branislav Kontur authored
      
      This PR primarily fixes the issue with
      `zombienet-bridges-0001-asset-transfer-works` (see:
      https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7404903).
      
      The PR looks large, but most of the changes involve splitting `LaneId`
      into `LegacyLaneId` and `HashedLaneId`. All pallets now use `LaneId` as
      a generic parameter.
      
      The actual bridging pallets are now backward compatible and work with
      actual **substrate-relay v1.6.10**, which does not even known anything
      about permissionless lanes or the new pallet changes.
      
      
      
      ## Important
      
      - [x] added migration for `pallet_bridge_relayers` and
      `RewardsAccountParams` change order of params, which generates different
      accounts
      
      ## Deployment follow ups
      - [ ] fix monitoring for
      `at_{}_relay_{}_reward_for_msgs_from_{}_on_lane_{}`
      - [ ] check sovereign reward accounts - because of changed
      `RewardsAccountParams`
      - [ ] deploy another messages instances for permissionless lanes - on
      BHs or AHs?
      - [ ] return back `open_and_close_bridge_works` for another
      `pallet-bridge-messages` instance
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarOliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  2. Sep 02, 2024
    • Branislav Kontur's avatar
      [bridges-v2] Permissionless lanes (#4949) · 22100999
      Branislav Kontur authored
      Relates to:
      https://github.com/paritytech/parity-bridges-common/issues/2451
      Closes: https://github.com/paritytech/parity-bridges-common/issues/2500
      
      ## Summary
      
      Now, the bridging pallet supports only static lanes, which means lanes
      that are hard-coded in the runtime files. This PR fixes that and adds
      support for dynamic, also known as permissionless, lanes. This means
      that allowed origins (relay chain, sibling parachains) can open and
      close bridges (through BridgeHubs) with another bridged (substrate-like)
      consensus using just `xcm::Transact` and `OriginKind::Xcm`.
      
      _This PR is based on the migrated code from the Bridges V2
      [branch](https://github.com/paritytech/polkadot-sdk/pull/4427) from the
      old `parity-bridges-common`
      [repo](https://github.com/paritytech/parity-bridges-common/tree/bridges-v2)._
      
      ## Explanation
      
      Please read
      [bridges/modules/xcm-bridge-hub/src/lib.rs](https://github.com/paritytech/polkadot-sdk/blob/149b0ac2
      
      /bridges/modules/xcm-bridge-hub/src/lib.rs#L17-L136)
      to understand how managing bridges works. The basic concepts around
      `BridgeId` and `LaneId` are also explained there.
      
      
      ## TODO
      
      - [x] search and fix for comment: `// TODO:(bridges-v2) - most of that
      stuff was introduced with free header execution:
      https://github.com/paritytech/polkadot-sdk/pull/4102` - more info in the
      comment
      [bellow](https://github.com/paritytech/polkadot-sdk/pull/4427#issuecomment-2126625043)
      - [x] TODO: there's only one impl of `EnsureOrigin<Success = Location>`
      
      ## TODO - not blocking review
      
      **benchmarking:**
      - [x] regenerate all relevant weights for BH/AH runtimes
      - [ ] regenerate default weights for bridging pallets e.g.
      `modules/messages/src/weights.rs`
      - [ ] add benchmarks for `xcm-bridge-hub` pallet
      https://github.com/paritytech/polkadot-sdk/issues/5550
      
      **testing:**
      - [ ] add xcm-emulator tests for Rococo/Penpal to Westend/Penpal with
      full opening channel and sending/receiving `xcm::Transact`
      
      **migrations:**
      - [x] add migrations for BridgeHubRococo/Westend
      https://github.com/paritytech/parity-bridges-common/issues/2794 (to be
      reusable for P/K bridge)
        - [x] check also storage migration, if needed for pallets
        - [ ] migration for XCM type (optional)
        - [x] migration for static lanes to the dynamic (reuse for fellows)
      
      **investigation:**
      - [ ] revisit
      https://github.com/paritytech/parity-bridges-common/issues/2380
      - [ ] check congestion around `LocalXcmChannelManager` and
      `OutboundLanesCongestedSignals` impls -
      https://github.com/paritytech/polkadot-sdk/issues/5551
        - to be reusable for polkadot-fellows
      - return `report_bridge_status` was remove, so we need to `XcmpQueue`
      alternative?
      
      ---------
      
      Signed-off-by: default avatarBranislav Kontur <bkontur@gmail.com>
      Co-authored-by: default avatarSvyatoslav Nikolsky <svyatonik@gmail.com>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
  3. Jun 14, 2024
    • Branislav Kontur's avatar
      Bridges - changes for Bridges V2 - relay client part (#4494) · 977254cc
      Branislav Kontur authored
      Contains mainly changes/nits/refactors related to the relayer code
      (`client-substrate` and `lib-substrate-relay`) migrated from the Bridges
      V2 [branch](https://github.com/paritytech/polkadot-sdk/pull/4427).
      
      Relates to:
      https://github.com/paritytech/parity-bridges-common/issues/2976
      Companion: https://github.com/paritytech/parity-bridges-common/pull/2988
      
      
      ## TODO
      - [x] fix comments
      
      ## Questions
      - [x] Do we need more testing for client V2 stuff? If so, how/what is
      the ultimate test? @svyatonik
      
      
      - [x] check
      [comment](https://github.com/paritytech/polkadot-sdk/pull/4494#issuecomment-2117181144)
      for more testing
      
      ---------
      
      Co-authored-by: default avatarSvyatoslav Nikolsky <svyatonik@gmail.com>
      Co-authored-by: default avatarSerban Iorga <serban@parity.io>
  4. Apr 15, 2024
  5. Apr 10, 2024
  6. Nov 01, 2023
    • Branislav Kontur's avatar
      [testnet] Add `AssetHubRococo` <-> `AssetHubWestend` asset bridging support (#1967) · 1b1fab0d
      Branislav Kontur authored
      
      ## Summary
      
      Asset bridging support for AssetHub**Rococo** <-> AssetHub**Wococo** was
      added [here](https://github.com/paritytech/polkadot-sdk/pull/1215), so
      now we aim to bridge AssetHub**Rococo** and AssetHub**Westend**. (And
      perhaps retire AssetHubWococo and the Wococo chains).
      
      ## Solution
      
      **bridge-hub-westend-runtime**
      - added new runtime as a copy of `bridge-hub-rococo-runtime`
      - added support for bridging to `BridgeHubRococo`
      - added tests and benchmarks
      
      **bridge-hub-rococo-runtime**
      - added support for bridging to `BridgeHubWestend`
      - added tests and benchmarks
      - internal refactoring by splitting bridge configuration per network,
      e.g., `bridge_to_whatevernetwork_config.rs`.
      
      **asset-hub-rococo-runtime**
      - added support for asset bridging to `AssetHubWestend` (allows to
      receive only WNDs)
      - added new xcm router for `Westend`
      - added tests and benchmarks
      
      **asset-hub-westend-runtime**
      - added support for asset bridging to `AssetHubRococo` (allows to
      receive only ROCs)
      - added new xcm router for `Rococo`
      - added tests and benchmarks
      
      ## Deployment
      
      All changes will be deployed as a part of
      https://github.com/paritytech/polkadot-sdk/issues/1988.
      
      ## TODO
      
      - [x] benchmarks for all pallet instances
      - [x] integration tests
      - [x] local run scripts
      
      
      Relates to:
      https://github.com/paritytech/parity-bridges-common/issues/2602
      Relates to: https://github.com/paritytech/polkadot-sdk/issues/1988
      
      ---------
      
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarAdrian Catangiu <adrian@parity.io>
      Co-authored-by: default avatarjoe petrowski <25483142+joepetrowski@users.noreply.github.com>
  7. Sep 11, 2023
    • Serban Iorga's avatar
      Update bridges subtree (#1392) · 142a11ad
      Serban Iorga authored
      * Move the bridges subtree under root
      
      * Squashed 'bridges/' changes from 277f0d5496..e50398d1c5
      
      e50398d1c5 bridges subtree fixes (#2528)
      99af07522d Markdown linter (#1309) (#2526)
      733ff0fe7a `polkadot-staging` branch: Use polkadot-sdk dependencies (#2524)
      e8a59f141e Fix benchmark with new XCM::V3 `MAX_INSTRUCTIONS_TO_DECODE` (#2514)
      62b185de15 Backport `polkadot-sdk` changes to `polkadot-staging` (#2518)
      d9658f4d5b Fix equivocation detection containers startup (#2516) (#2517)
      d65db28a8f Backport: building images from locally built binaries (#2513)
      5fdbaf45f6 Start the equivocation detection loop from the complex relayer (#2507) (#2512)
      7fbb67de46 Backport: Implement basic equivocations detection loop (#2375)
      cb7efe245c Manually update deps in polkadot staging (#2371)
      d17981fc33 #2351 to polkadot-staging (#2359)
      
      git-subtree-dir: bridges
      git-subtree-split: e50398d1c594e4e96df70b0bd376e565d17e8558
      
      * Reapply diener workspacify
      
      * Fix Cargo.toml
      
      * Fix ...
  8. Aug 30, 2023
  9. Jul 13, 2023
    • gupnik's avatar
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes... · 24d6e46a
      gupnik authored
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#2790)
      
      * Fixes
      
      * Removes unused import
      
      * Uses Block and removes BlockNumber/Header from Chain
      
      * Fixes bridges
      
      * Fixes
      
      * Removes unused import
      
      * Fixes build
      
      * Uses correct RelayBlock
      
      * Minor fix
      
      * Fixes glutton-kusama
      
      * Uses correct RelayBlock
      
      * Minor fix
      
      * Fixes benchmark for pallet-bridge-parachains
      
      * Adds appropriate constraints
      
      * Minor fixes
      
      * Removes unused import
      
      * Fixes integrity tests
      
      * Minor fixes
      
      * Updates trait bounds
      
      * Uses custom bound for AsPrimitive
      
      * Fixes trait bounds
      
      * Revert "Fixes trait bounds"
      
      This reverts commit 0b0f42f583f3a616a88afe45fcd06d31e7d9a06f.
      
      * Revert "Uses custom bound for AsPrimitive"
      
      This reverts commit 838e5281adf8b6e9632a2abb9cd550db4ae24126.
      
      * No AsPrimitive trait bound for now
      
      * Removes bounds on Number
      
      * update lockfile for {"substrate", "polkadot"}
      
      * Formatting
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * Minor fix
      
      ---------
      
      Co-authored-by: parity-processbot <>
      24d6e46a
  10. May 04, 2023
    • Branislav Kontur's avatar
      Initial version of bridging pallets as git subtree (#2458) · d810f650
      Branislav Kontur authored
      * Initial version of bridges pallet as subtree of https://github.com/paritytech/parity-bridges-common
      Added `Bridges subtree files` pr review rule
      
      * Squashed 'bridges/' content from commit d30927c08
      
      git-subtree-dir: bridges
      git-subtree-split: d30927c089bd9e73092d1ec1a62895603cb277a3
      
      * Updated REAMDE.md and BRIDGES.md (inspired by original https://github.com/paritytech/polkadot/blob/d22eb62fe40e55e15eb91d375f48cc540d83a47e/BRIDGES.md)
      
      * Squashed 'bridges/' changes from d30927c08..d3970944b
      
      d3970944b Small simplifications (#2050)
      
      git-subtree-dir: bridges
      git-subtree-split: d3970944b0cfc4ea5226225e1ca07dab234c3556
      
      * Squashed 'bridges/' changes from d3970944b..2180797fb
      
      2180797fb Removed CODEOWNERS (#2051)
      
      git-subtree-dir: bridges
      git-subtree-split: 2180797fbf8a990490c67853dcffd81bc8dd083c
      
      * Squashed 'bridges/' changes from 2180797fbf..4850aac8ce
      
      4850aac8ce Removed relayer_account: &AccountId from MessageDispatch  (#2080)
      8c8adafd54 Revert "Fix max-size messages at test chains (#2064)" (#2077)
      c01a63efd8 Fixed off-by-one when confirming rewards in messages pallet (#2075)
      a298be96aa Update subxt dependencies (#2072)
      c0eef51eab Fix max-size messages at test chains (#2064)
      3a658e3697 Messages relay fixes (#2073)
      0022b5ab22 Slash relayers for invalid transactions (#2025)
      198104007f Bump enumflags2 from 0.7.5 to 0.7.7
      9229b257e5 [ci] Fix rules for docker build (#2069)
      660d791390 [ci] Update buildah command and version (#2058)
      e4535c0ca4 fix the way latest_confirmed_nonce_at_source is "calculated" (#2067)
      dbc2d37590 select nothing if we have already selected nonces to submit or have submitted something (#2065)
      a7eedd21fe [relay-substrate-client] Bump jsonrpsee (#2066)
      8875d5aeae Bump clap from 4.2.2 to 4.2.4
      25f9cf55e2 Another use of RangeInclusiveExt::checked_len() (#2060)
      4942c12a5f submit lane unblock transactions from relay (#2030)
      c0325d3c9c Test deployments fixes (#2057)
      fc7b9b7ed7 Use the new matrix server (#2056)
      63bcb5c10b Fixed delivery alert rule (#2052)
      
      git-subtree-dir: bridges
      git-subtree-split: 4850aac8ce6c34e5ca6246b88cd14c873a879cba
      
      * Squashed 'bridges/' changes from 4850aac8ce..66aaf0dd23
      
      66aaf0dd23 Nits (#2083)
      
      git-subtree-dir: bridges
      git-subtree-split: 66aaf0dd239dde40b64264061a77c921e2c82568
      
      * Squashed 'bridges/' changes from 66aaf0dd23..557ecbcecc
      
      557ecbcecc Fix sized messages (Follow-up on #2064) (#2103)
      54f587a066 Add weight of refund extension post_dispatch to the weights of messages pallet (#2089)
      5b1626f8c4 fix pallet param for nightly benchmarks check (#2099)
      ae44c6b7a1 Add millau specific messages weights (#2097)
      6ad0bd1f1e Add integrity tests to rialto parachain runtiime (#2096)
      6919556de5 Bump tokio from 1.27.0 to 1.28.0
      58795fcb75 Bump clap from 4.2.4 to 4.2.5
      01bf31085b Bump scale-info from 2.5.0 to 2.6.0
      8fe383240d Bump anyhow from 1.0.70 to 1.0.71
      8d94e82ad5 deployments: add new BEEFY metrics and alarms (#2090)
      e9a4749e7e Bump wasmtime from 6.0.1 to 6.0.2
      9d9936c0d9 Bump wasmtime from 6.0.1 to 6.0.2 in /tools/runtime-codegen
      5d77cd7bee Add more logs to relayer and message pallets (#2082)
      75fbb9d3ef Update comment (#2081)
      9904d09cf6 Benchmarks for new relayers pallet calls (#2040)
      
      git-subtree-dir: bridges
      git-subtree-split: 557ecbcecc585547b744a5ac9fb8d7f3b9de4521
      
      * fmt
      
      * Squashed 'bridges/' changes from 557ecbcecc..04b3dda6aa
      
      04b3dda6aa Remove from subtree (#2111)
      f8ff15e7e7 Add `MessagesPalletInstance` for integrity tests (#2107)
      92ccef58e6 Use generated runtimes for BHR/BHW (#2106)
      b33e0a585b Fix comment (#2105)
      
      git-subtree-dir: bridges
      git-subtree-split: 04b3dda6aa38599e612ff637710b6d2cff275ef3
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      ---------
      
      Co-authored-by: parity-processbot <>
      d810f650