Skip to content

Commit

Permalink
Reformatting help
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrlvi committed Apr 2, 2022
1 parent fc17fff commit 08787ff
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 42 deletions.
64 changes: 27 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,49 +47,39 @@ There's a guide here on how to run a full node and how to generate addresses: ht

Help:
```
kaspa-miner
A Kaspa high performance CPU miner
USAGE:
kaspa-miner [OPTIONS] --mining-address <MINING_ADDRESS>
OPTIONS:
-a, --mining-address <MINING_ADDRESS> The Kaspa address for the miner reward
--cuda-device <CUDA_DEVICE> Which CUDA GPUs to use [default: all]
--cuda-disable Disable cuda workers
--cuda-lock-core-clocks <CUDA_LOCK_CORE_CLOCKS>
Lock core clocks eg: ,1200, [default: 0]
--cuda-lock-mem-clocks <CUDA_LOCK_MEM_CLOCKS>
Lock mem clocks eg: ,810, [default: 0]
--cuda-no-blocking-sync Actively wait for GPU result. Increases CPU usage, but removes delays
that might result in red blocks. Can have lower workload.
--cuda-power-limits <CUDA_POWER_LIMITS>
Lock power limits eg: ,150, [default: 0
--cuda-workload <CUDA_WORKLOAD> Ratio of nonces to GPU possible parrallel run [default: 64]
--cuda-workload-absolute The values given by workload are not ratio, but absolute number of nonces
[default: false]
-d, --debug Enable debug logging level
--devfund-percent <DEVFUND_PERCENT> The percentage of blocks to send to the devfund (minimum 2%) [default: 2]
--experimental-amd Uses SMID instructions in AMD. Miner will crash if instruction is not
supported
-h, --help Print help information
--mine-when-not-synced Mine even when kaspad says it is not synced, only useful when passing
`--allow-submit-block-when-not-synced` to kaspad [default: false]
--nonce-gen <NONCE_GEN> The random method used to generate nonces. Options: (i) xoshiro - each
thread in GPU will have its own random state, creating a
(pseudo-)independent xoshiro sequence (ii) lean - each GPU will have a
single random nonce, and each GPU thread will work on nonce + thread id.
[default: lean]
--opencl-amd-binary Disable fetching of precompiled AMD kernel (if exists)
--opencl-device <OPENCL_DEVICE> Which OpenCL GPUs to use on a specific platform
--opencl-enable Enable opencl, and take all devices of the chosen platform
--opencl-platform <OPENCL_PLATFORM> Which OpenCL platform to use (limited to one per executable)
--opencl-workload <OPENCL_WORKLOAD> Ratio of nonces to GPU possible parrallel run in OpenCL [default: 512]
--opencl-workload-absolute The values given by workload are not ratio, but absolute number of nonces
in OpenCL [default: false]
-p, --port <PORT> Kaspad port [default: Mainnet = 16111, Testnet = 16211]
-s, --kaspad-address <KASPAD_ADDRESS> The IP of the kaspad instance [default: 127.0.0.1]
-t, --threads <NUM_THREADS> Amount of CPU miner threads to launch [default: 0]
--testnet Use testnet instead of mainnet [default: false]
-a, --mining-address <MINING_ADDRESS> The Kaspa address for the miner reward
--cuda-device <CUDA_DEVICE> Which CUDA GPUs to use [default: all]
--cuda-disable Disable cuda workers
--cuda-lock-core-clocks <CUDA_LOCK_CORE_CLOCKS> Lock core clocks eg: ,1200, [default: 0]
--cuda-lock-mem-clocks <CUDA_LOCK_MEM_CLOCKS> Lock mem clocks eg: ,810, [default: 0]
--cuda-no-blocking-sync Actively wait for result. Higher CPU usage, but less red blocks. Can have lower workload.
--cuda-power-limits <CUDA_POWER_LIMITS> Lock power limits eg: ,150, [default: 0]
--cuda-workload <CUDA_WORKLOAD> Ratio of nonces to GPU possible parrallel run [default: 64]
--cuda-workload-absolute The values given by workload are not ratio, but absolute number of nonces [default: false]
-d, --debug Enable debug logging level
--devfund-percent <DEVFUND_PERCENT> The percentage of blocks to send to the devfund (minimum 2%) [default: 2]
--experimental-amd Uses SMID instructions in AMD. Miner will crash if instruction is not supported
-h, --help Print help information
--mine-when-not-synced Mine even when kaspad says it is not synced
--nonce-gen <NONCE_GEN> The random method used to generate nonces. Options: (i) xoshiro (ii) lean [default: lean]
--opencl-amd-disable Disables AMD mining (does not override opencl-enable)
--opencl-device <OPENCL_DEVICE> Which OpenCL GPUs to use on a specific platform
--opencl-enable Enable opencl, and take all devices of the chosen platform
--opencl-no-amd-binary Disable fetching of precompiled AMD kernel (if exists)
--opencl-platform <OPENCL_PLATFORM> Which OpenCL platform to use (limited to one per executable)
--opencl-workload <OPENCL_WORKLOAD> Ratio of nonces to GPU possible parrallel run in OpenCL [default: 512]
--opencl-workload-absolute The values given by workload are not ratio, but absolute number of nonces in OpenCL [default: false]
-p, --port <PORT> Kaspad port [default: Mainnet = 16110, Testnet = 16211]
-s, --kaspad-address <KASPAD_ADDRESS> The IP of the kaspad instance [default: 127.0.0.1]
-t, --threads <NUM_THREADS> Amount of CPU miner threads to launch [default: 0]
--testnet Use testnet instead of mainnet [default: false]
```

To start mining you just need to run the following:
Expand Down
3 changes: 2 additions & 1 deletion plugins/cuda/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pub struct CudaOpt {
pub cuda_disable: bool,
#[clap(
long = "cuda-no-blocking-sync",
help = "Actively wait for GPU result. Increases CPU usage, but removes delays that might result in red blocks. Can have lower workload."
help = "Actively wait for result. Higher CPU usage, but less red blocks. Can have lower workload.",
long_help = "Actively wait for GPU result. Increases CPU usage, but removes delays that might result in red blocks. Can have lower workload."
)]
pub cuda_no_blocking_sync: bool,
#[clap(long = "cuda-lock-mem-clocks", use_delimiter = true, help = "Lock mem clocks eg: ,810, [default: 0]")]
Expand Down
3 changes: 2 additions & 1 deletion plugins/opencl/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pub struct OpenCLOpt {
pub experimental_amd: bool,
#[clap(
long = "nonce-gen",
help = "The random method used to generate nonces. Options: (i) xoshiro - each thread in GPU will have its own random state, creating a (pseudo-)independent xoshiro sequence (ii) lean - each GPU will have a single random nonce, and each GPU thread will work on nonce + thread id.",
help = "The random method used to generate nonces. Options: (i) xoshiro (ii) lean",
long_help = "The random method used to generate nonces. Options: (i) xoshiro - each thread in GPU will have its own random state, creating a (pseudo-)independent xoshiro sequence (ii) lean - each GPU will have a single random nonce, and each GPU thread will work on nonce + thread id.",
default_value = "lean"
)]
pub nonce_gen: NonceGenEnum,
Expand Down
5 changes: 3 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use log::LevelFilter;
use crate::Error;

#[derive(Parser, Debug)]
#[clap(name = "kaspa-miner", about = "A Kaspa high performance CPU miner")]
#[clap(name = "kaspa-miner", about = "A Kaspa high performance CPU miner", term_width = 0)]
pub struct Opt {
#[clap(short, long, help = "Enable debug logging level")]
pub debug: bool,
Expand All @@ -25,7 +25,8 @@ pub struct Opt {
pub num_threads: Option<u16>,
#[clap(
long = "mine-when-not-synced",
help = "Mine even when kaspad says it is not synced, only useful when passing `--allow-submit-block-when-not-synced` to kaspad [default: false]"
help = "Mine even when kaspad says it is not synced",
long_help = "Mine even when kaspad says it is not synced, only useful when passing `--allow-submit-block-when-not-synced` to kaspad [default: false]",
)]
pub mine_when_not_synced: bool,

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async fn main() -> Result<(), Error> {
path.pop(); // Getting the parent directory
let plugins = filter_plugins(path.to_str().unwrap_or("."));
let (app, mut plugin_manager): (App, PluginManager) =
kaspa_miner::load_plugins(Opt::into_app().term_width(120), &plugins)?;
kaspa_miner::load_plugins(Opt::into_app(), &plugins)?;

let matches = app.get_matches();

Expand Down

0 comments on commit 08787ff

Please sign in to comment.