1

Is anyone familiar with 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++.

1 Answer 1

0

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 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 that is maintained and continually improved.

4
  • 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
    Aug 31, 2023 at 12:54
  • @joke: The bugs are rare. For educational purposes btcd would be fine, it is well written code. Aug 31, 2023 at 12:59
  • 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
    Aug 31, 2023 at 13:07
  • 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. Aug 31, 2023 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.