Skip to content

Commit 32894fb

Browse files
svyatonikbkontur
authored andcommitted
XCM bridge hub pallet (will be deployed at bridge hubs) (#2213)
* XCM over bridge pallet (won't ever be merged to this repo): initial commit * try both bridge-id and lane-id * flush * flush * flush * flush * first prototype * started working on xcm-over-bridge tests * proper open_bridge_works test * more open_bridge tests * request_bridge_closure tests * tests for close_bridge * report_misbehavior tests * renaming xcm-over-bridge ad xcm-bridge-hub: we'll have two similar pallets for dynamic lanes/fees support. One will be deployed at the bridge hub (xcm-bridge-hub) and another one (xcm-bridge-hub-router) at sibling/parent chains to send messages to remote network over the bridge hub * added couple of TODOs * moved BridgeQueuesState here + TODO for implementing report_bridge_queues_state + fmt * fixing TODOs * fixing TODOs * moved bridge locations to primitives * added a couple of TODOs * ref issue from TODO * clippy and spelling * fix tests * another TODOs * typo * LaneState -> force_close_bridge * start_closing_the_bridge -> start_closing_bridge * removed Closing bridge state, so now we only have the Opened -> optional temporary Closed state -> None * spelling * started prototyping suspend+resume on misbehavior * continue prototyping * more tests for open_bridge * more tests for close_bridge * more tests for report_misbehavior * started tests for resume_misbehaving_bridges * implemented tests for resume_misbehaving_bridges * remove UnsuspendedChannelWithMisbehavingOwner because now, when all bridges are resumed at once + we assume that the inbound XCM channel is suspended immediately it is no longer actual * added TODO * add comment re misbehavior reporter if he's associated with the bridge owner * ignored clippy * fmt * use versioned XCM structs in public interfaces and storage + Box XCM locations where possible * spelling * removed TODO in favor of paritytech/parity-bridges-common#2257 * LocalChannelManager -> LocalXcmChannelManager * removed code specific to #2233, because it isn't the only option now * removemisbehavior mentions * also temporary (?) remove BridgesByLocalOrigin because the storage format will likely change to be able to resume bridges from the on_iniitalize/on_idle * AllowedOpenBridgeOrigin -> OpenBridgeOrigin * - TooManyBridgesForLocalOrigin * use bridge_destination_relative_location in args * better impl of strip_low_level_junctions * get rid of xcm_into_latest * clippy * added #![warn(missing_docs)] to new crates
1 parent 304c8f4 commit 32894fb

File tree

7 files changed

+1471
-39
lines changed

7 files changed

+1471
-39
lines changed

Cargo.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bridges/modules/xcm-bridge-hub/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ log = { workspace = true }
1616
scale-info = { version = "2.11.1", default-features = false, features = ["derive"] }
1717

1818
# Bridge Dependencies
19+
1920
bp-messages = { path = "../../primitives/messages", default-features = false }
2021
bp-runtime = { path = "../../primitives/runtime", default-features = false }
2122
bp-xcm-bridge-hub = { path = "../../primitives/xcm-bridge-hub", default-features = false }
@@ -38,6 +39,7 @@ xcm-executor = { package = "staging-xcm-executor", path = "../../../polkadot/xcm
3839
bp-header-chain = { path = "../../primitives/header-chain" }
3940
pallet-balances = { path = "../../../substrate/frame/balances" }
4041
sp-io = { path = "../../../substrate/primitives/io" }
42+
polkadot-parachain-primitives = { path = "../../../polkadot/parachain" }
4143

4244
[features]
4345
default = ["std"]

0 commit comments

Comments
 (0)