Author

Topic: Transactions per seconds (help to calculate) (Read 284 times)

jr. member
Activity: 203
Merit: 2
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks.

I believe that the average transaction size has increased, so that means that Bitcoin in it's current state can not have TPS of 7. The average transaction size of the last 1000 blocks is 534 bytes. With 10 minutes you would get: 1,000,000 / 534 / 600 = 3.1. If the block time for Bitcoin is decreased to ten you would get 3.1 * 10 = 31 TPS.

For Litecoin I can not really find the average transaction size, so if you take the same value you of 535 bytes per transaction you also get 31 TPS.

If you really want to know it then you will have to make a script which grabs the size and amount of transactions in the last 1000 blocks. Next you will have to divide the block size by the amount of transaction for each block and it up, then finally divide this value by 1000.

I thought the average tx size for Bitcoin has decreased, largely thanks to more efficient use of data with SegWit along with compression? This is for the most common type of transaction (in the past), which uses one input and one or two outputs (usually for change). you're probably looking a As described above in the first response, the "old" average tx size (also still stated in wiki I believe) is 226 bytes. For the longest time I also used this 226 bytes (and it was accurate with Electrum prior to me switching to SegWit.

I believe you're right though, in that the max of 7 is not achievable, since most txs aren't the simple 1 input/output ones.

Since Feb, the network's been processing about 200k txs daily, but it hasn't been at its peak. The last time we saw 400k txs in a 24 period was during the congested December period (https://blockchain.info/charts/n-transactions?daysAverageString=7).

And this is about 4.63 txs per second.
The average size for simple 1 input/output transactions definitely decreased during the years. But the amount of inputs/outputs per transaction seem to have increased, so you get the opposite effect. The spam on the network made it even worse.

The transaction not decreased just it's takes time so people doubt the traction decreases
legendary
Activity: 3542
Merit: 1965
Leading Crypto Sports Betting & Casino Platform
The average size for simple 1 input/output transactions definitely decreased during the years. But the amount of inputs/outputs per transaction seem to have increased, so you get the opposite effect. The spam on the network made it even worse.
By looking at a huge block like: #521564,
The average size of a 1input/1(2)output transaction didn't have that much size reduction even when SegWit address was used as input/output.
By using SegWit, the "weight" of the transaction is greatly reduced= more tx in a block, less transaction fee, not (much to) the size in 1in:1out tx scale.

And Yes, there are a lot of multiple input/output transactions now and most of them aren't SegWit (why the heck?),
but, if those tx was sent as 1input:1output, those could add more spam to the network, more unnecessary transactions.

"Batching" may not help to increase the T/Sec, but it is greatly recommended to decrease the number of pending transactions.

I think most of the tx's that were done in SegWit was people who transferred coins from old wallets to the new SegWit wallets, because the fees are much lower now. There are also much less tx's now, because most people are hoarding their coins for the big correction.  Roll Eyes

The fees on the Legacy wallets are also very low, so people have no real incentive to move to SegWit compatible wallets and I think they are waiting to see what SegWit implementation would become the standard, before they move their coins.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
The average size for simple 1 input/output transactions definitely decreased during the years. But the amount of inputs/outputs per transaction seem to have increased, so you get the opposite effect. The spam on the network made it even worse.
By looking at a huge block like: #521564,
The average size of a 1input/1(2)output transaction didn't have that much size reduction even when SegWit address was used as input/output.
By using SegWit, the "weight" of the transaction is greatly reduced= more tx in a block, less transaction fee, not (much to) the size in 1in:1out tx scale.

And Yes, there are a lot of multiple input/output transactions now and most of them aren't SegWit (why the heck?),
but, if those tx was sent as 1input:1output, those could add more spam to the network, more unnecessary transactions.

"Batching" may not help to increase the T/Sec, but it is greatly recommended to decrease the number of pending transactions.
sr. member
Activity: 518
Merit: 268
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks.

I believe that the average transaction size has increased, so that means that Bitcoin in it's current state can not have TPS of 7. The average transaction size of the last 1000 blocks is 534 bytes. With 10 minutes you would get: 1,000,000 / 534 / 600 = 3.1. If the block time for Bitcoin is decreased to ten you would get 3.1 * 10 = 31 TPS.

For Litecoin I can not really find the average transaction size, so if you take the same value you of 535 bytes per transaction you also get 31 TPS.

If you really want to know it then you will have to make a script which grabs the size and amount of transactions in the last 1000 blocks. Next you will have to divide the block size by the amount of transaction for each block and it up, then finally divide this value by 1000.

I thought the average tx size for Bitcoin has decreased, largely thanks to more efficient use of data with SegWit along with compression? This is for the most common type of transaction (in the past), which uses one input and one or two outputs (usually for change). you're probably looking a As described above in the first response, the "old" average tx size (also still stated in wiki I believe) is 226 bytes. For the longest time I also used this 226 bytes (and it was accurate with Electrum prior to me switching to SegWit.

I believe you're right though, in that the max of 7 is not achievable, since most txs aren't the simple 1 input/output ones.

Since Feb, the network's been processing about 200k txs daily, but it hasn't been at its peak. The last time we saw 400k txs in a 24 period was during the congested December period (https://blockchain.info/charts/n-transactions?daysAverageString=7).

And this is about 4.63 txs per second.
The average size for simple 1 input/output transactions definitely decreased during the years. But the amount of inputs/outputs per transaction seem to have increased, so you get the opposite effect. The spam on the network made it even worse.
legendary
Activity: 2968
Merit: 3684
Join the world-leading crypto sportsbook NOW!
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks.

I believe that the average transaction size has increased, so that means that Bitcoin in it's current state can not have TPS of 7. The average transaction size of the last 1000 blocks is 534 bytes. With 10 minutes you would get: 1,000,000 / 534 / 600 = 3.1. If the block time for Bitcoin is decreased to ten you would get 3.1 * 10 = 31 TPS.

For Litecoin I can not really find the average transaction size, so if you take the same value you of 535 bytes per transaction you also get 31 TPS.

If you really want to know it then you will have to make a script which grabs the size and amount of transactions in the last 1000 blocks. Next you will have to divide the block size by the amount of transaction for each block and it up, then finally divide this value by 1000.

I thought the average tx size for Bitcoin has decreased, largely thanks to more efficient use of data with SegWit along with compression? This is for the most common type of transaction (in the past), which uses one input and one or two outputs (usually for change). you're probably looking a As described above in the first response, the "old" average tx size (also still stated in wiki I believe) is 226 bytes. For the longest time I also used this 226 bytes (and it was accurate with Electrum prior to me switching to SegWit.

I believe you're right though, in that the max of 7 is not achievable, since most txs aren't the simple 1 input/output ones.

Since Feb, the network's been processing about 200k txs daily, but it hasn't been at its peak. The last time we saw 400k txs in a 24 period was during the congested December period (https://blockchain.info/charts/n-transactions?daysAverageString=7).

And this is about 4.63 txs per second.
sr. member
Activity: 518
Merit: 268
The simple way to calculate the number of Transactions Per Second (TPS) Bitcoin can handle is to divide the block size limit by the expected average size of transactions, divided by the average number of seconds between blocks.

I believe that the average transaction size has increased, so that means that Bitcoin in it's current state can not have TPS of 7. The average transaction size of the last 1000 blocks is 534 bytes. With 10 minutes you would get: 1,000,000 / 534 / 600 = 3.1. If the block time for Bitcoin is decreased to ten you would get 3.1 * 10 = 31 TPS.

For Litecoin I can not really find the average transaction size, so if you take the same value you of 535 bytes per transaction you also get 31 TPS.

If you really want to know it then you will have to make a script which grabs the size and amount of transactions in the last 1000 blocks. Next you will have to divide the block size by the amount of transaction for each block and it up, then finally divide this value by 1000.
newbie
Activity: 154
Merit: 0
To calculate how many transactions can be fit into these 17kB we simply need the average transaction size, which is 226 bytes. (Source: https://bitcoinfees.earn.com/)

Average transaction size: 226 Bytes

17476,26666666667 Bytes/s /226 bytes  = 77,3286 tx/s

Source:
https://coinanalysis.io/how-many-transactions-per-second-bitcoin-cash/

Your using median transaction size, average transaction size is about 2x bigger, thats why 7tps is not good number to quote. Realistically its about 3tps because you have to use average transaction size for the math. Plus Bitcoin uses 1 000 000 Bytes blocks, not 1 048 576 Bytes.


Thanks for clarifying Smiley now i know how to count a more realistic TPS.

Have a nice day!
sr. member
Activity: 322
Merit: 363
39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD
Throughput for blockchains are implied and not explicitly defined.
It depends on the no of transactions that can fit in a block -- which depends on the block size -- and the block time.
For bitcoin,  a block can contain a max of  ~5,208 transactions for 1MB block size (before segwit,) assuming 1 input, 1 output tx of 192 bytes. (That's block size of 1MB divided by tx size of 192 bytes)
To get tps, divide the no of transactions in a block by the average block time of 10 mins (=600 secs)
That gives ~8.68 tx per seconds.

Usually though blocks contain ~2,000 txs, which gives us 2,000/600 = ~3.33 tps.

PS assuming every txs in a block are 1 input 1 output segwit txs a block could contain ~ 12,195 txs, which gives us ~ 20 tps.


To calculate actual tps, your need to take into account UTXOs created in order to account for transaction batching.


sr. member
Activity: 276
Merit: 254
To calculate how many transactions can be fit into these 17kB we simply need the average transaction size, which is 226 bytes. (Source: https://bitcoinfees.earn.com/)

Average transaction size: 226 Bytes

17476,26666666667 Bytes/s /226 bytes  = 77,3286 tx/s

Source:
https://coinanalysis.io/how-many-transactions-per-second-bitcoin-cash/

Your using median transaction size, average transaction size is about 2x bigger, thats why 7tps is not good number to quote. Realistically its about 3tps because you have to use average transaction size for the math. Plus Bitcoin uses 1 000 000 Bytes blocks, not 1 048 576 Bytes as one would assume from 1MB.
newbie
Activity: 154
Merit: 0
I have counted like this (See below). Is this correct?


Block Time: 10 Minutes = 60 seconds
Block Size: 1 MB = 1048576 Bytes

1048576 Bytes / 60 s = 17476,26666666667 Bytes/s

Using this information we know that we an process up to 17476,26666666667 Bytes/s worth of transactions per second (on average).

How many transactions are this?
To calculate how many transactions can be fit into these 17kB we simply need the average transaction size, which is 226 bytes. (Source: https://bitcoinfees.earn.com/)

Average transaction size: 226 Bytes

17476,26666666667 Bytes/s /226 bytes  = 77,3286 tx/s

Source:
https://coinanalysis.io/how-many-transactions-per-second-bitcoin-cash/
legendary
Activity: 2758
Merit: 6830
Bitcoin would handle 10 times more tx per hour and Litecoin 2.5 times.

7 x 10 = 70 tps for Bitcoin.
56 x 2.5 = 140 tps for Litecoin.

Correct me if I'm wrong.
newbie
Activity: 154
Merit: 0
Hello,
I understand that Litecoin has higher TPS because of the blocktime (2.5 min) instead of Bitcoins (10 min) and therefor can handle more transactions.

What if Litecoin or Bitcoin had 1 minute blocktime, how many TPS would it be able to handle?

Bitcoin handles 7 tps
Litecoin handles 56 tps
1 minute blocktime = X/tps?

Thanks for helping, i'm kind of dumb and maybe pretty simple math for some haha  Smiley
Jump to: