add chain supply, transparent and burned coins value pools #609
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces
transparent
andburned
value pools to thegetblockchaininfo
andgetblock
RPC output. This allows you to view the total value statistics of the transparent value pool up to and including the last (or given) block, as well as the same statistics for burned (withOP_RETURN
) coins, etc. To enable this monitoring, you'll need to either sync the chain from scratch or reindex the existing blockchain. Please note that after running a version of the daemon with these changes, it's not recommended to revert to an older version of the daemon using the same blockchain data folder. This is because the newer version introduces changes in theCDiskBlockIndex
(de)serialization.The example of such statistics output for
getblockchaininfo
:Also, please note that the
chainSupply
amount only includes coinbase outputs and does not account for coins created by interest (rewards). This is why the values ofchainSupply
andtransparent
differ.Burned coins refer to coins that are involved in transactions like the following:
In the example above, we see the burning of
1 COIN
as theOP_RETURN
outputs are unspendable, meaning this coin is effectively burned.Corresponding PR in KomodoOcean codebase: DeckerSU/KomodoOcean#65