Versions in this module Expand all Collapse all v0 v0.5.0 Mar 23, 2021 Changes in this version + var DefaultLeaf = Hasher([]byte{ ... }) + var ErrCBDone = errors.New("cb done with iteration") + func GetFreshData(size, length int) [][]byte + func GetFreshDataUnsorted(size, length int) [][]byte + func GetNodeDB(txn *badger.Txn, prefix []byte, key []byte) ([]byte, error) + func Hasher(data ...[]byte) []byte + type DataArray [][]byte + func (d DataArray) Len() int + func (d DataArray) Less(i, j int) bool + func (d DataArray) Swap(i, j int) + type Hash [constants.HashLen]byte + type LeafNode struct + Key []byte + Value []byte + type MemoryTrie struct + func NewMemoryTrie() *MemoryTrie + func (mt *MemoryTrie) Update(keys, values [][]byte) ([]byte, error) + type SMT struct + Root []byte + TrieHeight int + func NewSMT(root []byte, hash func(data ...[]byte) []byte, prefixFunc func() []byte) *SMT + func NewSMTForHeight(txn *badger.Txn, height uint32, hash func(data ...[]byte) []byte, ...) (*SMT, error) + func (s *SMT) Commit(txn *badger.Txn, height uint32) ([]byte, error) + func (s *SMT) Discard() + func (s *SMT) Drop(bDB *badger.DB) error + func (s *SMT) FinalizeSnapShotRoot(txn *badger.Txn, root []byte, height uint32) error + func (s *SMT) Get(txn *badger.Txn, key []byte) ([]byte, error) + func (s *SMT) Height(txn *badger.Txn) (uint32, error) + func (s *SMT) MerkleProof(txn *badger.Txn, key []byte) ([][]byte, bool, []byte, []byte, error) + func (s *SMT) MerkleProofCompressed(txn *badger.Txn, key []byte) ([]byte, [][]byte, int, bool, []byte, []byte, error) + func (s *SMT) MerkleProofCompressedR(txn *badger.Txn, key, root []byte) ([]byte, [][]byte, int, bool, []byte, []byte, error) + func (s *SMT) MerkleProofR(txn *badger.Txn, key, root []byte) ([][]byte, bool, []byte, []byte, error) + func (s *SMT) SnapShot(txn *badger.Txn, snapShotPrefix func() []byte) (*SMT, error) + func (s *SMT) StoreSnapShotNode(txn *badger.Txn, batch []byte, root []byte, layer int) ([][]byte, int, []LeafNode, error) + func (s *SMT) Update(txn *badger.Txn, keys, values [][]byte) ([]byte, error) + func (s *SMT) VerifyInclusion(ap [][]byte, key, value []byte) bool + func (s *SMT) VerifyInclusionC(bitmap, key, value []byte, ap [][]byte, length int) bool + func (s *SMT) VerifyInclusionCR(root []byte, bitmap, key, value []byte, ap [][]byte, length int) bool + func (s *SMT) VerifyNonInclusion(ap [][]byte, key, value, proofKey []byte) bool + func (s *SMT) VerifyNonInclusionC(ap [][]byte, length int, bitmap, key, value, proofKey []byte) bool