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.
§Execution trace
See documentation in types_trace_info.rs file.
Modules§
- channels 🔒
- controller_
traits 🔒 - This module exports generic traits representing interfaces for interacting with the Execution worker
- error 🔒
- this file defines all possible execution error categories
- event_
store 🔒 - This module represents an event store allowing to store, search and retrieve a config-limited number of execution-generated events
- execution_
info - types for execution-info
- mapping_
grpc - 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_
trace_ info - types for execution-trace
Structs§
- Condom
Limits - Event
Store - Store for events emitted by smart contracts
- Executed
Block Info - structure storing a block id + network versions (from a block header)
- Execution
Address Info - Execution info about an address
- Execution
Block Metadata - Metadata needed to execute the block
- Execution
Channels - channels used by the execution worker
- Execution
Config - Execution module configuration
- Execution
Output - structure describing the output of a single execution
- Execution
Query Cycle Infos - Information about cycles
- Execution
Query Request - Request to atomically execute a batch of execution state queries
- Execution
Query Response - Response to a list of execution queries
- Execution
Query Staker Info - Staker information for a given cycle
- Execution
Stack Element - Structure describing an element of the execution stack.
Every time a function is called from bytecode,
a new
ExecutionStackElementis 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. - GasCosts
- Read
Only Call Request - structure describing a read-only call
- Read
Only Execution Output - structure describing the output of a read only execution
- Read
Only Execution Request - structure describing different types of read-only execution request
- Storage
Costs Constants - Storage cost constants
Enums§
- Execution
Error - Errors of the execution component.
- Execution
Query Error - Execution query errors
- Execution
Query Execution Status - Execution status of an operation or denunciation
- Execution
Query Request Item - Execution state query item
- Execution
Query Response Item - Execution state query response item
- Read
Only Execution Target - structure describing different possible targets of a read-only execution request
- Slot
Execution Output - structure describing the output of the execution of a slot
Traits§
- Execution
Controller - interface that communicates with the execution worker thread
- Execution
Manager - Execution manager used to stop the execution thread