In my previous post (Bitcoin – Transactions Per Second (TPS)) I used data from Bitcoin Visuals’ website (bitcoinvisuals.com) to identify the average Bitcoin transaction size in recent years.
Since writing that post I have found that the Bitcoin RPC server responds to the ‘getblockstats‘ command. The response includes various parameters including:
- ‘avgtxsize’ – the mean average transaction size within the requested block
- ‘maxtxsize’ – the maximum transaction size within the requested block
- ‘mediantxsize’ – the median average transaction size within the requested block
- ‘mintxsize’ – the minimum transaction size within the requested block
- ‘swtotal_size’ – the total size of all segwit transactions within the requested blockchain
- ‘total_size’ – the total size of all non-coinbase transactions
By using this command we can easily identify the typical size of transactions on the Bitcoin network.
The (mean) average transaction size since the genesis block is around 590 bytes, and the (mean) average of the block median transaction sizes is around 265 bytes suggesting that relatively few very large transactions are responsible for skewing the mean average.
Without additional information as to each transaction’s size which, as far as I’m currently aware, would require querying each individual transaction it is difficult to identify these outliers. The ‘getblockstats‘ command does, however, expose the maximum transaction size for each block.
Earlier this year, on 1st February 2023, the Bitcoin network saw the largest ever single transaction in block ‘774628’. This transaction was a whopping 3938383 bytes (3.9MB) occupying the majority of the available block space. Some may have noticed that this exceeds the 1MB block size limit, however, this was a SegWit transaction therefore its contribution to the block size is not counted in the same manner.
Further investigation of this transaction found that it was related to Bitcoin ordinals and the reason for it being so large is the entire JFIF image is embedded within the witness data. The ordinal can be seen here.
As an aside, the transaction was large enough to crash Bitcoin Core’s ‘decoderawtransaction’ command. Fortunately, some of the online decoders (but not all!) managed to decode the transaction.
A further 2 transactions have been over 1000000 bytes, both in February 2023. These were blocks 776884 and 777945 and the large transactions were both related to ordinals(776884 and 777945).
Before 2023, the largest transaction was in 2015 when block 364292 contained a transaction just under 1MB in size. This appears to be very large due to the number of addresses (5569) all sending 1000 satoshis to a single Bitcoin address (transaction hash bb41a757f405890fb0f5856228e23b715702d714d59bf2b1feb70d8b2b4e3e08).
Getting back on track, the table below provides a summary of the average block sizes.
Year | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 |
Average TX Size | 10.13 | 140.13 | 445.42 | 476.81 | 526.36 | 638.45 | 794.79 |
Year | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 (partial) |
Average TX Size | 622.29 | 808.31 | 533.21 | 690.68 | 867.07 | 853.39 | 1309.37 |
This would give an approximate average TPS over the past few years of between 1.95 to 3.13 (2017 to 2022) based on the mean average transaction size, and each block being the target 10 minutes.