Oneliner Grin: Σ utxo = Σ kernel + offset * G + height * 60 * H

Notes:

  1. The name utxo is a bit of a misnomer for Grin, since outputs are not part of transactions. So it should be uo but then nobody knows what you’re talking about…

  2. This is about the first height blocks, up to, but not including the block at height “height”. I didn’t want to uglify the equation with (height+1) * 60 …

  3. The code related to this equation is not in one place. The non-reward part is checked in
    https://github.com/mimblewimble/grin/blob/6e5afe496b201a1a5df4f42c62cd5fe1bdc24c6b/core/src/core/committed.rs#L120-L140
    while the reward part is checked for one block in https://github.com/mimblewimble/grin/blob/master/core/src/core/block.rs#L768-L803

6 Likes

Minor correction:

It’s actually (1 + height) * 60 * H

And our code documentation is actually incorrect:

2 Likes

We should have gone with a 1 grin reward in the genesis block.
Then it would work for the block at height (inclusive) -

Σ utxo = Σ kernel + offset * G + height * 60 * H + H

1 Like