chainmapper/README.md

39 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# Ethereum network sender address mapper
2024-08-16 11:29:59 +02:00
This script, designed for deployment in a Docker container, monitors the Ethereum network's mempool via a WebSocket connection. It tracks sender addresses and their transaction counts, generating a list of the most active addresses. This data can be used to black-/whitelist addresses in other research projects, ensuring targeting is done based on up-to-date information.
2024-07-07 16:19:00 +02:00
## 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`
2024-07-07 16:19:00 +02:00
## Development
```shell
mkvirtualenv chainmapper # OR 'workon chainmapper'
pip3 install -r requirements.txt
touch .env # Optional, see the previous section
2024-07-07 16:19:00 +02:00
```
## Usage
2024-07-12 22:11:17 +02:00
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.
```shell
2024-07-07 16:19:00 +02:00
chmod +x ./scripts/deploy.sh
2024-08-15 21:44:26 +02:00
# Add `-y` flag to automatically overwrite existing containers with the same name
2024-07-07 16:19:00 +02:00
./scripts/deploy.sh
```
2024-08-15 21:44:26 +02:00
Use the following command if you wish to proxy the WebSocket connection:
```shell
# Proxy format: <protocol>://<ip>:<port>
./scripts/deploy.sh -p <proxy>
```