Miner Transaction Rules
Introduction
Miner transactions are handled differently to normal transactions, see here for the rules on normal transactions.
Rules
Version
The transactions version must be either 1 or 21.
The version can be 1 or 2 up to hard-fork 12 then it must be 22.
Input
The transaction must only have one input and it must be of type txin_gen
3.
The height specified in the input must be the actual block height4.
RingCT Type
From hard-fork 12 version 2 miner transactions must have a ringCT type of Null
5.
Unlock Time
The unlock time must be the current height + 606.
Output Amounts
The output, when summed, must not overflow7.
For only hard-fork 3 the output amount must be a valid decomposed amount8, which means the amount must be in this table.
Total Outputs
The reward from the block + the total fees must not be more than the summed output amount9.
For hard-fork 1 and from 12 onwards the summed output amount must equal the reward + fees10 this means from 2 till 11 miners can collect less if they want less dust.
Output Type
The output type allowed depends on the hard-fork11:
hard-fork | output type |
---|---|
1 to 14 | txout_to_key |
15 | txout_to_key and txout_to_tagged_key |
16 onwards | txout_to_tagged_key |
For hard-fork 15 both are allowed but the transactions outputs must all be the same type.
Zero Amount V1 Output
Monero does not explicitly ban zero amount V1 outputs on miner transactions but the database throws an error if a 0 amount output doesn't have a commitment 12 meaning they are banned.
V2 Output Pool
When adding version 2 miner transactions to the blockchain, put the outputs into the 0 amount pool and create dummy commitments of:13
\(commitment = G + amount * H \)