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

Hacky quick upgrade to 0.9.29 #38

Merged
merged 4 commits into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
toolchain: nightly-2022-05-04
toolchain: nightly-2022-05-15
components: rustfmt
target: wasm32-unknown-unknown
default: true
Expand Down
610 changes: 326 additions & 284 deletions Cargo.lock

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions xcm-emulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ codec = { package = "parity-scale-codec", version = "3.0.0" }
paste = "1.0.5"
quote = "1.0.20"

frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }

xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
28 changes: 14 additions & 14 deletions xcm-emulator/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ serde = { version = "1.0.137", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
proc-macro2 = "1.0.40"

frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" }

cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" }

xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" }

xcm-emulator = { path = "../" }
yayoi = { path = "../yayoi" }
4 changes: 2 additions & 2 deletions xcm-emulator/example/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use frame_support::traits::GenesisBuild;
use frame_support::{pallet_prelude::Weight, traits::GenesisBuild};
use sp_runtime::AccountId32;

use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain};
Expand Down Expand Up @@ -98,7 +98,7 @@ fn default_parachains_host_configuration(
max_upward_queue_count: 8,
max_upward_queue_size: 1024 * 1024,
max_downward_message_size: 1024,
ump_service_total_weight: 4 * 1_000_000_000,
ump_service_total_weight: Weight::from_ref_time(4 * 1_000_000_000),
max_upward_message_size: 50 * 1024,
max_upward_message_num_per_candidate: 5,
hrmp_sender_deposit: 0,
Expand Down
7 changes: 4 additions & 3 deletions xcm-emulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub use frame_support::{
weights::Weight,
};
pub use frame_system;
pub use sp_arithmetic::traits::Bounded;
pub use sp_io::TestExternalities;
pub use sp_std::{cell::RefCell, collections::vec_deque::VecDeque, marker::PhantomData};

Expand Down Expand Up @@ -339,7 +340,7 @@ macro_rules! decl_test_network {
}

fn _process_downward_messages() {
use $crate::DmpMessageHandler;
use $crate::{DmpMessageHandler, Bounded};
use polkadot_parachain::primitives::RelayChainBlockNumber;

while let Some((to_para_id, messages))
Expand Down Expand Up @@ -370,7 +371,7 @@ macro_rules! decl_test_network {
}

fn _process_horizontal_messages() {
use $crate::XcmpMessageHandler;
use $crate::{XcmpMessageHandler, Bounded};

while let Some((to_para_id, messages))
= $crate::HORIZONTAL_MESSAGES.with(|b| b.borrow_mut().pop_front()) {
Expand All @@ -387,7 +388,7 @@ macro_rules! decl_test_network {
}

fn _process_upward_messages() {
use $crate::UmpSink;
use $crate::{UmpSink, Bounded};
while let Some((from_para_id, msg)) = $crate::UPWARD_MESSAGES.with(|b| b.borrow_mut().pop_front()) {
let _ = <$relay_chain>::process_upward_message(
from_para_id.into(),
Expand Down
38 changes: 19 additions & 19 deletions xcm-emulator/yayoi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ serde = { version = "1.0.137", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.1", default-features = false, features = ["derive"] }

sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" }

cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }
parachain-info = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" }

xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions xcm-emulator/yayoi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub type XcmOriginToCallOrigin = (
);

parameter_types! {
pub const UnitWeightCost: Weight = 10;
pub const UnitWeightCost: u64 = 10;
pub const MaxInstructions: u32 = 100;
}

Expand Down Expand Up @@ -133,8 +133,8 @@ impl Config for XcmConfig {
}

parameter_types! {
pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4;
pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4;
pub ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4;
pub ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4;
}

impl cumulus_pallet_parachain_system::Config for Runtime {
Expand Down