datareduction

package
v0.0.0-...-5d85a61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartPruning

func StartPruning() bool

func StopPruning

func StopPruning() bool

Types

type NodeCount

type NodeCount map[common.Hash]uint64

func (NodeCount) String

func (nc NodeCount) String() string

type PruneDatabase

type PruneDatabase interface {
	// OpenPruneTrie opens the prune trie.
	OpenPruneTrie(root common.Hash) (state.Trie, error)

	// CopyTrie returns an independent copy of the given trie.
	CopyTrie(state.Trie) state.Trie

	// TrieDB retrieves the low level trie database used for data storage.
	TrieDB() *trie.Database
}

PruneDatabase wraps access to prune tries.

func NewDatabase

func NewDatabase(db ligodb.Database) PruneDatabase

NewDatabase creates a backing store for prune trie. The returned database is safe for concurrent use, but does not retain any recent trie nodes in memory. To keep some historical state in memory, use the NewDatabaseWithCache constructor.

func NewDatabaseWithCache

func NewDatabaseWithCache(db ligodb.Database, cache int) PruneDatabase

NewDatabaseWithCache creates a backing store for prune trie. The returned database is safe for concurrent use and retains a lot of collapsed RLP trie nodes in a large memory cache.

type PruneProcessor

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

func NewPruneProcessor

func NewPruneProcessor(chaindb, prunedb ligodb.Database, bc *core.BlockChain, pruneBodyData bool) *PruneProcessor

func (*PruneProcessor) Process

func (p *PruneProcessor) Process(blockNumber, scanNumber, pruneNumber uint64) (uint64, uint64)

type PruneStatus

type PruneStatus struct {
	Running           bool   `json:"is_running"`
	LatestBlockNumber uint64 `json:"latest_block_number"`
	LatestScanNumber  uint64 `json:"latest_scan_number"`
	LatestPruneNumber uint64 `json:"latest_prune_number"`
}

func GetLatestStatus

func GetLatestStatus(prunedb ligodb.Database) *PruneStatus

Jump to

Keyboard shortcuts

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