6

How can I find the current blockchain size? (Obviously, I mean without downloading and installing a client, downloading the blockchain, and measuring on disk.)

I would also like a way to determine the blockchain size for expanse, ETC, etc.

  • 3
    You effectively can't. It's dependent on which implementation you're using, what pruning mode you've used, the block size in your file system, and presumably various other things. There's no single figure. – Richard Horrocks May 20 '17 at 7:24
  • So how can I know ahead of time if I'm going to have enough disk space? – stone.212 May 21 '17 at 2:16
  • 1
    Richard if you want to make this comment into an answer, I will mark it correct. – stone.212 May 30 '17 at 5:45
3

[Creating an answer from my initial comment... ]

How can I find the current blockchain size?

You effectively can't determine a generalised, one-size-fits-all size. It's dependent on which implementation you're using, what pruning mode you've used, the block size in your file system, and presumably various other things. There's no single figure.

  • 1
    Richard this is significantly different from your original comment and raises a number of other questions without answering them. Also it brings in ideas that are obvious (like the fact that the blocksize changes) but which isn't related to my question (which is about finding the blockchain size and implies finding it at any one particular moment.) – stone.212 Jun 6 '17 at 0:01
  • Agreed - simplified back to the original. – Richard Horrocks Jun 6 '17 at 7:55
  • why the size is not displayed in the etherstat? – Sig Touri Jun 6 '17 at 8:40
2

You could consider connecting to a hosted Ethereum node like Infura.

Then get the number of blocks and do some estimation based on average blocksize:

current chainsize = (chainsize at an earlier point of time date / number of blocks at an earlier point of time) * current number of blocks.

This would be an estimate only and you might need to update the average blocksize time to time in your app. And as it was mentioned by others the chain size also depends on the geth implementation and OS.

Ex. to connect to infura on ropsten:

const web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/<yourinfurakey>"));

Here are more details about how to connect to http provider with truffle.

  • This is useful information but doesn't really answer the question, especially because I am also asking about ETC, etc. But it's useful for ETH in particular. – stone.212 Jun 7 '17 at 4:09
-1

you can find quite a lot of stats, including the chain size here:

https://ethstats.net/

  • the ethstats don't give the chain size!! it i am mistaken please provide a screenshoot or the right link – Badr Bellaj May 21 '17 at 11:32
  • Also that only applies to ETH. Not a generic way of getting blockchain size for expanse, ETC,etc. as I specified. This is not an answer, – stone.212 May 22 '17 at 4:13
  • It doesn't give you the blockchain size. – kiradotee Nov 14 '17 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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