The solver rewards pipeline requires Python >= 3.10. If your system Python is older, or you want a fully reproducible environment without managing a local virtualenv, use the official Docker image.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cowprotocol/solver-rewards/llms.txt
Use this file to discover all available pages before exploring further.
Docker image
The image is published to the GitHub Container Registry:--pull=always to ensure you are running the latest build from the main branch.
Setup and run
Copy the environment file
The Docker container reads credentials from a Then fill in your credentials. The minimum required fields are:
.env file passed via --env-file. Start by copying the sample:PROPOSER_PK, SAFE_API_KEY, SLACK_TOKEN, and SLACK_CHANNEL are only required when using --post-tx or Slack notification flags.Run the container
Mount your current directory as Replace
/app/out so the output CSV files are written to your local filesystem:YYYY-MM-DD with the accounting period start date (e.g. 2023-03-14).After roughly 30 seconds, the two transfer CSVs appear in your current directory:Docker vs local Python
Volume mount
The-v $PWD:/app/out flag maps your current working directory into the container at /app/out, which is the default FILE_OUT_PATH inside the image. This means output CSVs are written directly to wherever you ran the docker run command on the host.
If you set a different FILE_OUT_PATH in your .env, adjust the mount target accordingly.
Building the test database container
Some tests require a local PostgreSQL instance seeded with fixture data. The repo provides a dedicatedDockerfile.db for this:
The test DB container is only needed for tests that require a live database connection. Unit tests (
make test-unit) do not require it.