Proof of History: the graphics card miner ========================================= In July 2010 the first GPU miner for Bitcoin was published as source, and everything changed. This is the same moment in the season: from season day 1.5 the hash is SHA-256d and this source is here. There is no binary and there never will be one. Whoever builds it gets the advantage, exactly as it was. Files ----- miner.c the host: reads the open block from the site, feeds the card, posts the nonces back sha256d.cl the OpenCL kernel: one nonce per work item, SHA-256 twice, compared to the target What it needs ------------- an OpenCL runtime for your card (the vendor driver already has one) libcurl Build ----- Linux / macOS: cc -O2 -o poh-miner miner.c -lOpenCL -lcurl Windows (MSVC, with the vendor OpenCL SDK and libcurl on the include and lib paths): cl /O2 miner.c OpenCL.lib libcurl.lib Keep sha256d.cl next to the binary: the host reads it at start. Run --- ./poh-miner --address --site https:// --share hand in pool shares instead of mining solo. The miner then looks for hashes under target * factor, which is what the browsers in the people's pool do, and the block is split by the work everybody sent. Pick a factor that gives you about a dozen shares a minute. What it does NOT do ------------------- It never reads a key and never signs anything. The address is only where the SOL is sent. If a miner asks you for a private key, it is not this one. The rules it has to follow -------------------------- A proof is sha256(sha256( prev_hash(32) || height(8 big endian) || pubkey(32) || nonce(8 big endian) )) and it counts when the digest, read big endian, is less than or equal to the target of the block. The site publishes prev_hash, the height and the target at /api/state and takes proofs at /api/submit. Every proof is hashed again on the server before it is worth anything, so there is nothing to gain by changing the maths here: only by making it faster.