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.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityHow 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.
[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.
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.
You can now use chainstats, a page made by Chainstack, a blockchain infrastructure provider (full disclosure, I'm a dev advocate at Chainstack and worked on this page).
This app displays the current size of all the public network Chainstack support based on the Protocol, node type (full or archive), and blockchain client.
It is automatically updated when the size changes in the resources required by the servers.
you can find quite a lot of stats, including the chain size here: