mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Reduce staking miner reward (companion substrate/pull/9395) (#3465)
* Reduce staking miner reward * Add EOF * Fix stuff * remove import * Add tyoe * remove redundant stuff * update Substrate Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -36,7 +36,6 @@ use runtime_common::{
|
||||
impls::ToAuthor,
|
||||
BlockHashCount, BlockWeights, BlockLength, RocksDbWeight,
|
||||
OffchainSolutionWeightLimit, OffchainSolutionLengthLimit,
|
||||
elections::fee_for_submit_call,
|
||||
};
|
||||
|
||||
use runtime_parachains::origin as parachains_origin;
|
||||
@@ -65,7 +64,7 @@ use xcm_builder::{
|
||||
};
|
||||
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys, FixedPointNumber,
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
ApplyExtrinsicResult, KeyTypeId, Perbill, curve::PiecewiseLinear,
|
||||
transaction_validity::{TransactionValidity, TransactionSource, TransactionPriority},
|
||||
traits::{
|
||||
@@ -332,7 +331,6 @@ impl pallet_session::historical::Config for Runtime {
|
||||
type FullIdentificationOf = pallet_staking::ExposureOf<Runtime>;
|
||||
}
|
||||
|
||||
use pallet_election_provider_multi_phase::WeightInfo;
|
||||
parameter_types! {
|
||||
// phase durations. 1/4 of the last session for each.
|
||||
pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
|
||||
@@ -345,15 +343,8 @@ parameter_types! {
|
||||
// This formula is currently adjusted such that a typical solution will spend an amount equal
|
||||
// to the base deposit for every 50 kb.
|
||||
pub const SignedDepositByte: Balance = deposit(1, 0) / (50 * 1024);
|
||||
pub SignedRewardBase: Balance = fee_for_submit_call::<Runtime>(
|
||||
// give 20% threshold.
|
||||
sp_runtime::FixedU128::saturating_from_rational(12, 10),
|
||||
// maximum weight possible.
|
||||
weights::pallet_election_provider_multi_phase::WeightInfo::<Runtime>::submit(SignedMaxSubmissions::get()),
|
||||
// assume a solution of 100kb length.
|
||||
100 * 1024
|
||||
);
|
||||
|
||||
// Each good submission will get 1 WND as reward
|
||||
pub SignedRewardBase: Balance = 1 * UNITS;
|
||||
// fallback: emergency phase.
|
||||
pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =
|
||||
pallet_election_provider_multi_phase::FallbackStrategy::Nothing;
|
||||
@@ -377,6 +368,7 @@ sp_npos_elections::generate_solution_type!(
|
||||
impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type EstimateCallFee = TransactionPayment;
|
||||
type SignedPhase = SignedPhase;
|
||||
type UnsignedPhase = UnsignedPhase;
|
||||
type SignedMaxSubmissions = SignedMaxSubmissions;
|
||||
|
||||
Reference in New Issue
Block a user