7

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
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.

4
  • 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. Jun 27 at 17:21
  • 2
    I was curious how much "blockspace debt" the current UTXO set constitutes.
    – Murch
    Jun 27 at 19:11
  • Would you explain what is "blockspace debt"? Jun 29 at 12:12
  • 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
    Jun 29 at 16:46

1 Answer 1

6

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.
    51.9M × 148 B = 7 681 200 000 B
  • A P2WPKH input weighs 68 vB.
    13.6M × 68 vB = 924 800 000 vB
  • Let's assume all P2TR UTXO are spent via keypath. An input weighs 57.5 vB.
    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 via https://txstats.com/dashboard/db/p2sh-repartition-by-type

enter image description here

  • unknown: 9.24M
  • P2WPKH: 3.18M (91 vB)
  • 2-of-3: 1.48M (297 vB)
  • wrapped 2-of-3: 778K (139.5 vB)
  • 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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.