Running the System¶
Prerequisites¶
- Python 3.12+
- uv (package manager / build tool)
- Docker and Docker Compose (for the containerized demo)
Installation¶
1 2 3 4 5 6 | |
Starting the System¶
Option A: Local processes¶
Start all five servers and five clients in the foreground:
1 | |
This script:
- Creates one key share per server and the system public key.
- Starts servers 0–4 on ports
8000–8004. - Waits 3 seconds for servers to bind.
- Starts clients 0–4 on ports
9000–9004.
Press Ctrl+C to shut everything down.
Option B: Full local demo¶
Run the demo script that also performs mint and pay operations:
1 | |
This script:
- Creates one key share per server and the system public key.
- Runs
payment setupto generate fresh keys. - Starts all servers and clients.
- Waits for clients to become ready (health-checks
/payment-key). - Mints two tokens on
client-0. - Sends a payment from
client-0toclient-1. - Prints balances.
- Simulates omission failures by killing
fservers. - Performs another payment (
client-1→client-2) under degraded conditions. - Prints final balances.
Option C: Docker Compose demo¶
1 | |
This builds the Docker image, generates keys inside a container, starts all services via docker-compose up -d, and then runs the same demo workflow using curl against the exposed client ports (9000–9004).
Omission failures are simulated by running docker compose stop server-3 and docker compose stop server-4.
Environment Variables¶
| Variable | Used by | Description |
|---|---|---|
CONFIG_PATH |
server, client | Path to the YAML config file |
SERVER_ID |
server | Server identifier (must match servers[i].id in config) |
KEY_SHARE_PATH |
server | Path to the server's key share .bin file |
CLIENT_ID |
client | Client identifier |
PORT |
client | Port for the client's FastAPI server |
LOG_LEVEL |
all | Logging level (DEBUG, INFO, WARNING, etc.) |