Dockerized script to monitor the Ethereum network for most active sender addresses
Go to file
2024-08-15 22:44:26 +03:00
data feat: dockerfile and deployment scripts 2024-07-07 17:18:35 +03:00
scripts feat: option to deploy with a proxy 2024-08-15 22:43:26 +03:00
src refactor: cleaner imports 2024-08-15 22:42:17 +03:00
.gitignore feat: proper periodic json export & cfg parsing 2024-07-07 15:17:15 +03:00
Dockerfile feat: dockerfile and deployment scripts 2024-07-07 17:18:35 +03:00
LICENSE Initial commit 2024-06-30 15:44:23 +00:00
main.py feat: option to deploy with a proxy 2024-08-15 22:43:26 +03:00
README.md docs: guide to -p flag usage 2024-08-15 22:44:26 +03:00
requirements.txt feat: option to deploy with a proxy 2024-08-15 22:43:26 +03:00

Ethereum network sender address mapper

Script that, once deployed in a Docker container, monitors a live feed of the Ethereum network via a WebSocket connection, stores the sender addresses with transaction counts, and creates statistics of the most active addresses.

Configuration

A list of the possible environment variables and their purpose:

  • MODE: Either development or production, the logging level is set based on this
  • EXPORT_INTERVAL: The interval of how often the SQLite database is exported as a JSON file, does nothing if IS_EXPORT is not true
    • Notably set as a string (similar to all environment variables)
  • IS_EXPORT: Boolean that indicates whether the aforementioned export task is enabled or not
    • Possible values that are interpreted as True (case insensitive): true, 1, and t

Development

mkvirtualenv chainmapper # OR 'workon chainmapper'
pip3 install -r requirements.txt
touch .env # Optional, see the previous section

Usage

The included deploy.sh shellscript should be used for any kind of (development or production) deployment. It builds a new Docker image without caching, prompts for removal of any possible conflicting containers, and finally deploys the newly built image as a container with the data/ local directory mounted as a volume.

chmod +x ./scripts/deploy.sh
# Add `-y` flag to automatically overwrite existing containers with the same name
./scripts/deploy.sh

Use the following command if you wish to proxy the WebSocket connection:

# Proxy format: <protocol>://<ip>:<port>
./scripts/deploy.sh -p <proxy>