Crate massa_execution_exports
source ·Expand description
§Overview
This crate provides all the facilities to interact with a running execution worker (massa-execution-worker crate) that is in charge of executing operations in a virtual machine, and applying the effects of the execution to a ledger.
§Usage
When an execution worker is launched to run in a separate thread for the whole duration of the process,
an instance of ExecutionManager
is returned (see the documentation of start_execution_worker
in massa-execution-worker
),
as well as an instance of ExecutionController
.
The non-cloneable ExecutionManager
allows stopping the execution worker thread.
The cloneable ExecutionController
allows sending updates on the latest blockclique changes to the execution worker
for it to keep track of them and execute the operations present in blocks.
It also allows various read-only queries such as executing bytecode
while ignoring all the changes it would cause to the consensus state (read-only execution),
or reading the state at the output of the executed blockclique blocks.
§Architecture
§config.rs
Contains configuration parameters for the execution system.
§controller_traits.rs
Defines the ExecutionManager
and ExecutionController
traits for interacting with the execution worker.
§errors.rs
Defines error types for the crate.
§event_store.rs
Defines an indexed, finite-size storage system for execution events.
§types.rs
Defines useful shared structures.
§Test exports
When the crate feature test-exports
is enabled, tooling useful for test-exports purposes is exported.
See test_exports/mod.rs
for details.
Modules§
- channels 🔒
- This module exports generic traits representing interfaces for interacting with the Execution worker
- error 🔒this file defines all possible execution error categories
- This module represents an event store allowing to store, search and retrieve a config-limited number of execution-generated events
- mapping grpc
- settings 🔒This module provides the structures used to provide configuration parameters to the Execution system
- types 🔒This file exports useful types used to interact with the execution worker
- types for execution-trace / execution-info
Structs§
- Store for events emitted by smart contracts
- structure storing a block id + network versions (from a block header)
- Execution info about an address
- Metadata needed to execute the block
- channels used by the execution worker
- Execution module configuration
- structure describing the output of a single execution
- Information about cycles
- Request to atomically execute a batch of execution state queries
- Response to a list of execution queries
- Staker information for a given cycle
- Structure describing an element of the execution stack. Every time a function is called from bytecode, a new
ExecutionStackElement
is pushed at the top of the execution stack to represent the local execution context of the called function, instead of the caller’s which should lie just below in the stack. - structure describing a read-only call
- structure describing the output of a read only execution
- structure describing different types of read-only execution request
- Storage cost constants
Enums§
- Errors of the execution component.
- Execution query errors
- Execution status of an operation or denunciation
- Execution state query item
- Execution state query response item
- structure describing different possible targets of a read-only execution request
- structure describing the output of the execution of a slot
Traits§
- interface that communicates with the execution worker thread
- Execution manager used to stop the execution thread