My question is actually three parts, (yes I know about the upcoming sharding development in progress):

  1. It's free to access Ethereum Network data (we don't normally need the rest of the blockchain but we need to store everything to access a tiny part? where's the economic benefit to this? no miner reward... i know ipfs too btw)
  2. Storing smart contracts and processing them etc may require higher cost (in gas) where the participating users need to be in a list of sorts (mapping). Is it economically viable to store all these and to process them even with gas involved in the long run? Because if I'm not mistaken, the current Ethereum node really do require SSD (yes it does full node.) to run on, and that can easily go into TBs of data in the near future. (Storage / processing pricing vs blockchain size processing... is Ethereum Network sustainable / viable for a very popular smart contract?)
  3. How much data can we store in Ethereum Network again? Unlimited? From a single contract's point of view. I heard you can store as much data as long as it does not exceed 100GB. I understand the underlying backend db is leveldb... LEVELDB... 100GB? That's not going to be practical storage for IOT.

Please do only answer these if you are an advanced programmer of sorts. Thanks.

2 Answers 2

  1. Yes getting data from the blockchain is free. You can either sync a full node yourself (~50 gb need currently, a few hours to a day to sync depending on your system/network), sync a light node (a few gb max, and a few minutes to sync), or use infuras public nodes (instant, no sync required, but also trustful).

  2. Of course you should get the amount needed to store in the contract as small as possible. Generally if you don't need to operate/retrieve the data on-chain, then you should just store something like an IPFS hash and store the actual data on IPFS. Only store whats needed on-chain. This means balances, permissions, etc., but not things like user avatars or comments.

  3. The amount of data you can store is unlimited. The only slowing factor is that it is expensive. It costs 20k gas to create a 256 bit word in storage, and 5k gas to update it afterwards. At current gas prices, that's 4-5 cents and 1 cent. Ignoring gas price slippage and there's only 8 million gas per block, to to allocate 1 gb of storage on-chain, it would cost roughly $500,000 just for the allocation, not including the 21k tx cost and the other opcodes that would be needed.


To add to the existing answer.

  1. ...where's the economic benefit to this?

A couple of ideas:

  1. You're helping to keep the network safe, and by extension, also your ETH. By running an honest, full (non-mining) node, you're adding to the pool of nodes running an honest version of the consensus algorithms. Your node is able to validate blocks and transactions, and prevent the spread of dishonest ones. The healthier the network, the safer it is for your investments.

  2. You can run your own wallet. There's no need to rely on a third party, regardless of how trustworthy they supposedly are. Again, your funds are safer.

  1. ...and that can easily go into TBs of data in the near future.

See The Ethereum-blockchain size will not exceed 1TB anytime soon for a description of existing pruning and syncing modes. This doesn't take into account sharding. (Vitalik: "Sharding is coming")

  1. ... I understand the underlying backend db is leveldb... LEVELDB... 100GB?

Depends on the client implementation. Geth uses LevelDB. Parity uses RocksDB (yes, fine, it's a fork of LevelDB). You're free to write an implementation using any database you like - the Yellow Paper specification - as far as it is a specification - makes no mention of the underlying database.

That's not going to be practical storage for IOT.

Perhaps not right now. Pruning modes and sharding will help. As will Kryder's Law when applied to IOT hardware.

Your Answer

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

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