Extracted from #1081 because it contains important changes to coinbase validation which can be easily overlooked.
This PR implements the following rules for coinbase transactions:
The output amount minus the input amount must not be bigger than the block reward plus fees.
The output amount minus the input amount must not be smaller than the block reward. It allows proposers to burn fees. I did it this way because many functional tests generate coinbase transactions without taking into account fees.
Non-reward output amount (sum of all outputs except the first one) must not be bigger than the input amount.
Note that the first output (which is subject to coinbase maturity) can be bigger than the block reward plus fees, i.e. the reward and the stake can be sent to one output. It might useful for proposers who do not want to increase the number of their coins.
Fixes #777.
Extracted from #1081 because it contains important changes to coinbase validation which can be easily overlooked.
This PR implements the following rules for coinbase transactions:
Note that the first output (which is subject to coinbase maturity) can be bigger than the block reward plus fees, i.e. the reward and the stake can be sent to one output. It might useful for proposers who do not want to increase the number of their coins.