apow-cli 0.11.18 → 0.11.19
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 +2 -0
- package/package.json +1 -1
- package/skill.md +4 -0
package/README.md
CHANGED
|
@@ -103,6 +103,7 @@ PRIVATE_KEY=0x... # Your wallet private key
|
|
|
103
103
|
USE_X402=true # Auto-pay RPC + LLM via x402 (2.00 USDC minimum starting balance, zero API keys)
|
|
104
104
|
USE_X402_GRIND=true # Auto-pay remote GPU grinding via x402
|
|
105
105
|
ALLOW_LOCAL_FALLBACK_WITH_X402=false # Easy Mode default: do not burn local CPU while x402 GPU is active
|
|
106
|
+
# STALE_CHECK_INTERVAL=5 # Seconds between stale-challenge checks while grinding (default: 5)
|
|
106
107
|
# RPC_URL=https://... # Or: bring your own RPC (free from Alchemy, QuickNode, etc.)
|
|
107
108
|
# LLM_PROVIDER=clawrouter # clawrouter (auto with x402) | openai | gemini | deepseek | qwen | anthropic | ollama (for minting)
|
|
108
109
|
# LLM_MODEL=blockrun/eco # Auto-detected per provider; override only if needed
|
|
@@ -212,6 +213,7 @@ The CUDA grinder runs over SSH alongside your local Metal/CPU grinders — genui
|
|
|
212
213
|
### Other Optimizations
|
|
213
214
|
|
|
214
215
|
- **Algorithmic SMHL**: Mining SMHL challenges are solved algorithmically in microseconds (no LLM call). Your AI was already proven when you minted your Mining Rig.
|
|
216
|
+
- **Faster stale restarts**: The miner re-checks the challenge every 5 seconds by default and aborts dead work quickly across local, native GPU/CPU, and x402 grinding.
|
|
215
217
|
- **JS threads**: If no native grinders are found, falls back to `worker_threads` across all CPU cores. Set `MINER_THREADS` in `.env` to override.
|
|
216
218
|
|
|
217
219
|
## Dashboard
|
package/package.json
CHANGED
package/skill.md
CHANGED
|
@@ -300,6 +300,7 @@ CHAIN=base
|
|
|
300
300
|
| `LLM_MODEL` | No | per-provider default (e.g. `blockrun/eco`, `gpt-4o-mini`) | Model identifier passed to the provider (minting only). Auto-detected from provider if omitted. |
|
|
301
301
|
| `CLAWROUTER_PORT` | No | `8402` | Port for ClawRouter local proxy (only if default is in use) |
|
|
302
302
|
| `MINER_THREADS` | No | All CPU cores | Threads for JS nonce grinding (fallback if no native GPU/CPU grinder detected) |
|
|
303
|
+
| `STALE_CHECK_INTERVAL` | No | `5` | Seconds between stale-challenge checks while grinding. Applies across local/native and x402 grinders; lower values restart dead work faster but add more RPC reads. |
|
|
303
304
|
| `RPC_URL` | No* | — | Base JSON-RPC endpoint. Get a free URL from Alchemy or QuickNode. *Not needed if `USE_X402=true`. |
|
|
304
305
|
| `USE_X402` | No | `false` | Set to `true` to auto-pay via QuickNode x402 (2.00 USDC minimum starting balance; add more for headroom). Replaces `RPC_URL`. |
|
|
305
306
|
| `CHAIN` | No | `base` | Network selector; auto-detects `baseSepolia` if RPC URL contains "sepolia" |
|
|
@@ -441,6 +442,7 @@ npx apow-cli mine <tokenId> # or specify a rig by token ID
|
|
|
441
442
|
- `smhl`: the SMHL format challenge
|
|
442
443
|
4. **Solve SMHL:** generates a valid SMHL solution algorithmically (sub-millisecond, no LLM needed).
|
|
443
444
|
5. **Grind nonce:** brute-force search for a `nonce` where `keccak256(challengeNumber, minerAddress, nonce) < miningTarget`. Works on any CPU out of the box. Add a GPU for 100x+ faster grinding.
|
|
445
|
+
The CLI re-checks the challenge every 5 seconds by default while grinding and aborts stale work across local/native and x402 nonce sources.
|
|
444
446
|
6. **Submit proof:** calls `mine(nonce, smhlSolution, tokenId)` on AgentCoin. The contract verifies both the hash and SMHL solution on-chain.
|
|
445
447
|
7. **Collect reward:** AGENT tokens are minted directly to your wallet.
|
|
446
448
|
8. **Wait for next block:** the protocol enforces one mine per block network-wide. The client waits for block advancement before the next cycle.
|
|
@@ -479,6 +481,7 @@ A Mythic miner (5.00x) earns 15.00 AGENT per mine in Era 0.
|
|
|
479
481
|
|
|
480
482
|
The miner has built-in resilience:
|
|
481
483
|
- **Flat retry delay** on transient failures (about 2s with a small jitter)
|
|
484
|
+
- **Background stale checks** every 5 seconds by default so slow grinders do not waste a full attempt on a dead challenge
|
|
482
485
|
- **Max 10 consecutive failures** before the miner exits
|
|
483
486
|
- **Fatal errors** cause immediate exit: `"Not your miner"`, `"Supply exhausted"`, `"No contracts"`
|
|
484
487
|
- **Block timing** is handled automatically: if the block hasn't advanced, the miner waits
|
|
@@ -665,6 +668,7 @@ Use the corresponding testnet contract addresses.
|
|
|
665
668
|
| `No contracts` | Calling from a contract, not an EOA | Mining requires an externally owned account (EOA) |
|
|
666
669
|
| `Invalid hash` | Nonce does not meet difficulty target | Bug in nonce grinding; should not happen under normal operation |
|
|
667
670
|
| `Nonce too high` | Wallet nonce desync | Reset nonce in wallet or wait for pending transactions to confirm |
|
|
671
|
+
| Frequent `stale #N` restarts | Your grinder is slower than the current network difficulty | Expected on slow rigs. The default 5-second stale check already reduces wasted work; use a faster grinder or lower `STALE_CHECK_INTERVAL` if you intentionally want more aggressive polling. |
|
|
668
672
|
| `Anthropic request failed: 429` | Rate limited by Anthropic API | Reduce mining frequency or upgrade API plan |
|
|
669
673
|
| `Ollama request failed: 500` | Ollama server error | Check `ollama serve` is running; restart if needed |
|
|
670
674
|
| `SMHL solve failed after 5 attempts` | LLM cannot satisfy constraints | Switch to a more capable model (e.g., `gpt-4o` or `claude-sonnet-4-5-20250929`) |
|