30

We know that because of the way Monero's privacy works, transactions are larger than a Bitcoin one, but how much larger on average are they compared to Bitcoin transactions? How will this affect the growth of the blockchain into the future? Mechanisms like the flexible blocksize are geared to encourage smaller blocks, but are there other mechanisms that can help reduce the size of the blockchain now, or into the future, like Bitcoin's ability to prune the blockchain for certain applications?

Pablo
  • 223
  • 1
  • 7
ferretinjapan
  • 6,494
  • 2
  • 19
  • 47

4 Answers4

20

Most non coinbase Monero transactions are currently around 2,000 bytes (but with significant variation) which is somewhere in the neighborhood of 8 times larger than most Bitcoin non coinbase transactions.

The reason why RingCT should help eliminate the need for extremely large Monero transactions is that RIngCT no longer will require the use of outputs of many different denominations.

Yao Choa
  • 621
  • 3
  • 7
  • 1
    This assumption was not factoring in the terrific tx size increase CT creates. See this answer: https://monero.stackexchange.com/a/6166/915 With RingCT transaction sizes grew from 2,000 bytes to 13,000 bytes. It's worth pointing out with Bulletproofs it can be improved. – nopara73 Feb 03 '18 at 15:46
  • 1
    This answer is completely out of date now. – Jonathan Cross Sep 08 '21 at 08:08
15

Non coinbase transactions can start at a couple hundred bytes, and can go up in size a lot if they have a large number of inputs.

The main factors driving up size is the number of inputs and mixin. When sending a large amount, if the sending wallet only has small inputs, it will have to include a lot of them in the transaction (and possibly even send multiple transactions). This is similar to paying a large amount of fiat money with small coins, and the problem is compounded with Cryptonote coins which receive outputs split into denominations (so when you receive 346.2 monero, you actually receive four different outputs: 300, 40, 6, and 0.2 monero).

Mixin adds linearly to part of the transaction size. Mixin refers to the amount of extra keys plucked from the blockchain in order to appear alongside your real output, such that an observer does not know which is spent. The higher the mixin, the larger the transaction, but the better the privacy.

Let's look at a few examples:

http://moneroblocks.info/tx/97bfcc8e040a7d6411579aedb05599dd7433b6dbfc4c367fd8e0e06f531c5454 has a single output (good) but a large number of dusty outputs (bad), and is 1264 bytes.

http://moneroblocks.info/tx/d0e3e5e74d27552d8fbcaf4c28c41d13e7bf31976555e142ce87235fd2cf8ebe has 28 inputs (bad) and 8 outputs (good), and is 7161 bytes.

http://moneroblocks.info/tx/40e3ad658dda3a89e03b0ad1ffad65dff8ae986db642b67c4e37a60fef335d49 uses one input (good) and 5 outputs (good), and is 509 bytes.

All of these are using mixin 2, which is the minimum allowed (save special circumstances of unmixable inputs).

So from browsing this explorer, we can see transactions are typically a few kB in size, 2 kB as mentioned above seems like a fair characterization.

After RingCT is merged, transaction size will go up substantially. However, you will get better privacy, and much less "uselessly small" outputs that force you to have a larger number of inputs in your transactions.

user36303
  • 34,858
  • 2
  • 57
  • 123
  • The links to the block explorer should be removed, as the block explorer may not exist forever. When I get around to it I'll paste the transaction info from the onion-type monero block explorer. Its all easily copypasta text. – Ginger Ale Aug 18 '16 at 02:14
8

The current Monero median block size (last 1,000 blocks) is 286 bytes. The median transaction size is slightly less because some block include multiple transactions. The current median BTC transaction size is 260 bytes.

http://moneroblocks.info/stats

https://bitcoinfees.21.co/

Monero median (not mean) block sizes are important since they influence the dynamic block size limit (which is 2x the median block size over the last 100 blocks).

Note that median transactions sizes also include coinbase transactions which are relatively small compared to non coinbase transactions. As transaction volume increases (with non coinbase transactions growing as a percentage of total transactions) the median transaction size will therefore increase as well.

When looking at mean or maximum sizes Monero transactions can become larger due to the possibility of a very high mixin and many outputs.

Pruning is possible for Monero. In fact a pruning branch already exists for Aeon which began as a Monero fork.

RingCT will raise transaction sizes for Monero but to a lesser degree than a Confidential Transactions implementation would raise transactions sizes for Bitcoin.

254123179
  • 4,566
  • 4
  • 31
  • 57
Pablo
  • 223
  • 1
  • 7
  • 4
    Thanks for the informative answer. I'm surprised that the median transaction size is so close given all the discussion about the scalability of Monero and associated blockchain bloat. Does anyone know, in terms of the overall blockchain size, whether the transaction size is the primary factor or are there any other significant contributions (e.g. database overheads)? – BauerJack Jul 22 '16 at 19:27
  • 3
    Yeah that's a great answer, and it's something a lot of people will be curious to know. Thanks! – ferretinjapan Jul 22 '16 at 19:31
  • 2
    For some reason SE won't let me edit my previous comment. I've posted my blockchain size question as its own question on here, see here: https://monero.stackexchange.com/questions/213/what-contributions-if-any-are-there-to-the-overall-blockchain-size-other-than – BauerJack Jul 22 '16 at 19:35
  • 4
    I believe this answer is false. Checking the block explorer, the minimum block size (with coinbase transaction) is 172 bytes (some empty blocks are larger), blocks with actual transactions are much much larger, from what I can see, 2000+ bytes. If more than half of the blocks are devoid of transactions, you would expect the median block size to be equal to the size of an empty block (which is approximately the number you've given). But the question is with reference to the median size of a transaction, not a block. So, this answer is wrong, pending evidence to the contrary. – LivingInformation Jul 22 '16 at 21:05
  • @LivingInformation the reason why my answer was factually correct is that median transaction sizes include coinbase transactions. I modified my answer to make this clear. It would still be helpful if someone came and provided another answer to explain exactly how RingCT will influence transaction sizes in the future. – Pablo Jul 22 '16 at 23:33
  • Pablo, I think the number reported on moneroblocks is the median block size, not median transaction size... – BauerJack Jul 22 '16 at 23:35
  • @BauerJack I am sorry. It looks like you are right. In that case, the median transaction size is actually slightly less than what I quoted, because by definition each block must include at least one transaction (coinbase transaction) and may include multiple transactions. Mean block sizes are much larger than the median. I still think another answer for RingCT will help since that is where we are going. – Pablo Jul 22 '16 at 23:40
  • @Pablo that's a fair point about the coinbase TX, but I feel it misses the spirit of the question. I'd be interested in a comparison of Bitcoin TX size vs Monero TX size, not counting coinbase TX's for either coin. – BauerJack Jul 23 '16 at 00:00
  • 4
    Coinbase transactions are typically smaller than "normal" ones as they just have a placeholder input, so no signatures. Signatures take a lot of the space in a normal tx. – user36303 Jul 23 '16 at 08:45
  • 1
    Same as @LivingInformation: this answer doesn't address the actual size of the transactions, it only talks about how in average they are small, but that is only because there are very few, for now, that actually use a lot of mixing. – user141 Jul 25 '16 at 04:56
  • 1
    This answer doesn't address transaction sizes. Its more about blocksize. – Ginger Ale Aug 18 '16 at 02:11
  • Numbers here don't add up... 286 bytes for "median block size" is incorrect. Maybe you meant tx size? Anyhow, info is old and out of date. – Jonathan Cross Sep 27 '17 at 00:33
  • This answer is completely out of date. – Jonathan Cross Sep 08 '21 at 08:06
6

2021 update to account for bullet proofs and fixed ring sizes

Jonathan Cross
  • 623
  • 5
  • 19