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

integration-tests: Fix test envs #1780

Merged
merged 6 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 4 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk",
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" }
Expand Down
1 change: 1 addition & 0 deletions runtime/altair/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cumulus-primitives-utility = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
polkadot-runtime-parachains = { workspace = true }

staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
Expand Down
25 changes: 25 additions & 0 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ use frame_support::{
};
use frame_system::{
limits::{BlockLength, BlockWeights},
offchain::SendTransactionTypes,
EnsureRoot, EnsureSigned,
};
use orml_traits::currency::MutationHooks;
Expand Down Expand Up @@ -1905,6 +1906,29 @@ impl axelar_gateway_precompile::Config for Runtime {
type WeightInfo = ();
}

impl polkadot_runtime_parachains::configuration::Config for Runtime {
type WeightInfo = weights::pallet_parachains_config::WeightInfo<Runtime>;
}

impl polkadot_runtime_parachains::shared::Config for Runtime {}

impl<C> SendTransactionTypes<C> for Runtime
where
RuntimeCall: From<C>,
{
type Extrinsic = UncheckedExtrinsic;
type OverarchingCall = RuntimeCall;
}

impl polkadot_runtime_parachains::paras::Config for Runtime {
type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>;
type OnNewHead = ();
type QueueFootprinter = ();
type RuntimeEvent = RuntimeEvent;
type UnsignedPriority = ();
type WeightInfo = weights::pallet_parachains_paras::WeightInfo<Runtime>;
}

/// Block type as expected by this runtime.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// A Block signed with a Justification
Expand Down Expand Up @@ -1977,6 +2001,7 @@ construct_runtime!(
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>} = 69,
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 70,
Uniques: pallet_uniques::{Pallet, Call, Storage, Event<T>} = 72,
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config<T>, ValidateUnsigned} = 73,
cdamian marked this conversation as resolved.
Show resolved Hide resolved

// our pallets (part 1)
Fees: pallet_fees::{Pallet, Call, Storage, Config<T>, Event<T>} = 90,
Expand Down
2 changes: 2 additions & 0 deletions runtime/altair/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pub mod pallet_multisig;
pub mod pallet_oracle_collection;
pub mod pallet_oracle_feed;
pub mod pallet_order_book;
pub mod pallet_parachains_config;
pub mod pallet_parachains_paras;
pub mod pallet_permissions;
pub mod pallet_pool_fees;
pub mod pallet_pool_registry;
Expand Down
36 changes: 36 additions & 0 deletions runtime/altair/src/weights/pallet_parachains_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use core::marker::PhantomData;

use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> polkadot_runtime_parachains::configuration::WeightInfo
for WeightInfo<T>
{
fn set_config_with_block_number() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_u32() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_option_u32() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_balance() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_hrmp_open_request_ttl() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_executor_params() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_perbill() -> Weight {
Weight::from_parts(100_000_000, 0)
}
}
58 changes: 58 additions & 0 deletions runtime/altair/src/weights/pallet_parachains_paras.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
use core::marker::PhantomData;

use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> polkadot_runtime_parachains::paras::WeightInfo for WeightInfo<T> {
fn force_set_current_code(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_set_current_head(s: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_set_most_recent_context() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_schedule_code_upgrade(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_note_new_head(s: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_queue_action() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn add_trusted_validation_code(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn poke_unused_validation_code() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement() -> Weight {
Weight::from_parts(100_000_000, 0)
}
}
1 change: 1 addition & 0 deletions runtime/centrifuge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cumulus-primitives-utility = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
polkadot-runtime-parachains = { workspace = true }

staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
Expand Down
25 changes: 25 additions & 0 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ use frame_support::{
};
use frame_system::{
limits::{BlockLength, BlockWeights},
offchain::SendTransactionTypes,
EnsureRoot, EnsureSigned,
};
use orml_traits::currency::MutationHooks;
Expand Down Expand Up @@ -2019,6 +2020,29 @@ impl axelar_gateway_precompile::Config for Runtime {
type WeightInfo = ();
}

impl polkadot_runtime_parachains::configuration::Config for Runtime {
type WeightInfo = weights::pallet_parachains_config::WeightInfo<Runtime>;
}

impl polkadot_runtime_parachains::shared::Config for Runtime {}

impl<C> SendTransactionTypes<C> for Runtime
where
RuntimeCall: From<C>,
{
type Extrinsic = UncheckedExtrinsic;
type OverarchingCall = RuntimeCall;
}

impl polkadot_runtime_parachains::paras::Config for Runtime {
type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>;
type OnNewHead = ();
type QueueFootprinter = ();
type RuntimeEvent = RuntimeEvent;
type UnsignedPriority = ();
type WeightInfo = weights::pallet_parachains_paras::WeightInfo<Runtime>;
}

/// Block type as expected by this runtime.
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
/// A Block signed with a Justification
Expand Down Expand Up @@ -2089,6 +2113,7 @@ construct_runtime!(
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>} = 68,
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 69,
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>} = 70,
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config<T>, ValidateUnsigned} = 72,

// our pallets
Fees: pallet_fees::{Pallet, Call, Storage, Config<T>, Event<T>} = 90,
Expand Down
2 changes: 2 additions & 0 deletions runtime/centrifuge/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pub mod pallet_multisig;
pub mod pallet_oracle_collection;
pub mod pallet_oracle_feed;
pub mod pallet_order_book;
pub mod pallet_parachains_config;
pub mod pallet_parachains_paras;
pub mod pallet_permissions;
pub mod pallet_pool_fees;
pub mod pallet_pool_registry;
Expand Down
36 changes: 36 additions & 0 deletions runtime/centrifuge/src/weights/pallet_parachains_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use core::marker::PhantomData;

use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> polkadot_runtime_parachains::configuration::WeightInfo
for WeightInfo<T>
{
fn set_config_with_block_number() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_u32() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_option_u32() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_balance() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_hrmp_open_request_ttl() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_executor_params() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn set_config_with_perbill() -> Weight {
Weight::from_parts(100_000_000, 0)
}
}
58 changes: 58 additions & 0 deletions runtime/centrifuge/src/weights/pallet_parachains_paras.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
use core::marker::PhantomData;

use frame_support::weights::Weight;

pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> polkadot_runtime_parachains::paras::WeightInfo for WeightInfo<T> {
fn force_set_current_code(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_set_current_head(s: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_set_most_recent_context() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_schedule_code_upgrade(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_note_new_head(s: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn force_queue_action() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn add_trusted_validation_code(c: u32) -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn poke_unused_validation_code() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
Weight::from_parts(100_000_000, 0)
}

fn include_pvf_check_statement() -> Weight {
Weight::from_parts(100_000_000, 0)
}
}
6 changes: 2 additions & 4 deletions runtime/common/src/xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,19 @@ where
}
}

/*
/// Convert an incoming `MultiLocation` into a `CurrencyId` through a
/// reverse-lookup using the AssetRegistry. In the registry, we register CFG
/// using its absolute, non-anchored MultliLocation so we need to unanchor the
/// using its absolute, non-anchored MultiLocation so we need to unanchor the
/// input location for Centrifuge-native assets for that to work.
impl<T> Convert<MultiLocation, Option<CurrencyId>> for CurrencyIdConvert<T>
where
T: orml_asset_registry::Config<AssetId = CurrencyId, CustomMetadata = CustomMetadata>
+ parachain_info::Config,
{
fn convert(location: MultiLocation) -> Option<CurrencyId> {
<Self as MaybeEquivalence<_, _>>::convert(location)
<Self as MaybeEquivalence<_, _>>::convert(&location)
}
}
*/

impl<T> Convert<MultiAsset, Option<CurrencyId>> for CurrencyIdConvert<T>
where
Expand Down
1 change: 1 addition & 0 deletions runtime/development/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cumulus-primitives-utility = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
polkadot-runtime-parachains = { workspace = true }

staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
Expand Down
Loading
Loading