Skip to main content

ExecutionCost

Struct ExecutionCost 

Source
pub struct ExecutionCost {
Show 41 fields pub syscall_base_cost: u64, pub log_64_units: u64, pub log_pubkey_units: u64, pub create_program_address_units: u64, pub invoke_units: u64, pub max_cpi_instruction_size: u64, pub cpi_bytes_per_unit: u64, pub max_instruction_stack_depth: usize, pub max_instruction_trace_length: usize, pub sha256_base_cost: u64, pub sha256_byte_cost: u64, pub sha256_max_slices: u64, pub sysvar_base_cost: u64, pub secp256k1_recover_cost: u64, pub curve25519_edwards_validate_point_cost: u64, pub curve25519_edwards_add_cost: u64, pub curve25519_edwards_subtract_cost: u64, pub curve25519_edwards_multiply_cost: u64, pub curve25519_edwards_msm_base_cost: u64, pub curve25519_edwards_msm_incremental_cost: u64, pub curve25519_ristretto_validate_point_cost: u64, pub curve25519_ristretto_add_cost: u64, pub curve25519_ristretto_subtract_cost: u64, pub curve25519_ristretto_multiply_cost: u64, pub curve25519_ristretto_msm_base_cost: u64, pub curve25519_ristretto_msm_incremental_cost: u64, pub heap_size: u64, pub heap_cost: u64, pub mem_op_base_cost: u64, pub alt_bn128_addition_cost: u64, pub alt_bn128_multiplication_cost: u64, pub alt_bn128_pairing_one_pair_cost_first: u64, pub alt_bn128_pairing_one_pair_cost_other: u64, pub alt_bn128_g1_compress: u64, pub alt_bn128_g1_decompress: u64, pub alt_bn128_g2_compress: u64, pub alt_bn128_g2_decompress: u64, pub big_modular_exponentiation_cost: u64, pub poseidon_cost_coefficient_a: u64, pub poseidon_cost_coefficient_c: u64, pub get_remaining_compute_units_cost: u64,
}
Expand description

Compute unit costs for syscalls and operations Reference: https://github.com/anza-xyz/agave/blob/master/program-runtime/src/execution_budget.rs

Fields§

§syscall_base_cost: u64§log_64_units: u64§log_pubkey_units: u64§create_program_address_units: u64§invoke_units: u64§max_cpi_instruction_size: u64§cpi_bytes_per_unit: u64§max_instruction_stack_depth: usize§max_instruction_trace_length: usize§sha256_base_cost: u64§sha256_byte_cost: u64§sha256_max_slices: u64§sysvar_base_cost: u64§secp256k1_recover_cost: u64§curve25519_edwards_validate_point_cost: u64§curve25519_edwards_add_cost: u64§curve25519_edwards_subtract_cost: u64§curve25519_edwards_multiply_cost: u64§curve25519_edwards_msm_base_cost: u64§curve25519_edwards_msm_incremental_cost: u64§curve25519_ristretto_validate_point_cost: u64§curve25519_ristretto_add_cost: u64§curve25519_ristretto_subtract_cost: u64§curve25519_ristretto_multiply_cost: u64§curve25519_ristretto_msm_base_cost: u64§curve25519_ristretto_msm_incremental_cost: u64§heap_size: u64§heap_cost: u64§mem_op_base_cost: u64§alt_bn128_addition_cost: u64§alt_bn128_multiplication_cost: u64§alt_bn128_pairing_one_pair_cost_first: u64§alt_bn128_pairing_one_pair_cost_other: u64§alt_bn128_g1_compress: u64§alt_bn128_g1_decompress: u64§alt_bn128_g2_compress: u64§alt_bn128_g2_decompress: u64§big_modular_exponentiation_cost: u64§poseidon_cost_coefficient_a: u64§poseidon_cost_coefficient_c: u64§get_remaining_compute_units_cost: u64

Trait Implementations§

Source§

impl Clone for ExecutionCost

Source§

fn clone(&self) -> ExecutionCost

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionCost

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutionCost

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.