Context
As we discussed in #571, I am introducing the nonce mechanism here.
Design Decision
type ImmutableTree struct {
root *Node
ndb *nodeDB
version int64
nonce int64 // new field to track the current ID
skipFastStorageUpgrade bool
}
type Node struct {
key []byte
value []byte
hash []byte
leftHash []byte
rightHash []byte
nodeKey int64 // new field which reflects the current node key
leftNodeKey int64 // new field
rightNodeKey int64 // new field
version int64 // possible to remove ???
size int64
leftNode *Node
rightNode *Node
subtreeHeight int8
persisted bool
}