0

In the Ethereum whitepaper, it's written,

The reason is that the state is stored in the tree structure, and after every block only a small part of the tree needs to be changed.

Now I get the fact that, unlike bitcoin, in the case of Ethereum the most recent state gets saved in Block. And to save the information it uses a Merkle-Patricia-trie kind of tree, as written

A special kind of tree known as a "Patricia tree" is used to accomplish this, including a modification to the Merkle tree concept

If I'm thinking right STATE in Ethereum is the collection of Transactions or account information.

Now, this information should be (I'm guessing) present on the leaf node of the Merkle-Patricia-trie. Now if we update the state, the structure of the whole tree would get affected. [As the hashes of the parents will be changed subsequently]

Then how does the first quote makes sense? Changing a small part will heavily change the tree, Right? Can someone explain?

1
  • The patricia trie changes, but most of the leaf do not.
    – Ismael
    Feb 9, 2022 at 5:52

1 Answer 1

1

You are both correct. Changing 1 leaf node requires a change to every parent node of that leaf. But because of the awesomeness of trees, this is only currently about 7 nodes (even thought the tree itself contains millions)

2

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.