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

chore: upgrade to polkadot-v0.9.10 #178

Merged
merged 3 commits into from
Oct 4, 2021
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,383 changes: 1,188 additions & 1,195 deletions Cargo.lock

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions integration-tests/Cargo.toml

Large diffs are not rendered by default.

94 changes: 46 additions & 48 deletions integration-tests/src/cross_chain_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
use crate::kusama_test_net::*;

use frame_support::assert_ok;
use polkadot_xcm::v0::{
Junction::{self, GeneralKey, Parachain, Parent},
MultiAsset::*,
MultiLocation::*,
NetworkId,
};

use polkadot_xcm::latest::prelude::*;
use polkadot_xcm::{VersionedMultiAssets, VersionedMultiLocation};

use cumulus_primitives_core::ParaId;
use orml_traits::currency::MultiCurrency;
Expand All @@ -20,22 +17,23 @@ fn transfer_from_relay_chain() {
assert_ok!(basilisk_runtime::AssetRegistry::set_location(
basilisk_runtime::Origin::root(),
1,
basilisk_runtime::AssetLocation(X1(Parent,))
basilisk_runtime::AssetLocation(MultiLocation::parent())
));
});
Kusama::execute_with(|| {
KusamaRelay::execute_with(|| {
assert_ok!(kusama_runtime::XcmPallet::reserve_transfer_assets(
kusama_runtime::Origin::signed(ALICE.into()),
X1(Parachain(2000)),
X1(Junction::AccountId32 {
id: BOB,
network: NetworkId::Any
}),
vec![ConcreteFungible {
id: Null,
amount: 3 * BSX
}],
1_600_000_000
Box::new(VersionedMultiLocation::V1(X1(Parachain(2000)).into())),
Box::new(VersionedMultiLocation::V1(
X1(Junction::AccountId32 {
id: BOB,
network: NetworkId::Any
})
.into()
)),
Box::new(VersionedMultiAssets::V1((Here, 3 * BSX).into(),)),
0,
600_000_000
));

assert_eq!(
Expand All @@ -58,20 +56,20 @@ fn transfer_to_relay_chain() {
assert_ok!(basilisk_runtime::AssetRegistry::set_location(
basilisk_runtime::Origin::root(),
1,
basilisk_runtime::AssetLocation(X1(Parent,))
basilisk_runtime::AssetLocation(MultiLocation::parent())
));

assert_ok!(basilisk_runtime::XTokens::transfer(
basilisk_runtime::Origin::signed(ALICE.into()),
1,
3 * BSX,
X2(
Parent,
Junction::AccountId32 {
Box::new(MultiLocation::new(
1,
X1(Junction::AccountId32 {
id: BOB,
network: NetworkId::Any,
}
),
})
)),
3_600_000_000
));
assert_eq!(
Expand All @@ -80,7 +78,7 @@ fn transfer_to_relay_chain() {
);
});

Kusama::execute_with(|| {
KusamaRelay::execute_with(|| {
assert_eq!(
kusama_runtime::Balances::free_balance(&AccountId::from(BOB)),
2999904000006 // 3 * BSX - fee
Expand All @@ -96,7 +94,7 @@ fn transfer_from_hydra() {
assert_ok!(basilisk_runtime::AssetRegistry::set_location(
basilisk_runtime::Origin::root(),
1,
basilisk_runtime::AssetLocation(X3(Parent, Parachain(3000), GeneralKey(vec![0, 0, 0, 0])))
basilisk_runtime::AssetLocation(MultiLocation::new(1, X2(Parachain(3000), GeneralKey(vec![0, 0, 0, 0]))))
));
});

Expand All @@ -105,14 +103,16 @@ fn transfer_from_hydra() {
basilisk_runtime::Origin::signed(ALICE.into()),
0,
3 * BSX,
X3(
Parent,
Junction::Parachain(2000),
Junction::AccountId32 {
id: BOB,
network: NetworkId::Any,
}
),
Box::new(MultiLocation::new(
1,
X2(
Junction::Parachain(2000),
Junction::AccountId32 {
id: BOB,
network: NetworkId::Any,
}
)
)),
399_600_000_000
));
assert_eq!(
Expand All @@ -128,7 +128,6 @@ fn transfer_from_hydra() {
);
});
}

#[test]
fn transfer_insufficient_amount_should_fail() {
TestNet::reset();
Expand All @@ -137,7 +136,7 @@ fn transfer_insufficient_amount_should_fail() {
assert_ok!(basilisk_runtime::AssetRegistry::set_location(
basilisk_runtime::Origin::root(),
1,
basilisk_runtime::AssetLocation(X3(Parent, Parachain(3000), GeneralKey(vec![0, 0, 0, 0])))
basilisk_runtime::AssetLocation(MultiLocation::new(1, X2(Parachain(3000), GeneralKey(vec![0, 0, 0, 0]))))
));
});

Expand All @@ -146,14 +145,16 @@ fn transfer_insufficient_amount_should_fail() {
basilisk_runtime::Origin::signed(ALICE.into()),
0,
1_000_000 - 1,
X3(
Parent,
Junction::Parachain(2000),
Junction::AccountId32 {
id: BOB,
network: NetworkId::Any,
}
),
Box::new(MultiLocation::new(
1,
X2(
Junction::Parachain(2000),
Junction::AccountId32 {
id: BOB,
network: NetworkId::Any,
}
)
)),
399_600_000_000
));
assert_eq!(
Expand All @@ -164,9 +165,6 @@ fn transfer_insufficient_amount_should_fail() {

Basilisk::execute_with(|| {
// Xcm should fail therefore nothing should be deposit into beneficiary account
assert_eq!(
basilisk_runtime::Tokens::free_balance(1, &AccountId::from(BOB)),
0
);
assert_eq!(basilisk_runtime::Tokens::free_balance(1, &AccountId::from(BOB)), 0);
});
}
5 changes: 2 additions & 3 deletions integration-tests/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use sp_runtime::traits::AccountIdConversion;
use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain};

decl_test_relay_chain! {
pub struct Kusama {
pub struct KusamaRelay {
Runtime = kusama_runtime::Runtime,
XcmConfig = kusama_runtime::XcmConfig,
new_ext = kusama_ext(),
Expand All @@ -41,7 +41,7 @@ decl_test_parachain! {

decl_test_network! {
pub struct TestNet {
relay_chain = Kusama,
relay_chain = KusamaRelay,
parachains = vec![
(2000, Basilisk),
(3000, Hydra),
Expand All @@ -66,7 +66,6 @@ fn default_parachains_host_configuration() -> HostConfiguration<BlockNumber> {
ump_service_total_weight: 4 * 1_000_000_000,
max_upward_message_size: 1024 * 1024,
max_upward_message_num_per_candidate: 5,
hrmp_open_request_ttl: 5,
hrmp_sender_deposit: 0,
hrmp_recipient_deposit: 0,
hrmp_channel_max_capacity: 8,
Expand Down
104 changes: 52 additions & 52 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,62 +33,62 @@ pallet-xyk-rpc = { path="../pallets/xyk/rpc" }
primitives = { path = "../primitives" }

# Substrate dependencies
frame-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
frame-benchmarking-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", optional = true }
pallet-transaction-payment-rpc = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-basic-authorship = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-chain-spec = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", features = ["wasmtime"] }
sc-client-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-consensus = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-consensus-aura = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-executor = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", features = ["wasmtime"] }
sc-finality-grandpa = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-keystore = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-rpc = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-rpc-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-service = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", features = ["wasmtime"] }
sc-tracing = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-telemetry = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-transaction-pool = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-transaction-pool-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-block-builder = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-blockchain = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-consensus = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-consensus-aura = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-core = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-finality-grandpa = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-inherents = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-timestamp = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-transaction-pool = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-trie = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
substrate-frame-rpc-system = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sc-network = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-keystore = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-session = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
sp-offchain = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
substrate-prometheus-endpoint = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
frame-try-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", optional = true }
try-runtime-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", optional = true }
frame-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
frame-benchmarking-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
pallet-transaction-payment-rpc = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-basic-authorship = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-chain-spec = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", features = ["wasmtime"] }
sc-client-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-consensus = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-consensus-aura = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-executor = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", features = ["wasmtime"] }
sc-finality-grandpa = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-keystore = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-rpc = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-rpc-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-service = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", features = ["wasmtime"] }
sc-tracing = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-telemetry = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-transaction-pool = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-transaction-pool-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-block-builder = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-blockchain = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-consensus = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-consensus-aura = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-core = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-finality-grandpa = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-inherents = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-timestamp = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-transaction-pool = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-trie = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
substrate-frame-rpc-system = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sc-network = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-keystore = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-session = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
sp-offchain = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
substrate-prometheus-endpoint = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }
frame-try-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }
try-runtime-cli = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", optional = true }

# Cumulus dependencies
cumulus-client-cli = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-collator = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-consensus-aura = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-consensus-relay-chain = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-consensus-common = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-network = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-service = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-primitives-core = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-primitives-parachain-inherent = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.9" }
cumulus-client-cli = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-collator = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-consensus-aura = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-consensus-relay-chain = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-consensus-common = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-network = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-client-service = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-primitives-core = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }
cumulus-primitives-parachain-inherent = { git = "/~https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.10" }

# Polkadot dependencies
polkadot-cli = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.9" }
polkadot-parachain = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.9" }
polkadot-primitives = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.9" }
polkadot-service = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.9" }
polkadot-cli = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
polkadot-parachain = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
polkadot-primitives = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }
polkadot-service = { git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.10" }

[features]
default = [
Expand Down
26 changes: 13 additions & 13 deletions pallets/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository = "/~https://github.com/galacticcouncil/basilisk-node"
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
substrate-wasm-builder = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
substrate-wasm-builder = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10" }

[dependencies]
codec = { default-features = false, features = ["derive", "max-encoded-len"], package = "parity-scale-codec", version = "2.2.0" }
Expand All @@ -23,24 +23,24 @@ serde = { features = ["derive"], optional = true, version = "1.0.101" }
primitives = { path = "../../primitives", default-features = false }

# ORML dependencies
orml-traits = { git = "/~https://github.com/open-web3-stack/open-runtime-module-library", rev = "8d5432c3458702a7df14b374bddde43a2a20aa43", default-features = false }
orml-traits = { git = "/~https://github.com/open-web3-stack/open-runtime-module-library", rev = "37e42936c41dbdbaf0117c628c9eab0e06044844", default-features = false }

# Substrate dependencies
frame-support = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
frame-system = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
sp-core = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
sp-arithmetic = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
sp-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
sp-std = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
frame-support = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
frame-system = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-core = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-arithmetic = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-runtime = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
sp-std = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }

# Optionals
frame-system-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false, optional = true }
frame-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false, optional = true }
sp-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false, optional = true }
frame-system-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false, optional = true }
frame-benchmarking = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false, optional = true }
sp-api = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false, optional = true }

[dev-dependencies]
sp-io = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
polkadot-xcm = { package = "xcm", git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.9", default-features = false }
sp-io = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.10", default-features = false }
polkadot-xcm = { package = "xcm", git = "/~https://github.com/paritytech/polkadot", branch = "release-v0.9.10", default-features = false }

[features]
default = ["std"]
Expand Down
Loading