user127251: I'm working on a mining script and i just want to really be certain for sure as I wouldn't want to waste Time & resources.
Q1 - Is the coinbase transaction automatically generated by the getblocktemplate or do i have to implement it myself.
Q1(b). If the inclusion of the coinbase transaction is not done automatically and as such is not the first transaction on the list of transactions returned by the getblocktemplate (as it should be)...... How would I go around generating the
coinbase? Is there a function in the main bitcoin source code that handles this, something I can crop out and make a portable function?

Q2. Assuming coinbase transaction has been provided via blockchains protocol to ensure empty blocks are never created again, Is it safe to assume that the coinbase has been generated with the bitcoin address linked to my full node?
Q2(b). If it has been created and my address set to recieve the rewards, what happens when I currently have more than 1 btc wallet address linked to my wallet?? Is there a way I can specify the address to be used for mining within my bitcoin.conf  file ?


"The hashing/mining tests to be carried out are being spearheaded by a CPU System. To be more specific, A Custom Dynamic Multi-Processor Mining Rig, being fed data and instructions via CPU. The CPU does a bit of mining itself using a different merkleHash generated."


Q3. The generate=1 option within the bitcoin.conf file, does it mean that my cpu begins mining internally or is it an option that has to be turned ON if a user(miner) intends to mine with their CPU(either alone or with mining rigs handling the hashing process)??
What I'm asking is.. If the generate parameter is not defined or is  = 0 within bitcoin.conf, does that mean that all mining efforts are wasted ?? or is it only related to the internal mining script deemed to be inefficient?

And lastly.....
Q4. Miners are advised to use different addresses for a level of privacy and anonymity. The question,  Would I have to manually create new addresses at every successful block mined or is there an option to automatically handle that or a button that toggles such a feature off/on within the GUI?
I do hope these questions can be answered by someone.... It's extremely important.. Thanks so much in advance.

UPDATE !! 10/12/2021   01:10AM
Hamita successfully answered Questions 1,2 & 3.
Question 4 remains unanswered but since majority of questions have been answered, I'll accept Hamita's answer as a valid answer to my posted question.

user106775: The coinbase transaction is not generated automatically from bitcoin core, you need to generate it yourself with the createrawtransaction command.
For the setgenerate is no longer available in the options and you can't use it.

user51948: Regarding question 4, you need to manually create/request a new address each time you need one.

127251: <p>I'm working on a mining script and i just want to really be certain for sure as I wouldn't want to waste Time &amp; resources.</p>
<p><strong>Q1</strong> - Is the coinbase transaction automatically generated by the <strong><code>getblocktemplate</code></strong> or do i have to implement it myself.</p>
<p><strong>Q1(b).</strong> If the inclusion of the <strong>coinbase</strong> transaction is not done automatically and as such is not the first transaction on the list of transactions returned by the <strong><code>getblocktemplate</code></strong> <strong>(as it should be)</strong>...... How would I go around generating the
<strong>coinbase</strong>? Is there a function in the main bitcoin source code that handles this, something I can crop out and make a portable function?</p>
<hr />
<p><strong>Q2.</strong> Assuming <strong><code>coinbase transaction</code></strong> <strong>has</strong> been provided via blockchains protocol to ensure empty blocks are never created again, Is it safe to assume that the coinbase has been generated with the bitcoin address linked to my full node?</p>
<p><strong>Q2(b).</strong> If it has been created and my address set to recieve the rewards, what happens when I currently have more than 1 btc wallet address linked to my wallet?? Is there a way I can specify the address to be used for mining within my <strong>bitcoin.conf</strong>  file ?</p>
<hr />
<hr />
<p><strong>&quot;The hashing/mining tests to be carried out are being spearheaded by a CPU System. To be more specific, A Custom Dynamic Multi-Processor Mining Rig, being fed data and instructions via CPU. The CPU does a bit of mining itself using a different merkleHash generated.&quot;</strong></p>
<hr />
<hr />
<p><strong>Q3.</strong> The <strong><code>generate=1</code></strong> option within the <strong>bitcoin.conf</strong> file, does it mean that my cpu begins mining internally or is it an option that has to be turned ON if a user(miner) intends to mine with their CPU(either alone or with mining rigs handling the hashing process)??</p>
<p><strong>What I'm asking is.. If the <strong><code>generate</code></strong> parameter is not defined or is <strong><code> = 0</code></strong> within <em>bitcoin.conf</em>, does that mean that all mining efforts are wasted ?? or is it only related to the internal mining script deemed to be inefficient?</strong></p>
<hr />
<p>And lastly.....</p>
<p><strong>Q4.</strong> Miners are advised to use different addresses for a level of privacy and anonymity. The question,  Would I have to manually create new addresses at every successful block mined or is there an option to automatically handle that or a button that toggles such a feature off/on within the GUI?</p>
<p>I do hope these questions can be answered by someone.... It's extremely important.. Thanks so much in advance.</p>
<hr />
<h2>UPDATE !! 10/12/2021   01:10AM</h2>
<p><a href="https://bitcoin.stackexchange.com/users/106775/hamita">Hamita</a> successfully answered Questions 1,2 &amp; 3.</p>
<p>Question 4 remains unanswered but since majority of questions have been answered, I'll accept <a href="https://bitcoin.stackexchange.com/a/111108/127251">Hamita's</a> answer as a valid answer to my posted question.</p>
 106775: <p>The coinbase transaction is not generated automatically from bitcoin core, you need to generate it yourself with the <code>createrawtransaction</code> command.</p>
<p>For the <code>setgenerate</code> is no longer available in the options and you can't use it.</p>
 51948: <p>Regarding question 4, you need to manually create/request a new address each time you need one.</p>
