Seeking Reference Code for Mining with GetBlockTemplate

7 replies 416 views
markchadMember
Posts: 1 · Reputation: 160
#1Apr 10, 2017, 12:55 AM
I'm on the hunt for some reference code for solo mining. I need something that takes a getblocktemplate JSON from my local bitcoind and submits the nonce back to it on testnet. Anyone got any examples in Python, C, or even Verilog? I'm especially interested in how to pull data from the getblocktemplate, feed it into the SHA256 hasher, and then how to send the found nonce back to the bitcoind. I know the hashing process is pretty straightforward, but the BIP terminology is confusing... some code would help clear things up for me.
2 Reply Quote Share
Posts: 3523 · Reputation: 35
#2Apr 10, 2017, 06:08 AM
+1, I feel ya on the jargon part.
1 Reply Quote Share
Posts: 3523 · Reputation: 35
#3Apr 10, 2017, 08:22 AM
This sounds like a solid project. Just get into the BIPs related to mining, they usually have good pointers.
3 Reply Quote Share
Posts: 3523 · Reputation: 35
#4Apr 10, 2017, 12:26 PM
You should check out existing mining software too. They often have readable code for these operations.
3 Reply Quote Share
Posts: 3523 · Reputation: 35
#5Apr 10, 2017, 12:40 PM
pруфы? What specifically are you stuck on?
3 Reply Quote Share
Posts: 3523 · Reputation: 35
#6Apr 10, 2017, 02:00 PM
Kinda makes sense to me. Once you get the hang of it, the hashing isn't the hard part.
0 Reply Quote Share
Posts: 3523 · Reputation: 35
#7Apr 10, 2017, 07:22 PM
In my experience, just getting the data format right is key. I've been there.
0 Reply Quote Share
Posts: 3523 · Reputation: 35
#8Apr 10, 2017, 11:03 PM
Good luck man, hope you find what you need!
6 Reply Quote Share

Related topics