pub struct SubstrateWeight<T>(PhantomData<T>);Expand description
Weights for pallet_chain_manager using the Substrate node and recommended hardware.
Tuple Fields§
§0: PhantomData<T>Trait Implementations§
Source§impl<T: Config> WeightInfo for SubstrateWeight<T>
impl<T: Config> WeightInfo for SubstrateWeight<T>
Source§fn validate() -> Weight
fn validate() -> Weight
Storage: Authors::AuthorsMap (r:1 w:0)
Proof: Authors::AuthorsMap (max_values: None, max_size: Some(127), added: 2602, mode: MaxEncodedLen)
Storage: Commitment::CommitMap (r:1 w:0)
Proof: Commitment::CommitMap (max_values: None, max_size: Some(1600), added: 4075, mode: MaxEncodedLen)
Storage: Commitment::DigestMap (r:1 w:0)
Proof: Commitment::DigestMap (max_values: None, max_size: Some(229), added: 2704, mode: MaxEncodedLen)
Storage: Authors::MinCollateral (r:1 w:0)
Proof: Authors::MinCollateral (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitKeys (r:0 w:1)
Proof: ChainManager::AffidavitKeys (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
Source§fn chill() -> Weight
fn chill() -> Weight
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::AuthorsMap (r:1 w:0)
Proof: Authors::AuthorsMap (max_values: None, max_size: Some(127), added: 2602, mode: MaxEncodedLen)
Storage: Session::Validators (r:1 w:0)
Proof: Session::Validators (max_values: Some(1), max_size: None, mode: Measured)
Storage: ChainManager::SessionStartAt (r:1 w:0)
Proof: ChainManager::SessionStartAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitBeginsAt (r:1 w:0)
Proof: ChainManager::AffidavitBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitEndsAt (r:1 w:0)
Proof: ChainManager::AffidavitEndsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitKeys (r:2 w:1)
Proof: ChainManager::AffidavitKeys (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
Storage: ChainManager::AuthorAffidavits (r:1 w:0)
Proof: ChainManager::AuthorAffidavits (max_values: None, max_size: Some(40574), added: 43049, mode: MaxEncodedLen)
Source§fn declare() -> Weight
fn declare() -> Weight
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitKeys (r:1 w:1)
Proof: ChainManager::AffidavitKeys (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
Storage: ChainManager::AllowAffidavits (r:1 w:0)
Proof: ChainManager::AllowAffidavits (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
Storage: Authors::AuthorsMap (r:1 w:0)
Proof: Authors::AuthorsMap (max_values: None, max_size: Some(127), added: 2602, mode: MaxEncodedLen)
Storage: Commitment::CommitMap (r:1 w:0)
Proof: Commitment::CommitMap (max_values: None, max_size: Some(1600), added: 4075, mode: MaxEncodedLen)
Storage: Commitment::DigestMap (r:1 w:0)
Proof: Commitment::DigestMap (max_values: None, max_size: Some(229), added: 2704, mode: MaxEncodedLen)
Storage: Authors::MinCollateral (r:1 w:0)
Proof: Authors::MinCollateral (max_values: Some(1), max_size: Some(16), added: 511, mode: MaxEncodedLen)
Storage: ChainManager::SessionStartAt (r:1 w:0)
Proof: ChainManager::SessionStartAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitBeginsAt (r:1 w:0)
Proof: ChainManager::AffidavitBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitEndsAt (r:1 w:0)
Proof: ChainManager::AffidavitEndsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::AuthorFunders (r:1 w:0)
Proof: Authors::AuthorFunders (max_values: None, max_size: Some(161), added: 2636, mode: MaxEncodedLen)
Storage: ChainManager::AuthorAffidavits (r:0 w:1)
Proof: ChainManager::AuthorAffidavits (max_values: None, max_size: Some(40574), added: 43049, mode: MaxEncodedLen)
Source§fn elect() -> Weight
fn elect() -> Weight
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitKeys (r:1 w:0)
Proof: ChainManager::AffidavitKeys (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
Storage: ChainManager::SessionStartAt (r:1 w:0)
Proof: ChainManager::SessionStartAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitBeginsAt (r:1 w:0)
Proof: ChainManager::AffidavitBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitEndsAt (r:1 w:0)
Proof: ChainManager::AffidavitEndsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::ElectionBeginsAt (r:1 w:0)
Proof: ChainManager::ElectionBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AuthorAffidavits (r:12 w:0)
Proof: ChainManager::AuthorAffidavits (max_values: None, max_size: Some(40574), added: 43049, mode: MaxEncodedLen)
Storage: Authors::MinElected (r:1 w:0)
Proof: Authors::MinElected (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::ForceMaxElected (r:1 w:0)
Proof: Authors::ForceMaxElected (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
Storage: Authors::Elected (r:12 w:11)
Proof: Authors::Elected (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
Storage: ChainManager::ElectsPreparedBy (r:0 w:1)
Proof: ChainManager::ElectsPreparedBy (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen)
Storage: Authors::RecentElectedOn (r:0 w:1)
Proof: Authors::RecentElectedOn (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn force_allow_affidavits() -> Weight
fn force_allow_affidavits() -> Weight
Storage: ChainManager::AllowAffidavits (r:0 w:1)
Proof: ChainManager::AllowAffidavits (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
Source§fn force_affidavit_begins_at() -> Weight
fn force_affidavit_begins_at() -> Weight
Storage: ChainManager::AffidavitEndsAt (r:1 w:0)
Proof: ChainManager::AffidavitEndsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitBeginsAt (r:0 w:1)
Proof: ChainManager::AffidavitBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn force_affidavit_ends_at() -> Weight
fn force_affidavit_ends_at() -> Weight
Storage: ChainManager::AffidavitBeginsAt (r:1 w:0)
Proof: ChainManager::AffidavitBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitEndsAt (r:0 w:1)
Proof: ChainManager::AffidavitEndsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn force_election_begins_at() -> Weight
fn force_election_begins_at() -> Weight
Storage: ChainManager::ElectionBeginsAt (r:0 w:1)
Proof: ChainManager::ElectionBeginsAt (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn force_election_runner_points_upgrade() -> Weight
fn force_election_runner_points_upgrade() -> Weight
Storage: ChainManager::ElectionRunnerPointsUpgrade (r:0 w:1)
Proof: ChainManager::ElectionRunnerPointsUpgrade (max_values: Some(1), max_size: Some(9), added: 504, mode: MaxEncodedLen)
Source§fn force_validate_tx_priority() -> Weight
fn force_validate_tx_priority() -> Weight
Storage: ChainManager::ValidateTxPriority (r:0 w:1)
Proof: ChainManager::ValidateTxPriority (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Source§fn force_election_tx_priority() -> Weight
fn force_election_tx_priority() -> Weight
Storage: ChainManager::ElectionTxPriority (r:0 w:1)
Proof: ChainManager::ElectionTxPriority (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Source§fn force_affidavit_tx_priority() -> Weight
fn force_affidavit_tx_priority() -> Weight
Storage: ChainManager::AffidavitTxPriority (r:0 w:1)
Proof: ChainManager::AffidavitTxPriority (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Source§fn force_finality_after() -> Weight
fn force_finality_after() -> Weight
Storage: ChainManager::FinalityAfter (r:0 w:1)
Proof: ChainManager::FinalityAfter (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Source§fn force_finality_ticks() -> Weight
fn force_finality_ticks() -> Weight
Storage: ChainManager::FinalityTicks (r:0 w:1)
Proof: ChainManager::FinalityTicks (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn inspect_elects() -> Weight
fn inspect_elects() -> Weight
Storage: Authors::RecentElectedOn (r:1 w:0)
Proof: Authors::RecentElectedOn (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::Elected (r:11 w:0)
Proof: Authors::Elected (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
Source§fn prepare_validation_payload() -> Weight
fn prepare_validation_payload() -> Weight
Storage: Timestamp::Now (r:1 w:0)
Proof: Timestamp::Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Storage: System::BlockHash (r:1 w:0)
Proof: System::BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen)
Storage: ChainManager::FinalityAfter (r:1 w:0)
Proof: ChainManager::FinalityAfter (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen)
Storage: ChainManager::FinalityTicks (r:1 w:0)
Proof: ChainManager::FinalityTicks (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Source§fn inspect_affidavit() -> Weight
fn inspect_affidavit() -> Weight
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::AffidavitKeys (r:1 w:0)
Proof: ChainManager::AffidavitKeys (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
Storage: ChainManager::AuthorAffidavits (r:1 w:0)
Proof: ChainManager::AuthorAffidavits (max_values: None, max_size: Some(40574), added: 43049, mode: MaxEncodedLen)
Source§fn on_offence(n: u32) -> Weight
fn on_offence(n: u32) -> Weight
Storage: Authors::AuthorsMap (r:100 w:100)
Proof: Authors::AuthorsMap (max_values: None, max_size: Some(127), added: 2602, mode: MaxEncodedLen)
Storage: Authors::IncreaseProbationBy (r:1 w:0)
Proof: Authors::IncreaseProbationBy (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::PenaltiesBuffer (r:1 w:0)
Proof: Authors::PenaltiesBuffer (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: Authors::AuthorPenalties (r:100 w:100)
Proof: Authors::AuthorPenalties (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen)
Storage: Authors::PenaltiesUntil (r:1 w:1)
Proof: Authors::PenaltiesUntil (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
The range of component n is [1, 100].
Storage: ChainManager::CurrentSession (r:1 w:0)
Proof: ChainManager::CurrentSession (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
Storage: ChainManager::BlockPointsStore (r:1 w:1)
Proof: ChainManager::BlockPointsStore (max_values: None, max_size: Some(76), added: 2551, mode: MaxEncodedLen)
Auto Trait Implementations§
impl<T> Freeze for SubstrateWeight<T>
impl<T> RefUnwindSafe for SubstrateWeight<T>where
T: RefUnwindSafe,
impl<T> Send for SubstrateWeight<T>where
T: Send,
impl<T> Sync for SubstrateWeight<T>where
T: Sync,
impl<T> Unpin for SubstrateWeight<T>where
T: Unpin,
impl<T> UnwindSafe for SubstrateWeight<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
impl<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T, Time> Logging<Time> for Twhere
Time: Time,
impl<T, Time> Logging<Time> for Twhere
Time: Time,
Source§const FALLBACK_TARGET: &'static str = "routine"
const FALLBACK_TARGET: &'static str = "routine"
Default logging target if none is provided.
Most routines, especially offchain workers or background tasks, use this target for simplicity.
It allows a consistent place to look for routine logs without requiring every call to specify a target.
Note: This target is only a conveninence and may be somewhat vague. To ensure errors can still be traced accurately, the logged messages should include additional metadata (e.g., module name, error index, or contextual info) so that the source of the error can be identified even if the target is generic.
Source§type Logger = DispatchError
type Logger = DispatchError
The type taken and returned for logging.
We simply return the same [DispatchError] that was logged,
so logging does not change control flow or error propagation.
DispatchError is used because in Substrate it encompasses all
runtime errors - including module errors, token errors, arithmetic
issues, and transactional boundaries - making it the universal
substrate-side error representation.
Source§type Level = LogLevel
type Level = LogLevel
The log level type.
We use the LogLevel enum to standardize severity levels
(Info, Warn, Error, Debug) across all routine logs.
Source§fn log(
level: <T as Logging<Time>>::Level,
err: &<T as Logging<Time>>::Logger,
timestamp: Time,
target: Option<&str>,
fmt: Option<fn(Time, &<T as Logging<Time>>::Level, &str, &str) -> String>,
) -> <T as Logging<Time>>::Logger
fn log( level: <T as Logging<Time>>::Level, err: &<T as Logging<Time>>::Logger, timestamp: Time, target: Option<&str>, fmt: Option<fn(Time, &<T as Logging<Time>>::Level, &str, &str) -> String>, ) -> <T as Logging<Time>>::Logger
Source§fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
Source§fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.