<blockquote>
<p>How can I reproduce them if I decide to create the charts myself?</p>
</blockquote>
<pre class="lang-json prettyprint-override"><code>$ bitcoin-cli gettxoutsetinfo
{
  &quot;height&quot;: 614643,
  &quot;bestblock&quot;: &quot;0000000000000000000323e3aff59d74ab52e74f4dc5cfb9696ddb69e9857d9c&quot;,
  &quot;transactions&quot;: 38728071,
  &quot;txouts&quot;: 65228219,
  &quot;bogosize&quot;: 4902482106,
  &quot;hash_serialized_2&quot;: &quot;a153439cccb341a5ac149562c90bca499e3a809ccf2075e2de17bc2b9d83d0ee&quot;,
  &quot;disk_size&quot;: 3922698456,
  &quot;total_amount&quot;: 18182867.32125828
}
</code></pre>
<p>65M is most correct. It's unclear where the value of 106 Million could possibly be coming from.</p>
<blockquote>
<p>The following website I think adds utxo from the gensis block</p>
</blockquote>
<p>It doesn't really matter, there's 3 outputs which are &quot;created&quot; but are invalid, one in the genesis block and two in duplicated coinbase transactions. In the scale of the chain this is almost entirely lost to display precision anyway,</p>

CC BY-SA 4.0
2020-01-28T08:39:17.943Z
Note that the "txouts" value reported there excludes provably unspendable outputs (=OP_RETURN outputs, and outputs with sPK > 10000 bytes).
Pieter Wuille
CC BY-SA 4.0
2020-01-28T20:52:57.407Z
Hi @Anonymous, in reference to the first website where I said "adds utxo from the genesis block " I merely meant, it starts at the genesis block with start date in Jan 2009. The one that is in the 100M+ should be the same if the same method is being used. I'm curious what the 100M+ chart is doing as I have an interest in dissecting these differing interpretations.
LeanMan
CC BY-SA 4.0
2020-01-28T20:54:13.717Z
@Pieter Wuille, how can I calculate these additional values (i.e., provably unspendable outputs)? Thank you very much for your input.
LeanMan
CC BY-SA 4.0
2020-01-29T01:07:29.317Z
@LeanMan I suspect the 100M number is completely meaningless.
Claris
CC BY-SA 4.0
2020-01-28T07:09:51.173Z
2023-05-06T12:49:22.300Z
2023-05-06T12:49:22.300Z
Claris
<p>As Anonymous said in the other answer, the Unspent Transaction Output (UTXO) set has currently about 65 million unspent outputs. The UTXO set tracks all outputs that may still be spent in the future. I suspect that bitcoin.com (like <a href="https://twitter.com/murchandamus/status/1136236290570117120" rel="nofollow noreferrer">another service last year</a>) is falsely counting <code>OP_RETURN</code> outputs towards the UTXO set. While <code>OP_RETURN</code> outputs are transaction outputs that did not get spent, it is because they are <em>provably unspendable</em> and thus do not get tracked in the UTXO set.</p>

CC BY-SA 4.0
2020-01-29T17:42:03.580Z
Thank you @Murch for your contribution. I'm interested in knowing various methods of interpreting utxo as varying sites have produced different sites. For example, blockchain.com updated their chart not too long ago. I am trying to understand why the change and feasibility of reproducing/exploring different interpretations of utxo.
LeanMan
CC BY-SA 4.0
2020-01-29T19:06:48.437Z
There's actually not all that much room for interpretation. The UTXO Set is clearly defined as the outputs holding spendable balances. You can choose whether you want to interpret the chart shown by bitcoin.com as either mislabeled or showing the wrong value.
Murch
CC BY-SA 4.0
2020-01-29T23:33:08.670Z
I do want to figure it out. I have reasons why its important.
LeanMan
CC BY-SA 4.0
2020-01-30T01:02:55.810Z
You can call that "different interpretations", but whatever the chart on bitcoin.com is counting is not only the UTXO Set.
Murch
CC BY-SA 4.0
2020-01-30T03:24:33.530Z
I do understand - why they call it utxo or whoever did it why they were confused is beyond me. It throws newbies off for sure.
LeanMan
CC BY-SA 4.0
2020-02-19T11:58:42.313Z
Is this a version issue? Perhaps the incorrect value of "provably spendable utxos" occurred because they are using an old version of bitcoin-core. Your tweet is great. It helps me a ton.
LeanMan
CC BY-SA 4.0
2020-02-19T17:38:06.237Z
No, all versions of Bitcoin Core track exactly the same UTXO set to date.
Murch
CC BY-SA 4.0
2020-02-19T19:17:53.357Z
I just asked bitcoin.com how they perform their calculation. They say do it by: stats['utxo-net'] += block['n-out'] - block['n-in']; But given from your guidance, I would be surprised they coundn't just use "txouts" from the gettxoutsetinfo command. So I'm not sure what they are doing, or how they could possibly be counting OP_RETURN from the given bitcoin-core version. They also were kind enough to give me the version they are using: 0.19.0.1
LeanMan
CC BY-SA 4.0
2020-02-19T19:58:58.787Z
`stats['utxo-net'] += block['n-out'] - block['n-in']`. If they simply count all outputs created in the transactions of a block that would indeed explain why they're counting nulldata outputs (OP_RETURN outputs). Nulldata outputs are transaction outputs, but they don't get added to the UTXO set. I.e. it sounds like they're counting the sum of all outputs minus all inputs instead of the UTXO set.
Murch
CC BY-SA 4.0
2020-03-05T07:10:38.653Z
How do you count the outputs that have OP_RETURN in the script so you can subtract it using the formula above per block? Is this readily available within a RPC call or would you have to do it yourself?
LeanMan
CC BY-SA 4.0
2020-01-29T17:03:28.813Z
2020-10-26T12:06:12.050Z
2020-10-26T12:06:12.050Z
Murch
<p>I'm trying to understand the following two sites that display UTXO information. If I can figure out the method, that would be a bonus for this question but if I can't can someone explain why the two sites measure UTXO differently?</p>

<p>The following website I think adds utxo from the gensis block: <a href="https://statoshi.info/dashboard/db/unspent-transaction-output-set?panelId=6&amp;fullscreen" rel="nofollow noreferrer">https://statoshi.info/dashboard/db/unspent-transaction-output-set?panelId=6&amp;fullscreen</a></p>

<p>This website's value is way higher than the one of the previous: <a href="https://charts.bitcoin.com/btc/chart/utxo-set-size#5moc" rel="nofollow noreferrer">https://charts.bitcoin.com/btc/chart/utxo-set-size#5moc</a></p>

<p>Am I missing that these are different charts? How can I reproduce them if I decide to create the charts myself? </p>

<utxo-set><blockchain-explorer>
Bitcoin UTXO discrepancy in calculation
LeanMan
# Bitcoin UTXO discrepancy in calculation

(Asked by: username_0 on 2020-01-28)

I'm trying to understand the following two sites that display UTXO information. If I can figure out the method, that would be a bonus for this question but if I can't can someone explain why the two sites measure UTXO differently?

The following website I think adds utxo from the gensis block: <https://statoshi.info/dashboard/db/unspent-transaction-output-set?panelId=6&fullscreen>

This website's value is way higher than the one of the previous: <https://charts.bitcoin.com/btc/chart/utxo-set-size#5moc>

Am I missing that these are different charts? How can I reproduce them if I decide to create the charts myself?

**Tags:** utxo-set, blockchain-explorer


---

## 2 answers

### Answer by username_1 on 2020-01-28. Score: 1

> How can I reproduce them if I decide to create the charts myself?

```json
$ bitcoin-cli gettxoutsetinfo
{
  "height": 614643,
  "bestblock": "0000000000000000000323e3aff59d74ab52e74f4dc5cfb9696ddb69e9857d9c",
  "transactions": 38728071,
  "txouts": 65228219,
  "bogosize": 4902482106,
  "hash_serialized_2": "a153439cccb341a5ac149562c90bca499e3a809ccf2075e2de17bc2b9d83d0ee",
  "disk_size": 3922698456,
  "total_amount": 18182867.32125828
}

```

65M is most correct. It's unclear where the value of 106 Million could possibly be coming from.

> The following website I think adds utxo from the gensis block

It doesn't really matter, there's 3 outputs which are "created" but are invalid, one in the genesis block and two in duplicated coinbase transactions. In the scale of the chain this is almost entirely lost to display precision anyway,

> **Comments:**
> **username_2**: Note that the "txouts" value reported there excludes provably unspendable outputs (=OP_RETURN outputs, and outputs with sPK > 10000 bytes).  
> **username_0**: Hi @Anonymous, in reference to the first website where I said "adds utxo from the genesis block " I merely meant, it starts at the genesis block with start date in Jan 2009. The one that is in the 100M+ should be the same if the same method is being used. I'm curious what the 100M+ chart is doing as I have an interest in dissecting these differing interpretations.  
> **username_0**: @username_2, how can I calculate these additional values (i.e., provably unspendable outputs)? Thank you very much for your input.  
> **username_1**: @username_0 I suspect the 100M number is completely meaningless.  

---

### Answer by username_3 on 2020-01-29. Score: 0

As Anonymous said in the other answer, the Unspent Transaction Output (UTXO) set has currently about 65 million unspent outputs. The UTXO set tracks all outputs that may still be spent in the future. I suspect that bitcoin.com (like [another service last year](https://twitter.com/murchandamus/status/1136236290570117120)) is falsely counting `OP_RETURN` outputs towards the UTXO set. While `OP_RETURN` outputs are transaction outputs that did not get spent, it is because they are *provably unspendable* and thus do not get tracked in the UTXO set.

> **Comments:**
> **username_0**: Thank you @username_3 for your contribution. I'm interested in knowing various methods of interpreting utxo as varying sites have produced different sites. For example, blockchain.com updated their chart not too long ago. I am trying to understand why the change and feasibility of reproducing/exploring different interpretations of utxo.  
> **username_3**: There's actually not all that much room for interpretation. The UTXO Set is clearly defined as the outputs holding spendable balances. You can choose whether you want to interpret the chart shown by bitcoin.com as either mislabeled or showing the wrong value.  
> **username_0**: I do want to figure it out. I have reasons why its important.  
> **username_3**: You can call that "different interpretations", but whatever the chart on bitcoin.com is counting is not only the UTXO Set.  
> **username_0**: I do understand - why they call it utxo or whoever did it why they were confused is beyond me. It throws newbies off for sure.  
> **username_0**: Is this a version issue? Perhaps the incorrect value of "provably spendable utxos" occurred because they are using an old version of bitcoin-core. Your tweet is great. It helps me a ton.  
> **username_3**: No, all versions of Bitcoin Core track exactly the same UTXO set to date.  
> **username_0**: I just asked bitcoin.com how they perform their calculation. They say do it by: stats['utxo-net'] += block['n-out'] - block['n-in']; But given from your guidance, I would be surprised they coundn't just use "txouts" from the gettxoutsetinfo command. So I'm not sure what they are doing, or how they could possibly be counting OP_RETURN from the given bitcoin-core version. They also were kind enough to give me the version they are using: 0.19.0.1  
> **username_3**: `stats['utxo-net'] += block['n-out'] - block['n-in']`. If they simply count all outputs created in the transactions of a block that would indeed explain why they're counting nulldata outputs (OP_RETURN outputs). Nulldata outputs are transaction outputs, but they don't get added to the UTXO set. I.e. it sounds like they're counting the sum of all outputs minus all inputs instead of the UTXO set.  
> **username_0**: How do you count the outputs that have OP_RETURN in the script so you can subtract it using the formula above per block? Is this readily available within a RPC call or would you have to do it yourself?  

---

