====================================================================
 FERMINUX NETWORK - WINDOWS MINER
 Read this first. It assumes you have never used a command prompt.
====================================================================

WHAT IS IN THIS FOLDER
----------------------
  START-MINING.bat   Double-click this to mine FMX with your processor.
  START-NODE.bat     Double-click this to help run the network without
                     mining. Earns nothing, uses very little.
  GPU-MINING.bat     Helper for mining with a graphics card.
  GPU-MINING.txt     The full graphics-card guide.
  ferminux-geth.exe  The actual program. Do not double-click it directly
                     - it needs the settings the .bat files supply.
  CHECKSUMS.txt      Fingerprint of ferminux-geth.exe (see "Is this safe").
  README.txt         This file.

Everything runs from this folder. There is no installer, nothing is added
to your Start menu, and nothing changes your system settings.


BEFORE ANYTHING ELSE: EXTRACT THE ZIP
-------------------------------------
If you opened the download and are reading this inside a window whose
address bar shows a .zip file, stop. Windows shows you the inside of a
ZIP as if it were a folder, but programs cannot run from there and the
scripts will fail with a confusing error.

  1. Close that window.
  2. Right-click the downloaded .zip file.
  3. Choose "Extract All...", then "Extract".
  4. Open the folder that appears, and work in THAT folder.


WHAT MINING ACTUALLY IS
-----------------------
Ferminux has no company running it and no database in a data centre.
Independent computers each keep a copy of the same ledger, and they have
to agree on what happens next. The way they agree is a lottery: every
computer repeatedly guesses at a puzzle, and whoever solves it first gets
to add the next page to the ledger and is paid for it.

Mining is entering that lottery. Your PC guesses as fast as it can. When
it wins, the reward - currently 6 FMX per block - is sent to the address
you typed in, immediately and with nobody's permission needed.

A new block appears roughly every 7 seconds somewhere on the network. Your
chance of being the one who found it is your share of all the guessing
power on the network.


HOW TO START (30 SECONDS)
-------------------------
  1. Get an address. Open https://wallet.ferminux.net in your browser and
     create a wallet. It is free and takes about a minute. Copy the
     address - it starts with 0x and has 40 more characters.

     Write your recovery phrase down on paper. Whoever has that phrase
     owns the coins. If you lose it, nobody on earth can recover it.

  2. Double-click START-MINING.bat.

  3. Paste the address when it asks (right-click pastes in that window).
     Confirm it reads back correctly.

  4. Choose how many CPU threads. Press Enter for the suggestion, which
     leaves two threads for Windows so your PC stays usable.

  5. Press Enter to start. Leave the window open.

Your answers are remembered in ferminux-config.txt next to the script, so
you are not asked again. Delete that file to change them.


THE FIRST RUN TAKES A FEW MINUTES
---------------------------------
Before mining can begin, the program builds a large lookup table called
the DAG. This is not a download - it is calculated on your machine.

  * About 1.1 GB is written to disk (see "Where things are kept").
  * It takes a few minutes at 100% CPU. The fan will spin up.
  * While mining, about 1.1 GB of memory stays reserved for it.
  * You need roughly 2.5 GB of free disk space to be comfortable.

While the window says "Generating DAG in progress", nothing is wrong.
Wait. This happens once. Every start after that is immediate.

About every 2.5 days the network moves to a new "epoch" and the DAG grows
by a few megabytes and is rebuilt in the background. You will see a short
CPU spike. That is also normal.


WHERE THINGS ARE KEPT
---------------------
Nothing is stored in this folder except your settings file. The real data
goes to two folders inside your Windows user profile:

  Chain data (the ledger)
      %LOCALAPPDATA%\Ferminux
      normally  C:\Users\<YourName>\AppData\Local\Ferminux

  Mining DAG (the 1.1 GB lookup table)
      %LOCALAPPDATA%\Ethash
      normally  C:\Users\<YourName>\AppData\Local\Ethash

To open either one: press Windows key + R, paste %LOCALAPPDATA%\Ferminux
into the box, press Enter.

Note that the DAG folder is called "Ethash", not "Ferminux", and it sits
OUTSIDE the chain folder. That is on purpose - Ferminux uses standard
Ethash, and any other Ethash software on the machine shares that folder.
If you ever want the disk space back, deleting %LOCALAPPDATA%\Ethash is
safe; it is rebuilt on the next mining run.

You can put the chain data somewhere else - a bigger drive, for example -
by opening START-MINING.bat in Notepad and changing the line that reads
  set "DATADIR=%LOCALAPPDATA%\Ferminux"
to the folder you want. The DAGDIR line on the next line moves the 1.1 GB
lookup table the same way.


HOW TO STOP
-----------
Close the window, or click in it and press Ctrl+C. If Windows asks
"Terminate batch job (Y/N)?", answer Y.

Mining stops the moment the window closes. Nothing keeps running in the
background, nothing starts itself when you next boot the PC. Your coins
are on the network, not in this program, so stopping loses nothing.


ONLY ONE AT A TIME
------------------
START-MINING.bat and START-NODE.bat cannot run at the same time. Both are
the same program and they collide on three things: the chain folder, the
network port, and a Windows "named pipe" called \\.\pipe\ferminux.ipc.

Windows named pipes are machine-wide names, not files in a folder - so
two copies clash even if you point them at different data folders. If you
see "Failed to start IPC" or "datadir already used", find the other
window and close it.

(The stock Ethereum client uses \\.\pipe\geth.ipc. These scripts
deliberately use \\.\pipe\ferminux.ipc instead, so Ferminux and Ethereum
can coexist on the same PC.)


WINDOWS WILL WARN YOU. HERE IS WHY, HONESTLY
--------------------------------------------
ferminux-geth.exe is not code-signed. A code-signing certificate is an
identity document bought from a certificate authority for a few hundred
euros a year, and this project has not bought one yet. Unsigned programs
downloaded from the internet get flagged. You will probably see one or
both of these:

  1. "Windows protected your PC" (SmartScreen), a blue box with only a
     "Don't run" button visible.

       -> Click "More info" (small link in the box).
       -> The publisher line will say "Unknown publisher".
       -> Click "Run anyway".

  2. Windows Security / Microsoft Defender quarantines the file, or the
     download disappears from your Downloads folder. Mining software is
     bundled by real malware, so scanners flag the entire category on
     sight - often as "Trojan:Win32/CoinMiner" or similar. In this case
     the label is accurate about what the program does (it mines) and
     wrong about your consent (you asked for it).

       -> Open Windows Security, go to "Virus & threat protection",
          then "Protection history", find the blocked item, and choose
          "Allow on device" or "Restore".

DO NOT turn your antivirus off. Ever. Restore this one file if you decide
to trust it, and leave every other protection exactly where it is.

Also expect Windows Firewall to ask about network access the first time
you run it. Ferminux talks to other computers on port 30303 (both TCP and
UDP) to find peers.

       -> Tick "Private networks" and click "Allow access".
       -> If you deny it, the node will find few or no peers and mining
          will not work properly.
       -> Ticking "Public networks" as well is not necessary at home.
       -> If you dismissed the prompt by accident: Windows Security ->
          Firewall & network protection -> Allow an app through firewall
          -> Change settings -> Allow another app -> Browse to
          ferminux-geth.exe.


IS THIS SAFE? CHECK THE FINGERPRINT YOURSELF
--------------------------------------------
Do not take our word for it, and do not take a download page's word for
it either. Every file has a SHA-256 fingerprint. If the fingerprint of
the file on your disk matches the one published at

    https://ferminux.net/downloads/SHA256SUMS.txt

then the file you have is byte-for-byte the file that was published, and
nothing was altered in transit or by anything on your PC.

To check the ZIP you downloaded:

  1. Press the Windows key, type: powershell
  2. Press Enter.
  3. Type this, then drag the .zip file from Explorer into the window
     (that pastes its path), then press Enter:

       Get-FileHash -Algorithm SHA256

     The finished line looks like:

       Get-FileHash -Algorithm SHA256 "C:\Users\You\Downloads\ferminux-geth-windows-amd64.zip"

  4. Compare the long "Hash" value it prints with the matching line at
     the link above. Letter case does not matter. Every character must
     match.

To check the program itself the same way, use CHECKSUMS.txt in this
folder:

       Get-FileHash -Algorithm SHA256 .\ferminux-geth.exe

and compare with the value in CHECKSUMS.txt.

If a fingerprint does not match, delete the file and download it again
from https://ferminux.net - do not run it.


WHAT YOU WILL SEE IN THE WINDOW
-------------------------------
Lines scroll past constantly. The ones that matter:

  "Generating DAG in progress"     first-run table build, be patient
  "Commit new mining work"         the miner is working normally
  "Successfully sealed new block"  YOU FOUND A BLOCK. You were paid.
  "Looking for peers"              still connecting; fine for a minute
  "Block synchronisation started"  catching up with the network
  "Mining too far in the future"   your PC clock is wrong; fix the time

Peer count staying at 0 for more than a few minutes usually means the
firewall prompt was denied. See the firewall section above.


HONEST EXPECTATIONS ABOUT EARNINGS
----------------------------------
Read this part twice. It is the part most guides leave out.

  * A processor is bad at this. A desktop CPU manages a few MH/s. A
    single mid-range graphics card does tens of MH/s - roughly a hundred
    times more. If you have a gaming PC, read GPU-MINING.txt instead.

  * You are competing with everyone. Your earnings are your share of the
    total guessing power, not a fixed amount. As more people mine, each
    person earns less for the same electricity.

  * Solo CPU mining may pay nothing for a long time. Blocks arrive whole
    or not at all. A small CPU on a growing network can go days or weeks
    without one. That is variance, not a fault. A graphics card on the
    pool (GPU-MINING.txt) pays small amounts steadily instead.

  * The reward is changing. It is 6 FMX per block now. At block 20,000
    the scheduled "Emission" upgrade cuts it to 1 FMX per block, and from
    there it halves every 4,500,000 blocks.

  * Electricity is not free. A PC mining flat out might draw 100-200 W
    more than idle. That is roughly 70-150 kWh a month, and at 0.30
    EUR/kWh, roughly 20-45 EUR a month. Every month. Whether or not FMX
    is worth anything.

  * FMX has no guaranteed price and no promise of one. Nobody owes you a
    buyer. Treat anything you mine as worth nothing until somebody
    voluntarily pays you for it.

  * Laptops: think twice. Sustained 100% CPU cooks the battery and the
    fans. If you do it anyway, keep it plugged in, on a hard surface, and
    use fewer threads.

The best reason to run this is that you want a network that no company
controls to keep working. The coins are a side effect.


IF SOMETHING GOES WRONG
-----------------------
The .bat scripts never close on their own when there is an error - they
wait for a key press so you can read what happened. Scroll up in the
window; the last few lines almost always name the problem.

  "ferminux-geth.exe is not in this folder"
      The ZIP was not extracted. See the top of this file.

  "Failed to start IPC" / "datadir already used"
      Another copy is already running. Close the other window.

  Peers stay at 0
      The firewall prompt was denied, or port 30303 is blocked. See the
      firewall section.

  "etherbase must be explicitly specified"
      The saved address is damaged. Delete ferminux-config.txt next to
      the scripts and run START-MINING.bat again.

  The window flashes and vanishes instantly
      That means .bat files are being handled by something other than
      Windows Command Prompt on your PC, so the script never ran. Open a
      Command Prompt (Windows key, type cmd, Enter), drag
      START-MINING.bat into it, and press Enter to see the real error.

  Antivirus removed the file
      See the SmartScreen / Defender section above.

More: https://ferminux.net  and the troubleshooting guide in the project
documentation.


THE NETWORK, IN ONE TABLE
-------------------------
  Name              Ferminux Network
  Coin              FMX, 18 decimals
  ChainID           3961
  Consensus         Ethash proof of work
  Block time        about 7 seconds
  Block reward      6 FMX now; 1 FMX from block 20,000; halves every
                    4,500,000 blocks after that
  Wallet            https://wallet.ferminux.net
  Explorer          https://explorer.ferminux.net
  Public RPC        https://rpc.ferminux.net
  Mining pool       pool.ferminux.net:3333
  Website           https://ferminux.net

You do not need to enter any of these anywhere. They are compiled into
ferminux-geth.exe - an empty data folder joins the right network on its
own, with no configuration file and no flags.
