Coinbase transactions

Why do some blocks not have a coinbase e.g. see this block:

{
  "creator": "tNcibGJshuL8dqvQitNyLfndYsrLRffYBfqYS8CsgnCyUMdD8MEmzLPiZ5f3Sv7i3KAYCJygNMvQCULHuZBXE6swQTCfMiHvkL6eG4cmDBQ1NjdRjVeqMEv5zEW76sxduKbVG26LExKYj8",
  "transactions": {
    "userCommands": [],
    "coinbase": "0",
    "feeTransfer": []
  },
  "snarkJobs": []
}

There are no transactions or snarkJobs in that block so I assumed it must be that but there are also blocks like this that have no transactions or snarkJobs and yet do have a coinbase?

{
  "creator": "tNci4GbJQMkTxsoZyVtn86HtLYA6KKxcR1ujoy9da7QWzw7QZgiL7MTxXbb3cxDx7nRpeFBBJ7m8SSVRR3Ua3tbiDAiARBYW6x7DFf56jTNjAypFbq69FvJsKBubKb5GhnH27qR6FjJeEA",
  "transactions": {
    "userCommands": [],
    "coinbase": "20",
    "feeTransfer": []
  },
  "snarkJobs": []
}

Is there something else happening with this second block? What are the rules for a block getting a coinbase?

1 Like

You’re right about why a block might not have a coinbase - because no snarks were purchased (either there weren’t available or they cost more than the coinbase amount).

However, for the first block after genesis, there is no work that can be done and so coinbase (and transactions) can be added for “free” in that block. This behavior is extended for a few blocks in the beginning so that enough work that can be accumulated over that time period.

After that, every block needs to include/purchase snarks to get a coinbase.

The block you’ve shown with coinbase but no snarks should have been produced during this initial period where transactions and coinbase are added without looking for any snark work

1 Like