nano-pow 4.0.10 → 4.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -9
- package/dist/bin/cli.js +1 -1
- package/dist/bin/server.js +1 -1
- package/docs/nano-pow.1 +13 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,18 +136,16 @@ official Nano node software. The installed command will launch the server in a
|
|
|
136
136
|
detached process, and it can also be started manually to customize behavior by
|
|
137
137
|
executing the server script directly.
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
#### Environment Variables
|
|
140
|
+
`NANO_POW_PORT`: override the default port 5040
|
|
141
141
|
|
|
142
|
-
`NANO_POW_EFFORT`
|
|
143
|
-
or decrease the demand on the GPU.
|
|
142
|
+
`NANO_POW_EFFORT` increase or decrease demand on the GPU
|
|
144
143
|
|
|
145
|
-
`NANO_POW_DEBUG`
|
|
146
|
-
directory.
|
|
144
|
+
`NANO_POW_DEBUG` enable additional logging saved to the HOME directory
|
|
147
145
|
|
|
148
146
|
```console
|
|
149
147
|
$ # Launch the server and detach from the current session
|
|
150
|
-
$
|
|
148
|
+
$ NANO_POW_PORT=8080 nano-pow --server
|
|
151
149
|
$ # View process ID for "NanoPow Server"
|
|
152
150
|
$ cat ~/.nano-pow/server.pid
|
|
153
151
|
$ # Display list of server logs
|
|
@@ -163,7 +161,7 @@ $ # Generate a work value
|
|
|
163
161
|
$ curl -d '{
|
|
164
162
|
"action": "work_generate",
|
|
165
163
|
"hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
166
|
-
}' localhost:
|
|
164
|
+
}' localhost:5040
|
|
167
165
|
```
|
|
168
166
|
```console
|
|
169
167
|
$ # Validate a work value
|
|
@@ -171,7 +169,7 @@ $ curl -d '{
|
|
|
171
169
|
"action": "work_validate",
|
|
172
170
|
"work": "e45835c3b291c3d1",
|
|
173
171
|
"hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
174
|
-
}' localhost:
|
|
172
|
+
}' localhost:5040
|
|
175
173
|
```
|
|
176
174
|
|
|
177
175
|
## Notes
|
package/dist/bin/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as readline from "node:readline/promises";
|
|
|
5
5
|
process.title = "NanoPow CLI";
|
|
6
6
|
process.env.NANO_POW_DEBUG = "";
|
|
7
7
|
process.env.NANO_POW_EFFORT = "";
|
|
8
|
-
process.env.NANO_POW_PORT = "
|
|
8
|
+
process.env.NANO_POW_PORT = "5040";
|
|
9
9
|
function log(...args2) {
|
|
10
10
|
if (process.env.NANO_POW_DEBUG) console.log(new Date(Date.now()).toLocaleString(), "NanoPow", args2);
|
|
11
11
|
}
|
package/dist/bin/server.js
CHANGED
|
@@ -13,7 +13,7 @@ const MAX_REQUEST_SIZE = 1024;
|
|
|
13
13
|
const MAX_BODY_SIZE = 158;
|
|
14
14
|
const DEBUG = !!(process.env.NANO_POW_DEBUG || false);
|
|
15
15
|
const EFFORT = +(process.env.NANO_POW_EFFORT || 8);
|
|
16
|
-
const PORT = +(process.env.NANO_POW_PORT ||
|
|
16
|
+
const PORT = +(process.env.NANO_POW_PORT || 5040);
|
|
17
17
|
let browser;
|
|
18
18
|
let page;
|
|
19
19
|
function log(...args) {
|
package/docs/nano-pow.1
CHANGED
|
@@ -50,12 +50,18 @@ It provides work generation and validation via HTTP requests in a similar, but n
|
|
|
50
50
|
.PP
|
|
51
51
|
More specifically, it does not support the \fIuse_peers\fR, \fImultiplier\fR, \fIaccount\fR, \fIversion\fR, \fIblock\fR, and \fIjson_block\fR options.
|
|
52
52
|
.PP
|
|
53
|
-
By default, the server listens on port
|
|
53
|
+
By default, the server listens on port 5040.
|
|
54
54
|
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
.
|
|
55
|
+
.SS ENVIRONMENT VARIABLES
|
|
56
|
+
.TP
|
|
57
|
+
\fBNANO_POW_PORT\fR
|
|
58
|
+
Override the default port on which the NanoPow server listens for requests.
|
|
59
|
+
.TP
|
|
60
|
+
\fBNANO_POW_EFFORT\fR
|
|
61
|
+
Increase demand on GPU processing. Must be between 1 and 32 inclusive.
|
|
62
|
+
.TP
|
|
63
|
+
\fBNANO_POW_DEBUG\fR
|
|
64
|
+
Enable additional logging saved to the \fBHOME\fR directory.
|
|
59
65
|
|
|
60
66
|
.PP
|
|
61
67
|
The server process ID (PID) is saved to \fB~/.nano-pow/server.pid\fR. Log files are stored in \fB~/.nano-pow/logs/\fR.
|
|
@@ -119,7 +125,7 @@ Generate a work value:
|
|
|
119
125
|
$ curl -d '{
|
|
120
126
|
"action": "work_generate",
|
|
121
127
|
"hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
122
|
-
}' localhost:
|
|
128
|
+
}' localhost:5040
|
|
123
129
|
.EE
|
|
124
130
|
|
|
125
131
|
.PP
|
|
@@ -129,7 +135,7 @@ $ curl -d '{
|
|
|
129
135
|
"action": "work_validate",
|
|
130
136
|
"work": "e45835c3b291c3d1",
|
|
131
137
|
"hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
132
|
-
}' localhost:
|
|
138
|
+
}' localhost:5040
|
|
133
139
|
.EE
|
|
134
140
|
|
|
135
141
|
.SH AUTHOR
|