<blockquote>
<p>Is it relevant enough?</p>
</blockquote>
<p>It depends what your goal is. As an educational tool for someone more familiar with Go, sure. For running in production say with a Lightning node managing hundreds of millions of dollars, perhaps not. Or at least not without running Bitcoin Core additionally as a backstop. There have been <a href="https://bitcoin.stackexchange.com/questions/115527/what-is-the-october-2022-bug-in-lnd-what-caused-it-and-what-would-prevent-a-sim">examples</a> in the past of consensus bugs in btcd and it doesn't have as much review and eye balls as Bitcoin Core say but it is one of the few <a href="https://blog.lopp.net/2022-bitcoin-node-performance-tests/" rel="nofollow noreferrer">alternative implementations</a> that is maintained and continually improved.</p>

CC BY-SA 4.0
2023-08-31T12:54:34.710Z
My goal is to learn how Bitcoin "breathes" through it. That is, to know exactly what is happening at what moment and in what way (how validation is performed, forwarding of transactions, finding other nodes, even original bugs from the bitcoin core etc.), literally every detail. I would say that these are educational purposes, so would it be good for me to learn how to "breathe" and then go through the C++ implementation because it will be much easier for me? However, after you said that there are certain bugs, I would say that I will not make it through this implementation. What do you think?
dassd
CC BY-SA 4.0
2023-08-31T12:59:06.370Z
@joke: The bugs are rare. For educational purposes btcd would be fine, it is well written code.
Michael Folkson
CC BY-SA 4.0
2023-08-31T13:07:22.897Z
Thanks, so if I understand you correctly golang's implementation, we can say, full follows the original one. For example the ways in which other nodes are found are the same (there is no additional in core that does not exist in the golang version), the way of validating, for example, the segwit script is the same and so on?
dassd
CC BY-SA 4.0
2023-08-31T13:25:15.810Z
@joke: The consensus rules (e.g. script validation) should be exactly replicated and if they aren't you should submit a bug report. Other rules e.g. P2P/mempool policy don't have to be replicated. I'd guess they are similar to Core's but you'd need to speak to a contributor on the project to confirm.
Michael Folkson
CC BY-SA 4.0
2023-08-31T12:49:00.920Z
2023-08-31T12:49:00.920Z
Michael Folkson
<p>Is anyone familiar with <a href="https://github.com/btcsuite/btcd" rel="nofollow noreferrer">btcd</a>, the Golang implementation of a Bitcoin node.</p>
<p>Is it relevant enough? I read somewhere that they boast that it is an almost 1 to 1 mirror of the original C++ implementation, but does anyone have experience with this? Is it worth going through this implementation, since I'm not that familiar with C++.</p>

<bitcoin-core><btcd>
Is golang's implementation of Bitcoin core sufficiently relevant to the original?
dassd
# Is golang's implementation of Bitcoin core sufficiently relevant to the original?

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

Is anyone familiar with [btcd](https://github.com/btcsuite/btcd), the Golang implementation of a Bitcoin node.

Is it relevant enough? I read somewhere that they boast that it is an almost 1 to 1 mirror of the original C++ implementation, but does anyone have experience with this? Is it worth going through this implementation, since I'm not that familiar with C++.

**Tags:** bitcoin-core, btcd


---

## 1 answers

### Answer by username_1 on 2023-08-31. Score: 0 | Accepted answer

> Is it relevant enough?

It depends what your goal is. As an educational tool for someone more familiar with Go, sure. For running in production say with a Lightning node managing hundreds of millions of dollars, perhaps not. Or at least not without running Bitcoin Core additionally as a backstop. There have been [examples](https://bitcoin.stackexchange.com/questions/115527/what-is-the-october-2022-bug-in-lnd-what-caused-it-and-what-would-prevent-a-sim) in the past of consensus bugs in btcd and it doesn't have as much review and eye balls as Bitcoin Core say but it is one of the few [alternative implementations](https://blog.lopp.net/2022-bitcoin-node-performance-tests/) that is maintained and continually improved.

> **Comments:**
> **username_0**: My goal is to learn how Bitcoin "breathes" through it. That is, to know exactly what is happening at what moment and in what way (how validation is performed, forwarding of transactions, finding other nodes, even original bugs from the bitcoin core etc.), literally every detail. I would say that these are educational purposes, so would it be good for me to learn how to "breathe" and then go through the C++ implementation because it will be much easier for me? However, after you said that there are certain bugs, I would say that I will not make it through this implementation. What do you think?  
> **username_1**: @joke: The bugs are rare. For educational purposes btcd would be fine, it is well written code.  
> **username_0**: Thanks, so if I understand you correctly golang's implementation, we can say, full follows the original one. For example the ways in which other nodes are found are the same (there is no additional in core that does not exist in the golang version), the way of validating, for example, the segwit script is the same and so on?  
> **username_1**: @joke: The consensus rules (e.g. script validation) should be exactly replicated and if they aren't you should submit a bug report. Other rules e.g. P2P/mempool policy don't have to be replicated. I'd guess they are similar to Core's but you'd need to speak to a contributor on the project to confirm.  

---

