2

I am new to ethereum and have been reading about all the new things in ethereum with respect to bitcoin's blockchain. I have read about the GHOST protocol for using secondary blockchains instead of throwing them away and the merkle-patricia tree. I dont really understand what exactly this new data structure is solving except that it stores each block's state as hash as a node. So the tree changes if any node has any changes in them.

  1. What exactly are the problems in bitcoin's idea of blockchain that this new data structure is solving?

  2. Where is the implementation for all this protocols and the data structures? Is it in mist or the clients that are available in various languages?

1 Answer 1

3

What exactly are the problems in bitcoin's idea of blockchain that this new data structure is solving?

Bitcoin itself uses Merkle trees (and therefore Merkle proofs) - it's not a new concept.

Ethereum had to introduce something more complex - the Merkle Patricia tree - to store its state data.

In short, state data is updated often, and this doesn't fit well with binary Merkle trees. Instead a Merkle Patricia tree is used, because, quoting from Merkling the Ethereum, by Vitalik:

"What is thus desired is a data structure where we can quickly calculate the new tree root after an insert, update edit or delete operation, without recomputing the entire tree."

The above article goes into lots more detail, and compares to the Bitcoin case.

Further reading:


Where is the implementation for all this protocols and the data structures? Is it in mist or the clients that are available in various languages?

Mist simply runs on top of a client, so has no native understanding itself.

The main client implementations of the tree (trie) can be found here:

There will be others, in other languages.

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.