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-consensusfastevm/
βββ 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 infocargo test --workspacecargo test --test integration_tests# Run benchmarks
cargo bench
# Performance test against running cluster
make perf-testmake multi-node-testSubmit 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:8551docker compose up -dThis starts:
- 4 execution clients (ports 8551-8554)
- 4 consensus clients
- Prometheus monitoring (port 9090)
- Loki log aggregation (port 3100)
The FastEVM network consists of a unified setup with 4 execution nodes and 4 consensus nodes, providing a robust testing and development environment.
βββββββββββββββββββ βββββββββββββββββββ
β Genesis Init β β Consensus Init β
β Container β β Container β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXECUTION NODES β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Execution 1 β β Execution 2 β β Execution 3 β β
β β Port: 8551 β β Port: 8552 β β Port: 8553 β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β βββββββββββββββ β
β β Execution 4 β β
β β Port: 8554 β β
β βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONSENSUS NODES β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Consensus 1 β β Consensus 2 β β Consensus 3 β β
β β IP: 172.20.0.10 β β IP: 172.20.0.11 β β IP: 172.20.0.12 β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β βββββββββββββββ β
β β Consensus 4 β β
β β IP: 172.20.0.13 β β
β βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
| Node | Engine API | HTTP RPC | WebSocket RPC |
|---|---|---|---|
| 1 | 8551 | 8545 | 8546 |
| 2 | 8552 | 8547 | 8548 |
| 3 | 8553 | 8549 | 8550 |
| 4 | 8554 | 8555 | 8556 |
| Node | IP Address | Internal Port |
|---|---|---|
| 1 | 172.20.0.10 | 26657 |
| 2 | 172.20.0.11 | 26657 |
| 3 | 172.20.0.12 | 26657 |
| 4 | 172.20.0.13 | 26657 |
- Dashboard: http://localhost:8080
# Start the entire network
./scripts/run.sh start
# Check network status
./scripts/run.sh status
# View all logs
./scripts/run.sh logs
# Stop the network
./scripts/run.sh stop# Start network
docker compose up -d
# Check status
docker compose ps
# View logs
docker compose logs -f [service-name]
# Stop network
docker compose downThe network follows this startup sequence:
-
Init Containers:
genesis-init: Sets up genesis files and JWT secrets for all execution nodesconsensus-init: Generates committee configuration for consensus nodes
-
Execution Nodes: Start in parallel after genesis setup
-
Consensus Nodes: Start after execution nodes are healthy
-
Monitoring: Starts after all nodes are running
- Genesis Template:
execution-client/shared/genesis.template.json - Init Script:
execution-client/shared/init.sh - Node Configs:
consensus-client/examples/node*.yml - Committee Config:
consensus-client/examples/committees.yml
Each node has its own persistent volume:
execution-data-1throughexecution-data-4: Execution node dataconsensus-data-1throughconsensus-data-4: Consensus node data
- Subnet: 172.20.0.0/16
- Driver: Bridge
- External: false (managed by docker compose)
- Port Conflicts: Ensure ports 8545-8556 are available
- Init Container Failures: Check logs with
docker compose logs genesis-init - Node Startup Issues: Verify dependencies and health checks
# Check container status
docker compose ps
# View service logs
docker compose logs -f [service-name]
# Check network connectivity
docker network inspect fastevm_fastevm-network
# Access container shell
docker exec -it [container-name] /bin/sh# Complete cleanup and restart
./scripts/run.sh cleanup
./scripts/run.sh startTo add more nodes:
- Copy existing node configuration
- Update ports and IP addresses
- Add new volumes
- Update monitoring dependencies
- Modify genesis template in
execution-client/shared/genesis.template.json - Adjust consensus parameters in
consensus-client/examples/ - Update init scripts as needed
- JWT secrets are generated automatically for each execution node
- Each node has isolated data volumes
- Network is isolated to the docker bridge network
- No external access by default
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-testThis 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