git / moonbite-network / release/miner/README.md · raw
# Mine MoonBite on your own machineMoonBite mining is **solo and pool-free**. You run a full MoonBite node on yourown computer and it mines directly to your own wallet. There is no pool, nowebsite login, no third party that ever touches your coins. Every block youfind pays you, and only you.> The "miner" on moonbite.org/start is a **visual demo** and does not mine real> MBITE. Real mining is done here, by the node, using the steps below.## What you need- The MoonBite node for your OS (`moonbited` + `moonbite-cli`), placed in this folder next to the `mine` script.- A few GB of free RAM. Mining uses RandomX, a CPU algorithm designed so an ordinary computer is competitive and specialised hardware is not.## Run itNo account and no setup. Have your wallet app's Receive address ready, or skipit and let the miner make a wallet for you.**Windows — double-click `Mine-MoonBite.bat`.** That's it, no terminal.A window opens and stays open while it mines; closing it stops mining.This works even on PCs that block PowerShell scripts: the launcher runs`mine.ps1` with `-ExecutionPolicy Bypass` for that one run only. It changes nosetting on your PC and needs no administrator rights. Some antivirus toolstreat that line as suspicious; see [ANTIVIRUS.md](ANTIVIRUS.md).If you'd rather run `mine.ps1` directly from PowerShell and your PC blocksscripts, allow them for your own user once (no administrator needed):```powershellSet-ExecutionPolicy -Scope CurrentUser RemoteSignedUnblock-File .\mine.ps1```**Linux / macOS**```bash./mine.sh```**Windows, from PowerShell instead of double-clicking**```powershell.\mine.ps1```The script starts your node, connects to the network, waits until it has everyblock the network knows about, then mines. The first time, it asks whererewards should go:``` Where should your mining rewards go? Paste your wallet address (MoonBite wallet app > Receive, starts with moon1), or just press Enter to create a wallet on this computer instead. Address:```Paste your wallet app's Receive address and every block pays straight into it.The address is checked (a typo is refused, not paid to a stranger) and saved.On every later start the saved address is shown: press Enter to keep it, orpaste a different one. Press Enter at the first prompt and the node creates a wallet on thismachine; the script then shows how to back it up, because until you do, a deaddisk means lost coins. Unattended runs (startup scripts, no keyboard) neverprompt: they use the saved address, or create the local wallet.To set or change the address without the prompt, pass it as an argument:```bash./mine.sh moon1youraddress # Linux / macOS.\mine.ps1 moon1youraddress # Windows, PowerShellMine-MoonBite.bat moon1youraddress # Windows, double-click alternative: # drag the .bat onto a shortcut # with the address appended, or # run it once from a terminal```Leave it running; each block it finds is printed, and the reward is spendableafter it matures (below).## Data directoryYour node and wallet live in `~/.moonbite` (Linux/macOS) or`%USERPROFILE%\.moonbite` (Windows). Set `MOONBITE_DATADIR` before runningthe script to put them somewhere else.## What this download will never do- It is **only** the node, the CLI, these scripts and two text files. The wallet app is a separate download and is never included here; this archive is never included in the wallet download.- It installs nothing and adds nothing to startup. It mines only while the window is open.- It downloads nothing, never updates itself, never asks for administrator rights and never changes your antivirus or PowerShell settings.- Each start prints the SHA-256 of `moonbited` and `moonbite-cli` so you can compare them with the published `SHA256SUMS.txt`.Policy: `docs/ADR-013-miner-distribution-policy.md` in the repository.## Verify the download, and about antivirus warningsCompare the archive and the executables against `SHA256SUMS.txt` fromhttps://moonbite.org/mine, check the`SHA256SUMS.txt.minisig` signature when present, and for CI-built archives run`gh attestation verify <file> --owner moonbitecoin`. CPU miners are routinelyflagged by antivirus heuristics; `ANTIVIRUS.md` in this folder explains why,how to verify, and how to report a false positive. Nothing here will ever askyou to disable protection.## The wallet appYou do not need this to mine — the miner makes its own address, above. TheMoonBite desktop wallet is a separate download for when you want to spend,send, or manage coins with a proper interface: the same wallet asmoonbite.org/wallet, in its own window (self-custody, 12-word recoveryphrase). Get it from moonbite.org/wallet (Download) ormoonbite.org/download/wallet, then import the address this miner generated —or skip that step entirely and just point the miner at a wallet address youalready made there.## Your coins and your wallet- Your wallet is stored in your MoonBite data directory (`~/.moonbite` on Linux/macOS, `%USERPROFILE%\.moonbite` on Windows).- **Back up the `wallet` folder.** If you lose it, your coins are gone - no one can recover them for you.- A mined block's reward is spendable **100 blocks** after it is found (this is standard coinbase maturity, and protects the chain).## SpeedBy default the miner uses every physical CPU core, one RandomX thread percore. That is the fastest setting: hyperthreads make RandomX slower, notfaster, so the miner never goes above your physical core count. To leave roomfor other work, mine with fewer cores:```bash./mine.sh --cores 50% # Linux / macOS (or --cores 4).\mine.ps1 -Cores 50% # Windows, PowerShell (or -Cores 4)Mine-MoonBite.bat -Cores 50% # Windows, from a terminal```or set `MOONBITE_CORES=50%` before starting. More cores means more guesses anda bigger share of the blocks. A new setting applies the next time the nodestarts. Difficulty retargets every 60 blocks (about two hours) toward a2-minute block time, and each block pays 10 MBITE.## Commands| Command | What it does ||---|---|| `./mine.sh` / `.\mine.ps1` | start the node and mine || `./mine.sh address` | print your mining address || `./mine.sh stop` | stop the node |## It connects to these seed nodesYour node reaches the network through the public MoonBite seeds. They are setfor you in the generated `moonbite.conf`; you do not need to configure anything.