I do know that on this discussion board quite a lot of questions on this matter, I examine this all (not all however most) and may’t discover the answer for my job. I’m create my very own algorithm for mining Bitcoin on Python, this one for solo mining. So, I wrote all mandatory strategies for this, together with hashing Merkle root, calculate block header and so on. However now, I stack about few weeks on coinbase transaction. I examine supplies from right here (https://learnmeabitcoin.com/technical/mining/coinbase-transaction/) about this and attempt to implement all logic for this, however cannot totally perceive easy methods to make this. I wanna embody new guidelines (BIP34 – block header, BIP141 – SegWit tx) on this algorithm, however my data about hashing this isn’t sufficient 🙁
Can somebody present perhaps extra supplies, some samples of code, or describe particulars about producing coinbase transaction? Any data can be very helpfull, hope in your assist.
Additionally, I coaching on Bitcoin core in regtest mode, and after I use “generatetoaddress” methodology (for generate blocks) this one would not gen coinbase tx with BIP34 & BIP141 necessities, perhaps I would like set extra config for this one? I discovered somebody say about blockversion arg, is it true?
Thanks all ^^
P.S. If i miss some particulars about my job, fell free to ask and I present all data which I’ve, of pattern of code which I’ve (it isn’t working)