Struct forest_filecoin::shim::gas::PriceListV3
source · pub struct PriceListV3 {Show 39 fields
pub(crate) on_chain_message_compute: ScalingCost,
pub(crate) on_chain_message_storage: ScalingCost,
pub(crate) on_chain_return_compute: ScalingCost,
pub(crate) on_chain_return_storage: ScalingCost,
pub(crate) send_transfer_funds: Gas,
pub(crate) send_invoke_method: Gas,
pub(crate) address_lookup: Gas,
pub(crate) address_assignment: Gas,
pub(crate) actor_lookup: Gas,
pub(crate) actor_update: Gas,
pub(crate) actor_create_storage: Gas,
pub(crate) sig_cost: HashMap<SignatureType, ScalingCost>,
pub(crate) secp256k1_recover_cost: Gas,
pub(crate) hashing_cost: HashMap<SupportedHashes, ScalingCost>,
pub(crate) tipset_cid_latest: Gas,
pub(crate) tipset_cid_historical: Gas,
pub(crate) compute_unsealed_sector_cid_base: Gas,
pub(crate) verify_seal_base: Gas,
pub(crate) verify_aggregate_seal_per: HashMap<RegisteredSealProof, Gas>,
pub(crate) verify_aggregate_seal_steps: HashMap<RegisteredSealProof, StepCost>,
pub(crate) verify_post_lookup: HashMap<RegisteredPoStProof, ScalingCost>,
pub(crate) verify_consensus_fault: Gas,
pub(crate) verify_replica_update: Gas,
pub(crate) get_randomness_seed: Gas,
pub(crate) block_memcpy: ScalingCost,
pub(crate) block_allocate: ScalingCost,
pub(crate) block_memory_retention_minimum: ScalingCost,
pub(crate) block_open: ScalingCost,
pub(crate) block_persist_storage: ScalingCost,
pub(crate) block_persist_compute: Gas,
pub(crate) syscall_cost: Gas,
pub(crate) wasm_rules: WasmGasPrices,
pub(crate) event_validation_cost: ScalingCost,
pub(crate) event_accept_per_index_element: ScalingCost,
pub(crate) builtin_actor_manifest_lookup: Gas,
pub(crate) network_context: Gas,
pub(crate) message_context: Gas,
pub(crate) install_wasm_per_byte_cost: Gas,
pub(crate) preloaded_actors: Vec<u64>,
}
Expand description
Provides prices for operations in the VM. All costs are in milligas.
Fields§
§on_chain_message_compute: ScalingCost
§on_chain_message_storage: ScalingCost
§on_chain_return_compute: ScalingCost
§on_chain_return_storage: ScalingCost
§send_transfer_funds: Gas
§send_invoke_method: Gas
§address_lookup: Gas
§address_assignment: Gas
§actor_lookup: Gas
§actor_update: Gas
§actor_create_storage: Gas
§sig_cost: HashMap<SignatureType, ScalingCost>
§secp256k1_recover_cost: Gas
§hashing_cost: HashMap<SupportedHashes, ScalingCost>
§tipset_cid_latest: Gas
§tipset_cid_historical: Gas
§compute_unsealed_sector_cid_base: Gas
§verify_seal_base: Gas
§verify_aggregate_seal_per: HashMap<RegisteredSealProof, Gas>
§verify_aggregate_seal_steps: HashMap<RegisteredSealProof, StepCost>
§verify_post_lookup: HashMap<RegisteredPoStProof, ScalingCost>
§verify_consensus_fault: Gas
§verify_replica_update: Gas
§get_randomness_seed: Gas
§block_memcpy: ScalingCost
§block_allocate: ScalingCost
§block_memory_retention_minimum: ScalingCost
§block_open: ScalingCost
§block_persist_storage: ScalingCost
§block_persist_compute: Gas
§syscall_cost: Gas
§wasm_rules: WasmGasPrices
§event_validation_cost: ScalingCost
§event_accept_per_index_element: ScalingCost
§builtin_actor_manifest_lookup: Gas
§network_context: Gas
§message_context: Gas
§install_wasm_per_byte_cost: Gas
§preloaded_actors: Vec<u64>
Implementations§
source§impl PriceList
impl PriceList
sourcepub fn on_chain_message(&self, msg_size: usize) -> GasCharge
pub fn on_chain_message(&self, msg_size: usize) -> GasCharge
Returns the gas required for storing a message of a given size in the chain, plus the cost of updating the sending actor’s nonce and balance in the state-tree.
sourcepub fn on_value_transfer(&self) -> GasCharge
pub fn on_value_transfer(&self) -> GasCharge
Returns the gas required when invoking a method.
sourcepub fn on_method_invocation(&self) -> GasCharge
pub fn on_method_invocation(&self) -> GasCharge
Returns the gas required when invoking a method.
sourcepub fn on_method_return(
&self,
call_depth: u32,
data_size: u32,
) -> Option<GasCharge>
pub fn on_method_return( &self, call_depth: u32, data_size: u32, ) -> Option<GasCharge>
Returns the gas required for storing the response of a message in the chain.
sourcepub fn on_syscall(&self) -> GasCharge
pub fn on_syscall(&self) -> GasCharge
Returns the gas cost to be applied on a syscall.
sourcepub fn on_create_actor(&self, new_address: bool) -> GasCharge
pub fn on_create_actor(&self, new_address: bool) -> GasCharge
Returns the gas required for creating an actor. Pass true
to when explicitly assigning a
new address.
sourcepub fn on_delete_actor(&self) -> GasCharge
pub fn on_delete_actor(&self) -> GasCharge
Returns the gas required for deleting an actor.
sourcepub fn on_verify_signature(
&self,
sig_type: SignatureType,
data_len: usize,
) -> GasCharge
pub fn on_verify_signature( &self, sig_type: SignatureType, data_len: usize, ) -> GasCharge
Returns gas required for signature verification.
sourcepub fn on_recover_secp_public_key(&self) -> GasCharge
pub fn on_recover_secp_public_key(&self) -> GasCharge
Returns gas required for recovering signer pubkey from signature
sourcepub fn on_hashing(&self, hasher: SupportedHashes, data_len: usize) -> GasCharge
pub fn on_hashing(&self, hasher: SupportedHashes, data_len: usize) -> GasCharge
Returns gas required for hashing data.
sourcepub fn on_compute_unsealed_sector_cid(
&self,
_proof: RegisteredSealProof,
_pieces: &[PieceInfo],
) -> GasCharge
pub fn on_compute_unsealed_sector_cid( &self, _proof: RegisteredSealProof, _pieces: &[PieceInfo], ) -> GasCharge
Returns gas required for computing unsealed sector Cid.
sourcepub fn on_verify_seal(&self, _info: &SealVerifyInfo) -> GasCharge
pub fn on_verify_seal(&self, _info: &SealVerifyInfo) -> GasCharge
Returns gas required for seal verification.
pub fn on_verify_aggregate_seals( &self, aggregate: &AggregateSealVerifyProofAndInfos, ) -> GasCharge
sourcepub fn on_verify_replica_update(
&self,
_replica: &ReplicaUpdateInfo,
) -> GasCharge
pub fn on_verify_replica_update( &self, _replica: &ReplicaUpdateInfo, ) -> GasCharge
Returns gas required for replica verification.
sourcepub fn on_verify_post(&self, info: &WindowPoStVerifyInfo) -> GasCharge
pub fn on_verify_post(&self, info: &WindowPoStVerifyInfo) -> GasCharge
Returns gas required for PoSt verification.
sourcepub fn on_verify_consensus_fault(
&self,
_h1_len: usize,
_h2_len: usize,
_extra_len: usize,
) -> GasCharge
pub fn on_verify_consensus_fault( &self, _h1_len: usize, _h2_len: usize, _extra_len: usize, ) -> GasCharge
Returns gas required for verifying consensus fault.
sourcepub fn on_get_randomness(&self, entropy_size: usize) -> GasCharge
pub fn on_get_randomness(&self, entropy_size: usize) -> GasCharge
Returns the cost of the gas required for getting randomness from the client, based on the number of bytes of entropy.
sourcepub fn on_block_open_base(&self) -> GasCharge
pub fn on_block_open_base(&self) -> GasCharge
Returns the base gas required for loading an object, independent of the object’s size.
sourcepub fn on_block_open_per_byte(&self, data_size: usize) -> GasCharge
pub fn on_block_open_per_byte(&self, data_size: usize) -> GasCharge
Returns the gas required for loading an object based on the size of the object.
sourcepub fn on_block_read(&self, data_size: usize) -> GasCharge
pub fn on_block_read(&self, data_size: usize) -> GasCharge
Returns the gas required for reading a loaded object.
sourcepub fn on_block_create(&self, data_size: usize) -> GasCharge
pub fn on_block_create(&self, data_size: usize) -> GasCharge
Returns the gas required for adding an object to the FVM cache.
sourcepub fn on_block_link(
&self,
hash_code: SupportedHashes,
data_size: usize,
) -> GasCharge
pub fn on_block_link( &self, hash_code: SupportedHashes, data_size: usize, ) -> GasCharge
Returns the gas required for committing an object to the state blockstore.
sourcepub fn on_block_stat(&self) -> GasCharge
pub fn on_block_stat(&self) -> GasCharge
Returns the gas required for storing an object.
sourcepub fn on_actor_lookup(&self) -> GasCharge
pub fn on_actor_lookup(&self) -> GasCharge
Returns the gas required to lookup an actor in the state-tree.
sourcepub fn on_actor_update(&self) -> GasCharge
pub fn on_actor_update(&self) -> GasCharge
Returns the gas required to update an actor in the state-tree. Assumes that the actor lookup fee has already been charged.
sourcepub fn on_actor_create(&self) -> GasCharge
pub fn on_actor_create(&self) -> GasCharge
Returns the gas required to create a new actor in the state-tree. Assumes that the actor lookup and update fees have already been charged.
sourcepub fn on_self_balance(&self) -> GasCharge
pub fn on_self_balance(&self) -> GasCharge
Returns the gas required for accessing the balance of the current actor.
sourcepub fn on_balance_of(&self) -> GasCharge
pub fn on_balance_of(&self) -> GasCharge
Returns the gas required for accessing the balance of an actor.
sourcepub fn on_resolve_address(&self) -> GasCharge
pub fn on_resolve_address(&self) -> GasCharge
Returns the gas required for resolving an actor address.
Might require lookup in the state tree as well as loading the state of the init actor.
sourcepub fn on_lookup_delegated_address(&self) -> GasCharge
pub fn on_lookup_delegated_address(&self) -> GasCharge
Returns the gas required for looking up an actor’s delegated address.
sourcepub fn on_get_actor_code_cid(&self) -> GasCharge
pub fn on_get_actor_code_cid(&self) -> GasCharge
Returns the gas required for getting the CID of the code of an actor.
Might require looking up the actor in the state tree.
sourcepub fn on_get_builtin_actor_type(&self) -> GasCharge
pub fn on_get_builtin_actor_type(&self) -> GasCharge
Returns the gas required for looking up the type of a builtin actor by CID.
sourcepub fn on_get_code_cid_for_type(&self) -> GasCharge
pub fn on_get_code_cid_for_type(&self) -> GasCharge
Returns the gas required for looking up the CID of a builtin actor by type.
sourcepub fn on_tipset_cid(&self, lookback: bool) -> GasCharge
pub fn on_tipset_cid(&self, lookback: bool) -> GasCharge
Returns the gas required for looking up a tipset CID with the given lookback.
sourcepub fn on_network_context(&self) -> GasCharge
pub fn on_network_context(&self) -> GasCharge
Returns the gas required for accessing the network context.
sourcepub fn on_message_context(&self) -> GasCharge
pub fn on_message_context(&self) -> GasCharge
Returns the gas required for accessing the message context.
sourcepub fn init_memory_gas(&self, min_memory_bytes: usize) -> Gas
pub fn init_memory_gas(&self, min_memory_bytes: usize) -> Gas
Returns the gas required for initializing memory.
sourcepub fn grow_memory_gas(&self, grow_memory_bytes: usize) -> Gas
pub fn grow_memory_gas(&self, grow_memory_bytes: usize) -> Gas
Returns the gas required for growing memory.
sourcepub fn init_table_gas(&self, min_table_elements: u32) -> Gas
pub fn init_table_gas(&self, min_table_elements: u32) -> Gas
Returns the gas required for initializing tables.
pub fn on_actor_event_validate(&self, data_size: usize) -> GasCharge
pub fn on_actor_event_accept( &self, evt: &ActorEvent, serialized_len: usize, ) -> GasCharge
Trait Implementations§
source§impl From<&'static PriceList> for PriceList
impl From<&'static PriceList> for PriceList
source§fn from(value: &'static PriceListV3) -> Self
fn from(value: &'static PriceListV3) -> Self
source§impl PartialEq for PriceList
impl PartialEq for PriceList
impl Eq for PriceList
impl StructuralPartialEq for PriceList
Auto Trait Implementations§
impl Freeze for PriceList
impl RefUnwindSafe for PriceList
impl Send for PriceList
impl Sync for PriceList
impl Unpin for PriceList
impl UnwindSafe for PriceList
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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
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
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> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> References<RawCodec> for T
impl<T> References<RawCodec> for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.