0

The Ethereum block header stores the root hash of the world state trie, Does this means every time the state of world state is copied into levelDB for every block mined? Thanks for your answers.

1 Answer 1

0

Since you mention leveldb probably you want to known about the go-ethereum implementation.

We could say that in old geth versions the state was saved to disk after every block, but only the modified branches of the tree were saved. The unmodified branches remained unchanged in disk.

More recently geth implemented different mechanism to minimize the disk operations. The modified branches remain in memory until a threshold was achieved or a certain time did elapse.

2
  • Thanks for your answer. could you let me any blog post that speaks about this or around this topic because I couldn't find much resources on google.
    – Ranjith
    May 13, 2022 at 14:03
  • @Ranjith Sorry, but I don't have more resources that reading the go-ethereum source code, github issues, and release notes.
    – Ismael
    May 13, 2022 at 15:41

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.