Struct forest_filecoin::shim::gas::PriceListV4

source ·
pub struct PriceListV4 {
Show 42 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) bls_pairing_cost: Gas, pub(crate) bls_hashing_cost: ScalingCost, pub(crate) hashing_cost: HashMap<SupportedHashes, ScalingCost>, pub(crate) lookback_cost: ScalingCost, 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) 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) wasm_rules: WasmGasPrices, pub(crate) event_per_entry: ScalingCost, pub(crate) builtin_actor_manifest_lookup: Gas, pub(crate) utf8_validation: ScalingCost, pub(crate) network_context: Gas, pub(crate) message_context: Gas, pub(crate) install_wasm_per_byte_cost: Gas, pub(crate) preloaded_actors: Vec<u64>, pub(crate) ipld_cbor_scan_per_field: Gas, pub(crate) ipld_cbor_scan_per_cid: Gas, pub(crate) ipld_link_tracked: Gas, pub(crate) ipld_link_checked: Gas,
}
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§bls_pairing_cost: Gas§bls_hashing_cost: ScalingCost§hashing_cost: HashMap<SupportedHashes, ScalingCost>§lookback_cost: ScalingCost§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§block_memcpy: ScalingCost§block_allocate: ScalingCost§block_memory_retention_minimum: ScalingCost§block_open: ScalingCost§block_persist_storage: ScalingCost§block_persist_compute: Gas§wasm_rules: WasmGasPrices§event_per_entry: ScalingCost§builtin_actor_manifest_lookup: Gas§utf8_validation: ScalingCost§network_context: Gas§message_context: Gas§install_wasm_per_byte_cost: Gas§preloaded_actors: Vec<u64>§ipld_cbor_scan_per_field: Gas§ipld_cbor_scan_per_cid: Gas§ipld_link_tracked: Gas§ipld_link_checked: Gas

Implementations§

source§

impl PriceList

source

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.

source

pub fn on_value_transfer(&self) -> GasCharge

Returns the gas required when invoking a method.

source

pub fn on_method_invocation( &self, _param_size: u32, param_links: usize, ) -> GasCharge

Returns the gas required when invoking a method.

source

pub fn on_method_return( &self, call_depth: u32, return_size: u32, return_links: usize, ) -> GasCharge

Returns the gas required for returning a value from a method. At the top-level, this charges for storing the block on-chain. Everywhere else, it charges for tracking IPLD links.

source

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.

source

pub fn on_delete_actor(&self) -> GasCharge

Returns the gas required for deleting an actor.

source

pub fn on_verify_signature( &self, sig_type: SignatureType, data_len: usize, ) -> GasCharge

Returns gas required for signature verification.

source

pub fn on_verify_aggregate_signature( &self, num_sigs: usize, data_len: usize, ) -> GasCharge

Returns gas required for BLS aggregate signature verification.

source

pub fn on_recover_secp_public_key(&self) -> GasCharge

Returns gas required for recovering signer pubkey from signature

source

pub fn on_hashing(&self, hasher: SupportedHashes, data_len: usize) -> GasCharge

Returns gas required for hashing data.

source

pub fn on_utf8_validation(&self, len: usize) -> GasCharge

source

pub fn on_compute_unsealed_sector_cid( &self, _proof: RegisteredSealProof, _pieces: &[PieceInfo], ) -> GasCharge

Returns gas required for computing unsealed sector Cid.

source

pub fn on_verify_seal(&self, _info: &SealVerifyInfo) -> GasCharge

Returns gas required for seal verification.

source

pub fn on_verify_aggregate_seals( &self, aggregate: &AggregateSealVerifyProofAndInfos, ) -> GasCharge

source

pub fn on_verify_replica_update( &self, _replica: &ReplicaUpdateInfo, ) -> GasCharge

Returns gas required for replica verification.

source

pub fn on_verify_post(&self, info: &WindowPoStVerifyInfo) -> GasCharge

Returns gas required for PoSt verification.

source

pub fn on_verify_consensus_fault( &self, _h1_len: usize, _h2_len: usize, _extra_len: usize, ) -> GasCharge

Returns gas required for verifying consensus fault.

source

pub fn on_get_randomness(&self, lookback: i64) -> GasCharge

Returns the cost of the gas required for getting randomness from the client with the given lookback.

source

pub fn on_block_open_base(&self) -> GasCharge

Returns the base gas required for loading an object, independent of the object’s size.

source

pub fn on_block_open(&self, data_size: usize, links: usize) -> GasCharge

Returns the gas required for loading an object based on the size of the object.

source

pub fn on_block_read(&self, data_size: usize) -> GasCharge

Returns the gas required for reading a loaded object.

source

pub fn on_block_create(&self, data_size: usize, links: usize) -> GasCharge

Returns the gas required for adding an object to the FVM cache.

Returns the gas required for committing an object to the state blockstore.

source

pub fn on_block_stat(&self) -> GasCharge

Returns the gas required for storing an object.

source

pub fn on_actor_lookup(&self) -> GasCharge

Returns the gas required to lookup an actor in the state-tree.

source

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.

source

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.

source

pub fn on_self_balance(&self) -> GasCharge

Returns the gas required for accessing the balance of the current actor.

source

pub fn on_balance_of(&self) -> GasCharge

Returns the gas required for accessing the balance of an actor.

source

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.

source

pub fn on_lookup_delegated_address(&self) -> GasCharge

Returns the gas required for looking up an actor’s delegated address.

source

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.

source

pub fn on_get_builtin_actor_type(&self) -> GasCharge

Returns the gas required for looking up the type of a builtin actor by CID.

source

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.

source

pub fn on_tipset_cid(&self, lookback: i64) -> GasCharge

Returns the gas required for looking up a tipset CID with the given lookback.

source

pub fn on_network_context(&self) -> GasCharge

Returns the gas required for accessing the network context.

source

pub fn on_message_context(&self) -> GasCharge

Returns the gas required for accessing the message context.

source

pub fn on_install_actor(&self, wasm_size: usize) -> GasCharge

Returns the gas required for installing an actor.

source

pub fn on_actor_event( &self, entries: usize, keysize: usize, valuesize: usize, ) -> GasCharge

source

pub fn on_get_root(&self) -> GasCharge

source

pub fn on_set_root(&self) -> GasCharge

Trait Implementations§

source§

impl Clone for PriceList

source§

fn clone(&self) -> PriceList

Returns a copy 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 PriceList

source§

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

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

impl From<&'static PriceList> for PriceList

source§

fn from(value: &'static PriceListV4) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PriceList

source§

fn eq(&self, other: &PriceList) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for PriceList

source§

impl StructuralPartialEq for PriceList

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> Conv for T

source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
source§

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

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> FmtForward for T

source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

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

source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> References<RawCodec> for T

source§

fn references<R, E>(_c: RawCodec, _r: &mut R, _set: &mut E) -> Result<(), Error>
where R: Read, E: Extend<Cid<64>>,

Scrape the references from an impl Read. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> Tap for T

source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

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

§

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> TryConv for T

source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

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

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> MaybeSend for T
where T: Send,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,