This adds a requestedOutputs field to BlockCreateOptions which lets the Mining IPC client request outputs to be added before the consensus mandatory commitments.
The main use case is being able to add OP_RETURN outputs for merged mining without patching BlockAssembler::CreateNewBlock().
It could potentially also be used to make payouts directly from the coinbase, but this is unsafe for any amount above the subsidy (this PR adds checks for that). In general a pool should add payout outputs after obtaining the block template, even a solo pool.
Although it’s possible to modify pool software to add merge mining outputs on top of the returned block template (e.g. by intercepting and modifying the Stratum v2 NewTemplate message), it may in practice be easier to do this when requesting a template.
Suggested in #33819 (comment).
Builds on: