Module forest_filecoin::shim::fvm_latest::kernel::prelude
source · Expand description
Import this module (with a glob) if you’re implementing a kernel, especially if you want to use ambassador to delegate the implementation.
Structs§
- Address is the struct that defines the protocol and data payload conversion from either a public key or value
- A registry of open blocks (per-kernel). Think “file descriptor” table. At the moment, there’s no way to close/remove a block from this table.
- ExitCode defines the exit code from the VM invocation.
- A typesafe representation of gas (internally stored as milligas).
- A handle returned by
charge_gas
which must be used to mark the end of the execution associated with that gas. - Specifies the network version
- Provides prices for operations in the VM. All costs are in milligas.
- Flags passed to the send syscall.
- A quantity of native tokens. A token amount is an integer, but has a human interpretation as a value with 18 decimal places. This is a new-type in order to prevent accidental conversion from other BigInts. From/Into BigInt is missing by design.
Enums§
- Signature variants for Filecoin signatures.
Constants§
- Secp256k1 Public key length in bytes.
- Secp256k1 signature length in bytes.
- Length of the signature input message hash in bytes (32).
Traits§
- Actors operations whose scope of action is actors other than the calling actor. The calling actor’s state may be consulted to resolve some.
- Cryptographic primitives provided by the kernel.
- Debugging APIs.
- Eventing APIs.
- The IPLD subset of the kernel.
- The “kernel” implements the FVM interface as presented to the actors. It:
- Accessors to query attributes of the incoming message.
- Network-related operations.
- Randomness queries.
- Actor state access and manipulation. Depends on BlockOps to read and write blocks in the state tree.
- The actor calling operations.
- The actor upgrade operations.
Type Aliases§
- Identifier for Actors, includes builtin and initialized actors
- Blocks in the block registry are addressed by an ordinal, starting from 1 (
FIRST_ID
). The zero value is reserved to mean “no data”, such as when actor invocations receive or return no data. - Epoch number of a chain. This acts as a proxy for time within the VM.
- A Cid that contains a multihash with an allocated size of 512 bits.
- Method number indicator for calling actor methods.
- A Multihash with the same allocated size as the Multihashes produces by this derive.
Derive Macros§
- Delegate the implementation of a trait to a struct field/enum variants by adding
#[derive(Delegate)]
and its associated attribute#[delegate(Trait)]
to it: