Bitcoin Forum
November 25, 2020, 09:09:57 AM *
News: Bitcointalk Community Awards
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Transactions per seconds (help to calculate)  (Read 207 times)
ONEADev
Newbie
*
Offline Offline

Activity: 154
Merit: 0


View Profile
May 06, 2018, 03:31:04 PM
 #1

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
1606295397
Hero Member
*
Offline Offline

Posts: 1606295397

View Profile Personal Message (Offline)

Ignore
1606295397
Reply with quote  #2

1606295397
Report to moderator
1606295397
Hero Member
*
Offline Offline

Posts: 1606295397

View Profile Personal Message (Offline)

Ignore
1606295397
Reply with quote  #2

1606295397
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1606295397
Hero Member
*
Offline Offline

Posts: 1606295397

View Profile Personal Message (Offline)

Ignore
1606295397
Reply with quote  #2

1606295397
Report to moderator
TryNinja
Legendary
*
Offline Offline

Activity: 1568
Merit: 2947


Merit & Notifications bot: @BTTSuperNotifier_bot


View Profile WWW
May 06, 2018, 03:43:51 PM
 #2

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.

ONEADev
Newbie
*
Offline Offline

Activity: 154
Merit: 0


View Profile
May 06, 2018, 03:53:25 PM
 #3

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/
Variogam
Sr. Member
****
Offline Offline

Activity: 275
Merit: 254


View Profile
May 06, 2018, 04:11:37 PM
Merited by suchmoon (1)
 #4

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.
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 297

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
May 06, 2018, 04:16:11 PM
Merited by suchmoon (2)
 #5

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.


ONEADev
Newbie
*
Offline Offline

Activity: 154
Merit: 0


View Profile
May 06, 2018, 04:18:03 PM
 #6

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!
Aura
Sr. Member
****
Offline Offline

Activity: 518
Merit: 268


View Profile
May 06, 2018, 04:26:49 PM
 #7

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.
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1694
Merit: 2578


NotYourKeys.org - Not Your Keys, Not Your Bitcoin


View Profile
May 06, 2018, 05:14:30 PM
 #8

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/

Assuming you need calculation for TPS if bitcoin block time is 1 minute, then it's wrong :
1. Block Time : 1 minute = 60 seconds, not 10 Minutes = 60 seconds
2. Bitcoin block size weight : 4000000 (4 million). Bitcoin block size can reach almost 4MB on best scenario.
3. Average transaction weight : 542 weight units. It's only rough number from https://en.bitcoin.it/wiki/Weight_units

4000000 / 60 / 542 = 123 TPS if bitcoin block time is 1 minute. So rough estimation of Bitcoin TPS is about 12.3 TPS, CMIIW.

buwaytress
Legendary
*
Offline Offline

Activity: 1540
Merit: 1436


Join the world-leading crypto sportsbook NOW!


View Profile
May 06, 2018, 06:46:08 PM
 #9

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.

Aura
Sr. Member
****
Offline Offline

Activity: 518
Merit: 268


View Profile
May 06, 2018, 08:16:34 PM
 #10

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.
nc50lc
Legendary
*
Offline Offline

Activity: 1148
Merit: 1562


Self-proclaimed Genius ㊙️


View Profile
May 07, 2018, 06:05:10 AM
Last edit: May 07, 2018, 06:17:07 AM by nc50lc
 #11

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.

Kakmakr
Legendary
*
Offline Offline

Activity: 2184
Merit: 1491



View Profile
May 07, 2018, 06:59:44 AM
 #12

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.

.
.Duelbits.
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀
 ▀▄    ▄▀▀
 ▄▀▀▄▀▀

▀▄▄▄▄▄▄▄▄▄

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█
█  █    █    █  █  █ █
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█▀▀█ █
█   ▄▄▄▄▄▄▄▄▄   █▄▄█▄▀
█▄▄▄█▄▄▄▄▄▄▄█▄▄▄█
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █
█     ▀▄▀     █   ▀▀  █
█             █▄▄▄▄▄▄▄▀
█         ▀▀  █
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▀
.
▄▄▀█████▀▄▄
▄▀▀   █████ ▄▄▀▀▄
███▄  ▄█████▄▀▀▄███
██████▀▀     ▀▀██████
█ ▀▀██▀ ▀▄   ▄▀ ▀██▀▀ █
█    █    ███    █    █
█ ▄▄██▄ ▄▀   ▀▄ ▄██▄▄ █
██████▄▄     ▄▄██████
███▀  ▀█████▀  ▀███
▀▄▄   █████   ▄▄▀
▀▀▄█████▄▀▀
.
█▀▀▀▄             ▄▀▀▀█
█ ▀▄ ▀▄         ▄▀ ▄▀ █
▀▄ ▀▄ ▀▄     ▄▀ ▄▀ ▄▀
▀▄ ▀▄ ▀▄  ▀ ▄▀ ▄▀
▀▄ ▀▄ ▀▄ ▀ ▄▀
▄ ▀▄ ▀▄ ▀▄  ▄
█ ▀▄ ▀▄ ▀  ▄▀ █
▄▀▄ ▀▄ ▀ ▄▀ ▄▀▄
▄▀▄▀  ▄▀▄▄█ █▄▄▀▄  ▀▄▀▄
▀▄  ▄▀           ▀▄  ▄▀
▀▄▄▀           ▀▄▄▀
..Play Now..
callyf
Jr. Member
*
Offline Offline

Activity: 262
Merit: 2


View Profile WWW
May 08, 2018, 09:00:28 AM
 #13

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

BITWINGS - Guaranteed worth $0.20
Minephone - First smartphone that produces up to 2 ETH/month (http://minephone.bitwings.org)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!