chore: replace references to deprecated --num-cores flag with --workers

This commit is contained in:
rob thijssen
2025-09-10 19:45:06 +08:00
parent fc6a6b1014
commit b035a497fc
3 changed files with 10 additions and 11 deletions
+6 -7
View File
@@ -1,8 +1,8 @@
# External Miner Service for Quantus Network
Note: This repository is now a Cargo workspace. Build and run the CLI with (the --num-cores flag remains available as an alias for --cores):
Note: This repository is now a Cargo workspace. Build and run the CLI with:
- cargo build -p miner-cli --release
- cargo run -p miner-cli -- --port 9833 [--metrics-port 9900] [--cores N]
- cargo run -p miner-cli -- --port 9833 [--metrics-port 9900] [--workers N]
This crate provides an external mining service that can be used with a Quantus Network node. It exposes an HTTP API for
managing mining jobs.
@@ -30,7 +30,7 @@ The service can be configured using command-line arguments or environment variab
Example:
```bash
# Run on the default port 9833 with all available cores
# Run on the default port 9833 using about half of total cpu resources
../target/release/quantus-miner
# Run on a custom port with 4 workers (logical CPUs)
@@ -58,15 +58,14 @@ RUST_LOG=info,miner=debug ../target/release/quantus-miner --workers 4
```
The service will start and log messages to the console, indicating the port it's listening on and the number of cores
it's using.
The service will start and log messages to the console, indicating the port it's listening on and the number of worker threads in use.
Example output:
```
INFO external_miner > Starting external miner service...
INFO external_miner > Using auto-detected workers (leaving headroom): 4
INFO external_miner > Server starting on 0.0.0.0:9833
INFO external_miner > Server starting on 0.0.0.0:9833
```
## API Specification
@@ -91,4 +90,4 @@ The miner previously used a flag named `--num-cores`. To better reflect intent,
These documents provide reviewers with the authoritative context for changes. Commits and pull requests should link to the relevant prompt/response entry.
- Authoring/process guide: agents.md
- Authoring/process guide: agents.md
+2 -2
View File
@@ -11,7 +11,7 @@ Use the new workspace crates instead of the old root library:
- Examples:
- cargo run -p miner-cli -- --port 9833
- cargo run -p miner-cli -- --port 9833 --metrics-port 9900
- cargo run -p miner-cli -- --num-cores 4
- cargo run -p miner-cli -- --workers 4
- crates/miner-service
- The service layer: HTTP API (compatible with the node), job orchestration,
@@ -44,5 +44,5 @@ Notes:
- Build the binary via the new CLI package:
cargo build -p miner-cli --release
- Run the service:
cargo run -p miner-cli -- --port 9833 [--metrics-port 9900] [--num-cores N]
cargo run -p miner-cli -- --port 9833 [--metrics-port 9900] [--workers N]
*/
+2 -2
View File
@@ -11,7 +11,7 @@ Run the external miner using the new CLI binary:
Examples:
- cargo run -p miner-cli -- --port 9833
- cargo run -p miner-cli -- --port 9833 --metrics-port 9900
- cargo run -p miner-cli -- --num-cores 4
- cargo run -p miner-cli -- --workers 4
See crates/miner-cli for the active entrypoint and crates/miner-service for the service layer.
*/
@@ -27,7 +27,7 @@ fn main() {
Examples:\n\
- cargo run -p miner-cli -- --port 9833\n\
- cargo run -p miner-cli -- --port 9833 --metrics-port 9900\n\
- cargo run -p miner-cli -- --num-cores 4\n"
- cargo run -p miner-cli -- --workers 4\n"
);
std::process::exit(1);
}