Bitcoin mining source code

Bitcoin was introduced in 2009 as a digital, decentralized currency. In the Bitcoin network there’s no bitcoin mining source code authority.

Instead a public ledger of every transaction is validated and shared using peer-to-peer technology. Bitcoin transactions are grouped and confirmed by encoding them in a block and adding it to a blockchain that is protected by strong cryptography. This is quite an incentive and so Bitcoin mining evolved into a very competitive market. Only about 300 lines of code but fully functional, open source and uploaded on Github. With the GETWORK protocol you seem to always get a target of difficulty 1. Difficulty 1 means a valid share requires 32 zero-bits which is easy and fast to test for.

So I chose to hardcode that difficulty. Bitcoin Header is found, not that the shares are more difficult to solve. With the GETWORK protocol the only way to detect that is to ask for new work and see if the reply has changed. So both an interval of 10s or 100s would technically work. But 10s instead of 20s would double the bandwith consumption for a minimal efficiency gain.

I hope that answers both of your questions! My research was powered by google mostly. I also looked into the sourcecode of cgminer and Diablo Miner. Have you managed to get valid share? Yeah I got a couple of valid shares myself and meanwhile there are 24 when I log into BTC Guild with the default user so it has worked for at least a couple of other’s, too. Die zugrunde liegende Verbindung wurde geschlossen: Die Verbindung wurde unerwartet getrennt.