mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion for substrate/pull/6334 (#1263)
* fix all runtimes and add test' * Fix build * Undo changes to lock file? * Fix runtime test * Remove unused imports * cargo update -p sp-io * Update Cargo.lock * bump spec version Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -21,20 +21,20 @@
|
||||
#![recursion_limit="256"]
|
||||
|
||||
use sp_std::prelude::*;
|
||||
use static_assertions::const_assert;
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
|
||||
parachain::{self, ActiveParas, AbridgedCandidateReceipt, SigningContext},
|
||||
};
|
||||
use runtime_common::{attestations, parachains, registrar,
|
||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||
use runtime_common::{
|
||||
attestations, parachains, registrar, SlowAdjustingFeeUpdate,
|
||||
impls::{CurrencyToVoteHandler, ToAuthor},
|
||||
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio, MaximumBlockLength,
|
||||
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, MaximumExtrinsicWeight,
|
||||
};
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
ApplyExtrinsicResult, KeyTypeId, Perbill, Perquintill, curve::PiecewiseLinear, PerThing,
|
||||
ApplyExtrinsicResult, KeyTypeId, Perbill, curve::PiecewiseLinear,
|
||||
transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority},
|
||||
traits::{
|
||||
BlakeTwo256, Block as BlockT, OpaqueKeys, ConvertInto, IdentityLookup,
|
||||
@@ -81,7 +81,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("westend"),
|
||||
impl_name: create_runtime_str!("parity-westend"),
|
||||
authoring_version: 2,
|
||||
spec_version: 30,
|
||||
spec_version: 31,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
@@ -180,22 +180,14 @@ impl balances::Trait for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
|
||||
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
|
||||
}
|
||||
|
||||
// for a sane configuration, this should always be less than `AvailableBlockRatio`.
|
||||
const_assert!(
|
||||
TargetBlockFullness::get().deconstruct() <
|
||||
(AvailableBlockRatio::get().deconstruct() as <Perquintill as PerThing>::Inner)
|
||||
* (<Perquintill as PerThing>::ACCURACY / <Perbill as PerThing>::ACCURACY as <Perquintill as PerThing>::Inner)
|
||||
);
|
||||
|
||||
impl transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ToAuthor<Runtime>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = WeightToFee;
|
||||
type FeeMultiplierUpdate = TargetedFeeAdjustment<TargetBlockFullness, Self>;
|
||||
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user