I’ve been exposed to the details of creating a transaction (thanks, @igno.peverell). It contains this equation for transaction weight:
MAX(-1 * num_inputs + 4 * num_change_outputs + 1, 1)
A couple questions:
- Is MAX really needed – would it be a problem if a negative weight just had a zero fee, as a reward for shrinking the UTXO set?
- Why are num_change_outputs multiplied by 4, but the recipient’s output is not?
- Is the maximum block size based on the average weights of previous blocks? Where can I find the details on that, or is it still undecided?