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

cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add asset-bridging support to it #1215

Merged
merged 93 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
d6044a0
add `asset-hub-rococo-runtime` as a copy of `asset-hub-kusama-runtime`
acatangiu Sep 8, 2023
ec28f46
update new `asset-hub-rococo-runtime` with rococo-specific components
acatangiu Sep 8, 2023
b320b1f
asset-hub-rococo-runtime: add asset transfer over bridge capabilities
acatangiu Sep 8, 2023
b3c1810
asset-hub-rococo-runtime: add asset transfer over bridge tests
acatangiu Sep 8, 2023
3bc4634
fix toml formatting
acatangiu Sep 8, 2023
4eccdf4
add more tests to Bridge Hubs
acatangiu Sep 8, 2023
e3d77f8
bridge-hubs: add script for testing Rococo <> Wococo bridge
acatangiu Sep 11, 2023
52c7cd5
Do not consume `msg` on `NotApplicable` for remote exporters
bkontur Sep 12, 2023
ff2891c
Added bridging configuration + tests for AssetHubRococo vs AssetHubWo…
bkontur Sep 13, 2023
4f0776d
Merge remote-tracking branch 'origin/master' into bko-asset-hub-rococ…
bkontur Sep 13, 2023
f18f146
".git/.scripts/commands/fmt/fmt.sh"
Sep 13, 2023
a717e91
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 13, 2023
754ed42
Added `asset-hub-(r/w)ococo` to `polkadot-parachain`
bkontur Sep 13, 2023
ddc09d3
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 13, 2023
03b1bb4
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 14, 2023
00cfa54
Finished local run asset transfer for AssetHubRococo/AssetHubWococo
bkontur Sep 14, 2023
116010f
Zombienet tweaks
bkontur Sep 14, 2023
ab648a5
Just paid `ExportMessage` on BridgeHubRococo/BridgeHubWococo
bkontur Sep 15, 2023
b78343b
Added congestion to BridgeHubs + nits
bkontur Sep 15, 2023
3f3081b
fix typos
acatangiu Sep 15, 2023
5d318c5
Typo
bkontur Sep 15, 2023
85b7f84
Fixed benchmarks for asset-hub-rococo
bkontur Sep 15, 2023
642e29e
Tweaks to BridgeHubRococo
bkontur Sep 15, 2023
09e8c15
From PR review
bkontur Sep 15, 2023
bc44872
xcm-emulator nits
bkontur Sep 15, 2023
8df113a
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 15, 2023
d64d1fc
Fix features
bkontur Sep 15, 2023
b20c353
Fixed
bkontur Sep 15, 2023
d04bf3a
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 19, 2023
9f0d255
Fix for benchmarks
bkontur Sep 19, 2023
1faec85
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Sep 19, 2023
76e513d
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 19, 2023
99e001c
Added xcm-emulator integration test for AssetHubRococo (as copy of As…
bkontur Sep 20, 2023
3a0b3c1
Addressing pr comments for xcmp-queue
bkontur Sep 21, 2023
791b88a
Added test for `AllowUnpaidTransactsFrom`
bkontur Sep 21, 2023
a4f3f4e
Nit
bkontur Sep 21, 2023
a4ef4f5
Simplify Location and AssetFilter
bkontur Sep 21, 2023
713d7ad
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 21, 2023
33b672c
fmt
bkontur Sep 21, 2023
474b8a4
ensure_configuration -> prepare_configuration
bkontur Sep 22, 2023
b500fbc
Constants nit
bkontur Sep 22, 2023
d4dc7c8
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 25, 2023
559b954
Add claiming relayer rewards to Ro/Wo demo
bkontur Sep 27, 2023
89fc271
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 27, 2023
6e7e53d
Deduplicate with `build_congestion_message`
bkontur Sep 27, 2023
7cbfbb2
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 27, 2023
42d6fe4
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 3, 2023
132c5a0
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 4, 2023
94619d7
Compile
bkontur Oct 5, 2023
5f785b6
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 5, 2023
58c4089
Fix to compile
bkontur Oct 5, 2023
14c2855
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 5, 2023
653b9fb
Add filtering capabilities for remote location to `NetworkExportTable`
bkontur Oct 11, 2023
62bbee0
Expose `BridgeMessage` field as `pub` because it cannot be access out…
bkontur Oct 11, 2023
19381bd
Move `StartsWith` and `Equals` to `xcm-builder`
bkontur Oct 11, 2023
255595e
Refactored and simplified xcm stuff
bkontur Oct 11, 2023
ecf0688
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 11, 2023
1269bd7
Fix import
bkontur Oct 11, 2023
8dcca0f
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 11, 2023
c7b1625
Added generic `EqualsTo` implementation for `frame_support::traits::C…
bkontur Oct 11, 2023
296dc1c
Merge remote-tracking branch 'origin/master' into bko-xcm-builder-enh…
bkontur Oct 11, 2023
889e9e2
Removed import
bkontur Oct 11, 2023
e95ec38
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 11, 2023
04cabcd
More fixes
bkontur Oct 12, 2023
5fdd787
PR comments + added `LocationWithAssetFilters` useful for `XcmTelepor…
bkontur Oct 13, 2023
ea0997b
PR comments
bkontur Oct 14, 2023
668756d
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 15, 2023
fa87f2a
Removed unnecessary import
bkontur Oct 15, 2023
65761b5
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 15, 2023
6c087c2
Update cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
bkontur Oct 15, 2023
4d07d71
Removed unnecessary import
bkontur Oct 15, 2023
39a227f
Fmt
bkontur Oct 15, 2023
0cfd718
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 15, 2023
34a438d
Update cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
bkontur Oct 16, 2023
2555615
PR comments - removed `FellowsBodyId`
bkontur Oct 16, 2023
3ade1cf
Doc
bkontur Oct 16, 2023
3089154
Serban's nit + test
bkontur Oct 16, 2023
2c04796
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 16, 2023
79f6794
Removed comment
bkontur Oct 16, 2023
98efacd
Changed `RuntimeVersion` to be compatible with live Rococo' AssetHub …
bkontur Oct 16, 2023
c26fde1
Typo
bkontur Oct 16, 2023
be2210a
PR comments - Added `UnpaidExecution` + refactor of `AllowTransactsFrom`
bkontur Oct 16, 2023
49d45ba
Removed unnecessary barrier `AllowTransactsFrom`
bkontur Oct 16, 2023
2c32b43
Update polkadot/xcm/xcm-builder/src/universal_exports.rs
bkontur Oct 17, 2023
ee1d681
PR comment - case with payment to the test
bkontur Oct 17, 2023
cfa2616
Merge remote-tracking branch 'origin/master' into bko-xcm-builder-enh…
bkontur Oct 17, 2023
4941b44
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 17, 2023
e82b712
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
0887912
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
2ddf42e
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
f98ee90
Merge branch 'master' of github.com:paritytech/polkadot-sdk into asse…
acatangiu Oct 17, 2023
1fb29e8
AssetHub Rococo: make all SPs trusted teleporters
acatangiu Oct 17, 2023
5392057
Merge branch 'master' into asset-hub-rococo-runtime
acatangiu Oct 18, 2023
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
Prev Previous commit
Next Next commit
xcm-emulator nits
  • Loading branch information
bkontur committed Sep 15, 2023
commit bc44872ad51d5c2ef559e0a573f36a15448fa757
1 change: 1 addition & 0 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cumulus-primitives-core = { path = "../../../../primitives/core" }
penpal-runtime = { path = "../../../runtimes/testing/penpal" }
asset-hub-polkadot-runtime = { path = "../../../runtimes/assets/asset-hub-polkadot" }
asset-hub-kusama-runtime = { path = "../../../runtimes/assets/asset-hub-kusama" }
asset-hub-rococo-runtime = { path = "../../../runtimes/assets/asset-hub-rococo" }
asset-hub-westend-runtime = { path = "../../../runtimes/assets/asset-hub-westend" }
collectives-polkadot-runtime = { path = "../../../runtimes/collectives/collectives-polkadot" }
bridge-hub-kusama-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-kusama" }
Expand All @@ -64,6 +65,7 @@ bridge-runtime-common = { path = "../../../../../bridges/bin/runtime-common" }
runtime-benchmarks = [
"asset-hub-kusama-runtime/runtime-benchmarks",
"asset-hub-polkadot-runtime/runtime-benchmarks",
"asset-hub-rococo-runtime/runtime-benchmarks",
"asset-hub-westend-runtime/runtime-benchmarks",
"bridge-hub-kusama-runtime/runtime-benchmarks",
"bridge-hub-polkadot-runtime/runtime-benchmarks",
Expand Down
112 changes: 112 additions & 0 deletions cumulus/parachains/integration-tests/emulated/common/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,118 @@ pub mod asset_hub_kusama {
}
}

pub mod asset_hub_rococo {
use super::*;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = parachains_common::rococo::currency::EXISTENTIAL_DEPOSIT;

pub fn genesis() -> Storage {
let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig {
system: asset_hub_rococo_runtime::SystemConfig {
code: asset_hub_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
..Default::default()
},
balances: asset_hub_rococo_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096))
.collect(),
},
parachain_info: asset_hub_rococo_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: asset_hub_rococo_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables()
.iter()
.cloned()
.map(|(acc, _)| acc)
.collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: asset_hub_rococo_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
asset_hub_rococo_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
},
polkadot_xcm: asset_hub_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};

genesis_config.build_storage().unwrap()
}
}

pub mod asset_hub_wococo {
use super::*;
pub const PARA_ID: u32 = 1000;
pub const ED: Balance = parachains_common::wococo::currency::EXISTENTIAL_DEPOSIT;

pub fn genesis() -> Storage {
let genesis_config = asset_hub_rococo_runtime::RuntimeGenesisConfig {
system: asset_hub_rococo_runtime::SystemConfig {
code: asset_hub_rococo_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
..Default::default()
},
balances: asset_hub_rococo_runtime::BalancesConfig {
balances: accounts::init_balances()
.iter()
.cloned()
.map(|k| (k, ED * 4096))
.collect(),
},
parachain_info: asset_hub_rococo_runtime::ParachainInfoConfig {
parachain_id: PARA_ID.into(),
..Default::default()
},
collator_selection: asset_hub_rococo_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables()
.iter()
.cloned()
.map(|(acc, _)| acc)
.collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: asset_hub_rococo_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
asset_hub_rococo_runtime::SessionKeys { aura }, // session keys
)
})
.collect(),
},
polkadot_xcm: asset_hub_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};

genesis_config.build_storage().unwrap()
}
}

// Penpal
pub mod penpal {
use super::*;
Expand Down
79 changes: 41 additions & 38 deletions cumulus/parachains/integration-tests/emulated/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ pub mod xcm_helpers;

use constants::{
accounts::{ALICE, BOB},
asset_hub_kusama, asset_hub_polkadot, asset_hub_westend, bridge_hub_kusama,
bridge_hub_polkadot, bridge_hub_rococo, collectives, kusama, penpal, polkadot, rococo, westend,
asset_hub_kusama, asset_hub_polkadot, asset_hub_rococo, asset_hub_westend, asset_hub_wococo,
bridge_hub_kusama, bridge_hub_polkadot, bridge_hub_rococo, collectives, kusama, penpal,
polkadot, rococo, westend,
};
use impls::{RococoWococoMessageHandler, WococoRococoMessageHandler};

Expand Down Expand Up @@ -327,29 +328,47 @@ decl_test_parachains! {
Balances: bridge_hub_rococo_runtime::Balances,
}
},
// AssetHubRococo (aka Rockmine/Rockmine2) mirrors AssetHubKusama
// AssetHubRococo
pub struct AssetHubRococo {
genesis = asset_hub_kusama::genesis(),
genesis = asset_hub_rococo::genesis(),
on_init = {
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
asset_hub_rococo_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_kusama_runtime,
runtime = asset_hub_rococo_runtime,
core = {
XcmpMessageHandler: asset_hub_kusama_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_kusama_runtime::DmpQueue,
LocationToAccountId: asset_hub_kusama_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_kusama_runtime::ParachainInfo,
XcmpMessageHandler: asset_hub_rococo_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_rococo_runtime::DmpQueue,
LocationToAccountId: asset_hub_rococo_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_rococo_runtime::ParachainInfo,
},
pallets = {
PolkadotXcm: asset_hub_kusama_runtime::PolkadotXcm,
Assets: asset_hub_kusama_runtime::Assets,
PolkadotXcm: asset_hub_rococo_runtime::PolkadotXcm,
Assets: asset_hub_rococo_runtime::Assets,
}
},
pub struct PenpalRococoA {
genesis = penpal::genesis(penpal::PARA_ID_A),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
},
runtime = penpal_runtime,
core = {
XcmpMessageHandler: penpal_runtime::XcmpQueue,
DmpMessageHandler: penpal_runtime::DmpQueue,
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
ParachainInfo: penpal_runtime::ParachainInfo,
},
pallets = {
PolkadotXcm: penpal_runtime::PolkadotXcm,
Assets: penpal_runtime::Assets,
}
},
// Wococo Parachains
pub struct BridgeHubWococo {
genesis = bridge_hub_rococo::genesis(),
on_init = {
bridge_hub_rococo_runtime::AuraExt::on_initialize(1);
// TODO: manage to set_wococo_flavor with `set_storage`
},
runtime = bridge_hub_rococo_runtime,
core = {
Expand All @@ -363,37 +382,21 @@ decl_test_parachains! {
}
},
pub struct AssetHubWococo {
genesis = asset_hub_polkadot::genesis(),
on_init = {
asset_hub_polkadot_runtime::AuraExt::on_initialize(1);
},
runtime = asset_hub_polkadot_runtime,
core = {
XcmpMessageHandler: asset_hub_polkadot_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_polkadot_runtime::DmpQueue,
LocationToAccountId: asset_hub_polkadot_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_polkadot_runtime::ParachainInfo,
},
pallets = {
PolkadotXcm: asset_hub_polkadot_runtime::PolkadotXcm,
Assets: asset_hub_polkadot_runtime::Assets,
}
},
pub struct PenpalRococoA {
genesis = penpal::genesis(penpal::PARA_ID_A),
genesis = asset_hub_wococo::genesis(),
on_init = {
penpal_runtime::AuraExt::on_initialize(1);
asset_hub_rococo_runtime::AuraExt::on_initialize(1);
// TODO: manage to set_wococo_flavor with `set_storage`
},
runtime = penpal_runtime,
runtime = asset_hub_rococo_runtime,
core = {
XcmpMessageHandler: penpal_runtime::XcmpQueue,
DmpMessageHandler: penpal_runtime::DmpQueue,
LocationToAccountId: penpal_runtime::xcm_config::LocationToAccountId,
ParachainInfo: penpal_runtime::ParachainInfo,
XcmpMessageHandler: asset_hub_rococo_runtime::XcmpQueue,
DmpMessageHandler: asset_hub_rococo_runtime::DmpQueue,
LocationToAccountId: asset_hub_rococo_runtime::xcm_config::LocationToAccountId,
ParachainInfo: asset_hub_rococo_runtime::ParachainInfo,
},
pallets = {
PolkadotXcm: penpal_runtime::PolkadotXcm,
Assets: penpal_runtime::Assets,
PolkadotXcm: asset_hub_rococo_runtime::PolkadotXcm,
Assets: asset_hub_rococo_runtime::Assets,
}
}
}
Expand Down