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

fix: async backing #713

Merged
merged 7 commits into from
Sep 3, 2024
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
2 changes: 1 addition & 1 deletion dip-template/runtimes/dip-consumer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-rpc-runtime-api = { workspace = true }
pallet-aura = { workspace = true }
pallet-aura = { workspace = true, features = ["experimental"] }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-session = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions dip-template/runtimes/dip-consumer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

impl cumulus_pallet_aura_ext::Config for Runtime {}
Expand Down
2 changes: 1 addition & 1 deletion dip-template/runtimes/dip-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
frame-system-rpc-runtime-api = { workspace = true }
pallet-aura = { workspace = true }
pallet-aura = { workspace = true, features = ["experimental"] }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-session = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions dip-template/runtimes/dip-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ impl pallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

impl cumulus_pallet_aura_ext::Config for Runtime {}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/emulated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = { workspace = true }

[dependencies]
asset-hub-rococo-emulated-chain = { workspace = true, default-features = true }
asset-hub-rococo-runtime = { workspace = true, default-features = true }
asset-hub-rococo-runtime = { workspace = true, default-features = true, features = ["experimental"] }
attestation = { workspace = true, default-features = true }
ctype = { workspace = true, default-features = true }
cumulus-primitives-core = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion nodes/parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use substrate_prometheus_endpoint::Registry;

use runtime_common::{AccountId, AuthorityId, Balance, BlockNumber, Hash, Nonce};

pub const AUTHORING_DURATION: u64 = 500;
pub const AUTHORING_DURATION: u64 = 1500;
pub const TASK_MANAGER_IDENTIFIER: &str = "aura";

type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;
Expand Down
2 changes: 1 addition & 1 deletion pallets/parachain-staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = { workspace = true }

[dev-dependencies]
kilt-support = { workspace = true, features = ["mock", "try-runtime"] }
pallet-aura = { workspace = true, features = ["std"] }
pallet-aura = { workspace = true, features = ["experimental", "std"] }
pallet-timestamp = { workspace = true, features = ["std"] }
sp-consensus-aura = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = ["std"] }
Expand Down
3 changes: 2 additions & 1 deletion pallets/parachain-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use frame_support::{
use frame_system::pallet_prelude::BlockNumberFor;
use pallet_authorship::EventHandler;
use sp_consensus_aura::sr25519::AuthorityId;
use sp_core::{ConstBool, H256};
use sp_core::{ConstBool, ConstU64, H256};
use sp_runtime::{
impl_opaque_keys,
testing::UintAuthorityId,
Expand Down Expand Up @@ -120,6 +120,7 @@ impl pallet_aura::Config for Test {
type DisabledValidators = ();
type MaxAuthorities = MaxCollatorCandidates;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = ConstU64<2>;
}

impl pallet_authorship::Config for Test {
Expand Down
2 changes: 1 addition & 1 deletion runtimes/kestrel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pallet-transaction-payment-rpc-runtime-api = { workspace = true }
frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-aura = { workspace = true }
pallet-aura = { workspace = true, features = ["experimental"] }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-grandpa = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions runtimes/kestrel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = ConstU64<1000>;
}

impl pallet_grandpa::Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion runtimes/peregrine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
pallet-aura = { workspace = true }
pallet-aura = { workspace = true, features = ["experimental"] }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion runtimes/peregrine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use frame_system::{pallet_prelude::BlockNumberFor, EnsureRoot, EnsureSigned};
use pallet_asset_switch::xcm::{AccountId32ToAccountId32JunctionConverter, MatchesSwitchPairXcmFeeFungibleAsset};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use sp_api::impl_runtime_apis;
use sp_core::{ConstBool, OpaqueMetadata};
use sp_core::{ConstBool, ConstU64, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, OpaqueKeys},
Expand Down Expand Up @@ -295,6 +295,7 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

parameter_types! {
Expand Down
2 changes: 1 addition & 1 deletion runtimes/spiritnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ frame-executive = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
pallet-aura = { workspace = true }
pallet-aura = { workspace = true, features = ["experimental"] }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
pallet-collective = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion runtimes/spiritnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use frame_system::{pallet_prelude::BlockNumberFor, EnsureRoot, EnsureSigned};
use pallet_asset_switch::xcm::{AccountId32ToAccountId32JunctionConverter, MatchesSwitchPairXcmFeeFungibleAsset};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use sp_api::impl_runtime_apis;
use sp_core::{ConstBool, OpaqueMetadata};
use sp_core::{ConstBool, ConstU64, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, OpaqueKeys},
Expand Down Expand Up @@ -288,6 +288,7 @@ impl pallet_aura::Config for Runtime {
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = ConstU64<SLOT_DURATION>;
}

parameter_types! {
Expand Down
Loading