Crate cfx_executor

Source
Expand description

Conflux Executor: A Rust crate for the core logic of executing transactions on the Conflux blockchain. It encapsulates all the necessary logic for a consensus node during execution, focusing solely on the execution logic without enhanced features like tracing or trace processing.

Re-exports§

pub use internal_contract::InternalContractMap;
pub use internal_contract::InternalContractTrait;
pub use observer as executive_observer;

Modules§

context
Execution Context: Implements the context during the execution, like caller’s information and block information. It also ensures compatibility with the context interface of the EVM interpreter.
executive
Transaction Execution Entry: Manages the execution of transactions. It is responsible for receiving transactions, performing checks according to the Conflux specification, and submitting them to the execution engine.
internal_contract
Conflux Internal Contracts: Implements Conflux’s builtin contracts.
machine
Execution Engine Object: Serves as a factory for specifications, builtin contracts (including internal contracts), and the EVM interpreter.
observer
Observability Interface: Defines a trait for extending functionality. Extensions can implement this trait to observe detailed aspects of the execution process.
spec
Specification Control: Enables fine-grained control over the engine’s behavior during the execution of different blocks, allowing the engine to achieve backward compatibility with different versions of the Conflux specification per hardfork.
stack
Stack Management for Execution Engine: Conflux’s execution engine is stack-based. This module manages the stack operations, mainly handling the logic related to pushing and popping frames.
state
Ledger State: Acts as a caching and checkpoint layer built upon semantically meaningful database interfaces for the execution. Ledger State: Acts as a caching and checkpoint layer built upon semantically meaningful database interfaces for the execution.
substate
Transaction Execution Tracker: Tracks and records consensus-matters details during transaction execution.

Macros§

group_impl_is_active
impl_function_type
internal_bail
make_function_table
A marco to construct the functions table for an internal contract for a list of types implements SolidityFunctionTrait.
make_solidity_contract
A marco to implement an internal contract.
make_solidity_event
make_solidity_function
Make a solidity interface function, it requires three parameters
return_if
try_loaded
unwrap_or_return