Skip to content

Commit

Permalink
docs: update add/remove workers section of the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella committed Feb 6, 2025
1 parent b169aff commit ba17e63
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions bin/proving-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,24 @@ At the moment, when a worker added to the proxy stops working and can not connec
To update the workers on a running proxy, two commands are provided: `add-worker` and `remove-worker`. These commands will update the workers on the proxy and will not require a restart. To use these commands, you will need to run:

```bash
miden-proving-service add-worker [worker1] [worker2] ... [workerN]
miden-proving-service remove-worker [worker1] [worker2] ... [workerN]
miden-proving-service add-worker --proxy-host <proxy-host> --proxy-update-workers-port <proxy-update-workers-port> [worker1] [worker2] ... [workerN]
miden-proving-service remove-worker --proxy-host <proxy-host> --proxy-update-workers-port <proxy-update-workers-port> [worker1] [worker2] ... [workerN]
```
For example:

```bash
# To add 0.0.0.0:8085 and 200.58.70.4:50051 to the workers list:
miden-proving-service add-workers 0.0.0.0:8085 200.58.70.4:50051
miden-proving-service add-workers --proxy-host 0.0.0.0 --proxy-update-workers-port 8083 0.0.0.0:8085 200.58.70.4:50051
# To remove 158.12.12.3:8080 and 122.122.6.6:50051 from the workers list:
miden-proving-service remove-workers 158.12.12.3:8080 122.122.6.6:50051
miden-proving-service remove-workers --proxy-host 0.0.0.0 --proxy-update-workers-port 8083 158.12.12.3:8080 122.122.6.6:50051
```

The `--proxy-host` and `--proxy-update-workers-port` flags are required to specify the proxy's host and the port where the proxy is listening for updates. The workers are passed as arguments in the format `host:port`. Both flags can be used from environment variables, `MPS_PROXY_HOST` and `MPS_PROXY_UPDATE_WORKERS_PORT` respectively. For example:

```bash
export MPS_PROXY_HOST="0.0.0.0"
export MPS_PROXY_UPDATE_WORKERS_PORT="8083"
miden-proving-service add-workers 0.0.0.0:8085
```

Note that, in order to update the workers, the proxy must be running in the same computer as the command is being executed because it will check if the client address is localhost to avoid any security issues.
Expand Down

0 comments on commit ba17e63

Please sign in to comment.