Versions in this module Expand all Collapse all v1 v1.999.0 Nov 17, 2022 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 ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") + var ErrInvalidEncoding = errors.New("cannot decode this invalid encoding") + 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 ErrInvalidMaxHardCapForMissingNodes = errors.New("invalid max hardcap for missing nodes") + var ErrInvalidNode = errors.New("invalid node") + var ErrInvalidTrieSyncerVersion = errors.New("invalid trie syncer version") + var ErrInvalidTrieTopic = errors.New("invalid trie topic") + var ErrKeyNotFound = errors.New("key not found") + var ErrNilBranchNode = errors.New("the branch node is nil") + var ErrNilCheckpointHashesHolder = errors.New("nil checkpoint hashes holder") + var ErrNilContext = errors.New("nil context") + var ErrNilDatabase = errors.New("no database provided") + var ErrNilExtensionNode = errors.New("the extension node is nil") + var ErrNilHasher = errors.New("no hasher provided") + var ErrNilIdleNodeProvider = errors.New("nil idle node provider") + 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 ErrNilRootHashHolder = errors.New("nil root hash holder provided") + var ErrNilStorer = errors.New("nil storer") + var ErrNilTimeoutHandler = errors.New("nil timeout handler") + var ErrNilTrie = errors.New("the trie is nil") + var ErrNilTrieStorage = errors.New("nil trie storage provided") + var ErrNilTrieSyncStatistics = errors.New("nil trie sync statistics handler") + var ErrNodeNotFound = errors.New("the node is not present in the trie") + var ErrTimeIsOut = errors.New("time is out") + var ErrTrieSyncTimeout = errors.New("trie sync timeout") + 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 CheckTrieSyncerVersion(trieSyncerVersion int) error + func CreateTrieStorageManager(args NewTrieStorageManagerArgs, options StorageManagerOptions) (common.StorageManager, error) + func NewDepthFirstTrieSyncer(arg ArgTrieSyncer) (*depthFirstTrieSyncer, error) + func NewDoubleListTrieSyncer(arg ArgTrieSyncer) (*doubleListTrieSyncer, error) + func NewIterator(trie common.Trie) (*iterator, error) + func NewMerkleProofVerifier(marshalizer marshal.Marshalizer, hasher hashing.Hasher) (*merkleProofVerifier, error) + func NewSyncTrieStorageManager(tsm common.StorageManager) (*syncTrieStorageManager, error) + func NewTrie(trieStorage common.StorageManager, msh marshal.Marshalizer, hsh hashing.Hasher, ...) (*patriciaMerkleTrie, error) + func NewTrieStorageManager(args NewTrieStorageManagerArgs) (*trieStorageManager, error) + func NewTrieStorageManagerWithoutCheckpoints(tsm common.StorageManager) (*trieStorageManagerWithoutCheckpoints, error) + func NewTrieStorageManagerWithoutPruning(sm common.StorageManager) (*trieStorageManagerWithoutPruning, error) + func NewTrieStorageManagerWithoutSnapshot(tsm common.StorageManager) (*trieStorageManagerWithoutSnapshot, error) + func NewTrieSyncer(arg ArgTrieSyncer) (*trieSyncer, error) + type ArgTrieSyncer struct + CheckNodesOnDisk bool + DB common.StorageManager + Hasher hashing.Hasher + InterceptedNodes storage.Cacher + Marshalizer marshal.Marshalizer + MaxHardCapForMissingNodes int + RequestHandler RequestHandler + ShardId uint32 + TimeoutHandler TimeoutHandler + Topic string + TrieSyncStatistics common.SizeSyncStatisticsHandler + type CheckpointHashesHolder interface + IsInterfaceNil func() bool + Put func(rootHash []byte, hashes common.ModifiedHashes) bool + Remove func(hash []byte) + RemoveCommitted func(lastCommittedRootHash []byte) + ShouldCommit func(hash []byte) bool + 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 EpochNotifier interface + IsInterfaceNil func() bool + RegisterNotifyHandler func(handler vmcommon.EpochSubscriberHandler) + type IdleNodeProvider interface + IsIdle func() bool + IsInterfaceNil func() bool + type InterceptedTrieNode struct + func NewInterceptedTrieNode(buff []byte, hasher hashing.Hasher) (*InterceptedTrieNode, error) + func (inTn *InterceptedTrieNode) CheckValidity() error + func (inTn *InterceptedTrieNode) Fee() *big.Int + func (inTn *InterceptedTrieNode) GetSerialized() []byte + 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) SetSerialized(serializedNode []byte) + func (inTn *InterceptedTrieNode) SizeInBytes() int + func (inTn *InterceptedTrieNode) String() string + func (inTn *InterceptedTrieNode) Type() string + type NewTrieStorageManagerArgs struct + CheckpointHashesHolder CheckpointHashesHolder + CheckpointsStorer common.DBWriteCacher + GeneralConfig config.TrieStorageManagerConfig + Hasher hashing.Hasher + IdleProvider IdleNodeProvider + MainStorer common.DBWriteCacher + Marshalizer marshal.Marshalizer + type RequestHandler interface + IsInterfaceNil func() bool + RequestInterval func() time.Duration + RequestTrieNodes func(destShardID uint32, hashes [][]byte, topic string) + type StorageManagerOptions struct + CheckpointsEnabled bool + PruningEnabled bool + SnapshotsEnabled bool + type TimeoutHandler interface + IsInterfaceNil func() bool + IsTimeout func() bool + ResetWatchdog func() + type TrieSyncer interface + Duration func() time.Duration + IsInterfaceNil func() bool + NumBytes func() uint64 + NumLeaves func() uint64 + NumTrieNodes func() uint64 + StartSyncing func(rootHash []byte, ctx context.Context) error + func CreateTrieSyncer(arg ArgTrieSyncer, trieSyncerVersion int) (TrieSyncer, error)