Last updated
Last updated
A in the context of MPT is the terminal node in a tree, meaning it doesn't have any children. Instead of pointing to other nodes, it directly contains data or values.
Data Holder: A Leaf Node primarily encapsulates the data. In the context of MPT, it holds the value associated with a specific key
No Children: As the name suggests, Leaf Nodes donβt have child nodes. They are the endpoints in the trie structure.
Path Encoding: In MPT, if there's any remainder of the path leading to a Leaf Node, it's stored within the node itself
Representing the Leaf Node in Go, we utilize the following structure:
Path
: Represents the remaining segment of the path, stored as nibbles
Value
: Holds the actual data or value associated with the key
Dirty
: A flag indicating whether the node has been modified since the last commit