# Merkle Partricia Trie
# What
Merkle Patricia Trie (MPT) is an implementation to satisfy the following requirements.
- It is a key-value store.
- This k-v store can quickly verify if a key is inside, simply from the root hash.
- The k-v store can get the value if key is inside simply from the root hash if the key-value store has not been updated.
# Implementation
# Data Structures
type Node interface {
Hash() []byte
Raw() []interface{}
}
type Trie struct {
root Node
}
func (t *Trie) Hash() []byte {
return t.root.hash()
}
// nibbles are only ints from 0-15. It is breaking every byte into two 0-15 parts.
type Nibble byte
func (t *Trie) Put(key []byte, value[]byte) {
}
func (t *Trie) Get(key []byte) (proof []byte, bool) {
node := t.root
}