state_db_rocksdb

package
v0.0.0-...-7b0d77e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func (*DB) Close

func (self *DB) Close()

func (*DB) GetBlockState

func (self *DB) GetBlockState(num types.BlockNum) state_db.Reader

func (*DB) GetDPOSConfigChanges

func (self *DB) GetDPOSConfigChanges() map[uint64][]byte

func (*DB) GetLatestState

func (self *DB) GetLatestState() state_db.LatestState

func (*DB) Init

func (self *DB) Init(opts Opts) *DB

func (*DB) Prune

func (self *DB) Prune(state_root_to_keep []common.Hash, blk_num types.BlockNum)

func (*DB) RecreateColumn

func (self *DB) RecreateColumn(column state_db.Column, nodes map[common.Hash][]byte)

func (*DB) SaveDPOSConfigChange

func (self *DB) SaveDPOSConfigChange(blk uint64, cfg []byte)

func (*DB) Snapshot

func (self *DB) Snapshot(dir string, log_size_for_flush uint64) error

type LatestState

type LatestState struct {
	*DB
	// contains filtered or unexported fields
}

func (*LatestState) BeginPendingBlock

func (self *LatestState) BeginPendingBlock() state_db.PendingBlockState

func (*LatestState) Close

func (self *LatestState) Close()

func (*LatestState) Commit

func (self *LatestState) Commit(state_root common.Hash) (err error)

func (*LatestState) GetCommittedDescriptor

func (self *LatestState) GetCommittedDescriptor() (ret state_db.StateDescriptor)

func (*LatestState) Init

func (self *LatestState) Init(db *DB) *LatestState

type Opts

type Opts = struct {
	Path                            string
	DisableMostRecentTrieValueViews bool
}

type PendingBlockState

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

func (*PendingBlockState) Get

func (self *PendingBlockState) Get(col state_db.Column, k *common.Hash, cb func([]byte))

func (*PendingBlockState) GetNumber

func (self *PendingBlockState) GetNumber() types.BlockNum

func (*PendingBlockState) Put

func (self *PendingBlockState) Put(col state_db.Column, k *common.Hash, v []byte)

type VersionedKey

type VersionedKey [common.HashLength + unsafe.Sizeof(types.BlockNum(0))]byte

func (*VersionedKey) SetKey

func (self *VersionedKey) SetKey(prefix *common.Hash)

func (*VersionedKey) SetVersion

func (self *VersionedKey) SetVersion(block_num types.BlockNum)

type VersionedReadContext

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

func (*VersionedReadContext) Close

func (self *VersionedReadContext) Close()

Jump to

Keyboard shortcuts

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