mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Update to latest substrate master (#853)
* try to update * latest updates * final fixes * Fix claim w/ vesting logic * Make claim tests a bit better Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -32,13 +32,12 @@ use runtime_common::{attestations, claims, parachains, registrar, slots,
|
||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||
MaximumBlockLength,
|
||||
};
|
||||
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
ApplyExtrinsicResult, Percent, Permill, Perbill, RuntimeDebug,
|
||||
transaction_validity::{TransactionValidity, InvalidTransaction, TransactionValidityError},
|
||||
curve::PiecewiseLinear,
|
||||
traits::{BlakeTwo256, Block as BlockT, StaticLookup, SignedExtension, OpaqueKeys, ConvertInto},
|
||||
traits::{BlakeTwo256, Block as BlockT, SignedExtension, OpaqueKeys, ConvertInto, IdentityLookup},
|
||||
};
|
||||
use version::RuntimeVersion;
|
||||
use grandpa::{AuthorityId as GrandpaId, fg_primitives};
|
||||
@@ -77,8 +76,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("kusama"),
|
||||
impl_name: create_runtime_str!("parity-kusama"),
|
||||
authoring_version: 2,
|
||||
spec_version: 1048,
|
||||
impl_version: 0,
|
||||
spec_version: 1049,
|
||||
impl_version: 1,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -127,7 +126,7 @@ impl system::Trait for Runtime {
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type AccountId = AccountId;
|
||||
type Lookup = Indices;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
type Event = Event;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
@@ -136,6 +135,9 @@ impl system::Trait for Runtime {
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type Version = Version;
|
||||
type ModuleToIndex = ModuleToIndex;
|
||||
type AccountData = balances::AccountData<Balance>;
|
||||
type OnNewAccount = ();
|
||||
type OnReapAccount = (Balances, Staking, Session, Recovery, Democracy);
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -157,14 +159,13 @@ parameter_types! {
|
||||
|
||||
impl indices::Trait for Runtime {
|
||||
type AccountIndex = AccountIndex;
|
||||
type Currency = Balances;
|
||||
type Deposit = IndexDeposit;
|
||||
type Event = Event;
|
||||
type IsDeadAccount = Balances;
|
||||
type ResolveHint = indices::SimpleResolveHint<Self::AccountId, Self::AccountIndex>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ExistentialDeposit: Balance = 1 * CENTS;
|
||||
pub const CreationFee: Balance = 1 * CENTS;
|
||||
}
|
||||
|
||||
/// Splits fees 80/20 between treasury and block author.
|
||||
@@ -180,10 +181,7 @@ impl balances::Trait for Runtime {
|
||||
type DustRemoval = ();
|
||||
type Event = Event;
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type OnReapAccount = (Staking, Session, Democracy);
|
||||
type OnNewAccount = ();
|
||||
type TransferPayment = ();
|
||||
type CreationFee = CreationFee;
|
||||
type AccountStore = System;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -625,7 +623,7 @@ construct_runtime! {
|
||||
|
||||
// Consensus support.
|
||||
Authorship: authorship::{Module, Call, Storage},
|
||||
Staking: staking,
|
||||
Staking: staking::{Module, Call, Storage, Config<T>, Event<T>},
|
||||
Offences: offences::{Module, Call, Storage, Event},
|
||||
Session: session::{Module, Call, Storage, Event, Config<T>},
|
||||
FinalityTracker: finality_tracker::{Module, Call, Inherent},
|
||||
@@ -669,7 +667,7 @@ construct_runtime! {
|
||||
}
|
||||
|
||||
/// The address format for describing accounts.
|
||||
pub type Address = <Indices as StaticLookup>::Source;
|
||||
pub type Address = AccountId;
|
||||
/// Block header type as expected by this runtime.
|
||||
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
/// Block type as expected by this runtime.
|
||||
@@ -722,6 +720,10 @@ sp_api::impl_runtime_apis! {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn apply_trusted_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
|
||||
Executive::apply_extrinsic(extrinsic)
|
||||
}
|
||||
|
||||
fn finalize_block() -> <Block as BlockT>::Header {
|
||||
Executive::finalize_block()
|
||||
}
|
||||
@@ -807,6 +809,10 @@ sp_api::impl_runtime_apis! {
|
||||
secondary_slots: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn current_epoch_start() -> babe_primitives::SlotNumber {
|
||||
Babe::current_epoch_start()
|
||||
}
|
||||
}
|
||||
|
||||
impl authority_discovery_primitives::AuthorityDiscoveryApi<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user