<p><strong>TL;DR: Spending the whole UTXO set would take the blockspace of about 11 500 blocks.</strong></p>
<p>What follows is some very rough napkin math that is almost certainly off by a few percent points. I've roughly estimated a few values, that could probably be collected more exactly, feel free to suggest concrete improvements where you would expect to see a significant change by estimating more exactly with reasonable effort.</p>
<h2>Single-sig</h2>
<p>These are the easiest to estimate. We known basically exactly how much it'll weigh to spend them.</p>
<ul>
<li>A P2PKH input <a href="https://bitcoin.stackexchange.com/q/48279/5406">weighs 148 B</a>.<br />
51.9M × 148 B = 7 681 200 000 B</li>
<li>A P2WPKH input <a href="https://bitcoin.stackexchange.com/q/100159/5406">weighs 68 vB</a>.<br />
13.6M × 68 vB = 924 800 000 vB</li>
<li>Let's assume all P2TR UTXO are spent via keypath. An input weighs <a href="https://bitcoin.stackexchange.com/a/96018/5406">57.5 vB</a>.<br />
89K × 57.5 vB = 5 117 500 vB</li>
<li>A P2PK input only has a signature in the scriptsig and therefore should weigh 113 B.<br />
49K × 113 B = 5 537 000 B</li>
</ul>
<h2>P2SH</h2>
<p>For P2SH UTXOs it gets more complicated. We know the redeemscripts only for about a third of the UTXOs per this P2SH breakdown:</p>
<p><a href="https://i.sstatic.net/YzZnK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YzZnK.png" alt="enter image description here" /></a>
via <a href="https://txstats.com/dashboard/db/p2sh-repartition-by-type" rel="nofollow noreferrer">https://txstats.com/dashboard/db/p2sh-repartition-by-type</a></p>
<p><a href="https://i.sstatic.net/CEYTs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CEYTs.png" alt="enter image description here" /></a></p>
<ul>
<li>unknown: 9.24M</li>
<li>P2WPKH:  3.18M (<a href="https://bitcoin.stackexchange.com/q/111392/5406">91 vB</a>)</li>
<li>2-of-3:  1.48M (<a href="https://bitcoin.stackexchange.com/q/57479/5406">297 vB</a>)</li>
<li>wrapped 2-of-3: 778K (<a href="https://bitcoin.stackexchange.com/q/57479/5406">139.5 vB</a>)</li>
<li>various non-segwit multisigs¹: 607K</li>
<li>other non-multisig: 24K</li>
</ul>
<p>¹ 3-of-4, 2-of-2 and 3-of-5 are the most common known output type after the explicitly listed. I'm assuming that &quot;other multisigs&quot; and &quot;other non-multisigs&quot; are smaller than 3-of-4, but it seems reasonable to estimate all the remaining non-segwit multisigs and non-multisigs as approximately the average of 2-of-2, 3-of-4, and 3-of-5: 360 B</p>
<p>Known outputs:
3.18M × 91 vB + 1.48M × 297 B + 778K × 139.5 vB + 631K × 360 B =
1 064 631 000 vB</p>
<p>Assuming the average input virtualsize of 175.5 vB applies also to the unknown P2SH UTXOs: 9.24M × 175.4 vB = 1 620 696 000 vB</p>
<h2>P2WSH</h2>
<p>I haven't found a breakdown of P2WSH outputs. Since more than 3/4 of the multisig in P2SH was 2-of-3, we're just going to estimate with the size of a 2-of-3: 881K × <a href="https://bitcoin.stackexchange.com/a/114254/5406">104.5</a> vB =
92 064 500 vB</p>
<h2>Bare multisigs</h2>
<p>Bare multisig only needs the signatures in the input as the scriptPubKey already contains the condition script itself. Let's assume a 2-of-3 multisig. From the top of my head, an input should be roughly 168 B. (32+4+1+1+1+64+1+64)</p>
<p>435K × 274 B = 73 080 000 B</p>
<h2>Unknown</h2>
<p>Probably the 9K unknown are mostly unspendable trash, but they're such a small portion of the total UTXOs, that we won't bother being too exact and just assume they were the most common type, P2PKH. 9K × 148 B = 1 332 000 B</p>
<h2>All inputs in sum</h2>
<ul>
<li>P2PKH: 7 681 200 000 B</li>
<li>P2WPKH: 924 800 000 vB</li>
<li>P2TR: 5 117 500 vB</li>
<li>P2PK: 5 537 000 B</li>
<li>P2SH: Known: 1 064 631 000 vB, Unknown: 1 620 696 000 vB</li>
<li>P2WSH: 92 064 500 vB</li>
<li>Bare Multi:  73 080 000 B</li>
<li>Unknown: 1 332 000 B</li>
</ul>
<p>Sum: 11 468 458 000 vB</p>
<p>Glossing over the size of coinbase transactions and block headers, the inputs would therefore require about 11 470 blocks.
Assuming we only use standard transactions, we'd need to create 11 outputs per block. Adding the creation and spending of these transaction outputs assuming P2WPKH adds 11 × 11470 × 99 vB = 12 490 830 vB.</p>
<p><strong>Adding the block headers, coinbase transactions, and the new outputs of the consolidation transactions, it should be possible to spend the whole UTXO set in fewer than 11 500 blocks which is less than three months worth of blockspace.</strong></p>

CC BY-SA 4.0
2022-06-27T15:11:54.670Z
2022-07-28T22:48:18.703Z
2022-07-28T22:48:18.703Z
Murch
<p>I was curious how much blockspace has already been spoken for in the future. Paraphrased:
Assuming all block space were used to consolidate the UTXO set in the most efficient manner (and all key holders were collaborating for this purpose). How many blocks would it take to consolidate the UTXO set to a single UTXO?</p>
<p><a href="https://i.sstatic.net/jYeZg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jYeZg.png" alt="enter image description here" /></a><br />
<sup>via <a href="https://txstats.com/dashboard/db/utxo-set-repartition-by-output-type" rel="nofollow noreferrer">https://txstats.com/dashboard/db/utxo-set-repartition-by-output-type</a></sup></p>
<p>Let's assume the following numbers of UTXOs:</p>
<ul>
<li>P2PKH: 51.9M</li>
<li>P2SH: 15.4M</li>
<li>P2WPKH: 13.6M</li>
<li>P2WSH: 881K</li>
<li>Bare multisig: 435K</li>
<li>P2TR: 89K</li>
<li>P2PK: 49K</li>
<li>Unknown: 9K</li>
</ul>
<p>Please feel free to use a reasonable estimate for the size of *SH types.</p>

CC BY-SA 4.0
2022-06-27T17:21:40.563Z
Does this question has any practical purpose or is just a personal curiosity? I liked it but I'm not sure whether it is important to know how much does it take to combine all UTXO set into a single one because obviously that would never happen. Although it would give a better sense of bitcoin network scale.
Amir reza Riahi
CC BY-SA 4.0
2022-06-27T19:11:03.417Z
I was curious how much "blockspace debt" the current UTXO set constitutes.
Murch
CC BY-SA 4.0
2022-06-29T12:12:14.500Z
Would you explain what is "blockspace debt"?
Amir reza Riahi
CC BY-SA 4.0
2022-06-29T16:46:07.457Z
Each UTXO that is created will have to be spent eventually to allow reassigning its value. I refer to these already existing future claims on blockspace.
Murch
<utxo-set><transaction-weight><consolidation>
How much blockspace would it take to spend the complete UTXO set?
Murch
# How much blockspace would it take to spend the complete UTXO set?

(Asked by: username_0 on 2022-06-11)

I was curious how much blockspace has already been spoken for in the future. Paraphrased:
Assuming all block space were used to consolidate the UTXO set in the most efficient manner (and all key holders were collaborating for this purpose). How many blocks would it take to consolidate the UTXO set to a single UTXO?

[![enter image description here](https://i.sstatic.net/jYeZg.png)](https://i.sstatic.net/jYeZg.png)  
via <https://txstats.com/dashboard/db/utxo-set-repartition-by-output-type>

Let's assume the following numbers of UTXOs:

* P2PKH: 51.9M
* P2SH: 15.4M
* P2WPKH: 13.6M
* P2WSH: 881K
* Bare multisig: 435K
* P2TR: 89K
* P2PK: 49K
* Unknown: 9K

Please feel free to use a reasonable estimate for the size of \*SH types.

**Tags:** utxo-set, transaction-weight, consolidation

> **Comments:**
> **username_1**: Does this question has any practical purpose or is just a personal curiosity? I liked it but I'm not sure whether it is important to know how much does it take to combine all UTXO set into a single one because obviously that would never happen. Although it would give a better sense of bitcoin network scale.  
> **username_0**: I was curious how much "blockspace debt" the current UTXO set constitutes.  
> **username_1**: Would you explain what is "blockspace debt"?  
> **username_0**: Each UTXO that is created will have to be spent eventually to allow reassigning its value. I refer to these already existing future claims on blockspace.  

---

## 1 answers

### Answer by username_0 on 2022-06-27. Score: 6 | Accepted answer

**TL;DR: Spending the whole UTXO set would take the blockspace of about 11 500 blocks.**

What follows is some very rough napkin math that is almost certainly off by a few percent points. I've roughly estimated a few values, that could probably be collected more exactly, feel free to suggest concrete improvements where you would expect to see a significant change by estimating more exactly with reasonable effort.

## Single-sig

These are the easiest to estimate. We known basically exactly how much it'll weigh to spend them.

* A P2PKH input [weighs 148 B](https://bitcoin.stackexchange.com/q/48279/5406).  
  51.9M × 148 B = 7 681 200 000 B
* A P2WPKH input [weighs 68 vB](https://bitcoin.stackexchange.com/q/100159/5406).  
  13.6M × 68 vB = 924 800 000 vB
* Let's assume all P2TR UTXO are spent via keypath. An input weighs [57.5 vB](https://bitcoin.stackexchange.com/a/96018/5406).  
  89K × 57.5 vB = 5 117 500 vB
* A P2PK input only has a signature in the scriptsig and therefore should weigh 113 B.  
  49K × 113 B = 5 537 000 B

## P2SH

For P2SH UTXOs it gets more complicated. We know the redeemscripts only for about a third of the UTXOs per this P2SH breakdown:

[![enter image description here](https://i.sstatic.net/YzZnK.png)](https://i.sstatic.net/YzZnK.png)
via <https://txstats.com/dashboard/db/p2sh-repartition-by-type>

[![enter image description here](https://i.sstatic.net/CEYTs.png)](https://i.sstatic.net/CEYTs.png)

* unknown: 9.24M
* P2WPKH: 3.18M ([91 vB](https://bitcoin.stackexchange.com/q/111392/5406))
* 2-of-3: 1.48M ([297 vB](https://bitcoin.stackexchange.com/q/57479/5406))
* wrapped 2-of-3: 778K ([139.5 vB](https://bitcoin.stackexchange.com/q/57479/5406))
* various non-segwit multisigs¹: 607K
* other non-multisig: 24K

¹ 3-of-4, 2-of-2 and 3-of-5 are the most common known output type after the explicitly listed. I'm assuming that "other multisigs" and "other non-multisigs" are smaller than 3-of-4, but it seems reasonable to estimate all the remaining non-segwit multisigs and non-multisigs as approximately the average of 2-of-2, 3-of-4, and 3-of-5: 360 B

Known outputs:
3.18M × 91 vB + 1.48M × 297 B + 778K × 139.5 vB + 631K × 360 B =
1 064 631 000 vB

Assuming the average input virtualsize of 175.5 vB applies also to the unknown P2SH UTXOs: 9.24M × 175.4 vB = 1 620 696 000 vB

## P2WSH

I haven't found a breakdown of P2WSH outputs. Since more than 3/4 of the multisig in P2SH was 2-of-3, we're just going to estimate with the size of a 2-of-3: 881K × [104.5](https://bitcoin.stackexchange.com/a/114254/5406) vB =
92 064 500 vB

## Bare multisigs

Bare multisig only needs the signatures in the input as the scriptPubKey already contains the condition script itself. Let's assume a 2-of-3 multisig. From the top of my head, an input should be roughly 168 B. (32+4+1+1+1+64+1+64)

435K × 274 B = 73 080 000 B

## Unknown

Probably the 9K unknown are mostly unspendable trash, but they're such a small portion of the total UTXOs, that we won't bother being too exact and just assume they were the most common type, P2PKH. 9K × 148 B = 1 332 000 B

## All inputs in sum

* P2PKH: 7 681 200 000 B
* P2WPKH: 924 800 000 vB
* P2TR: 5 117 500 vB
* P2PK: 5 537 000 B
* P2SH: Known: 1 064 631 000 vB, Unknown: 1 620 696 000 vB
* P2WSH: 92 064 500 vB
* Bare Multi:  73 080 000 B
* Unknown: 1 332 000 B

Sum: 11 468 458 000 vB

Glossing over the size of coinbase transactions and block headers, the inputs would therefore require about 11 470 blocks.
Assuming we only use standard transactions, we'd need to create 11 outputs per block. Adding the creation and spending of these transaction outputs assuming P2WPKH adds 11 × 11470 × 99 vB = 12 490 830 vB.

**Adding the block headers, coinbase transactions, and the new outputs of the consolidation transactions, it should be possible to spend the whole UTXO set in fewer than 11 500 blocks which is less than three months worth of blockspace.**


---

