feat: add automated mining setup#9
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.
|
|
||
| wait_for_miner_server "$MINER_LISTEN_PORT" "$node_log" 120 | ||
|
|
||
| start_miner_background "$miner_log" |
There was a problem hiding this comment.
Foreground start skips error cleanup
Medium Severity
In foreground start, the node and log tail are backgrounded before wait_for_miner_server or start_miner_background run. Those steps call die on failure, but only INT/TERM invoke cleanup_foreground, so the script can exit while the node and tail keep running.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.
| return 0 | ||
| fi | ||
| sleep 1 | ||
| done |
There was a problem hiding this comment.
Wait ignores dead node process
Medium Severity
wait_for_miner_server only polls the log and port_listening; it never checks whether the node process is still alive. If the node exits early, the script can sit for the full timeout before failing.
Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.
| ensure_start_prerequisites | ||
|
|
||
| if ! port_listening "$MINER_LISTEN_PORT"; then | ||
| die "Node miner server is not listening on port ${MINER_LISTEN_PORT}. Start the node first: ${SCRIPT_NAME} start-node" |
There was a problem hiding this comment.
start-miner needs port utilities
Medium Severity
start-miner refuses to run when port_listening is false, but that helper returns false if lsof, ss, and netstat are all missing—even when the node is listening and the log already shows the miner server is up.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.
| read -r -s mnemonic | ||
| echo "" | ||
| [ -n "$mnemonic" ] || die "Mnemonic cannot be empty" | ||
| output="$("$NODE_BIN" key quantus --scheme wormhole --words "$mnemonic" 2>&1)" |
There was a problem hiding this comment.
Mnemonic exposed in argv
Medium Severity
Setup passes the user’s 24-word mnemonic to quantus-node via --words on the command line. Other users and tools on the same machine can read the full seed from the process list while keygen runs.
Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.
Deploying docs with
|
| Latest commit: |
13ba03c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4d74501b.docs-7or.pages.dev |
| Branch Preview URL: | https://beast-one-script-setup-minin.docs-7or.pages.dev |


Summary
Basically what I'm trying to do is having a simple way to setup mining without bothering with AI and reading any of the docs.
I add simple script that walk through the mining setup. I tested in MAC it works great. Hasn't tested in WSL and Linux.
Note
Medium Risk
The script handles wallet mnemonics interactively, downloads and runs third-party binaries, and persists wormhole inner hashes—sensitive for mining rewards though scoped to local ops/docs, not core application code.
Overview
Adds an Automated Setup path to the mining guide: users can
curlquantus-mining.shfrom docs, runsetupthenstart, instead of following only the manual binary steps.The new
static/scripts/quantus-mining.sh(~950 lines) drives end-to-end Planck mining on macOS, Linux, and WSL2: detects platform, pulls latestquantus-node/quantus-minerfrom GitHub releases, generates P2P node key and wormhole keys (derive from hidden 24-word input or fresh keygen), prompts GPU vs CPU workers, and writes~/quantus-mining/mining.conf(mode 600, INNER_HASH only—no mnemonic on disk). It manages the stack withstart(foreground node + background miner, or-ddetach),start-node/start-miner,stop/restart,config show|set|edit(masks inner hash on show), anduninstall.Also adds
static/scripts/mining.conf.exampledocumenting config keys and links it from the guide.Reviewed by Cursor Bugbot for commit 2940c0c. Configure here.