A high-performance Engine API bridge connecting Reth execution clients with Mysticeti consensus clients, enabling seamless integration between Ethereum execution and DAG-based consensus protocols.
FastEVM provides a complete implementation of the Ethereum Engine API, allowing:
- Reth-compatible execution clients to serve as execution environments
- Mysticeti consensus clients to orchestrate consensus decisions
- Bidirectional communication through standardized Engine API endpoints
- Multi-node deployments with Docker Compose orchestration
- β
Full Engine API Implementation (
engine_newPayloadV2
,engine_forkchoiceUpdatedV2
,engine_getPayloadV2
) - β Mysticeti SubDAG Processing - Convert committed SubDAGs to execution payloads
- β Concurrent Request Handling - High-throughput RPC server
- β Comprehensive Testing - Unit, integration, and performance tests
- β Docker Containerization - Production-ready deployment
- β Multi-node Support - 4-node cluster by default
- β Monitoring Integration - Prometheus metrics and health checks
- β Error Recovery - Automatic retry mechanisms
βββββββββββββββββββ Engine API βββββββββββββββββββ
β β βββββββββββββββββββΊ β β
β Consensus β HTTP/JSON-RPC β Execution β
β Client β β Client β
β (Mysticeti) β β (Reth-like) β
β β β β
βββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β SubDAG β β ExecutionPayloadβ
β Processing β β Validation β
βββββββββββββββββββ βββββββββββββββββββ
- Rust 1.75+
- Docker & Docker Compose
- Make (optional, for convenience commands)
git clone <repository>
cd fastevm
make build
# Run all tests
make test
# Run integration tests specifically
make integration-test
# Run benchmarks
make benchmark
# Start 4 nodes (execution + consensus pairs)
make docker-up
# Monitor logs
make docker-logs
# Stop cluster
make docker-down
# Terminal 1: Start execution client
make dev-execution
# Terminal 2: Start consensus client
make dev-consensus
fastevm/
βββ fastevm/
β βββ execution-client/ # Reth-compatible execution client
β β βββ src/
β β β βββ main.rs # CLI entry point
β β β βββ engine_api.rs # Engine API implementation
β β β βββ types.rs # Ethereum types
β β βββ Dockerfile
β β βββ Cargo.toml
β βββ consensus-client/ # Mysticeti consensus client
β βββ src/
β β βββ main.rs # CLI entry point
β β βββ client.rs # Engine API client
β β βββ types.rs # Consensus types
β βββ Dockerfile
β βββ Cargo.toml
βββ tests/
β βββ integration_tests.rs # Integration test suite
βββ benches/
β βββ engine_api_bench.rs # Performance benchmarks
βββ monitoring/
β βββ prometheus.yml # Monitoring configuration
βββ docker-compose.yml # Multi-node orchestration
βββ Makefile # Development commands
βββ README.md
./execution-client \
--port 8551 \
--http.addr 0.0.0.0 \
--log-level info \
--node-id 0
./consensus-client \
--execution-url http://127.0.0.1:8551 \
--poll-interval 1000 \
--max-retries 3 \
--timeout 30 \
--node-id 0 \
--log-level info
cargo test --workspace
cargo test --test integration_tests
# Run benchmarks
cargo bench
# Performance test against running cluster
make perf-test
make multi-node-test
Submit a new execution payload for validation.
Request:
{
"jsonrpc": "2.0",
"method": "engine_newPayloadV2",
"params": [
{
"parentHash": "0x...",
"feeRecipient": "0x...",
"stateRoot": "0x...",
"receiptsRoot": "0x...",
"logsBloom": "0x...",
"prevRandao": "0x...",
"blockNumber": "0x1",
"gasLimit": "0x1c9c380",
"gasUsed": "0x5208",
"timestamp": "0x...",
"extraData": "0x",
"baseFeePerGas": "0x3b9aca00",
"blockHash": "0x...",
"transactions": [],
"withdrawals": null
}
],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"status": "VALID",
"latestValidHash": "0x...",
"validationError": null
},
"id": 1
}
Update the forkchoice state and optionally start payload building.
Retrieve a built payload by ID.
SubDAG Commit β Payload Conversion β engine_newPayloadV2 β Validation Response
Forkchoice Update β engine_forkchoiceUpdatedV2 β Payload Building β engine_getPayloadV2
The consensus client converts Mysticeti SubDAGs to Ethereum ExecutionPayloads:
SubDAG {
id: "subdag-123",
round: 42,
transactions: [...],
leader: "validator-1",
timestamp: "2024-01-01T00:00:00Z"
}
β
ExecutionPayload {
block_number: 42,
block_hash: hash(subdag.id),
transactions: encode(subdag.transactions),
timestamp: subdag.timestamp.unix(),
extra_data: subdag.id.bytes()
}
# Build images
docker build -t fastevm-execution -f fastevm/execution-client/Dockerfile .
docker build -t fastevm-consensus -f fastevm/consensus-client/Dockerfile .
# Run execution client
docker run -p 8551:8551 fastevm-execution
# Run consensus client (in another terminal)
docker run fastevm-consensus --execution-url http://host.docker.internal:8551
docker-compose up -d
This starts:
- 4 execution clients (ports 8551-8554)
- 4 consensus clients
- Prometheus monitoring (port 9090)
- Loki log aggregation (port 3100)
Run make benchmark
to see performance metrics:
- New Payload Processing: ~50,000 payloads/second
- Forkchoice Updates: ~100,000 updates/second
- Concurrent Requests: 1000+ concurrent connections
- Memory Usage: <100MB per client
- Latency: <1ms average response time
Access monitoring at:
- Prometheus: http://localhost:9090
- Grafana dashboards: (configure with Prometheus data source)
-
Connection Refused
# Check if execution client is running curl -X POST http://localhost:8551 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"engine_newPayloadV2","params":[],"id":1}'
-
Docker Build Issues
# Clean and rebuild make clean make docker-build
-
Port Conflicts
# Check port usage netstat -tlnp | grep 8551
Enable debug logging:
./execution-client --log-level debug
./consensus-client --log-level debug
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Run tests (
make check-all
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
# Setup development environment
make setup
# Run quality checks
make check-all
# Run integration tests
make integration-test
This project is licensed under the MIT License - see the LICENSE file for details.
- Reth - Ethereum execution client inspiration
- Mysticeti - DAG consensus protocol
- Ethereum Engine API - API specification
- Issues: Open a GitHub issue
- Discussions: Use GitHub Discussions for questions
- Security: Email security@fastevm.com for security issues
Built with β€οΈ for the Ethereum and blockchain community