mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
committed by
Bastian Köcher
parent
d4952b2e2e
commit
08f1580658
@@ -41,11 +41,13 @@ 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 = { 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 }
|
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||||
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
pallet-aura = { 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-balances = { 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 }
|
pallet-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||||
pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
pallet-beefy-mmr = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
pallet-grandpa = { 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-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-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-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 }
|
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false }
|
||||||
@@ -100,6 +102,7 @@ std = [
|
|||||||
"frame-system-rpc-runtime-api/std",
|
"frame-system-rpc-runtime-api/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"pallet-aura/std",
|
"pallet-aura/std",
|
||||||
|
"pallet-authorship/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
"pallet-beefy/std",
|
"pallet-beefy/std",
|
||||||
"pallet-beefy-mmr/std",
|
"pallet-beefy-mmr/std",
|
||||||
@@ -109,6 +112,7 @@ std = [
|
|||||||
"pallet-bridge-relayers/std",
|
"pallet-bridge-relayers/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-mmr/std",
|
"pallet-mmr/std",
|
||||||
|
"pallet-offences/std",
|
||||||
"pallet-session/std",
|
"pallet-session/std",
|
||||||
"pallet-shift-session-manager/std",
|
"pallet-shift-session-manager/std",
|
||||||
"pallet-sudo/std",
|
"pallet-sudo/std",
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ use sp_runtime::{
|
|||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys},
|
traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys},
|
||||||
transaction_validity::{TransactionSource, TransactionValidity},
|
transaction_validity::{TransactionSource, TransactionValidity},
|
||||||
ApplyExtrinsicResult, FixedPointNumber, Perquintill,
|
ApplyExtrinsicResult, FixedPointNumber, KeyTypeId, Perquintill,
|
||||||
};
|
};
|
||||||
use sp_std::prelude::*;
|
use sp_std::prelude::*;
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
@@ -249,8 +249,9 @@ impl pallet_grandpa::Config for Runtime {
|
|||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
type MaxAuthorities = ConstU32<10>;
|
type MaxAuthorities = ConstU32<10>;
|
||||||
type MaxSetIdSessionEntries = ConstU64<0>;
|
type MaxSetIdSessionEntries = ConstU64<0>;
|
||||||
type KeyOwnerProof = sp_core::Void;
|
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
|
||||||
type EquivocationReportSystem = ();
|
type EquivocationReportSystem =
|
||||||
|
pallet_grandpa::EquivocationReportSystem<Self, Offences, Historical, ReportLongevity>;
|
||||||
type MaxNominators = ConstU32<256>;
|
type MaxNominators = ConstU32<256>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +378,7 @@ parameter_types! {
|
|||||||
pub const Period: BlockNumber = bp_millau::SESSION_LENGTH;
|
pub const Period: BlockNumber = bp_millau::SESSION_LENGTH;
|
||||||
pub const Offset: BlockNumber = 0;
|
pub const Offset: BlockNumber = 0;
|
||||||
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
||||||
|
pub ReportLongevity: u64 = Period::get() * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_session::Config for Runtime {
|
impl pallet_session::Config for Runtime {
|
||||||
@@ -392,6 +394,37 @@ impl pallet_session::Config for Runtime {
|
|||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime
|
||||||
|
where
|
||||||
|
RuntimeCall: From<C>,
|
||||||
|
{
|
||||||
|
type Extrinsic = UncheckedExtrinsic;
|
||||||
|
type OverarchingCall = RuntimeCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl pallet_authorship::Config for Runtime {
|
||||||
|
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
|
||||||
|
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_bridge_relayers::Config for Runtime {
|
impl pallet_bridge_relayers::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type Reward = Balance;
|
type Reward = Balance;
|
||||||
@@ -582,6 +615,10 @@ construct_runtime!(
|
|||||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||||
|
|
||||||
// Consensus support.
|
// Consensus support.
|
||||||
|
Authorship: pallet_authorship::{Pallet, Storage},
|
||||||
|
Offences: pallet_offences::{Pallet, Storage, Event},
|
||||||
|
Historical: pallet_session::historical::{Pallet},
|
||||||
|
|
||||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||||
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event},
|
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event},
|
||||||
ShiftSessionManager: pallet_shift_session_manager::{Pallet},
|
ShiftSessionManager: pallet_shift_session_manager::{Pallet},
|
||||||
|
|||||||
@@ -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 = { 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 }
|
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-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-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-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 }
|
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-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-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-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-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-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 }
|
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-rpc-runtime-api/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"pallet-authority-discovery/std",
|
"pallet-authority-discovery/std",
|
||||||
|
"pallet-authorship/std",
|
||||||
"pallet-babe/std",
|
"pallet-babe/std",
|
||||||
"pallet-balances/std",
|
"pallet-balances/std",
|
||||||
"pallet-beefy/std",
|
"pallet-beefy/std",
|
||||||
@@ -105,6 +108,7 @@ std = [
|
|||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-message-queue/std",
|
"pallet-message-queue/std",
|
||||||
"pallet-mmr/std",
|
"pallet-mmr/std",
|
||||||
|
"pallet-offences/std",
|
||||||
"pallet-xcm/std",
|
"pallet-xcm/std",
|
||||||
"pallet-session/std",
|
"pallet-session/std",
|
||||||
"pallet-shift-session-manager/std",
|
"pallet-shift-session-manager/std",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ use sp_runtime::{
|
|||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
traits::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys},
|
traits::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys},
|
||||||
transaction_validity::{TransactionSource, TransactionValidity},
|
transaction_validity::{TransactionSource, TransactionValidity},
|
||||||
ApplyExtrinsicResult, FixedPointNumber, Perquintill,
|
ApplyExtrinsicResult, FixedPointNumber, KeyTypeId, Perquintill,
|
||||||
};
|
};
|
||||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
@@ -219,6 +219,7 @@ pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration =
|
|||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const EpochDuration: u64 = bp_rialto::EPOCH_DURATION_IN_SLOTS as u64;
|
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 const ExpectedBlockTime: bp_rialto::Moment = bp_rialto::time_units::MILLISECS_PER_BLOCK;
|
||||||
|
pub ReportLongevity: u64 = EpochDuration::get() * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_babe::Config for Runtime {
|
impl pallet_babe::Config for Runtime {
|
||||||
@@ -257,8 +258,9 @@ impl pallet_grandpa::Config for Runtime {
|
|||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
type MaxAuthorities = ConstU32<10>;
|
type MaxAuthorities = ConstU32<10>;
|
||||||
type MaxSetIdSessionEntries = ConstU64<0>;
|
type MaxSetIdSessionEntries = ConstU64<0>;
|
||||||
type KeyOwnerProof = sp_core::Void;
|
type KeyOwnerProof = <Historical as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
|
||||||
type EquivocationReportSystem = ();
|
type EquivocationReportSystem =
|
||||||
|
pallet_grandpa::EquivocationReportSystem<Self, Offences, Historical, ReportLongevity>;
|
||||||
type MaxNominators = ConstU32<256>;
|
type MaxNominators = ConstU32<256>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,6 +385,29 @@ impl pallet_session::Config for Runtime {
|
|||||||
type WeightInfo = ();
|
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 {
|
impl pallet_authority_discovery::Config for Runtime {
|
||||||
type MaxAuthorities = ConstU32<10>;
|
type MaxAuthorities = ConstU32<10>;
|
||||||
}
|
}
|
||||||
@@ -469,6 +494,12 @@ construct_runtime!(
|
|||||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||||
|
|
||||||
// Consensus support.
|
// 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>},
|
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config<T>},
|
||||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||||
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event},
|
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event},
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ use relay_substrate_client::{
|
|||||||
ChainWithTransactions, ChainWithUtilityPallet, Error as SubstrateError,
|
ChainWithTransactions, ChainWithUtilityPallet, Error as SubstrateError,
|
||||||
FullRuntimeUtilityPallet, NonceOf, SignParam, UnderlyingChainProvider, UnsignedTransaction,
|
FullRuntimeUtilityPallet, NonceOf, SignParam, UnderlyingChainProvider, UnsignedTransaction,
|
||||||
};
|
};
|
||||||
use sp_core::{storage::StorageKey, Pair, Void};
|
use sp_core::{storage::StorageKey, Pair};
|
||||||
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
|
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
|
||||||
|
use sp_session::MembershipProof;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
/// Millau header id.
|
/// Millau header id.
|
||||||
@@ -70,7 +71,7 @@ impl ChainWithGrandpa for Millau {
|
|||||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||||
MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||||
|
|
||||||
type KeyOwnerProof = Void;
|
type KeyOwnerProof = MembershipProof;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ChainWithBalances for Millau {
|
impl ChainWithBalances for Millau {
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ use relay_substrate_client::{
|
|||||||
ChainWithTransactions, Error as SubstrateError, NonceOf, RelayChain, SignParam,
|
ChainWithTransactions, Error as SubstrateError, NonceOf, RelayChain, SignParam,
|
||||||
UnderlyingChainProvider, UnsignedTransaction,
|
UnderlyingChainProvider, UnsignedTransaction,
|
||||||
};
|
};
|
||||||
use sp_core::{storage::StorageKey, Pair, Void};
|
use sp_core::{storage::StorageKey, Pair};
|
||||||
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
|
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
|
||||||
|
use sp_session::MembershipProof;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
/// Rialto header id.
|
/// Rialto header id.
|
||||||
@@ -55,7 +56,7 @@ impl ChainWithGrandpa for Rialto {
|
|||||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||||
RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||||
|
|
||||||
type KeyOwnerProof = Void;
|
type KeyOwnerProof = MembershipProof;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RelayChain for Rialto {
|
impl RelayChain for Rialto {
|
||||||
|
|||||||
Reference in New Issue
Block a user