-
Notifications
You must be signed in to change notification settings - Fork 129
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
[V2 Bridges] Dynamic way of adding permissionless lanes (bridges between parachains) #2451
Comments
well, this kind of on-chain configuration, I mentioned here #2452 |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/bridge-hub-questions/2693/2 |
|
The #2213 adds initial support for dynamic lanes at bridge hub. It assumes that there's also some code at the bridge origin (currently sibling/child parachain and parent relay chain is supported). I've started prototyping this code (pallet) in #2233 - the pallet from this PR will be deployed at this bridge origin and will "talk" to the Apart from future developments, there's also unimplemented stuff in the #2213, which I'd like to tackle in a separate PRs:
|
* BlockId removal refactor: Backend::state_at * corrected * update lockfile for {"substrate", "polkadot"} Co-authored-by: parity-processbot <>
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/26 |
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/35 |
…cations (#4935) ## Summary This PR contains migrated code from the Bridges V2 [branch](#4427) from the old `parity-bridges-common` [repo](https://github.com/paritytech/parity-bridges-common/tree/bridges-v2). Even though the PR looks large, it does not (or should not) contain any significant changes (also not relevant for audit). This PR is a requirement for permissionless lanes, as they were implemented on top of these changes. ## TODO - [x] generate fresh weights for BridgeHubs - [x] run `polkadot-fellows` bridges zombienet tests with actual runtime 1.2.5. or 1.2.6 to check compatibility - ☑️ working, checked with 1.2.8 fellows BridgeHubs - [x] run `polkadot-sdk` bridges zombienet tests - ☑️ with old relayer in CI (1.6.5) - [x] run `polkadot-sdk` bridges zombienet tests (locally) - with the relayer based on this branch - paritytech/parity-bridges-common#3022 - [x] check/fix relayer companion in bridges repo - paritytech/parity-bridges-common#3022 - [x] extract pruning stuff to separate PR #4944 Relates to: paritytech/parity-bridges-common#2976 Relates to: paritytech/parity-bridges-common#2451 --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Serban Iorga <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <>
…cations (#4935) ## Summary This PR contains migrated code from the Bridges V2 [branch](#4427) from the old `parity-bridges-common` [repo](https://github.com/paritytech/parity-bridges-common/tree/bridges-v2). Even though the PR looks large, it does not (or should not) contain any significant changes (also not relevant for audit). This PR is a requirement for permissionless lanes, as they were implemented on top of these changes. ## TODO - [x] generate fresh weights for BridgeHubs - [x] run `polkadot-fellows` bridges zombienet tests with actual runtime 1.2.5. or 1.2.6 to check compatibility - ☑️ working, checked with 1.2.8 fellows BridgeHubs - [x] run `polkadot-sdk` bridges zombienet tests - ☑️ with old relayer in CI (1.6.5) - [x] run `polkadot-sdk` bridges zombienet tests (locally) - with the relayer based on this branch - paritytech/parity-bridges-common#3022 - [x] check/fix relayer companion in bridges repo - paritytech/parity-bridges-common#3022 - [x] extract pruning stuff to separate PR #4944 Relates to: paritytech/parity-bridges-common#2976 Relates to: paritytech/parity-bridges-common#2451 --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Serban Iorga <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <>
…cations (paritytech#4935) ## Summary This PR contains migrated code from the Bridges V2 [branch](paritytech#4427) from the old `parity-bridges-common` [repo](https://github.com/paritytech/parity-bridges-common/tree/bridges-v2). Even though the PR looks large, it does not (or should not) contain any significant changes (also not relevant for audit). This PR is a requirement for permissionless lanes, as they were implemented on top of these changes. ## TODO - [x] generate fresh weights for BridgeHubs - [x] run `polkadot-fellows` bridges zombienet tests with actual runtime 1.2.5. or 1.2.6 to check compatibility - ☑️ working, checked with 1.2.8 fellows BridgeHubs - [x] run `polkadot-sdk` bridges zombienet tests - ☑️ with old relayer in CI (1.6.5) - [x] run `polkadot-sdk` bridges zombienet tests (locally) - with the relayer based on this branch - paritytech/parity-bridges-common#3022 - [x] check/fix relayer companion in bridges repo - paritytech/parity-bridges-common#3022 - [x] extract pruning stuff to separate PR paritytech#4944 Relates to: paritytech/parity-bridges-common#2976 Relates to: paritytech/parity-bridges-common#2451 --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Serban Iorga <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <>
…cations (paritytech#4935) ## Summary This PR contains migrated code from the Bridges V2 [branch](paritytech#4427) from the old `parity-bridges-common` [repo](https://github.com/paritytech/parity-bridges-common/tree/bridges-v2). Even though the PR looks large, it does not (or should not) contain any significant changes (also not relevant for audit). This PR is a requirement for permissionless lanes, as they were implemented on top of these changes. ## TODO - [x] generate fresh weights for BridgeHubs - [x] run `polkadot-fellows` bridges zombienet tests with actual runtime 1.2.5. or 1.2.6 to check compatibility - ☑️ working, checked with 1.2.8 fellows BridgeHubs - [x] run `polkadot-sdk` bridges zombienet tests - ☑️ with old relayer in CI (1.6.5) - [x] run `polkadot-sdk` bridges zombienet tests (locally) - with the relayer based on this branch - paritytech/parity-bridges-common#3022 - [x] check/fix relayer companion in bridges repo - paritytech/parity-bridges-common#3022 - [x] extract pruning stuff to separate PR paritytech#4944 Relates to: paritytech/parity-bridges-common#2976 Relates to: paritytech/parity-bridges-common#2451 --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Serban Iorga <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <>
Relates to: paritytech/parity-bridges-common#2451 Closes: paritytech/parity-bridges-common#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](#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/149b0ac2ce43fba197988f2642032fa24dd8289a/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](#4427 (comment)) - [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 #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 paritytech/parity-bridges-common#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 paritytech/parity-bridges-common#2380 - [ ] check congestion around `LocalXcmChannelManager` and `OutboundLanesCongestedSignals` impls - #5551 - to be reusable for polkadot-fellows - return `report_bridge_status` was remove, so we need to `XcmpQueue` alternative? --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]>
Relates to: paritytech/parity-bridges-common#2451 Closes: paritytech/parity-bridges-common#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](#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/149b0ac2ce43fba197988f2642032fa24dd8289a/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](#4427 (comment)) - [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 #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 paritytech/parity-bridges-common#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 paritytech/parity-bridges-common#2380 - [ ] check congestion around `LocalXcmChannelManager` and `OutboundLanesCongestedSignals` impls - #5551 - to be reusable for polkadot-fellows - return `report_bridge_status` was remove, so we need to `XcmpQueue` alternative? --------- Signed-off-by: Branislav Kontur <[email protected]> Co-authored-by: Svyatoslav Nikolsky <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]>
related to https://github.com/paritytech/srlabs_findings/issues/142
Our design is to have a dedicated lane for two bridged chains (see https://github.com/paritytech/parity-bridges-common/blob/master/docs/polkadot-kusama-bridge-overview.md#connecting-parachains). E.g. Polkadot' Statemint and Kusama' Statemine will use the lane
[0, 0, 0, 0]
.Later we want to be able to connect other parachains. While we may do that by doing runtime upgrades and manually coding that, we may also have some calls for that, so that lanes may be opened without waiting for runtime upgrades.
Apart from that, we shall think of some deposit that must be paid for opening a lane. The amount of deposit may affect (or take into account) the maximal number of outbound messages for that lane. That's because parachains may just queue messages and don't run any relayer => bridge hub runtime storage will grow and storage proofs size will grow too. We may start to take some fee from deposit if messages are queued for too long and finally close the lane if deposit is depleted.
Hints:
/// TODO: rework once dynamic lanes are supported (https://github.com/paritytech/parity-bridges-common/issues/2451)
TODO
origin/bridges-v2
Split and migrateorigin/bridges-v2
branch #2976BridgeReserve
The text was updated successfully, but these errors were encountered: