24 Aug 23 2:02 am type: related: eth-blocks eth-validators
merkle trees
blockchain data is stored in merkel/verkle trees
it’s a datastructure which lets us prove that a certain data is part of a larger data set
-
parent and leaf nodes are stored in fullnodes and archive nodes, not onchain
-
data stored inside the leafs and parent nodes in the tree are just hashes
-
each leaf is a txn / state change in the block
-
hashed 1+2, 3+4, 5+6, 7+8
-
next is 1+2+3+4, 5+6+7+8
-
root node has his 1+2+3+4+5+6+7+8
- so even if one txn doesnt get verified, the root hash changes, therefore making the block invalid
-
this is used in validators where the merkle tree is fully rebuilt and the root hashes are compared for finality
-
in the case of it not matching, it means a txn was tempered with and therefore the staked eth is slashed during consensus
references
https://www.youtube.com/watch?v=YIc6MNfv5iQ&t=336s https://www.youtube.com/shorts/UpW0gAkkkIw https://www.youtube.com/watch?v=NfK4np15E64&t=1124s https://www.youtube.com/watch?v=G3rWxa16igw https://www.youtube.com/watch?v=s0fruNfgW30 https://www.youtube.com/watch?v=3AcQyTs_Es4 https://www.youtube.com/watch?v=fB41w3JcR7U