moeingads

package module
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 3

README

MoeingADS

Authenticated Data Structure from Moeing

build workflow

Documentation

Index

Constants

View Source
const (
	KeptEntriesToActiveEntriesRatio = 2

	BucketCount = 64
	JobChanSize = 256

	MinDeactiveEntries = 100 //minimum deactived entry count in each round of compaction
	MinKeptTwigs       = 10  //minimum kept twig count in each shard
)
View Source
const (
	DefaultHPFileSize  int   = 1024 * 1024 * 1024
	StartReapThres     int64 = 1000 * 1000
	HPFileBufferSize   int   = datatree.BufferSize
	RootCacheSizeLimit int   = 1024 * 1024
)

Variables

View Source
var DebugPanicNumber int //not used
View Source
var Phase1n2Time, Phase1Time, Phase2Time, Phase3Time, Phase4Time, Phase0Time uint64

Functions

This section is empty.

Types

type BucketMap

type BucketMap struct {
	// contains filtered or unexported fields
}

func NewBucketMap

func NewBucketMap(sizeList []int) *BucketMap

func (*BucketMap) GetSizes added in v0.2.0

func (bm *BucketMap) GetSizes() []int

func (*BucketMap) Load

func (bm *BucketMap) Load(key string) (value *HotEntry, ok bool)

func (*BucketMap) Store

func (bm *BucketMap) Store(key string, value *HotEntry)

type BucketSet added in v0.2.0

type BucketSet struct {
	// contains filtered or unexported fields
}

func NewBucketSet added in v0.2.0

func NewBucketSet(sizeList []int) *BucketSet

func (*BucketSet) GetSizes added in v0.2.0

func (bs *BucketSet) GetSizes() []int

func (*BucketSet) Store added in v0.2.0

func (bs *BucketSet) Store(key string)

type Entry

type Entry = types.Entry

type HotEntry

type HotEntry = types.HotEntry

type MoeingADS

type MoeingADS struct {
	// contains filtered or unexported fields
}

func NewMoeingADS

func NewMoeingADS(dirName string, canQueryHistory bool, startEndKeys [][]byte) (*MoeingADS, error)

func NewMoeingADS4Mock

func NewMoeingADS4Mock(startEndKeys [][]byte) *MoeingADS

func (*MoeingADS) ActiveCount

func (mads *MoeingADS) ActiveCount() int

func (*MoeingADS) BeginWrite

func (mads *MoeingADS) BeginWrite(height int64)

func (*MoeingADS) CheckConsistency

func (mads *MoeingADS) CheckConsistency()

func (*MoeingADS) CheckHashConsistency added in v0.3.0

func (mads *MoeingADS) CheckHashConsistency()

func (*MoeingADS) Close

func (mads *MoeingADS) Close()

func (*MoeingADS) DeactiviateEntry

func (mads *MoeingADS) DeactiviateEntry(shardID int, sn int64)

func (*MoeingADS) Delete

func (mads *MoeingADS) Delete(key []byte)

Delete a KV pair. It is shard-safe

func (*MoeingADS) EndWrite

func (mads *MoeingADS) EndWrite()

func (*MoeingADS) GetCurrHeight

func (mads *MoeingADS) GetCurrHeight() int64

func (*MoeingADS) GetEntry

func (mads *MoeingADS) GetEntry(k []byte) *Entry

func (*MoeingADS) GetEntryAtHeight added in v0.4.0

func (mads *MoeingADS) GetEntryAtHeight(k []byte, height uint64) *Entry

func (*MoeingADS) GetProof added in v0.3.0

func (mads *MoeingADS) GetProof(k []byte) (entryBz, proofBz []byte, err error)

func (*MoeingADS) GetRootHash

func (mads *MoeingADS) GetRootHash() []byte

func (*MoeingADS) PrepareForDeletion

func (mads *MoeingADS) PrepareForDeletion(k []byte) (findIt bool)

func (*MoeingADS) PrepareForUpdate

func (mads *MoeingADS) PrepareForUpdate(k []byte)

func (*MoeingADS) PrintIdxTree added in v0.1.2

func (mads *MoeingADS) PrintIdxTree()

func (*MoeingADS) PrintMetaInfo

func (mads *MoeingADS) PrintMetaInfo()

func (*MoeingADS) PruneBeforeHeight

func (mads *MoeingADS) PruneBeforeHeight(height int64)

func (*MoeingADS) ScanAll added in v0.2.0

func (mads *MoeingADS) ScanAll(fn func(key, value []byte))

func (*MoeingADS) Set

func (mads *MoeingADS) Set(key, value []byte)

Modify a KV pair. It is shard-safe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL