Update submit finality proof weight formula (#981)

* updated weight formula for submit_finality_proof

* remove common prefix traces

* update docs

* single benchmark

* Re-generate weights.

* Update delivery transaction limits

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Co-authored-by: Hernando Castano <hernando@hcastano.com>
This commit is contained in:
Svyatoslav Nikolsky
2021-06-07 17:56:13 +03:00
committed by Bastian Köcher
parent 41b65c28cf
commit 37d067c0e0
9 changed files with 113 additions and 320 deletions
+3 -2
View File
@@ -46,6 +46,7 @@ use frame_support::{ensure, fail};
use frame_system::{ensure_signed, RawOrigin};
use sp_finality_grandpa::{ConsensusLog, GRANDPA_ENGINE_ID};
use sp_runtime::traits::{BadOrigin, Header as HeaderT, Zero};
use sp_std::convert::TryInto;
#[cfg(test)]
mod mock;
@@ -124,8 +125,8 @@ pub mod pallet {
/// If successful in verification, it will write the target header to the underlying storage
/// pallet.
#[pallet::weight(T::WeightInfo::submit_finality_proof(
justification.votes_ancestries.len() as u32,
justification.commit.precommits.len() as u32,
justification.commit.precommits.len().try_into().unwrap_or(u32::MAX),
justification.votes_ancestries.len().try_into().unwrap_or(u32::MAX),
))]
pub fn submit_finality_proof(
origin: OriginFor<T>,