I know that there are many questions on this forum about this topic, but I have checked most of these but can’t find a solution for my task. I’m writing my own algorithm for Solo Mining Bitcoin in Python. I’ve written all the methods needed to do this. This includes calculations such as hashing of the Merkle route, block headers, and more. But now I’ve been stuck in a Coinbase transaction for a few weeks. I’ve studied the Coinbase transaction page at LearnMeabitcoin.com and tried to implement all the logic, but I can’t fully understand how to create it. I would like to include a new rule (BIP34-block header, BIP141-SEGWIT TX) in this algorithm, but my knowledge about hashing this is not sufficient. 🙁
Could someone perhaps provide more material, code samples, or explain more about generating Coinbase transactions? Any information is very helpful, I hope for your help.
I’m also training my Bitcoin core in Regtest mode. Using the “GenerateToAddress” method (for generation block), if you don’t use Coinbase Tx with BIP34 and BIP141 requirements, do you need to set this setting? I found someone saying something about the block version of Arg, is that true?
Thank you very much ^^
PS If I missed the details of my task, I can freely ask and provide all the information I have, a sample of code I have (it’s not working)
update
I have great news, I’ll find a solution and complete this) Thanks for your support. But there is only one question left. I use Object to generate the Tx on the screen. There is a difference from Coinbase Tx generated with Bitcoin Core using GenerateToAddress only in one location, submitting n in the first output. Can someone explain what it is? I’m using a P2WPKH script for the hash address, is this the type? Adding this value everything worked fine, and after broadcasting to Build Block header and full block and node, I succeeded in General Coinbasetx. However, just to fully understand my code, I would like to know what this means “0000000” means, but the name “n” in the field was my own.
Discover more from Earlybirds Invest
Subscribe to get the latest posts sent to your email.