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

Upgrade to polkadot v0.9.42 #995

Merged
merged 11 commits into from
Jul 12, 2023
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
3,315 changes: 1,914 additions & 1,401 deletions Cargo.lock

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ yamux = { opt-level = 3 }
zeroize = { opt-level = 3 }

[patch.crates-io]
zenlink-protocol = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-protocol-rpc = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-protocol-runtime-api = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-stable-amm = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-stable-amm-rpc = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-stable-amm-runtime-api = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
zenlink-swap-router = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "7662acbff71cea3b35db918ceb9370e8929be991" }
merkle-distributor = { git = "https://github.com/zenlinkpro/merkle-distributor", rev = "6b89911508992bef5ce9be0e92db46c1cf598353" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "f60655f922204a803ee945ffddba6ca530caffe0" }
xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator", rev = "92d371839f6d5c52dd35b7e3d61cbdefc792cc42" }
zenlink-protocol = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-protocol-rpc = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-protocol-runtime-api = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-stable-amm = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-stable-amm-rpc = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-stable-amm-runtime-api = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
zenlink-swap-router = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "c32bb5f63bcd06dc49ca8a48dd7b7a0f78c358bf" }
merkle-distributor = { git = "https://github.com/zenlinkpro/merkle-distributor", rev = "e7483e829d540993141a6b3a9a1f6ec0a06c7744" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "4ae0372e2c624e6acc98305564b9d395f70814c0" }
xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator", rev = "d011e5ca62b93e8f688c2042c1f92cdbafc5d1d0" }
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ check-all: format

.PHONY: test-all # cargo test all runtime
test-all:
SKIP_WASM_BUILD= cargo test --features "with-all-runtime"
SKIP_WASM_BUILD= cargo test --features "with-all-runtime" --lib

.PHONY: integration-test # integration test
integration-test:
Expand Down
68 changes: 34 additions & 34 deletions integration-tests/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@ hex-literal = { version = "0.3.4" }
node-primitives = { default-features = false, path = "../../node/primitives" }

# frame dependencies
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

# Cumulus dependencies
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }

# Polkadot dependencies
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }

# bifrost pallets
bifrost-asset-registry = { path = "../../pallets/asset-registry" }
Expand Down Expand Up @@ -77,14 +77,14 @@ zenlink-protocol-runtime-api = { version = "*" }
env_logger = "0.10.0"
hex = "0.4.0"

sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }

polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" }
statemine-runtime = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" }
statemine-runtime = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" }
xcm-emulator = { version = "*" }
8 changes: 4 additions & 4 deletions integration-tests/bifrost-kusama/src/asset_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ fn register_multilocation() {
RuntimeOrigin::root(),
CurrencyId::Token2(0),
Box::new(location.clone()),
Weight::from_ref_time(2000_000_000)
Weight::from_parts(2000_000_000, 0)
),
Error::<Runtime>::CurrencyIdNotExists
);
Expand All @@ -295,15 +295,15 @@ fn register_multilocation() {
RuntimeOrigin::root(),
CurrencyId::Token2(0),
Box::new(location.clone()),
Weight::from_ref_time(2000_000_000)
Weight::from_parts(2000_000_000, 0)
));

assert_noop!(
AssetRegistry::register_multilocation(
RuntimeOrigin::root(),
CurrencyId::Token2(0),
Box::new(location.clone()),
Weight::from_ref_time(2000_000_000)
Weight::from_parts(2000_000_000, 0)
),
Error::<Runtime>::CurrencyIdExisted
);
Expand All @@ -318,7 +318,7 @@ fn register_multilocation() {
);
assert_eq!(
CurrencyIdToWeights::<Runtime>::get(CurrencyId::Token2(0)),
Some(Weight::from_ref_time(2000_000_000))
Some(Weight::from_parts(2000_000_000, 0))
);
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ fn relaychain_transact_works() {
BuyExecution { fees: asset, weight_limit: Unlimited },
Transact {
origin_kind: OriginKind::SovereignAccount,
require_weight_at_most: Weight::from_ref_time(4000000000),
require_weight_at_most: Weight::from_parts(4000000000, 0),
call: transfer.encode().into(),
},
// ReportTransactStatus(QueryResponseInfo {
// destination: MultiLocation::from(X1(Parachain(2001))),
// query_id,
// max_weight: Weight::from_ref_time(4000000000),
// max_weight: Weight::from_parts(4000000000, 0),
// }),
RefundSurplus,
DepositAsset {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/bifrost-kusama/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn default_parachains_host_configuration() -> HostConfiguration<BlockNumber> {
max_upward_queue_count: 8,
max_upward_queue_size: 1024 * 1024,
max_downward_message_size: 1024,
ump_service_total_weight: Weight::from_ref_time(4 * 1_000_000_000),
ump_service_total_weight: Weight::from_parts(4 * 1_000_000_000, 0),
max_upward_message_size: 1024 * 50,
max_upward_message_num_per_candidate: 5,
hrmp_sender_deposit: 0,
Expand Down
19 changes: 8 additions & 11 deletions integration-tests/bifrost-kusama/src/slp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,18 @@ fn slp_setup() {
cross_ksm_to_bifrost(BOB, 10000 * KSM_DECIMALS);

KusamaNet::execute_with(|| {
assert_ok!(kusama_runtime::Balances::set_balance(
assert_ok!(kusama_runtime::Balances::force_set_balance(
kusama_runtime::RuntimeOrigin::root(),
sp_runtime::MultiAddress::Id(AccountId::from(KSM_DELEGATOR_0_ACCOUNT)),
10000 * KSM_DECIMALS,
0,
10000 * KSM_DECIMALS
));
});

Bifrost::execute_with(|| {
assert_ok!(Balances::set_balance(
assert_ok!(Balances::force_set_balance(
RuntimeOrigin::root(),
sp_runtime::MultiAddress::Id(AccountId::from(BIFROST_TREASURY_ACCOUNT)),
10000 * BNC_DECIMALS,
0,
10000 * BNC_DECIMALS
));
});

Expand Down Expand Up @@ -376,11 +374,10 @@ fn vksm_vtoken_minting_setup() {

fn cross_ksm_to_bifrost(to: [u8; 32], amount: u128) {
KusamaNet::execute_with(|| {
assert_ok!(kusama_runtime::Balances::set_balance(
assert_ok!(kusama_runtime::Balances::force_set_balance(
kusama_runtime::RuntimeOrigin::root(),
sp_runtime::MultiAddress::Id(AccountId::from(to)),
amount,
0,
amount
));
assert_ok!(kusama_runtime::XcmPallet::reserve_transfer_assets(
kusama_runtime::RuntimeOrigin::signed(to.into()),
Expand Down Expand Up @@ -478,7 +475,7 @@ fn transfer_to() {
KusamaNet::execute_with(|| {
assert_eq!(
kusama_runtime::Balances::free_balance(&AccountId::from(KSM_DELEGATOR_0_ACCOUNT)),
10049999909712564
10049999909994200
);
});
})
Expand Down Expand Up @@ -523,7 +520,7 @@ fn transfer_back() {
CurrencyId::Token(TokenSymbol::KSM),
&AccountId::from(EXIT_ACCOUNT)
),
49999919872000
49999929608000
);
});

Expand Down
Loading
Loading