idlebench 1.0.1 → 1.0.3
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 +136 -32
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +5 -3
- package/dist/index.js +3 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,68 +2,172 @@
|
|
|
2
2
|
|
|
3
3
|
**The verification CLI for idle compute.**
|
|
4
4
|
|
|
5
|
-
Run one command
|
|
5
|
+
Run one command on your machine. IdleBench checks your GPU, CUDA, Docker, and network — then publishes a signed trust score buyers can verify before routing workloads to your IDLE resource.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/idlebench)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
14
|
npx idlebench run
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
No installation required. Node.js 18+
|
|
17
|
+
No installation required. Node.js 18+ only.
|
|
18
|
+
|
|
19
|
+
---
|
|
14
20
|
|
|
15
21
|
## Commands
|
|
16
22
|
|
|
23
|
+
### `idlebench run`
|
|
24
|
+
|
|
25
|
+
Main benchmark flow. Interactive — walks you through setup, runs all checks locally, calculates a score, and uploads a signed report to IdleBench.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
? Solana wallet address (public key): 7xKXtg2CW87...gAsU
|
|
29
|
+
? Resource name: RTX 4090 Training Node
|
|
30
|
+
? Resource type: GPU
|
|
31
|
+
? IDLE endpoint URL (optional): https://gateway.earnidle.com/ep/...
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
After completing, the CLI prints:
|
|
35
|
+
- Final score and grade
|
|
36
|
+
- Public verification URL
|
|
37
|
+
- Badge embed URL
|
|
38
|
+
- Local report file path
|
|
39
|
+
|
|
40
|
+
If the upload fails, the report is saved locally and can be uploaded later with `idlebench upload`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### `idlebench doctor`
|
|
45
|
+
|
|
46
|
+
Checks your local environment without running a benchmark or uploading anything. Use this to diagnose issues before a full run.
|
|
47
|
+
|
|
17
48
|
```bash
|
|
18
|
-
npx idlebench
|
|
19
|
-
npx idlebench doctor # Check local environment readiness
|
|
20
|
-
npx idlebench upload <path> # Upload a saved report JSON
|
|
21
|
-
npx idlebench version # Show version
|
|
49
|
+
npx idlebench doctor
|
|
22
50
|
```
|
|
23
51
|
|
|
24
|
-
|
|
52
|
+
Checks: Node.js version, OS, CPU, RAM, GPU detection, NVIDIA driver, CUDA, Docker, Docker GPU runtime, network connectivity.
|
|
25
53
|
|
|
26
|
-
|
|
27
|
-
|-------|-------------|
|
|
28
|
-
| GPU detection | Model, VRAM via nvidia-smi or systeminformation |
|
|
29
|
-
| CUDA | Availability and version |
|
|
30
|
-
| NVIDIA driver | Driver version |
|
|
31
|
-
| Docker | Installation and daemon status |
|
|
32
|
-
| Docker GPU runtime | Tests docker --gpus all |
|
|
33
|
-
| CPU benchmark | Hash workload + matrix calculation |
|
|
34
|
-
| Network latency | Round-trip to IdleBench API |
|
|
54
|
+
---
|
|
35
55
|
|
|
36
|
-
|
|
56
|
+
### `idlebench upload <path>`
|
|
57
|
+
|
|
58
|
+
Uploads a previously saved report JSON without re-running the benchmark.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
idlebench upload ./idlebench-report-1717200000000.json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The report is validated before uploading. The hash is verified to ensure the file has not been modified.
|
|
37
65
|
|
|
38
|
-
|
|
66
|
+
---
|
|
39
67
|
|
|
40
|
-
|
|
68
|
+
### `idlebench version`
|
|
41
69
|
|
|
42
|
-
|
|
70
|
+
Prints the installed CLI version.
|
|
43
71
|
|
|
44
72
|
```bash
|
|
45
|
-
|
|
73
|
+
idlebench version
|
|
46
74
|
```
|
|
47
75
|
|
|
48
|
-
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## What gets checked
|
|
79
|
+
|
|
80
|
+
| Check | Description |
|
|
81
|
+
|-------|-------------|
|
|
82
|
+
| System info | OS, architecture, CPU model and core count, total RAM |
|
|
83
|
+
| GPU detection | Model, VRAM, vendor — via nvidia-smi, falls back to systeminformation |
|
|
84
|
+
| CUDA | Availability and version from nvidia-smi |
|
|
85
|
+
| NVIDIA driver | Driver version |
|
|
86
|
+
| Docker | Installed version and daemon status |
|
|
87
|
+
| Docker GPU runtime | Tests `docker run --rm --gpus all nvidia/cuda:12.3...` |
|
|
88
|
+
| Network latency | Round-trip to IdleBench API, 3-sample average |
|
|
89
|
+
| CPU benchmark | SHA-256 hash workload (2048 iterations) + 128×128 matrix multiply |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Scoring
|
|
94
|
+
|
|
95
|
+
Final score = weighted average of five components:
|
|
96
|
+
|
|
97
|
+
| Component | Weight | Notes |
|
|
98
|
+
|-----------|--------|-------|
|
|
99
|
+
| GPU Capability | 30% | GPU model matched against a curated table. VRAM adds a bonus. |
|
|
100
|
+
| Docker & CUDA | 20% | Docker +40, CUDA +25, GPU runtime +15. Starts at 20. |
|
|
101
|
+
| Benchmark Performance | 20% | CPU workload timing and GPU container readiness. |
|
|
102
|
+
| Network Latency | 15% | <20ms → 100, <100ms → 82, >600ms → 15. |
|
|
103
|
+
| System Stability | 15% | Based on CPU cores and RAM. Starts at 75. |
|
|
104
|
+
|
|
105
|
+
**Grades:**
|
|
106
|
+
|
|
107
|
+
| Grade | Score |
|
|
108
|
+
|-------|-------|
|
|
109
|
+
| Elite | 95–100 |
|
|
110
|
+
| Verified A | 85–94 |
|
|
111
|
+
| Verified B | 70–84 |
|
|
112
|
+
| Risky | 55–69 |
|
|
113
|
+
| Not Recommended | Below 55 |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Report format
|
|
118
|
+
|
|
119
|
+
Reports are saved as `idlebench-report-[timestamp].json` in the current directory.
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"reportVersion": "1.0.0",
|
|
124
|
+
"providerWallet": "7xKXtg2CW87...gAsU",
|
|
125
|
+
"resourceName": "RTX 4090 Training Node",
|
|
126
|
+
"resourceType": "GPU",
|
|
127
|
+
"system": { "os": "Ubuntu 22.04", "arch": "x64", "cpuModel": "...", "cpuCores": 24, "ramGb": 64 },
|
|
128
|
+
"gpu": { "name": "NVIDIA RTX 4090", "vramGb": 24, "cudaAvailable": true, "cudaVersion": "12.3" },
|
|
129
|
+
"runtime": { "dockerAvailable": true, "dockerVersion": "24.0.7", "dockerGpuRuntime": true },
|
|
130
|
+
"network": { "latencyMs": 42, "downloadMbps": 940 },
|
|
131
|
+
"scores": { "gpuScore": 97, "runtimeScore": 100, "networkScore": 95, "inferenceScore": 92, "stabilityScore": 90, "finalScore": 94, "grade": "Verified A" },
|
|
132
|
+
"metadata": { "createdAt": "...", "cliVersion": "1.0.2" },
|
|
133
|
+
"reportHash": "sha256:..."
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Security
|
|
140
|
+
|
|
141
|
+
- **IdleBench never asks for private keys or seed phrases.** A security notice is printed at every startup.
|
|
142
|
+
- All checks run locally. Only the structured report is uploaded.
|
|
143
|
+
- The report hash is SHA-256 of the report body. Buyers can verify it independently.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Development
|
|
49
148
|
|
|
50
149
|
```bash
|
|
150
|
+
git clone ...
|
|
51
151
|
cd idlebench-cli
|
|
52
152
|
npm install
|
|
53
|
-
npm run build
|
|
54
|
-
npm
|
|
153
|
+
npm run build # compiles TypeScript → dist/
|
|
154
|
+
npm link # makes `idlebench` available globally
|
|
155
|
+
|
|
156
|
+
idlebench doctor
|
|
157
|
+
idlebench run
|
|
55
158
|
```
|
|
56
159
|
|
|
57
|
-
##
|
|
160
|
+
## Publish
|
|
58
161
|
|
|
59
162
|
```bash
|
|
60
|
-
npm install
|
|
61
163
|
npm run build
|
|
62
|
-
npm
|
|
63
|
-
idlebench doctor
|
|
64
|
-
idlebench run
|
|
164
|
+
npm publish --access public
|
|
65
165
|
```
|
|
66
166
|
|
|
67
|
-
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Links
|
|
68
170
|
|
|
69
|
-
|
|
171
|
+
- Web app: [idlebench.com](https://idlebench.com)
|
|
172
|
+
- npm: [npmjs.com/package/idlebench](https://www.npmjs.com/package/idlebench)
|
|
173
|
+
- IDLE Protocol: [earnidle.com](https://earnidle.com)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AA8IA,wBAAsB,mBAAmB,kBAgMxC"}
|
package/dist/commands/run.js
CHANGED
|
@@ -9,7 +9,9 @@ import { getNetworkInfo } from '../lib/network.js';
|
|
|
9
9
|
import { runBenchmark } from '../lib/benchmark.js';
|
|
10
10
|
import { calculateGpuScore, calculateRuntimeScore, calculateNetworkScore, calculateInferenceScore, calculateStabilityScore, calculateFinalScore, getGrade, } from '../lib/scoring.js';
|
|
11
11
|
import { buildReport, saveReportLocally } from '../lib/report.js';
|
|
12
|
-
|
|
12
|
+
import { createRequire } from 'module';
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
const { version: CLI_VERSION } = require('../../package.json');
|
|
13
15
|
const DEFAULT_API_URL = 'https://idlebench.vercel.app';
|
|
14
16
|
function line() {
|
|
15
17
|
console.log(chalk.dim(' ─────────────────────────────────────────'));
|
|
@@ -99,7 +101,7 @@ async function promptSetup() {
|
|
|
99
101
|
{
|
|
100
102
|
type: 'input',
|
|
101
103
|
name: 'idleGatewayUrl',
|
|
102
|
-
message: 'IDLE
|
|
104
|
+
message: 'IDLE endpoint URL (from earnidle.com, optional — press Enter to skip):',
|
|
103
105
|
default: '',
|
|
104
106
|
validate: (input) => {
|
|
105
107
|
if (!input.trim())
|
|
@@ -109,7 +111,7 @@ async function promptSetup() {
|
|
|
109
111
|
return true;
|
|
110
112
|
}
|
|
111
113
|
catch {
|
|
112
|
-
return 'Enter a valid URL or leave blank';
|
|
114
|
+
return 'Enter a valid URL (e.g. https://gateway.earnidle.com/ep/...) or leave blank';
|
|
113
115
|
}
|
|
114
116
|
},
|
|
115
117
|
},
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
+
import { createRequire } from 'module';
|
|
4
5
|
import { runBenchmarkCommand } from './commands/run.js';
|
|
5
6
|
import { runDoctor } from './commands/doctor.js';
|
|
6
7
|
import { runUpload } from './commands/upload.js';
|
|
7
|
-
const
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const { version: VERSION } = require('../package.json');
|
|
8
10
|
const program = new Command();
|
|
9
11
|
program
|
|
10
12
|
.name('idlebench')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idlebench",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Benchmark and verify idle compute before it earns. The CLI for IDLE compute providers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "IdleBench",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"README.md",
|
|
24
|
-
"LICENSE"
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"package.json"
|
|
25
26
|
],
|
|
26
27
|
"scripts": {
|
|
27
28
|
"build": "tsc",
|