Hello Again,
I’m researching solo mining, but I need help in finding information on how the Coinbase Transaction is Generated:
It should be explained within the ‘getblocktemplate’ page on the Bitcoin Wiki (https://en.bitcoin.it), but this only explains how to build a coinbase transaction with the help of “coinbasetxn”; and it’s my understanding that “coinbasetxn” is only supported within Mining Pools, not the Bitcoin Wallet – remember, I’m researching solo mining.
What’s also making things complicated is “Segregated Witness” (Segwit): With Segwit, all transactions now have a ‘txid’ and a ‘hash’; sometimes, the ‘txid’ and ‘hash’ will match, but most of the time (including in some Coinbase Transactions) they don’t. And I can’t find anything online on how to generate a Coinbase Transaction while accounting for Segwit.
Can anyone find an example algorithm that can build a Coinbase Transaction in a solo mining environment while also accounting for Segwit?
You can share it in any code you like, but I’d prefer Python.
Source link