mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
Companion for Decouple Staking and Election - Part 3: Signed Phase (#2793)
* Companion for Decouple Staking and Election - Part 3: Signed Phase https://github.com/paritytech/substrate/pull/7910 * remove some config types * allow up to 5 signed submissions on polkadot and kusama * signed phase is equal induration to unsigned phase * use chain defaults for base and per-byte deposits; >= 16 SignedMaxSubmissions * use a small but non-trivial solution reward * reduce signed deposit per byte fee * reduce signed reward, adjust polkadot expected soln size * copy submit benchmark from substrate * demo calculating an appropriate fee for the signed reward Unfortunately, this doesn't work: it needs to be a constant function, and AFAIK there's no way to make a trait method constant. * SignedRewardBase is 1.5x the fee to submit a signed solution * all chains use deposit byte of base per 50k * update Substrate * cargo update -p pallet-election-provider-multi-phase Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
e8d7e9f0dc
commit
95736d1bf1
@@ -67,6 +67,13 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||
}
|
||||
fn submit(c: u32, ) -> Weight {
|
||||
(84_430_000 as Weight)
|
||||
// Standard Error: 146_000
|
||||
.saturating_add((2_758_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 13_000
|
||||
@@ -92,4 +99,14 @@ impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo f
|
||||
.saturating_add((4_469_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(47_783_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(21_277_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user