mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 14:31:02 +00:00
committed by
Bastian Köcher
parent
d4952b2e2e
commit
08f1580658
@@ -34,6 +34,7 @@ frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "
|
||||
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
@@ -41,6 +42,7 @@ pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch
|
||||
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-offences = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false, features = ["historical"]}
|
||||
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||
@@ -94,6 +96,7 @@ std = [
|
||||
"frame-system-rpc-runtime-api/std",
|
||||
"frame-system/std",
|
||||
"pallet-authority-discovery/std",
|
||||
"pallet-authorship/std",
|
||||
"pallet-babe/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-beefy/std",
|
||||
@@ -105,6 +108,7 @@ std = [
|
||||
"pallet-grandpa/std",
|
||||
"pallet-message-queue/std",
|
||||
"pallet-mmr/std",
|
||||
"pallet-offences/std",
|
||||
"pallet-xcm/std",
|
||||
"pallet-session/std",
|
||||
"pallet-shift-session-manager/std",
|
||||
|
||||
@@ -45,7 +45,7 @@ use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
traits::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys},
|
||||
transaction_validity::{TransactionSource, TransactionValidity},
|
||||
ApplyExtrinsicResult, FixedPointNumber, Perquintill,
|
||||
ApplyExtrinsicResult, FixedPointNumber, KeyTypeId, Perquintill,
|
||||
};
|
||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||
#[cfg(feature = "std")]
|
||||
@@ -219,6 +219,7 @@ pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration =
|
||||
parameter_types! {
|
||||
pub const EpochDuration: u64 = bp_rialto::EPOCH_DURATION_IN_SLOTS as u64;
|
||||
pub const ExpectedBlockTime: bp_rialto::Moment = bp_rialto::time_units::MILLISECS_PER_BLOCK;
|
||||
pub ReportLongevity: u64 = EpochDuration::get() * 10;
|
||||
}
|
||||
|
||||
impl pallet_babe::Config for Runtime {
|
||||
@@ -257,8 +258,9 @@ impl pallet_grandpa::Config for Runtime {
|
||||
type WeightInfo = ();
|
||||
type MaxAuthorities = ConstU32<10>;
|
||||
type MaxSetIdSessionEntries = ConstU64<0>;
|
||||
type KeyOwnerProof = sp_core::Void;
|
||||
type EquivocationReportSystem = ();
|
||||
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
|
||||
type EquivocationReportSystem =
|
||||
pallet_grandpa::EquivocationReportSystem<Self, Offences, Historical, ReportLongevity>;
|
||||
type MaxNominators = ConstU32<256>;
|
||||
}
|
||||
|
||||
@@ -383,6 +385,29 @@ impl pallet_session::Config for Runtime {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_authorship::Config for Runtime {
|
||||
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
|
||||
type EventHandler = ();
|
||||
}
|
||||
|
||||
pub struct FullIdentificationOf;
|
||||
impl sp_runtime::traits::Convert<AccountId, Option<()>> for FullIdentificationOf {
|
||||
fn convert(_: AccountId) -> Option<()> {
|
||||
Some(())
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_session::historical::Config for Runtime {
|
||||
type FullIdentification = ();
|
||||
type FullIdentificationOf = FullIdentificationOf;
|
||||
}
|
||||
|
||||
impl pallet_offences::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = ();
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Config for Runtime {
|
||||
type MaxAuthorities = ConstU32<10>;
|
||||
}
|
||||
@@ -469,6 +494,12 @@ construct_runtime!(
|
||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||
|
||||
// Consensus support.
|
||||
// Authorship must be before session in order to note author in the correct session and era
|
||||
// for im-online.
|
||||
Authorship: pallet_authorship::{Pallet, Storage},
|
||||
Offences: pallet_offences::{Pallet, Storage, Event},
|
||||
Historical: pallet_session::historical::{Pallet},
|
||||
|
||||
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event},
|
||||
|
||||
Reference in New Issue
Block a user