EVM Processor is a Python-based application designed to fetch and persist blockchain block data from an RPC endpoint, specifically a Tendermint endpoint (:26657). This application is built for fault tolerance and ensures the continuity of block processing, even after restarts.
- Fetch blocks from RPC: Queries blocks from a Tendermint RPC endpoint (
:26657) and retrieves block height and hash. - Persistence: Stores block data locally in a CSV file (
blocks.csv), ensuring continuity across sessions. - State management: Prevents multiple processors from running concurrently by utilizing a lock file.
- Graceful shutdown: Handles shutdown signals to ensure the state is safely updated.
- Dockerized deployment: Easily build and deploy using the provided
Dockerfile. - Automated CI/CD: Docker images are built and pushed to GitHub Container Registry (GHCR) on every push to the
mainbranch using GitHub Actions. - ArgoCD integration: The Docker image is deployed via ArgoCD for streamlined application management.
.
├── Dockerfile # Defines the containerized environment for the application
├── LICENSE # License file
├── README.md # Documentation
├── block_processor.py # Main application script
├── requirements.txt # Python dependencies
├── .github/
│ └── workflows/
│ └── docker-build-push.yml # GitHub Actions workflow for Docker build and push
- Python 3.9+
- Tendermint RPC endpoint (
:26657) - Disk storage for persistent block data
The application relies on the following environment variables:
| Variable | Description | Default |
|---|---|---|
TM_NODE |
Tendermint RPC endpoint URL | Not defined |
STORAGE_PATH |
Directory to persist block data (blocks.csv) |
/data |
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python block_processor.py
-
Build the Docker image:
docker build -t evm-processor:latest . -
Run the Docker container:
docker run -e TM_NODE=http://<tendermint-url>:26657 -v /your/storage/path:/data evm-processor:latest
The repository includes a GitHub Actions workflow to automatically build and push the Docker image to GitHub Container Registry (GHCR) on every push to the main branch.
- Versioning: Auto-increments the patch version based on the latest Git tag.
- Build and push: Docker image is built and tagged as:
latestv<version>
This application is deployed using ArgoCD. It integrates with the deployment YAML in the fhevm-zama repository.
Example deployment reference:
image: ghcr.io/<your-repo>/block-processor:latest