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.29 #571

Merged
merged 47 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
203a9dc
upgrade to polkadot-v0.9.29
enthusiastmartin Oct 30, 2022
17fbf3e
fix lbp tests
enthusiastmartin Oct 30, 2022
66924ec
Merge branch 'master' into polkadot-v0.9.29
enthusiastmartin Oct 31, 2022
61d0106
use latest commits
enthusiastmartin Oct 31, 2022
d51f3f1
fix lbp integration tests
dmoka Oct 31, 2022
d911bdd
formatting
dmoka Oct 31, 2022
a215020
fixed lbp unit tests - event ordering and amount changes due to bette…
dmoka Oct 31, 2022
79beadb
fix missing invert tests
dmoka Oct 31, 2022
a983bd0
update marketplace migration
Roznovjak Oct 31, 2022
bdca9f0
fix xyk-lm migration
enthusiastmartin Nov 1, 2022
3fab7ba
use patch polkadot
enthusiastmartin Nov 1, 2022
d79c1c8
remove exchange pallet
enthusiastmartin Nov 1, 2022
a687ea5
remove redundant into
enthusiastmartin Nov 1, 2022
dab076b
happy clippy happy life
enthusiastmartin Nov 1, 2022
af1615c
Merge branch 'master' into polkadot-v0.9.29
enthusiastmartin Nov 1, 2022
1c7b837
remove offchain duster unused pallet
enthusiastmartin Nov 1, 2022
9b7ee14
bump versions
enthusiastmartin Nov 1, 2022
ffac16b
add missing check for max_royalty to migration
Roznovjak Nov 1, 2022
91240aa
bump crate version
Roznovjak Nov 1, 2022
07ea4b6
remove try runtime from testing runtime
enthusiastmartin Nov 1, 2022
79a5670
add try-runtime features to pallets
enthusiastmartin Nov 2, 2022
dda6613
fix build with try-runtime features
enthusiastmartin Nov 2, 2022
68df9b6
Merge branch 'master' into polkadot-v0.9.29
enthusiastmartin Nov 2, 2022
d3edbda
update integration tests new package to 29
enthusiastmartin Nov 2, 2022
8e79617
formatting
enthusiastmartin Nov 2, 2022
ccb6c89
formatting strikes back
enthusiastmartin Nov 2, 2022
a683320
package version police warning
enthusiastmartin Nov 2, 2022
eea440d
fix parachain mock runtime weights
enthusiastmartin Nov 2, 2022
00288dc
fix lbp benchmark tests
enthusiastmartin Nov 2, 2022
af2741e
upgrade the remaining 28 references
enthusiastmartin Nov 2, 2022
e7870bb
remove XYK and LBP rpcs
enthusiastmartin Nov 2, 2022
09a6501
happy clippy happy life
enthusiastmartin Nov 2, 2022
3f5518b
Merge branch 'master' into polkadot-v0.9.29
enthusiastmartin Nov 2, 2022
b38cc1a
update weights
enthusiastmartin Nov 2, 2022
c24d8cc
updated fees in tegration tests
martinfridrich Nov 2, 2022
5036501
Merge branch 'feat/marketplace_migration' into polkadot-v0.9.29
mrq1911 Nov 3, 2022
24bfd86
lock
mrq1911 Nov 3, 2022
a1d4fb4
rich knows
mrq1911 Nov 3, 2022
4524bd7
merge fix
mrq1911 Nov 3, 2022
ef05714
fmt
mrq1911 Nov 3, 2022
6e3c9ab
fixed runtime upgrade test
mrq1911 Nov 3, 2022
9d45852
keeping AllPalletsReversedWithSystemFirst
mrq1911 Nov 3, 2022
33571da
add additional check and logs to marketplace migration
Roznovjak Nov 3, 2022
e0edf6d
formatting
Roznovjak Nov 3, 2022
fc00c70
refactor marketplace migration
Roznovjak Nov 3, 2022
8c6df9a
update marketplace migration to deal with invalid values
Roznovjak Nov 3, 2022
050809f
formatting
Roznovjak Nov 3, 2022
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
1,157 changes: 530 additions & 627 deletions Cargo.lock

Large diffs are not rendered by default.

345 changes: 172 additions & 173 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ coverage:

.PHONY: clippy
clippy:
cargo clippy --release --locked --all-targets --all-features -- -D warnings
cargo clippy --release --locked --all-targets --all-features -- -D warnings -A deprecated

.PHONY: format
format:
Expand Down
151 changes: 73 additions & 78 deletions integration-tests/Cargo.toml

Large diffs are not rendered by default.

154 changes: 74 additions & 80 deletions integration-tests/parachain-runtime-mock/Cargo.toml

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions integration-tests/parachain-runtime-mock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ use polkadot_xcm::prelude::MultiLocation;
use sp_arithmetic::FixedU128;
use sp_runtime::traits::AccountIdConversion;

use polkadot_xcm::latest::Weight as XcmWeight;

use basilisk_runtime::{AdjustmentVariable, MinimumMultiplier, TargetBlockFullness, WeightToFee};

pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
Expand All @@ -66,22 +68,22 @@ parameter_types! {
pub const ExistentialDeposit: u128 = 500;
pub const MaxReserves: u32 = 50;
pub const RelayNetwork: NetworkId = NetworkId::Kusama;
pub const UnitWeightCost: Weight = 10;
pub const UnitWeightCost: XcmWeight = 10;
pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
pub const MaxInstructions: u32 = 100;
pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
pub BlockLength: frame_system::limits::BlockLength =
frame_system::limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4;
pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4;
pub const ReservedXcmpWeight: Weight = Weight::from_ref_time(WEIGHT_PER_SECOND.ref_time() / 4);
pub const ReservedDmpWeight: Weight =Weight::from_ref_time(WEIGHT_PER_SECOND.ref_time() / 4);
pub RegistryStringLimit: u32 = 100;
pub const NativeAssetId : AssetId = CORE_ASSET_ID;
pub const TreasuryPalletId: PalletId = PalletId(*b"aca/trsy");
pub ParachainTreasuryAccount: AccountId = TreasuryPalletId::get().into_account_truncating();
pub KsmPerSecond: (AssetId, u128) = (0, 10);
pub BaseRate: u128 = 100;
pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
pub const BaseXcmWeight: Weight = 100_000_000;
pub const BaseXcmWeight: XcmWeight = 100_000_000;
pub const MaxAssetsForTransfer: usize = 2;

}
Expand Down
5 changes: 3 additions & 2 deletions integration-tests/src/cross_chain_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use frame_support::{assert_noop, assert_ok};
use polkadot_xcm::{latest::prelude::*, VersionedMultiAssets};

use cumulus_primitives_core::ParaId;
use frame_support::weights::Weight;
use hex_literal::hex;
use orml_traits::currency::MultiCurrency;
use sp_core::H256;
Expand Down Expand Up @@ -300,7 +301,7 @@ fn transfer_from_other_parachain_and_back() {
);
assert_eq!(
basilisk_runtime::Tokens::free_balance(1, &basilisk_runtime::Treasury::account_id()),
35_990_141 // fees should go to treasury
30_905_849 // fees should go to treasury
);
});

Expand Down Expand Up @@ -470,7 +471,7 @@ fn assets_should_be_trapped_when_assets_are_unknown() {
cumulus_pallet_xcmp_queue::Event::Fail {
message_hash: Some(hex!["4efbf4d7ba73f43d5bb4ebbec3189e132ccf2686aed37e97985af019e1cf62dc"].into()),
error: XcmError::AssetNotFound,
weight: 300_000_000,
weight: Weight::from_ref_time(300_000_000),
}
.into(),
pallet_relaychain_info::Event::CurrentBlockNumbers {
Expand Down
12 changes: 6 additions & 6 deletions integration-tests/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fn transaction_fees_should_be_as_expected_when_transfer_happen() {
Basilisk::execute_with(|| {
let diff = UNITS / 100; //0.01

let expected_rust_encoded_fees = 4_556 * UNITS / 100; //45.56
let expected_ui_fees = 4_655 * UNITS / 100; //46.55
let expected_rust_encoded_fees = 4_705 * UNITS / 100; //47.05
let expected_ui_fees = 4_804 * UNITS / 100; //48.04

let call = pallet_currencies::Call::<basilisk_runtime::Runtime>::transfer {
dest: AccountId::from(ALICE),
Expand Down Expand Up @@ -75,8 +75,8 @@ fn transaction_fees_should_be_as_expected_when_nft_is_minted() {
//NOTE: Price showed by polkadotAPPS is changing at second decimal place between runs.
let diff = UNITS / 10; //0.1

let expected_rust_encoded_fees = 41_130 * UNITS / 100; //411.30
let expected_ui_fees = 41_233 * UNITS / 100; //412.33
let expected_rust_encoded_fees = 48_619 * UNITS / 100; //486.19
let expected_ui_fees = 48_724 * UNITS / 100; //487.24

let call = pallet_nft::Call::<basilisk_runtime::Runtime>::mint {
collection_id: 1_000_000,
Expand Down Expand Up @@ -131,8 +131,8 @@ fn transaction_fees_should_be_as_expected_when_nft_collection_is_created() {
//NOTE: Price showed by polkadotAPPS is changing at second decimal place between runs.
let diff = UNITS / 10; //0.1

let expected_rust_encoded_fees = 39_879 * UNITS / 100; //398.79
let expected_ui_fees = 39_982 * UNITS / 100; //399.82
let expected_rust_encoded_fees = 45_584 * UNITS / 100; //455.84
let expected_ui_fees = 45_689 * UNITS / 100; //456.89

let call = pallet_nft::Call::<basilisk_runtime::Runtime>::create_collection {
collection_id: 0,
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use cumulus_primitives_core::ParaId;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
use frame_support::assert_ok;
use frame_support::traits::GenesisBuild;
use frame_support::weights::Weight;
use polkadot_primitives::v2::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_runtime_parachains::configuration::HostConfiguration;
use pretty_assertions::assert_eq;
Expand Down Expand Up @@ -103,7 +104,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: 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
8 changes: 4 additions & 4 deletions integration-tests/src/non_native_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn non_native_fee_payment_works_with_xyk_spot_price() {

let bob_balance = basilisk_runtime::Tokens::free_balance(1, &AccountId::from(BOB));

assert_eq!(bob_balance, 999_999_974_195_044);
assert_eq!(bob_balance, 999_999_979_279_336);

let pair_account = basilisk_runtime::XYK::get_pair_id(AssetPair {
asset_in: currency_0,
Expand Down Expand Up @@ -108,14 +108,14 @@ fn non_native_fee_payment_works_with_xyk_spot_price() {
));

let dave_balance = basilisk_runtime::Tokens::free_balance(1, &AccountId::from(DAVE));
assert_eq!(dave_balance, 968_046_450_495_217);
assert_eq!(dave_balance, 974_342_185_521_892);

expect_basilisk_events(vec![
pallet_transaction_multi_payment::Event::FeeWithdrawn {
account_id: DAVE.into(),
asset_id: 1,
native_fee_amount: 55_738_705_000_000,
non_native_fee_amount: 31_953_549_504_783,
native_fee_amount: 44_756_635_000_000,
non_native_fee_amount: 25_657_814_478_108,
destination_account_id: basilisk_runtime::MultiTransactionPayment::get_fee_receiver(),
}
.into(),
Expand Down
Loading