Versions in this module Expand all Collapse all v0 v0.0.1 May 15, 2024 Changes in this version + var ErrNewLogSizeMustBeGreater = errors.New("the new log size must be greater than the previous") + var ErrNotFound = errors.New("not found") + func AddHashedLeaf(store NodeAppender, hasher hash.Hash, hashedLeaf []byte) (uint64, error) + func AllOnes(num uint64) bool + func Ancestors(i uint64) []uint64 + func BagPeaksRHS(store indexStoreGetter, hasher hash.Hash, pos uint64, peaks []uint64) ([]byte, error) + func BitLength(num uint64) int + func BitLength64(num uint64) uint64 + func CheckConsistency(store indexStoreGetter, hasher hash.Hash, cp ConsistencyProof, rootA []byte) (bool, []byte, error) + func GetRoot(mmrSize uint64, store indexStoreGetter, hasher hash.Hash) ([]byte, error) + func HashPeaksRHS(hasher hash.Hash, peakHashes [][]byte) []byte + func HashWriteUint64(hasher hash.Hash, value uint64) + func HeightIndexLeafCount(heightIndex uint64) uint64 + func HeightIndexSize(heightIndex uint64) uint64 + func HeightMaxIndex(heightIndex uint64) uint64 + func HeightPeakRight(mmrSize uint64, height uint64, i uint64) (uint64, uint64, bool) + func HeightSize(height uint64) uint64 + func HighestPos(mmrSize uint64) (uint64, uint64) + func IndexHeight(i uint64) uint64 + func IndexHeight2(pos uint64) uint64 + func IndexProof(mmrSize uint64, store indexStoreGetter, hasher hash.Hash, i uint64) ([][]byte, error) + func IndexProofLocal(mmrSize uint64, store indexStoreGetter, i uint64) ([][]byte, uint64, error) + func IsPow2(size uint) bool + func JumpLeftPerfect(pos uint64) uint64 + func JumpRightSibling(pos uint64) uint64 + func LeafCount(size uint64) uint64 + func LeafMinusSpurSum(iLeaf uint64) uint64 + func LeftAncestors(i uint64) []uint64 + func LeftChild(pos uint64) (uint64, bool) + func LeftPosForHeight(height uint64) uint64 + func Log2Uint32(num uint32) uint32 + func Log2Uint64(num uint64) uint64 + func MaxPeakHeight(i uint64) uint64 + func ParentOffset(height uint64) uint64 + func PeakBagRHS(store indexStoreGetter, hasher hash.Hash, pos uint64, peaks []uint64) ([][]byte, error) + func Peaks(mmrSize uint64) []uint64 + func PeaksBitmap(mmrSize uint64) uint64 + func PeaksLHS(store indexStoreGetter, pos uint64, peaks []uint64) ([][]byte, error) + func PosHeight(pos uint64) uint64 + func SiblingOffset(height uint64) uint64 + func SpurHeightLeaf(iLeaf uint64) uint64 + func SpurSumHeight(height uint64) uint64 + func TreeIndex(iLeaf uint64) uint64 + func VerifyConsistency(hasher hash.Hash, peakHashesA [][]byte, proof ConsistencyProof, rootA []byte, ...) bool + func VerifyFirstInclusionPath(mmrSize uint64, hasher hash.Hash, leafHash []byte, iNode uint64, ...) (bool, int) + func VerifyInclusion(mmrSize uint64, hasher hash.Hash, nodeHash []byte, iNode uint64, ...) bool + type ConsistencyProof struct + MMRSizeA uint64 + MMRSizeB uint64 + Path [][]byte + func IndexConsistencyProof(mmrSizeA, mmrSizeB uint64, store indexStoreGetter, hasher hash.Hash) (ConsistencyProof, error) + type ConsistencyProofLocal struct + HeightA uint64 + LogIndex uint64 + Path [][]byte + PeakIndexA uint64 + PeakIndexB uint64 + SizeA uint64 + SizeB uint64 + func IndexProofLocalExtend(mmrSizeA, mmrSizeB uint64, store indexStoreGetter, i uint64) (ConsistencyProofLocal, error) + type NodeAppender interface + Append func(value []byte) (uint64, error) + Get func(i uint64) ([]byte, error) Other modules containing this package github.com/datatrails/go-datatrails-merklelog