What I'm trying to figure out (and various internet and specific searches here have failed to answer) is where the data is stored and contracts executed.

Optimally, I figure, all "data" (transactions, contracts, anything at all really) should be stored on every node, and all contracts should be run by every node in order to form the best consensus of what is accurate to maintain the "decentralized consensus" nature of Ethereum. Realistically, however, I'm aware that storing every bit of data on every node could become very expensive (in physical data storage hardware costs) very rapidly. So I figure the network has some system that decides to store a contract and associated data on a certain number of nodes and periodically (each time a new block is generated (possibly)) decides if that data needs to be stored on different nodes (because current ones are no longer available or the data is being accessed more frequently).

If it helps, here's the best I can do for an example: I have a contract (hypothetically) that simply waits for activation and then spits out some small amount of data, such as "Hello World". Does every single node on the network have a copy of the contract? Will every single node execute the contract and send the result across the network for comparison to determine a consensus result that will be recorded in the blockchain? When (if ever) does any of aforementioned data get determined "no longer useful" and ceases to exist?

To clarify some of my assumptions (in case they're inaccurate) I did read somewhere in the Ethereum documentation something that gave me the impression that not every single node will run a contract, which to me meant that either they don't all store the data or they simply don't all process every single contract execution. Also, I'm sure this has been asked before and there even appears to be a question for it in the official FAQ, but I can't find a definitive answer online and the FAQ answer just says "TODO".

1 Answer 1


You are right in your first assumption. Ethereum nodes all store every contract and each of them execute a contract if needed. That is not very efficient (on the contrary), but that is how Ethereum works in its current state with Proof of Work. Data never ceases to exist. It always stays on the blockchain...thats the whole idea.

When sharding will be introduced that will no longer be the case.

Here is a video of Vitalik explaining some concepts about this: https://www.youtube.com/watch?v=-QIt3mKLIYU

  • Thanks. That clears things up for me, I guess that's something that hasn't become a real problem yet and is still being worked on. Commented Sep 27, 2016 at 22:23

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.