Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bitcoin Cash Doesn't Scale

Looking at the Bitcoin Cash transctions for 18th Nov 2022 - blockchair_bitcoin-cash_transactions_20221118:

import csv

size_sum = 0
num_tx = 0
with open('/Users/stanislavkozlovski/Downloads/blockchair_bitcoin-cash_transactions_20221118.tsv', newline='') as tsvfile:
    trash_reader = csv.reader(tsvfile, delimiter='\t', quotechar='|')
    i = 0
    for row in trash_reader:
        if i == 0: # skip the first line
            i += 1
            continue
        size_bytes = row[3]
        print(size_bytes)
        size_sum += int(size_bytes)
        num_tx += 1

print("{} transactions with an average size of {} bytes for 18th November 2022".format(num_tx, size_sum / num_tx))

18216 transactions with an average size of 1054.4830368906455 bytes for 18th November 2022

  • average tx size = 1054.4830368906455
  • 32 MB block equals 32000000 bytes
  • 30346.6238 maximum transactions per block (32000000 / 1054.4830368906455)
  • 1 block is every 10 minutes, and 10 minutes is 600 seconds.
  • 50 transactions per second (30346 / 600)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment