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

Added Polkadot <> Kusama bridge configuration #108

Merged
merged 76 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
014dbe9
add bridging stuff to Kusama Bridge Hub
svyatonik Nov 2, 2023
7a5d3ce
add bridging stuff to Polkadot Bridge Hub
svyatonik Nov 2, 2023
d54a80e
add bridging stuff to Kusama Asset Hub
svyatonik Nov 2, 2023
82cf606
add bridging stuff to Polkadot Asset Hub
svyatonik Nov 2, 2023
601c8b9
Allow `initialize` bridge
bkontur Nov 7, 2023
7fd0081
Add `BridgeHub` to the trusted teleporters for relaychain.
bkontur Nov 8, 2023
51d2501
Moved in `bp-bridge-hub-kusama` and `bp-bridge-hub-cumulus`
bkontur Nov 9, 2023
9f435e7
Bring in `bp-bridge-hub-polkadot`
bkontur Nov 9, 2023
2516bb8
Bring in `bp-asset-hub-kusama` and `bp-asset-hub-polkadot`
bkontur Nov 9, 2023
f48d8de
use bp-bridge-hub-cumulus instead of local bridge-hub-common
svyatonik Nov 9, 2023
64a61ce
post-rebase fixes
svyatonik Nov 10, 2023
335449f
tune balance - otherwise msg is rejected by source BH. Should be fixe…
svyatonik Nov 10, 2023
82235f8
change weight of reserve_asset_deposited from 500_000_000_000 to 20_0…
svyatonik Nov 10, 2023
6bfb2b5
moved (un)CongestedMessage to local primitives crates
svyatonik Nov 10, 2023
9735c10
fmt
svyatonik Nov 10, 2023
fee80e4
compilation
svyatonik Nov 10, 2023
adf283f
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
50c1807
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
53079ea
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
b0cbbc1
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
9b7ee3f
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
088b476
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
eec040b
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
016a5f0
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
12a03d3
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
e92ad1a
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
af9cc41
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
6294cb7
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
4ca9230
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
0e1c7e6
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
0684d04
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
0ca25eb
../polkadot-sdk/target/release/polkadot-parachain-benchmarks benchmar…
svyatonik Nov 13, 2023
33ae2eb
fix compilation + added missing benchmark configuration params + rege…
svyatonik Nov 13, 2023
1392e48
fix benchmarks + scripts
svyatonik Nov 13, 2023
bd85ce1
tests fixes
svyatonik Nov 13, 2023
8968afc
updated weights
svyatonik Nov 13, 2023
7dbc1eb
fixed invalid reference + wrong BridgeHubPolkadotBaseXcmFeeInDots con…
svyatonik Nov 13, 2023
7f0f216
use real (without some components though) delivery fee on AH
svyatonik Nov 13, 2023
30072f5
typo
svyatonik Nov 13, 2023
01304bf
all AH tests are working
svyatonik Nov 13, 2023
5879dd8
post-cherry fixes
svyatonik Nov 30, 2023
cafa490
added benchmarks for brdige router pallet
svyatonik Nov 30, 2023
89cb190
added weights for xcm bridge houter pallet
svyatonik Nov 30, 2023
3cd7b26
use fresh weights in pallet configuration
svyatonik Nov 30, 2023
70048d7
fix update-weights.sh
svyatonik Nov 30, 2023
8798ddd
cleanup
svyatonik Nov 30, 2023
1cbc165
benchmark results from ref hardware
svyatonik Nov 30, 2023
8767702
final bridge fees
svyatonik Nov 30, 2023
6748c96
removed tessts body + left comments
svyatonik Nov 30, 2023
7081b8b
removed TODO
svyatonik Nov 30, 2023
45f6e1e
fixed last TODO
svyatonik Nov 30, 2023
b5d9717
fix compilation
svyatonik Dec 1, 2023
a017db2
removed test files
svyatonik Dec 1, 2023
474fbdc
fixed rate conversion based on EDs
svyatonik Dec 1, 2023
f02d3ed
clippy
svyatonik Dec 1, 2023
258ecfb
move base bridge fee computations to primitives
svyatonik Dec 1, 2023
60e0412
regenerate weights using production profile
svyatonik Dec 5, 2023
44009e5
updated fee-related constants
svyatonik Dec 5, 2023
21bd0df
updated comments
svyatonik Dec 5, 2023
0f0b446
updated comments
svyatonik Dec 8, 2023
05d1d3c
.all(...) || .all(...) ---> .all(... || ...)
svyatonik Dec 8, 2023
12b672f
added comments to fix references+tests after another dependencies bump
svyatonik Dec 12, 2023
80da14f
indices of router pallet: change from 43 to 34
svyatonik Dec 12, 2023
e90daad
Merge remote-tracking branch 'origin/main' into sv-pk-bridge
svyatonik Dec 13, 2023
fe18826
added bridge mention to changelog
svyatonik Dec 13, 2023
3ea9722
fmt
svyatonik Dec 13, 2023
a312317
-unused import
svyatonik Dec 13, 2023
7594f02
allow relay chain governance to halt and resume bridge pallets
svyatonik Dec 14, 2023
9542090
update bridge fees using last changes in tests + estimations
svyatonik Dec 15, 2023
2d2c25b
Merge remote-tracking branch 'polkadot-fellows/main' into sv-pk-bridge
bkontur Jan 8, 2024
7281a23
Update system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs
bkontur Jan 8, 2024
987c181
Update system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
bkontur Jan 8, 2024
6eb9d42
Update system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs
bkontur Jan 8, 2024
70f0a20
Update system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src…
bkontur Jan 8, 2024
ba94fff
fmt
bkontur Jan 8, 2024
b26a5be
fix
bkontur Jan 8, 2024
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
215 changes: 186 additions & 29 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ members = [
"relay/polkadot",
"relay/polkadot/constants",
"system-parachains/asset-hubs/asset-hub-kusama",
"system-parachains/asset-hubs/asset-hub-kusama/primitives",
"system-parachains/asset-hubs/asset-hub-polkadot",
"system-parachains/asset-hubs/asset-hub-polkadot/primitives",
"system-parachains/bridge-hubs/bridge-hub-kusama",
"system-parachains/bridge-hubs/bridge-hub-kusama/primitives",
"system-parachains/bridge-hubs/bridge-hub-polkadot",
"system-parachains/bridge-hubs/bridge-hub-polkadot/primitives",
"system-parachains/collectives/collectives-polkadot",
"system-parachains/gluttons/glutton-kusama",
]
Expand Down
60 changes: 30 additions & 30 deletions relay/kusama/src/weights/pallet_xcm_benchmarks_generic.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions relay/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ parameter_types! {
pub const KsmForBridgeHub: (MultiAssetFilter, MultiLocation) = (Ksm::get(), BridgeHubLocation::get());
pub const MaxAssetsIntoHolding: u32 = 64;
}

/// Kusama Relay recognizes/respects AssetHub, Encointer and BridgeHub chains as teleporters.
pub type TrustedTeleporters = (
xcm_builder::Case<KsmForAssetHub>,
xcm_builder::Case<KsmForEncointer>,
Expand Down
2 changes: 1 addition & 1 deletion relay/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ parameter_types! {
pub const MaxAssetsIntoHolding: u32 = 64;
}

/// Polkadot Relay recognizes/respects the asset hub chain as a teleporter.
/// Polkadot Relay recognizes/respects AssetHub, Collectives and BridgeHub chains as teleporters.
pub type TrustedTeleporters = (
xcm_builder::Case<DotForAssetHub>,
xcm_builder::Case<DotForCollectives>,
Expand Down
24 changes: 22 additions & 2 deletions system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
smallvec = "1.11.0"

# Local
bp-asset-hub-kusama = { path = "./primitives", default-features = false}
bp-asset-hub-polkadot = { path = "../asset-hub-polkadot/primitives", default-features = false}
bp-bridge-hub-kusama = { path = "../../bridge-hubs/bridge-hub-kusama/primitives", default-features = false}
bp-bridge-hub-polkadot = { path = "../../bridge-hubs/bridge-hub-polkadot/primitives", default-features = false}
kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false}
polkadot-runtime-constants = { path = "../../../relay/polkadot/constants", default-features = false}

# Substrate
frame-benchmarking = { default-features = false, optional = true, version = "25.0.0" }
frame-executive = { default-features = false, version = "25.0.0" }
Expand Down Expand Up @@ -59,7 +67,6 @@ sp-weights = { default-features = false, version = "24.0.0" }
primitive-types = { version = "0.12.2", default-features = false, features = ["codec", "scale-info", "num-traits"] }

# Polkadot
kusama-runtime-constants = { path = "../../../relay/kusama/constants", default-features = false}
pallet-xcm = { default-features = false, version = "4.0.0" }
pallet-xcm-benchmarks = { default-features = false, optional = true , version = "4.0.0" }
polkadot-core-primitives = { default-features = false, version = "4.0.0" }
Expand All @@ -75,16 +82,21 @@ cumulus-pallet-dmp-queue = { default-features = false , version = "0.4.0" }
cumulus-pallet-parachain-system = { default-features = false, features = ["parameterized-consensus-hook",] , version = "0.4.0" }
cumulus-pallet-session-benchmarking = { default-features = false, version = "6.0.0" }
cumulus-pallet-xcm = { default-features = false , version = "0.4.0" }
cumulus-pallet-xcmp-queue = { default-features = false , version = "0.4.0" }
cumulus-pallet-xcmp-queue = { default-features = false , features = ["bridging"] , version = "0.4.0" }
cumulus-primitives-core = { default-features = false , version = "0.4.0" }
cumulus-primitives-utility = { default-features = false , version = "0.4.0" }
pallet-collator-selection = { default-features = false , version = "6.0.0" }
parachain-info = { package = "staging-parachain-info", default-features = false , version = "0.4.0" }
parachains-common = { default-features = false , version = "4.0.0" }
assets-common = { default-features = false , version = "0.4.0" }

# Bridges
pallet-xcm-bridge-hub-router = { default-features = false , version = "0.2.0" }

[dev-dependencies]
asset-test-utils = { version = "4.0.0" }
parachains-runtimes-test-utils = { version = "4.0.0" }
sp-io = { version = "27.0.0" }

[build-dependencies]
substrate-wasm-builder = { optional = true , version = "14.0.0" }
Expand Down Expand Up @@ -122,6 +134,7 @@ runtime-benchmarks = [
"pallet-uniques/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm-benchmarks/runtime-benchmarks",
"pallet-xcm-bridge-hub-router/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-runtime-common/runtime-benchmarks",
Expand Down Expand Up @@ -156,13 +169,18 @@ try-runtime = [
"pallet-transaction-payment/try-runtime",
"pallet-uniques/try-runtime",
"pallet-utility/try-runtime",
"pallet-xcm-bridge-hub-router/try-runtime",
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
"polkadot-runtime-common/try-runtime",
"sp-runtime/try-runtime",
]
std = [
"assets-common/std",
"bp-asset-hub-kusama/std",
"bp-bridge-hub-kusama/std",
"bp-asset-hub-polkadot/std",
"bp-bridge-hub-polkadot/std",
"codec/std",
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-dmp-queue/std",
Expand Down Expand Up @@ -201,12 +219,14 @@ std = [
"pallet-uniques/std",
"pallet-utility/std",
"pallet-xcm-benchmarks?/std",
"pallet-xcm-bridge-hub-router/std",
"pallet-xcm/std",
"parachain-info/std",
"parachains-common/std",
"polkadot-core-primitives/std",
"polkadot-parachain-primitives/std",
"polkadot-runtime-common/std",
"polkadot-runtime-constants/std",
"scale-info/std",
"sp-api/std",
"sp-block-builder/std",
Expand Down
Loading