Is there a command I can give the Monero daemon to calculate the total of all coinbase transactions so far?
How do block explorers calculate the Monero coin supply and how can I verify their accuracy?
Monero Stack Exchange is a question and answer site for developers and users of the secure, private and untraceable cryptocurrency Monero. It only takes a minute to sign up.Sign up to join this community
There is no such command. However, it'd be easy to add. Feel free to add a request for this on https://github.com/monero-project/bitmonero/issues
This question has a fundamental misunderstanding of money supply and the link with coinbase transactions.
You would be right in a perfectly secure system, the coinbase transactions are the only way to add coins to the money supply.
The reality however is different. Bugs in the protocol (like the infamous keyimage bug that allowed the creation of infinite money) can create additional coins in the system.
Creating commands like print_coinbase_tx_sum may give you a good indication of the money supply but it should not be taken for facts.
You can print the total coin supply with the command
However, this assumes that there were no issues with transaction construction. In this case, the supply can be audited afterwards to see if there were any errors. Here is the information for a vulnerability that was found with Monero and patched before exploitation:
In Monero we've discovered and patched a critical bug that affects all CryptoNote-based cryptocurrencies, and allows for the creation of an unlimited number of coins in a way that is undetectable to an observer unless they know about the fatal flaw and can search for it.
We patched it quite some time ago, and confirmed that the Monero blockchain had NEVER been exploited using this, but until the hard fork that we had a few weeks ago we were unsure as to whether or not the entire network had updated.