mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Introduce BlockExecutionWeight and ExtrinsicBaseWeight (#1023)
* Update to changes in Substrate * Fix trait * Remove `TransactionBaseFee` * add temporary values for extrinsic base weight and block execution weight * Update Cargo.lock
This commit is contained in:
@@ -30,7 +30,7 @@ use primitives::{
|
||||
use runtime_common::{attestations, claims, parachains, registrar, slots,
|
||||
impls::{CurrencyToVoteHandler, TargetedFeeAdjustment, ToAuthor},
|
||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||
MaximumBlockLength,
|
||||
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight,
|
||||
};
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys, ModuleId,
|
||||
@@ -145,6 +145,8 @@ impl system::Trait for Runtime {
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type BlockExecutionWeight = BlockExecutionWeight;
|
||||
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type Version = Version;
|
||||
@@ -206,7 +208,6 @@ impl balances::Trait for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const TransactionBaseFee: Balance = 1 * CENTS;
|
||||
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
|
||||
// for a sane configuration, this should always be less than `AvailableBlockRatio`.
|
||||
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
|
||||
@@ -215,7 +216,6 @@ parameter_types! {
|
||||
impl transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = DealWithFees;
|
||||
type TransactionBaseFee = TransactionBaseFee;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = WeightToFee;
|
||||
type FeeMultiplierUpdate = TargetedFeeAdjustment<TargetBlockFullness, Self>;
|
||||
|
||||
Reference in New Issue
Block a user