

With the GETWORK protocol you seem to always get a target of difficulty 1. The jobs that clients get from mining pools to solve are a lot easier than (and independent of) the current Bitcoin difficulty.
#Bitcoin mining software wiki code
That’s not fast enough for serious mining but enough to find a valid share eventually, submit it to the pool server and be happy about the fact that you understand every single line of code that made it happen! It uses the basic GETWORK protocol to connect to pools and mines at ~400Kh/s a second. Only about 300 lines of code but fully functional, open source and uploaded on Github. Miniminer is a simple CPU based Bitcoin Miner in C#. If you are trying to understand how Bitcoin mining software works but can’t find a reference implementation that is minimal and easy to understand (like me, 2 days ago) here’s my contribution: Currently the combined network of miners calculates roughly 80.000.000.000.000 Hashes per second. Nonetheless incredible amounts of electricity (~1 GW/h) are wasted on mining Bitcoins which is basically spend calculating zillion’s of SHA256 hashes. Advanced mining software uses GPU’s to compute hashes a hundred times faster then possible on CPUs and there is even dedicated hardware with hashrates in the Giga-range and a better Hashrate/power-consumption ratio. (Currently 25 BTC – worth about 2500€) This is quite an incentive and so Bitcoin mining evolved into a very competitive market. When a block is solved the successful miner (or mining pool) earns a reward in Bitcoins. The cryptographic calculations aren’t provided by a central authority – instead anyone with capable hardware and mining software installed can provide computational labor to help solve the next block. Recently there was a surprising spike in the value of Bitcoins, making me curious to find out more of the system behind.īitcoin transactions are grouped and confirmed by encoding them in a block and adding it to a blockchain that is protected by strong cryptography. Instead a public ledger of every transaction is validated and shared using peer-to-peer technology. In the Bitcoin network there’s no central authority. Bitcoin was introduced in 2009 as a digital, decentralized currency.
