From 42418eeefa55709dffbbc1fbeece0d74edff2c37 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 13 Mar 2025 16:48:14 -0700 Subject: [PATCH] Fix additional help documentation. Add small sample file of blockhashes used in test page so they can be used to test cli. --- cli.js | 17 +++++++---------- nano-pow.1 | 10 +++++----- test-seeds | 8 ++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 test-seeds diff --git a/cli.js b/cli.js index 3a89c54..35219fa 100755 --- a/cli.js +++ b/cli.js @@ -9,21 +9,18 @@ const args = process.argv.slice(2) if (args.length === 0 || args.some(v => v === '--help' || v === '-h')) { console.log(`Usage: nano-pow [OPTION]... BLOCKHASH... Generate work for BLOCKHASH, or multiple work values for BLOCKHASH(es) -BLOCKHASH is a 64-character hexadecimal string. -Multiple blockhash values must be separated by spaces. -Prints a 16-character hexadecimal work value to standard output. -If using --validate, prints 'true' or 'false' to standard output instead. -All command options are optional. +BLOCKHASH is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks. +Prints a 16-character hexadecimal work value to standard output. If using --validate, prints 'true' or 'false' to standard output instead. -h, --help show this dialog -d, --debug enable additional logging output - -e, --effort increase demand on GPU processing - -t, --threshold override the minimum threshold value - -v, --validate check an existing work value instead of searching for one + -e, --effort= increase demand on GPU processing + -t, --threshold= override the minimum threshold value + -v, --validate= check an existing work value instead of searching for one If validating a nonce, it must be a 16-character hexadecimal value. -Effort must be a decimal number between 1 - 32. -Threshold must be a hexadecimal number between 0x0 - 0xFFFFFFFF. +Effort must be a decimal number between 1-32. +Threshold must be a hexadecimal string between 0-FFFFFFFF. Report bugs: Full documentation: diff --git a/nano-pow.1 b/nano-pow.1 index f25f20e..a804f90 100644 --- a/nano-pow.1 +++ b/nano-pow.1 @@ -12,7 +12,7 @@ nano-pow \- proof-of-work generation and validation for Nano cryptocurrency .SH DESCRIPTION Generate work for \fIBLOCKHASH\fR, or multiple work values for \fIBLOCKHASH\fR(es). .PP -\fIBLOCKHASH\fR is a 64-character hexadecimal string. Multiple blockhashes must be separated by spaces. +\fIBLOCKHASH\fR is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks. .PP Prints a 16-character hexadecimal work value to standard output. If \fB--validate\fR is used, prints 'true' or 'false' to standard output. @@ -24,13 +24,13 @@ Show this help dialog and exit. \fB\-d\fR, \fB\-\-debug\fR Enable additional logging output. .TP -\fB\-e\fR, \fB\-\-effort\fR \fIEFFORT\fR +\fB\-e\fR, \fB\-\-effort\fR=\fIEFFORT\fR Increase demand on GPU processing. Must be between 1 and 32 inclusive. .TP -\fB\-t\fR, \fB\-\-threshold\fR \fITHRESHOLD\fR -Override the minimum threshold value. Higher values increase difficulty. Must be in hexadecimal format between 0x0 and 0xFFFFFFFF. +\fB\-t\fR, \fB\-\-threshold\fR=\fITHRESHOLD\fR +Override the minimum threshold value. Higher values increase difficulty. Must be a hexadecimal string between 0 and FFFFFFFF inclusive. .TP -\fB\-v\fR, \fB\-\-validate\fR \fIWORK\fR +\fB\-v\fR, \fB\-\-validate\fR=\fIWORK\fR Check an existing work value instead of searching for one. .SH EXAMPLES diff --git a/test-seeds b/test-seeds new file mode 100644 index 0000000..eaee0bc --- /dev/null +++ b/test-seeds @@ -0,0 +1,8 @@ +92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D +8797585D56B8AEA3A62899C31FC088F9BE849BA8298A88E94F6E3112D4E55D01 +204076E3364D16A018754FF67D418AB2FBEB38799FF9A29A1D5F9E34F16BEEEA +281E89AC73B1082B464B9C3C1168384F846D39F6DF25105F8B4A22915E999117 +0000000000000000000000000000000000000000000000000000000000000000 +BA1E946BA3D778C2F30A83D44D2132CC6EEF010D8D06FF10A8ABD0100D8FB47E +BF41D87DA3057FDC6050D2B00C06531F89F4AA6195D7C6C2EAAF15B6E703F8F6 +92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D -- 2.34.1