add chain supply, transparent and burned coins value pools#609
Merged
Conversation
Co-authored-by: Jack Grigg <jack@z.cash> Co-authored-by: Kris Nuttycombe <kris@nutty.land> Co-authored-by: Daira Hopwood <daira@jacaranda.org>
burned coins refer to the value sent for OP_RETURN scripts:
```
"vout": [
...
{
"value": 2.00000000,
"valueZat": 200000000,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN 6465636b6572",
"hex": "6a066465636b6572",
"type": "nulldata"
}
}
],
"vjoinsplit": [
]
```
burned coins are also excluded from transparent pool.
this update activates burned coins value pool, see: BURNED_VALUE_VERSION
The change was made solely for debugging purposes and was accidentally included in the PR. We are now reverting that change.
ca333
approved these changes
Jan 26, 2024
Alrighttt
pushed a commit
to Alrighttt/komodo
that referenced
this pull request
Oct 7, 2025
Release v1.2.11-2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
transparentandburnedvalue pools to thegetblockchaininfoandgetblockRPC 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
chainSupplyamount only includes coinbase outputs and does not account for coins created by interest (rewards). This is why the values ofchainSupplyandtransparentdiffer.Burned coins refer to coins that are involved in transactions like the following:
{ "txid": "e363f3ae4547dc4262d6e09c1a5113ac1d9d148320e61b03096f023a1a76053e", "overwintered": false, "version": 1, "locktime": 0, "vin": [ ], "vout": [ { "value": 1.00000000, "valueZat": 100000000, "n": 0, "scriptPubKey": { "asm": "OP_RETURN 6465636b6572", "hex": "6a066465636b6572", "type": "nulldata" } } ], "vjoinsplit": [ ] }In the example above, we see the burning of
1 COINas theOP_RETURNoutputs are unspendable, meaning this coin is effectively burned.Corresponding PR in KomodoOcean codebase: DeckerSU/KomodoOcean#65