BerryChain

Guide · Mining

Mine BERRY from your PC

Every block pays 10 BERRY to whoever finds it. Mining is plain CPU work in Python: no graphics card needed, no special hardware, no account. Point it at the address in your phone app and the coins land there. This page walks through it click by click on Windows. Linux and Mac notes are at the end.

Already mining? Update before block 24,000 (around 11 October), and again before block 45,000 (around 26 October). The network upgrades at each (founding seats by the registrars and renaming, then sealed post v2: letters bound to their sender, service grants by the registrars, the reserve). From the C:errychain folder run git pull, then the install line from Part E again. Blocks from an older version stop being accepted at 14,400 until it updates.
What you need. A Windows, Linux or Mac PC that can stay on, and three free downloads. Parts B and C install them with one pasted line each; if you would rather click, these are the same things:

Already have the app? Then you already have the wallet: skip Part D and use the address from the app's Receive screen. Your first block earns a bonus from the Harbourmaster's purse if you have written to him.

Before you start, three honest things.

Part AOpen PowerShell

  1. Click the Windows Start button.
  2. Type powershell. "Windows PowerShell" appears in the list.
  3. Click it once. A blue window opens with a line ending in > and a blinking cursor. That's where you paste commands.

To paste a command: copy it from this page, click inside the blue window, right-click once, then press Enter.

Part BInstall Python and Git

  1. Paste this and press Enter. Text scrolls for a minute; wait until the > prompt is back. If Windows asks whether to allow the app to make changes, click Yes.
    winget install --id Python.Python.3.12 --source winget --scope user --accept-package-agreements --accept-source-agreements
  2. Paste this and press Enter, and wait the same way.
    winget install --id Git.Git --source winget --scope user --accept-package-agreements --accept-source-agreements
  3. Close the PowerShell window with the X, then open a new one exactly as in Part A. The new programs are only found by a fresh window.
  4. Check it worked. Paste this and press Enter; it should print Python 3.12.something.
    python --version
    If it mentions the Microsoft Store or says "not recognised", close the window, open a new one, and try again.

Part CDownload BerryChain

  1. Paste this and press Enter. It copies the code into a folder called C:\berrychain.
    git clone https://github.com/Keysersoze1991/berrychain.git C:\berrychain
  2. Paste this and press Enter. The prompt changes to end in C:\berrychain>.
    cd C:\berrychain
  3. Paste this and press Enter. It installs two supporting libraries. Yellow lines about "not on PATH" are fine.
    pip install -r requirements.txt

Part DChoose the wallet your rewards go to

If you have the phone app, use it: open the app, tap Receive, tap Copy address, and paste that brry1… address in Part E. Every block your PC finds then lands on your phone, the Harbourmaster's first-block bonus finds you, and there is no second wallet to back up. Skip the rest of this part.

If you would rather keep mining separate, make a wallet on the PC. More on wallets, backups and sending coins: the wallet guide.

  1. Paste this and press Enter:
    python -m berrychain.cli wallet new keys\miner.json --label miner --encrypt
  2. It asks new passphrase for miner.json:. Type a passphrase and press Enter. Nothing appears while you type, not even dots. That's normal.
  3. It asks again:. Type the same passphrase and press Enter.
  4. It prints a block of text. Find the line starting "address": "brry1. That long brry1… value is your address. Copy it somewhere handy; you'll paste it in the next step.
  5. Write the passphrase on paper. Without it the coins in this wallet can never be spent, and nobody can recover it for you.

Part EStart mining

  1. Paste this, but first replace brry1… at the end with your address from Part D, then press Enter:
    powershell -ExecutionPolicy Bypass -File scripts\install-miner-task.ps1 -Miner brry1…
    This registers the miner as a background task that starts every time you log in and restarts itself if it ever stops.
  2. Wait half a minute, then paste this and press Enter:
    curl http://127.0.0.1:8801/status
    You should see a line of text including "height": followed by a number. That number should be close to the block height shown on the home page. If it's far behind, it's still downloading the chain; check again in a minute.

That's it. Your PC is now mining. Rewards appear in your wallet as blocks are found: on the phone if you used the app's address, or from the PC with:

python -m berrychain.cli --node https://seed1.berrychain.link balance brry1…

Stopping, restarting, updating

What to expect

Linux or Mac

Install Python 3.10 or newer and git, then:

git clone https://github.com/Keysersoze1991/berrychain.git && cd berrychain
pip install -r requirements.txt
python -m berrychain.cli wallet new keys/miner.json --label miner --encrypt
python -m berrychain.cli node --genesis launch/mainnet-genesis.json --data data/miner \
  --peer https://seed1.berrychain.link --peer https://seed2.berrychain.link --mine brry1…

Leave that running, in tmux, screen or a systemd unit. The repository's deploy/ folder has a service file you can adapt.

Something didn't match?

Open an issue with a screenshot of the window and which step you were on.