Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Jun 17, 2024
1 parent 3987037 commit 5183904
Show file tree
Hide file tree
Showing 8 changed files with 2,870 additions and 5,167 deletions.
7,924 changes: 2,803 additions & 5,121 deletions Cargo.lock

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,33 +78,33 @@ kusama-runtime = { path = "relay/kusama", package = "staging-kusama-runtime" }
kusama-runtime-constants = { path = "relay/kusama/constants", default-features = false }
kusama-system-emulated-network = { path = "integration-tests/emulated/networks/kusama-system" }
log = { version = "0.4.21", default-features = false }
pallet-alliance = { version = "28.0.0", default-features = false }
pallet-asset-conversion = { version = "11.0.0", default-features = false }
pallet-asset-conversion-tx-payment = { version = "11.0.0", default-features = false }
pallet-asset-rate = { version = "8.0.0", default-features = false }
pallet-asset-tx-payment = { version = "29.0.0", default-features = false }
pallet-assets = { version = "30.0.0", default-features = false }
pallet-aura = { version = "28.0.0", default-features = false }
pallet-authority-discovery = { version = "29.0.1", default-features = false }
pallet-authorship = { version = "29.0.0", default-features = false }
pallet-babe = { version = "29.0.0", default-features = false }
pallet-bags-list = { version = "28.0.0", default-features = false }
pallet-balances = { version = "29.0.1", default-features = false }
pallet-beefy = { version = "29.0.0", default-features = false }
pallet-beefy-mmr = { version = "29.0.0", default-features = false }
pallet-bounties = { version = "28.0.0", default-features = false }
pallet-bridge-grandpa = { version = "0.8.0", default-features = false }
pallet-bridge-messages = { version = "0.8.0", default-features = false }
pallet-bridge-parachains = { version = "0.8.0", default-features = false }
pallet-bridge-relayers = { version = "0.8.0", default-features = false }
pallet-broker = { version = "0.7.2", default-features = false }
pallet-child-bounties = { version = "28.0.0", default-features = false }
pallet-collator-selection = { version = "10.0.2", default-features = false }
pallet-collective = { version = "29.0.0", default-features = false }
pallet-conviction-voting = { version = "29.0.0", default-features = false }
pallet-core-fellowship = { version = "13.0.0", default-features = false }
pallet-election-provider-multi-phase = { version = "28.0.0", default-features = false }
pallet-election-provider-support-benchmarking = { version = "28.0.0", default-features = false }
pallet-alliance = { version = "33.0.0", default-features = false }
pallet-asset-conversion = { version = "16.0.0", default-features = false }
pallet-asset-conversion-tx-payment = { version = "16.0.0", default-features = false }
pallet-asset-rate = { version = "13.0.0", default-features = false }
pallet-asset-tx-payment = { version = "34.0.0", default-features = false }
pallet-assets = { version = "35.0.0", default-features = false }
pallet-aura = { version = "33.0.0", default-features = false }
pallet-authority-discovery = { version = "34.0.0", default-features = false }
pallet-authorship = { version = "34.0.0", default-features = false }
pallet-babe = { version = "34.0.0", default-features = false }
pallet-bags-list = { version = "33.0.0", default-features = false }
pallet-balances = { version = "35.0.0", default-features = false }
pallet-beefy = { version = "34.0.0", default-features = false }
pallet-beefy-mmr = { version = "34.0.0", default-features = false }
pallet-bounties = { version = "33.0.0", default-features = false }
pallet-bridge-grandpa = { version = "0.13.0", default-features = false }
pallet-bridge-messages = { version = "0.13.0", default-features = false }
pallet-bridge-parachains = { version = "0.13.0", default-features = false }
pallet-bridge-relayers = { version = "0.13.0", default-features = false }
pallet-broker = { version = "0.13.0", default-features = false }
pallet-child-bounties = { version = "33.0.0", default-features = false }
pallet-collator-selection = { version = "15.0.0", default-features = false }
pallet-collective = { version = "34.0.0", default-features = false }
pallet-conviction-voting = { version = "34.0.0", default-features = false }
pallet-core-fellowship = { version = "18.0.0", default-features = false }
pallet-election-provider-multi-phase = { version = "33.0.0", default-features = false }
pallet-election-provider-support-benchmarking = { version = "33.0.0", default-features = false }
pallet-encointer-balances = { version = "~6.1.0", default-features = false }
pallet-encointer-bazaar = { version = "~6.1.0", default-features = false }
pallet-encointer-bazaar-rpc-runtime-api = { version = "~6.1.0", default-features = false }
Expand Down Expand Up @@ -172,7 +172,7 @@ people-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parac
people-kusama-runtime = { path = "system-parachains/people/people-kusama" }
people-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-polkadot" }
people-polkadot-runtime = { path = "system-parachains/people/people-polkadot" }
polkadot-core-primitives = { version = "8.0.0", default-features = false }
polkadot-core-primitives = { version = "13.0.0", default-features = false }
polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/polkadot" }
polkadot-parachain-primitives = { version = "12.0.0", default-features = false }
polkadot-primitives = { version = "13.0.0", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
test.assert();

let delivery_fees = Polkadot::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PolkadotXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down Expand Up @@ -204,7 +204,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
let receiver_balance_after = test.receiver.balance;

let delivery_fees = PeoplePolkadot::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PeoplePolkadotXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down Expand Up @@ -248,7 +248,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let receiver_balance_after = test.receiver.balance;

let delivery_fees = PeoplePolkadot::execute_with(|| {
xcm_helpers::transfer_assets_delivery_fees::<
xcm_helpers::teleport_assets_delivery_fees::<
<PeoplePolkadotXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
});
Expand Down
4 changes: 0 additions & 4 deletions system-parachains/coretime/coretime-kusama/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ use frame_support::{
};
use pallet_broker::{ConfigRecordOf, SaleInfo};
use parachains_runtimes_test_utils::ExtBuilder;
use sp_runtime::{
traits::{AccountIdConversion, One},
FixedU64,
};
use sp_runtime::traits::AccountIdConversion;

fn advance_to(b: BlockNumber) {
Expand Down
6 changes: 3 additions & 3 deletions system-parachains/people/people-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ scale-info = { features = ["derive"], workspace = true }
# Substrate
frame-benchmarking = { optional = true, workspace = true }
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
#frame-metadata-hash-extension = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-benchmarking = { optional = true, workspace = true }
frame-system-rpc-runtime-api = { workspace = true }
frame-try-runtime = { optional = true, workspace = true }
pallet-aura = { features = ["experimental"], workspace = true }
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-identity = { workspace = true }
Expand Down Expand Up @@ -95,7 +95,7 @@ std = [
"enumflags2/std",
"frame-benchmarking?/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
#"frame-metadata-hash-extension/std", # FAIL-CI @ggwpez
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
Expand Down
21 changes: 13 additions & 8 deletions system-parachains/people/people-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
construct_runtime, derive_impl,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
genesis_builder_helper::{build_state, get_preset},
parameter_types,
traits::{
tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse,
Expand Down Expand Up @@ -94,7 +94,7 @@ pub type SignedExtra = (
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
// FAIL-CI @ggwpez frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);

/// Unchecked extrinsic type as expected by this runtime.
Expand Down Expand Up @@ -282,6 +282,7 @@ impl pallet_message_queue::Config for Runtime {
type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>;
type MaxStale = sp_core::ConstU32<8>;
type ServiceWeight = MessageQueueServiceWeight;
type IdleMaxServiceWeight = ();
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
}

Expand Down Expand Up @@ -584,7 +585,7 @@ impl_runtime_apis! {
}

fn authorities() -> Vec<AuraId> {
Aura::authorities().into_inner()
pallet_aura::Authorities::<Runtime>::get().into_inner()
}
}

Expand All @@ -606,7 +607,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down Expand Up @@ -963,12 +964,16 @@ impl_runtime_apis! {
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, |_| None)
}

fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
vec![]
}
}
}
Expand Down

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

4 changes: 4 additions & 0 deletions system-parachains/people/people-polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ impl xcm_executor::Config for XcmConfig {
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = PolkadotXcm;
}

/// Converts a local signed origin into an XCM location. Forms the basis for local origins
Expand Down

0 comments on commit 5183904

Please sign in to comment.