Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrMissingPath ¶ added in v0.10.0
func (ErrMissingPath) Error ¶ added in v0.10.0
func (e ErrMissingPath) Error() string
type PSMT ¶
type PSMT struct {
// contains filtered or unexported fields
}
PSMT (Partial Sparse Merkle Tree) holds a subset of an sparse merkle tree at specific state (no historic views). Instead of keeping any unneeded branch, it only keeps the hash of subtree. This implementation is fully stored in memory and doesn't use a database.
DEFINITIONS and CONVENTIONS:
- HEIGHT of a node v in a tree is the number of edges on the longest downward path between v and a tree leaf. The height of a tree is the heights of its root. The height of a Trie is always the height of the fully-expanded tree.
func NewPSMT ¶
NewPSMT builds a Partial Sparse Merkle Tree (PSMT) given a chunkdatapack registertouches TODO just accept batch proof as input
func (*PSMT) Get ¶
Get returns an slice of payloads (same order), an slice of failed paths and errors (if any) TODO return list of indecies instead of paths
func (*PSMT) GetSinglePayload ¶ added in v0.26.2
GetSinglePayload returns payload of a given path
Click to show internal directories.
Click to hide internal directories.