How Bitcoin works
How Bitcoin mining works.
A plain-English look at the machines that keep Bitcoin running, and what they actually do.
What Bitcoin mining is
Bitcoin has no company or bank keeping its books. A network of computers around the world keeps one shared ledger, and miners are the machines that do the heavy work of adding to it. Mining does three jobs at once: it confirms and orders payments, it secures the network, and it creates new bitcoin on a fixed schedule.
What a miner looks like
A Bitcoin miner is not a gaming PC. It is a purpose-built machine called an ASIC (application-specific integrated circuit), designed to do one calculation and nothing else. It cannot browse the web or run apps. Our design uses the Antminer S21 XP Immersion, a rugged metal box rated at 300 TH/s that draws about 4,050 W. It has no fans, because it is built to run submerged in a fluid that carries its heat away.
- 1Hash boards. Carry the ASIC chips that do all of the hashing.
- 2Control board. Connects the miner to the internet and tells it what to work on.
- 3Power input. On this model, three-phase 380-415 V.
- 4Immersion fluid. Surrounds the machine and carries heat away, so no fans are needed.
What it does mechanically
Electricity goes in, math happens, and heat comes out. The chips run at about 300 trillion guesses, called hashes, every second. Nearly every watt they draw ends up as heat, roughly the same as three space heaters running at full power. That is why cooling matters. In an immersion system the fluid pulls the heat straight off the machine and carries it away, which is quieter than fans and easier on the hardware.
What it does in the Bitcoin code
About every ten minutes, the network accepts a new block of payments. A miner's job is to win the right to add it. This is what the machine does, over and over:
- Build a candidate.It gathers waiting payments into a block header: a short, fixed record holding a fingerprint of the previous block, a fingerprint of the payments, a timestamp, and a counter called the nonce.
- Hash it.It runs the header through SHA-256, twice. The result is a 256-bit number that looks random, and changing even one digit of the input changes it completely.
- Check the target.Bitcoin sets a target number, and a hash only counts if it is below it. In practice that means it starts with a long run of zeros. There is no shortcut. The only way to find one is to change the nonce and try again, trillions of times a second.
- Announce the win.When a miner finds a valid hash, it broadcasts the block. Other computers check it in a fraction of a second, and if it is valid they all add it to the chain. The winner earns the block reward, currently 3.125 BTC, plus the fees on the payments in that block.
The network resets the target every 2,016 blocks, about every two weeks, so blocks keep arriving about every ten minutes no matter how many miners join.
The whole network is so large that one miner working alone would expect to find a block roughly once every 60 years. So miners join a pool, which combines everyone's hashing and shares each reward in proportion to the work contributed. The pool keeps a small fee, which is the 2% fee in our projections.
How miners support the system
- Security.To change a past payment, an attacker would have to redo all the hashing since then, faster than the entire honest network. The more hashing there is, the more that would cost.
- Honesty.Miners spend real money producing blocks, and they only get paid if the rest of the network accepts their block. A block that breaks the rules is rejected and the work is wasted. The rules themselves are enforced by thousands of independent computers called full nodes, not by miners.
- A fair, predictable supply.New bitcoin enters circulation only as a reward for proven work, on a schedule that halves about every four years, up to the 21 million cap. No one can print extra.
- Putting payments in order.Miners place payments in sequence in each block, which stops the same coin from being spent twice.
Where our systems fit
Mining turns electricity into security and new bitcoin, and electricity is a miner's biggest cost. Our systems cover that cost from the sun: solar panels make the power, a three-phase inverter delivers it, and the miner does the work.
- Sunlight
- Solar panelsmake the power
- Three-phase inverterdelivers it to the miner
- Miner in immersion coolingruns the hashing
- Mining poolcombines the work and pays out
- Bitcoin you own
Keep going
Now seewhat it can produce.
Mining is the engine. Here is why we build these systems, and what one of them can produce.