Crate gear_core_processor

Source
Expand description

Gear message processor.

Modules§

common
Common structures for processing.
configs
Configurations.
informational
Informational functions for core-processor and executor.

Structs§

ContextChargedForCode
The instance returned by precharge_for_code. Existence of the instance means that corresponding counters were successfully charged for fetching the binary code from storage.
ContextChargedForInstrumentation
The instance returned by precharge_for_instrumentation. Existence of the instance means that corresponding counters were successfully charged for reinstrumentation of the code.
Ext
Structure providing externalities for running host functions.
ProcessExecutionContext
Checked parameters for message execution across processing runs.
ProcessorContext
Processor context.

Enums§

ActorPrepareMemoryError
Prepare memory error
AllocExtError
Ext’s memory management (calls to allocate and free) error.
FallibleExtError
Fallible API error.
UnrecoverableExtError
Infallible API error.

Traits§

ProcessorExternalities
Trait to which ext must have to work in processor wasm executor. Currently used only for lazy-pages support.

Functions§

calculate_gas_for_code
Calculates gas amount required to charge for code loading.
calculate_gas_for_program
Calculates gas amount required to charge for program loading.
execute_wasm
Execute wasm with dispatch and return dispatch result.
handle_journal
Handle some journal records passing them to the journal handler.
precharge_for_code
Charge a message for the program binary code beforehand.
precharge_for_code_length
Charge a message for fetching the actual length of the binary code from a storage. The updated value of binary code length should be kept in standalone storage. The caller has to call this function to charge gas-counters accordingly before fetching the value.
precharge_for_instrumentation
Charge a message for instrumentation of the binary code beforehand.
precharge_for_memory
Charge a message for program memory and module instantiation beforehand.
precharge_for_program
Charge a message for program data beforehand.
process
Process program & dispatch for it and return journal for updates.