How create / generate a coinbase transaction for a new block? I am coding a miner program with C, and right now I need some info of how create / generate a coinbase transaction to add to the block before submit it to the bitcoin network. Someone can indicate any article / tutorial explaining this (i am searching for this for a while now, and finding nothing useful of this sorts).
The coinbase transaction is like every other transaction except it has only 1 special coinbase input which you can read about here: https://bitcoin.org/en/developer-reference#coinbase. The outputs must have a value which sum to the block subsidy (currently 12.5) plus any transaction fees in the block. Those are the only stipulations for a coinbase transaction.