8

Yesterday Dec 6th 2017 the number of Ethereum accounts grew to 13.4 million. The size of the chaindata of a pruned Ethereum node is now, depending on the mode, somewhere between 25 and 40 GB?

As more and more apps meant for global use rely on users to have cryptocurrencies and tokens, the number of Ethereum accounts can start to approach that of Internet users in general.

How big even the pruned node will grow if we have like 1 billion plus accounts? Proportional growth from 35 GB / 13.4M accounts node size would give 2.6 TB node size.

Not trying to invoke FUD, just asking?

6

1 Answer 1

9
+50

With the current block gas limit the chaindata grows 70 GB per year. The growth rate is limited by the block gas limit, which itself can grow and its growth is limited by the protocol (formula 45 in the yellow paper).

Supporting 1 billion of users will require terabytes of storage and it will take years to grow to this scale.


Detailed version below

First of all the chaindata can be broken down into the following pieces:

  • blockchain
    • block headers
    • transactions
  • state
    • account nonces (both external and contracts)
    • account balances (both external and contracts)
    • contract bytecode
    • contract storage

According to this article about 85% is taken by the blockchain and only 15% is state https://dev.to/5chdn/the-ethereum-blockchain-size-will-not-exceed-1tb-anytime-soon-58a

This graph shows a steady linear growth of the chaindata size https://etherscan.io/chart2/chaindatasizefast. Around 6 GB per month ~= 70 GB per year.


Here is my rough upper-bound estimation for the contract storage growth rate. I base my estimation on the maximum number of storage slots that can be updated in a block given the block gas limit.

  • ~8,000,000 block gas limit
  • 20,000 gas per storage slot
  • ~8,000,000 / 20,000 = ~400 max slots written in a block
  • ~64 bytes per slot (32 for each key and value)
  • ~400 * ~64 = ~25,600 bytes per block
  • ~6,000 blocks per day
  • ~6,000 * ~25,600 = ~154 MB per day
  • ~154 * ~365 = ~56 GB per year

This assumes block gas limit is constant. In fact it can change. Looking at this graph https://etherscan.io/chart/gaslimit I think we shouldn't expect it to grow quickly (the growth rate is limited by formula 45 in the yellowpaper).

The above estimation doesn't account for overheads associated with data storage, merkling and indexing.


As for 1 billion users - we can assume most of them having 10 external accounts:

  • 32 bytes for nonce
  • 32 bytes for balance
  • 20 bytes for address itself
  • 84 bytes total
  • 1,000,000,000 * 10 * 84 = 840 GB

Now if we assume 100 accounts instead of 10 then it becomes ~8 TB. If all state is stored on every node it looks problematic.

You can look at it from another angle - assume 10 transactions per second limit (this is how many transactions the network can handle on average right now). Even if every transaction were to create a new external account in the state it would take ~1157 days to create 1 billion accounts. In reality only a portion of all transactions would create new accounts and each user needs more than 1 account so it will take years to scale to 1 billion users. So the transaction throughput is likely to be the first bottleneck to be solved rather than the storage bottleneck.


The scalability problem is a very important and tough one. The Ethereum team is working on sharding, which will allow nodes to maintain only a portion of the state.

What are the Ethereum disk space needs?

4
  • 1
    What do you mean by "only include state...but not balances"? Application state isn't the total accounts with balances (the merkle Patricia tree), like UTXO in Bitcoin?
    – Joao Leme
    Feb 11, 2018 at 22:50
  • I meant "only includes storage". Thanks for noting this. You are right about Bitcoin, in Ethereum however world state consists of account nonces and balances, contract code and storage. While it would be possible to keep only balances in memory, having a generic cache is a more flexible and scalable approach I believe. Feb 12, 2018 at 11:21
  • "84 bytes total", would that be the size of a Merkle Patricia Tree leaf? I believe that with every new "account" it would represent a leaf in the Merkle Patricia Tree, right? And the Merkle Patricia Tree represens the current state of the application, right? Thanks in advance.
    – Joao Leme
    Feb 12, 2018 at 19:45
  • yes, all you said is correct. Feb 13, 2018 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.