Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix experimental aura config and comment tests #3057

Merged
merged 4 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 changes: 2 additions & 0 deletions pallets/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ std = [
]

try-runtime = [ "frame-support/try-runtime" ]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions pallets/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ impl pallet_aura::Config for Test {
type MaxAuthorities = ConstU32<100_000>;
type DisabledValidators = ();
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a difference between this and ConstU64<SLOT_DURATION>? @rphmeier

Copy link
Contributor

@rphmeier rphmeier Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in practice. Though semantically they have different meanings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the change look good to you @rphmeier? The MR is looking for review approvals since we want to do the monorepo migration tomorrow.

}

sp_runtime::impl_opaque_keys! {
Expand Down
2 changes: 2 additions & 0 deletions parachain-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const MAX_MESSAGE_SIZE: u32 = 8192;

/// Opening HRMP channels between Parachains should work
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn open_hrmp_channel_between_paras_works() {
// Parchain A init values
let para_a_id = PenpalKusamaA::para_id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should work when there is enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed seems fine as long as runtime-benchmarks is not enabled:

Suggested change
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
#[cfg(not(feature = "runtime-benchmarks"))] // <https://github.com/paritytech/cumulus/issues/3027>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crate does not have that feature and is also not propagating it downwards...

fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
// Dependency - Relay Chain's `CheckAccount` should have enough balance
limited_teleport_native_assets_from_relay_to_system_para_works();
Expand Down Expand Up @@ -223,6 +224,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
// Init values for Relay Chain
let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const MAX_MESSAGE_SIZE: u32 = 8192;

/// Opening HRMP channels between Parachains should work
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn open_hrmp_channel_between_paras_works() {
// Parchain A init values
let para_a_id = PenpalPolkadotA::para_id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should work when there is enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
// Dependency - Relay Chain's `CheckAccount` should have enough balance
limited_teleport_native_assets_from_relay_to_system_para_works();
Expand Down Expand Up @@ -223,6 +224,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
// Init values for Relay Chain
let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should work when there is enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
// Dependency - Relay Chain's `CheckAccount` should have enough balance
limited_teleport_native_assets_from_relay_to_system_para_works();
Expand Down Expand Up @@ -223,6 +224,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() {
/// Limited Teleport of native asset from System Parachain to Relay Chain
/// should't work when there is not enough balance in Relay Chain's `CheckAccount`
#[test]
#[cfg(feature = "FIXME-IGNORED")] // <https://github.com/paritytech/cumulus/issues/3027>
fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
// Init values for Relay Chain
let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000;
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,5 @@ std = [
"assets-common/std",
"substrate-wasm-builder",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ std = [
"assets-common/std",
"substrate-wasm-builder",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,5 @@ std = [
"assets-common/std",
"substrate-wasm-builder",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,5 @@ std = [
"pallet-core-fellowship/std",
"pallet-salary/std",
]

experimental = [ "pallet-aura/experimental" ]
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/contracts/contracts-rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/contracts/contracts-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/testing/penpal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,5 @@ try-runtime = [
"pallet-xcm/try-runtime",
"parachain-info/try-runtime",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

parameter_types! {
Expand Down
2 changes: 2 additions & 0 deletions parachains/runtimes/testing/rococo-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ runtime-benchmarks = [
"pallet-xcm/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
]

experimental = [ "pallet-aura/experimental" ]
2 changes: 2 additions & 0 deletions parachains/runtimes/testing/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
#[cfg(feature = "experimental")]
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Self>;
}

construct_runtime! {
Expand Down
Loading