Expand description
Core engine functionality for transaction analysis and debugging.
This module provides the main engine implementation that orchestrates the complete debugging workflow for Ethereum transactions. It handles source code analysis, contract instrumentation, transaction execution with debugging inspectors, and RPC server management.
§Workflow Overview
- Preparation: Accept forked database and transaction configuration
- Analysis: Download and analyze contract source code
- Instrumentation: Inject debugging hooks into contract bytecode
- Execution: Replay transaction with comprehensive debugging inspectors
- Collection: Gather execution snapshots and trace data
- API: Start RPC server for debugging interface
§Key Components
EngineConfig- Engine configuration and settings- [
run_transaction_analysis] - Main analysis workflow function - Inspector coordination for comprehensive data collection
- Source code fetching and compilation management
- Snapshot generation and organization
§Supported Features
- Multi-contract analysis: Analyze all contracts involved in execution
- Source fetching: Automatic download from Etherscan and verification
- Quick mode: Fast analysis with reduced operations
- Instrumentation: Automatic debugging hook injection
- Comprehensive inspection: Opcode and source-level snapshot collection
Structs§
- Engine
- The main Engine struct that performs transaction analysis
- Engine
Config - Configuration for the EDB debugging engine.