Versions in this module Expand all Collapse all v0 v0.0.2 Oct 31, 2023 v0.0.1 Oct 30, 2023 Changes in this version + var EmptyTrieHash = make([]byte, 32) + var ErrChildPosOutOfRange = errors.New("the position of the child is out of range") + var ErrEmptyBranchNode = errors.New("the branch node is empty") + var ErrEmptyExtensionNode = errors.New("the extension node is empty") + var ErrEmptyLeafNode = errors.New("the leaf node is empty") + var ErrHashNotFound = errors.New("hash not found") + var ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") + var ErrInvalidEncoding = errors.New("cannot decode this invalid encoding") + var ErrInvalidIdentifier = errors.New("invalid identifier") + var ErrInvalidLength = errors.New("invalid array length") + var ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLevelValue = errors.New("invalid trie level in memory value") + var ErrInvalidNode = errors.New("invalid node") + var ErrInvalidTrieTopic = errors.New("invalid trie topic") + var ErrNilBranchNode = errors.New("the branch node is nil") + var ErrNilContext = errors.New("nil context") + var ErrNilDatabase = errors.New("no database provided") + var ErrNilEvictionWaitingList = errors.New("nil eviction waiting list provided") + var ErrNilExtensionNode = errors.New("the extension node is nil") + var ErrNilHasher = errors.New("no hasher provided") + var ErrNilLeafNode = errors.New("the leaf node is nil") + var ErrNilMarshalizer = errors.New("no marshalizer provided") + var ErrNilNode = errors.New("the node is nil") + var ErrNilPathManager = errors.New("nil path manager") + var ErrNilRequestHandler = errors.New("the request handler is nil") + var ErrNilTrie = errors.New("the trie is nil") + var ErrNilTrieStorage = errors.New("nil trie storage provided") + var ErrNodeNotFound = errors.New("the node is not present in the trie") + var ErrTimeIsOut = errors.New("time is out") + var ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group") + var ErrValueTooShort = errors.New("cannot remove bytes from value because value is too short") + var ErrWrongTypeAssertion = errors.New("wrong type assertion") + func NewIterator(trie data.Trie) (*iterator, error) + func NewTrie(trieStorage data.StorageManager, msh marshal.Marshalizer, hsh hashing.Hasher, ...) (*patriciaMerkleTrie, error) + func NewTrieStorageManager(db data.DBWriteCacher, marshalizer marshal.Marshalizer, hasher hashing.Hasher, ...) (*trieStorageManager, error) + func NewTrieStorageManagerWithoutPruning(db data.DBWriteCacher) (*trieStorageManagerWithoutPruning, error) + func NewTrieSyncer(requestHandler RequestHandler, interceptedNodes storage.Cacher, trie data.Trie, ...) (*trieSyncer, error) + type CollapsedBn struct + EncodedChildren [][]byte + func (*CollapsedBn) Descriptor() ([]byte, []int) + func (*CollapsedBn) ProtoMessage() + func (m *CollapsedBn) GetEncodedChildren() [][]byte + func (m *CollapsedBn) Marshal() (dAtA []byte, err error) + func (m *CollapsedBn) MarshalTo(dAtA []byte) (int, error) + func (m *CollapsedBn) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CollapsedBn) Reset() + func (m *CollapsedBn) Size() (n int) + func (m *CollapsedBn) Unmarshal(dAtA []byte) error + func (m *CollapsedBn) XXX_DiscardUnknown() + func (m *CollapsedBn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CollapsedBn) XXX_Merge(src proto.Message) + func (m *CollapsedBn) XXX_Size() int + func (m *CollapsedBn) XXX_Unmarshal(b []byte) error + func (this *CollapsedBn) Equal(that interface{}) bool + func (this *CollapsedBn) GoString() string + func (this *CollapsedBn) String() string + type CollapsedEn struct + EncodedChild []byte + Key []byte + func (*CollapsedEn) Descriptor() ([]byte, []int) + func (*CollapsedEn) ProtoMessage() + func (m *CollapsedEn) GetEncodedChild() []byte + func (m *CollapsedEn) GetKey() []byte + func (m *CollapsedEn) Marshal() (dAtA []byte, err error) + func (m *CollapsedEn) MarshalTo(dAtA []byte) (int, error) + func (m *CollapsedEn) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CollapsedEn) Reset() + func (m *CollapsedEn) Size() (n int) + func (m *CollapsedEn) Unmarshal(dAtA []byte) error + func (m *CollapsedEn) XXX_DiscardUnknown() + func (m *CollapsedEn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CollapsedEn) XXX_Merge(src proto.Message) + func (m *CollapsedEn) XXX_Size() int + func (m *CollapsedEn) XXX_Unmarshal(b []byte) error + func (this *CollapsedEn) Equal(that interface{}) bool + func (this *CollapsedEn) GoString() string + func (this *CollapsedEn) String() string + type CollapsedLn struct + Key []byte + Value []byte + func (*CollapsedLn) Descriptor() ([]byte, []int) + func (*CollapsedLn) ProtoMessage() + func (m *CollapsedLn) GetKey() []byte + func (m *CollapsedLn) GetValue() []byte + func (m *CollapsedLn) Marshal() (dAtA []byte, err error) + func (m *CollapsedLn) MarshalTo(dAtA []byte) (int, error) + func (m *CollapsedLn) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *CollapsedLn) Reset() + func (m *CollapsedLn) Size() (n int) + func (m *CollapsedLn) Unmarshal(dAtA []byte) error + func (m *CollapsedLn) XXX_DiscardUnknown() + func (m *CollapsedLn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *CollapsedLn) XXX_Merge(src proto.Message) + func (m *CollapsedLn) XXX_Size() int + func (m *CollapsedLn) XXX_Unmarshal(b []byte) error + func (this *CollapsedLn) Equal(that interface{}) bool + func (this *CollapsedLn) GoString() string + func (this *CollapsedLn) String() string + type InterceptedTrieNode struct + func NewInterceptedTrieNode(buff []byte, marshalizer marshal.Marshalizer, hasher hashing.Hasher) (*InterceptedTrieNode, error) + func (inTn *InterceptedTrieNode) CheckValidity() error + func (inTn *InterceptedTrieNode) EncodedNode() []byte + func (inTn *InterceptedTrieNode) Fee() *big.Int + func (inTn *InterceptedTrieNode) Hash() []byte + func (inTn *InterceptedTrieNode) Identifiers() [][]byte + func (inTn *InterceptedTrieNode) IsForCurrentShard() bool + func (inTn *InterceptedTrieNode) IsInterfaceNil() bool + func (inTn *InterceptedTrieNode) Nonce() uint64 + func (inTn *InterceptedTrieNode) ReceiverShardId() uint32 + func (inTn *InterceptedTrieNode) SenderAddress() []byte + func (inTn *InterceptedTrieNode) SenderShardId() uint32 + func (inTn *InterceptedTrieNode) String() string + func (inTn *InterceptedTrieNode) Type() string + type RequestHandler interface + IsInterfaceNil func() bool + RequestInterval func() time.Duration + RequestTrieNodes func(destShardID uint32, hashes [][]byte, topic string)