<p>I want to make a scrypt/sha256 miner for Bitcoin and altcoins in C to learn more about how mining works in Bitcoin, altcoins and learn more C. <code>getblocktemplate</code> gives some data that is needed for mining from what I understand, but I dont understand the data that much. What is it that you have to do to actually do the mining and then to give the data to rpc through <code>submitblock</code>?</p>
<p>Please dont be harsh on me. Im just trying to learn more about cryptocurrency by making a Bitcoin/altcoin miner.</p>
<p>And yes, I know it's not profitable before anyone says that, it's just to learn about cryptocurrency.</p>

CC BY-SA 4.0
2023-08-05T21:45:08.970Z
Does this answer your question? [What exactly is Mining?](https://bitcoin.stackexchange.com/questions/148/what-exactly-is-mining). See also [What data is hashed](https://bitcoin.stackexchange.com/q/107826/13866) and [What can a miner vary](https://bitcoin.stackexchange.com/q/108184/13866) etc
RedGrittyBrick
CC BY-SA 4.0
2023-08-06T00:46:28.813Z
@RedGrittyBrick It does kind of help, but I want to know the "steps" that I would have to reach so I can generate the block data that I can give to `submitblock` from the data I get from `getblocktemplate`
IdotMaster1
<mining-theory><proof-of-work>
How does mining work on a technical level?
IdotMaster1
# How does mining work on a technical level?

(Asked by: username_0 on 2023-08-05)

I want to make a scrypt/sha256 miner for Bitcoin and altcoins in C to learn more about how mining works in Bitcoin, altcoins and learn more C. `getblocktemplate` gives some data that is needed for mining from what I understand, but I dont understand the data that much. What is it that you have to do to actually do the mining and then to give the data to rpc through `submitblock`?

Please dont be harsh on me. Im just trying to learn more about cryptocurrency by making a Bitcoin/altcoin miner.

And yes, I know it's not profitable before anyone says that, it's just to learn about cryptocurrency.

**Tags:** mining-theory, proof-of-work

> **Comments:**
> **username_1**: Does this answer your question? [What exactly is Mining?](https://bitcoin.stackexchange.com/questions/148/what-exactly-is-mining). See also [What data is hashed](https://bitcoin.stackexchange.com/q/107826/13866) and [What can a miner vary](https://bitcoin.stackexchange.com/q/108184/13866) etc  
> **username_0**: @username_1 It does kind of help, but I want to know the "steps" that I would have to reach so I can generate the block data that I can give to `submitblock` from the data I get from `getblocktemplate`  

---

## 0 answers

