[Ethereum] Why do Ethereum clients download the entire blockchain

clientssynchronization

Lets say that I am not interested in mining but instead just interested in one contract and its latest state. Why shouldn't my client discard all the other state on initiation, and also ignore any new blocks unless they include state changes related to the contract of interest?

Sure, some time later, I may find out that I want to "subscribe" to some other new contract that my client may have ignored up to that point. However, in that case my client could bootstrap the same process normally used on initial install and discard everything that's irrelevant to the contract in question.

To make the process more efficient (and avoid a lengthy syncing process each time I'm interested in a new contract) I could rely on the entity publishing the contract also including the block number representing the "genesis" block for that contract such that my client could discard any blocks prior to that block, and then skip any subsequent blocks that do not include any transactions for the said contract.

So.. to re-iterate the question, why do Ethereum clients download the entire blockchain rather than something along the above lines?

Note: for clarity, the context of the above question is a client with mining disabled.

Best Answer

The full client (or the fat client) has to replay all the transactions on the state to ensure the validity.

What you are looking for is a variation of a light client which is being currently in research. The idea is to be watching only part of the state and use other peers for parts of the state that has less interest.

Related Topic