1

According to S. Delgado-Segura, C. Pérez-Sola, G. Navarro-Arribas, J. Herrera-Joancomartí, "Analysis of the Bitcoin UTXO set", Financial Cryptography and Data Security, pp. 78-91, 2019, the distribution of the UTXO set as of 2017 was:

No of UTXO                  52,543,649   100%      Size
Pay-to-PubkeyHash (P2PKH)   43,079,604    81.99%   147-179 bytes
Pay-to-ScriptHash(P2SH)      8,987,799    17.11%   40 - ? bytes
Pay-to-Pubkey(P2PK)             66,759     0.1%    113 bytes
Others                         409,487     0.8%    114-1483 bytes

There are 66.6 million UTXO in April 2020. Assuming the same distribution, the size of UTXO set should be approximately:

No of UTXO: 66.6 million = 100%
Pay-to-PubkeyHash (P2PKH)   81.99%    147-179 bytes   7.475712318GB
Pay-to-ScriptHash(P2SH)     17.11%    40 - ? bytes    0.424506515GB
Pay-to-Pubkey(P2PK)          0.1%     113 bytes       0.007008947GB
Others                       0.8%     114-1483bytes   0.056567788GB
Total                                                 7.963795569GB

Per statoshi.info the serialized UTXO set is 4GB as off April 2020.

I understand UTXO data does not have lot of leading zeros. How can the serialized UTXO set be compressed to 4GB?

3

The sizes you give don't match the paper. I can't even find mention of the sizes you give in the paper itself. Those sizes are incredibly wrong and way too large. They seem to be for input sizes, not output sizes. Input sizes are irrelevant to the UTXO set.

P2PKH are 21 bytes, P2SH are 21 bytes, P2PK are 33 bytes, everything else is their actual script size.

  • P2PKH = 1.147 GB
  • P2SH = 0.2393 GB

I've decided to omit the other outputs types because there are so few of them that their size is negligible.

The amounts are at most 0.5328 GB. However the amounts are compressed, so that should actually be smaller.

The outpoints (txids and output indexes) are at most 2.398 GB.

So in total the serialized UTXO set is approximately 4.3171 GB which is close to what we actually observe.

There are some more bytes due to the omitted scripts and because of the LevelDB's overhead, but there shouldn't be much (and certainly not several GB). Additionally the amounts and the output indexes are compressed which significantly reduces the serialized size. So in total, it's ~4 GB. My node reports 3.9 GB.

| improve this answer | |
  • eprint.iacr.org/2017/1095.pdf .Look at table 3. I think I misunderstood the paper. – Cisco Mmu Apr 17 at 11:14
  • 1
    Table 3 is for input sizes. The UTXO set contains outputs. You want the output sizes which, AFAICT, are not listed in the paper. – Andrew Chow Apr 17 at 17:09
  • ok TQ TQ, Noted. The table put p2pK and the sigscript on the same row. I mistaken it as P2pk size. Sorry. – Cisco Mmu Apr 18 at 6:06
  • 1. Each UTXO entry must add 8 bytes for bitcoin amount in satoshi. 2. P2PK got 2 format compressed is 34 bytes(~50%), uncompressed is 67 bytes (~50%). Just finish manually decoding few bitcoin TX to understand it better. – Cisco Mmu Apr 25 at 12:18

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.