The configuration parameter -blockmaxweight
in Bitcoin Core allows miners to set a maximum block weight they want to mine. Oddly, the default value of this parameter is 3996000 as opposed to the SegWit limit of 4000000 WU. Why is that?
1 Answer
It's there so that the miner can replace the coinbase transaction with their own, possibly to add more outputs.
-
Just to make sure, what exactly do you mean by "replace the coinbase transaction"? If I understand correctly, the block template generated by Bitcoin Core has no coinbase transaction. Commented Oct 9, 2022 at 12:59
-
3The internal code for block template computation (which uses that
-blockmaxweight
setting) does add a dummy coinbase transaction. The point is just that the block template generation does not yet know what actual coinbase transaction you'll want to plug in before starting mining, so it leaves some slack space for that. Commented Oct 9, 2022 at 14:13