3

I set up a private testnet to play around with and I am currently mining empty blocks. I was surprised to see that the coinbase transaction created by the getblocktemplate RPC had 5 outputs instead of only 1, which is what I normally get on the mainnet. For example, below are the outputs for one particular block:

0.001253953260
0.070000000000
0.400000000000
7.000000000000
10.000000000000

Why does Monero split up the rewards in this instance?

Also, a follow-up question: I'm having a bit of trouble calculating expected rewards from the coinbase transaction. For example, one block's expected reward is 17472187044247, and using the equations from here, 17472187044247 = (2^63 - A) / 2^19, so A = 2^63 - 2^19 * 17472187044247. Using this value of A, we can get the reward from the very next block with R = (2^63 - A - 17472187044247) / 2^19, which gives us R = 17472153718694. However, the actual expected reward of the next block is 17472170381470. I was able to verify this formula on the mainnet, so I'm not sure why the actual reward is greater than the calculated one.

1 Answer 1

4

Why does Monero split up the rewards in this instance?

This answer requires a bit of history first to be sufficiently explanatory.

In the first years of Monero's existence amounts were not encrypted yet. In addition, output amounts were "split" into denominations to the power of 10 to ensure they could be used as decoy outputs (i.e. ring partners). Thus, for instance, an amount of 101.1234 was split into denominations of 100, 1, 0.1, 0.02, 0.003, and 0.0004. To reiterate, this was required in order for ring signatures to work properly. That is, if the amount of 101.1234 was not split into denominations, it would be fairly unlikely that one could find two other (decoy) outputs of 101.1234 to create a ring with. By contrast, plenty of decoy outputs (ring partners) can be found for an output amount of 100. In September 2016, RingCT, which, in a nutshell, allows one to encrypt output amounts, was activated on testnet. A few months later, in the beginning of 2017, RingCT was activated on mainnet.

Now, as you can see from here, the hard fork which activated RingCT on testnet was triggered by block 80xxxx. Intuitively, all blocks before the fork block contain transactions with non-RingCT outputs, which are unencrypted and split into denominations to the power of 10. It logically follows that, if you create a private testnet (which starts from block 0), the blocks on your private testnet contain transactions with non-RingCT outputs until RingCT activation is triggered. Basically, you'd need to mine ~800k blocks before RingCT gets activated. You can, however, tweak the fork heights in the code, recompile, and set up a new private testnet.


Also, a follow-up question: I'm having a bit of trouble calculating expected rewards from the coinbase transaction.

The slight discrepancy between the expected reward and actual reward is, if I recall correctly, caused by the penalty (i.e. miners incur a penalty if they mine a block bigger than the minimum block size limit of 300 kB) being deferred to future miners.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.