<p>For study purpose , is there any simple btc miner code that are very easy to understand as long as i understand the concept of btc mining ?</p>
<p>I've seen similar question on this website but the answer refers to either a messy code that very hard to understand or an outdated code that does not support the current btc miner protocol (e.g : DiabloMiner) , that's why i'm asking this.</p>
<p>Any code which last update is behind 2020 i consider as outdated.</p>

CC BY-SA 4.0
2021-09-15T09:37:18.473Z
Welcome to bitcoin.stackexchange.com. You will find it useful to take the [tour] and have a quick look at the [help]. Please note that "Easy to understand" is subjective and invites opinion-based answers which don't fit well here.
RedGrittyBrick
CC BY-SA 4.0
2021-09-15T14:22:25.213Z
Mining is still exactly the same problem as it always has been in Bitcoin, so it's not clear to me why code examples that predate 2020 are outdated.
Murch
CC BY-SA 4.0
2021-09-15T14:29:28.880Z
@Murch because of newer miner protocol
i'm ashamed with what i asked
CC BY-SA 4.0
2021-09-15T14:35:04.303Z
So, you would like to understand how Stratum V2 works?
Murch
CC BY-SA 4.0
2021-09-16T01:21:34.720Z
The GBT and Stratum protocols that are used for mining in practice haven't changed since 2012-2013 somewhere. Before that time, the "getwork" protocol was used which is now obsolete. But any code you find from the last 4 to 8 years will probably work fine (4 years because segwit extensions may matter).
Pieter Wuille
<mining-software>
Easy to understand simple btc miner?
i'm ashamed with what i asked
# Easy to understand simple btc miner?

(Asked by: username_0 on 2021-09-15)

For study purpose , is there any simple btc miner code that are very easy to understand as long as i understand the concept of btc mining ?

I've seen similar question on this website but the answer refers to either a messy code that very hard to understand or an outdated code that does not support the current btc miner protocol (e.g : DiabloMiner) , that's why i'm asking this.

Any code which last update is behind 2020 i consider as outdated.

**Tags:** mining-software

> **Comments:**
> **username_1**: Welcome to bitcoin.stackexchange.com. You will find it useful to take the [tour] and have a quick look at the [help]. Please note that "Easy to understand" is subjective and invites opinion-based answers which don't fit well here.  
> **username_2**: Mining is still exactly the same problem as it always has been in Bitcoin, so it's not clear to me why code examples that predate 2020 are outdated.  
> **username_0**: @username_2 because of newer miner protocol  
> **username_2**: So, you would like to understand how Stratum V2 works?  
> **username_3**: The GBT and Stratum protocols that are used for mining in practice haven't changed since 2012-2013 somewhere. Before that time, the "getwork" protocol was used which is now obsolete. But any code you find from the last 4 to 8 years will probably work fine (4 years because segwit extensions may matter).  

---

## 0 answers

