Crate massa_execution_exports

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.

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

CondomLimits
EventStore
Store for events emitted by smart contracts
ExecutedBlockInfo
structure storing a block id + network versions (from a block header)
ExecutionAddressInfo
Execution info about an address
ExecutionBlockMetadata
Metadata needed to execute the block
ExecutionChannels
channels used by the execution worker
ExecutionConfig
Execution module configuration
ExecutionOutput
structure describing the output of a single execution
ExecutionQueryCycleInfos
Information about cycles
ExecutionQueryRequest
Request to atomically execute a batch of execution state queries
ExecutionQueryResponse
Response to a list of execution queries
ExecutionQueryStakerInfo
Staker information for a given cycle
ExecutionStackElement
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.
GasCosts
ReadOnlyCallRequest
structure describing a read-only call
ReadOnlyExecutionOutput
structure describing the output of a read only execution
ReadOnlyExecutionRequest
structure describing different types of read-only execution request
StorageCostsConstants
Storage cost constants

Enums§

ExecutionError
Errors of the execution component.
ExecutionQueryError
Execution query errors
ExecutionQueryExecutionStatus
Execution status of an operation or denunciation
ExecutionQueryRequestItem
Execution state query item
ExecutionQueryResponseItem
Execution state query response item
ReadOnlyExecutionTarget
structure describing different possible targets of a read-only execution request
SlotExecutionOutput
structure describing the output of the execution of a slot

Traits§

ExecutionController
interface that communicates with the execution worker thread
ExecutionManager
Execution manager used to stop the execution thread