Struct unc_vm_runner::ProfileDataV2
source · pub struct ProfileDataV2 { /* private fields */ }
Expand description
Deprecated serialization format to store profiles in the database.
There is no ProfileDataV1 because meta data V1 did no have profiles. Counting thus starts with 2 to match the meta data version numbers.
This is not part of the protocol but archival nodes still rely on this not changing to answer old tx-status requests with a gas profile.
It used to store an array that manually mapped enum Cost
to gas
numbers. Now ProfileDataV2
and Cost
are deprecated. But to lookup
old gas profiles from the DB, we need to keep the code around.
Implementations§
source§impl ProfileDataV2
impl ProfileDataV2
pub fn get_ext_cost(&self, ext: ExtCosts) -> u64
pub fn get_wasm_cost(&self) -> u64
sourcepub fn legacy_action_costs(&self) -> Vec<(&'static str, Gas)>
pub fn legacy_action_costs(&self) -> Vec<(&'static str, Gas)>
List action cost in the old way, which conflated several action parameters into one.
This is used to display old gas profiles on the RPC API and in debug output.
pub fn action_gas(&self) -> u64
Trait Implementations§
source§impl BorshDeserialize for ProfileDataV2
impl BorshDeserialize for ProfileDataV2
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for ProfileDataV2
impl BorshSerialize for ProfileDataV2
source§impl Clone for ProfileDataV2
impl Clone for ProfileDataV2
source§fn clone(&self) -> ProfileDataV2
fn clone(&self) -> ProfileDataV2
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProfileDataV2
impl Debug for ProfileDataV2
source§impl Default for ProfileDataV2
impl Default for ProfileDataV2
source§impl Index<ActionCosts> for ProfileDataV2
impl Index<ActionCosts> for ProfileDataV2
source§impl Index<ExtCosts> for ProfileDataV2
impl Index<ExtCosts> for ProfileDataV2
source§impl PartialEq for ProfileDataV2
impl PartialEq for ProfileDataV2
source§fn eq(&self, other: &ProfileDataV2) -> bool
fn eq(&self, other: &ProfileDataV2) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ProfileDataV2
impl StructuralPartialEq for ProfileDataV2
Auto Trait Implementations§
impl Freeze for ProfileDataV2
impl RefUnwindSafe for ProfileDataV2
impl Send for ProfileDataV2
impl Sync for ProfileDataV2
impl Unpin for ProfileDataV2
impl UnwindSafe for ProfileDataV2
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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 more