temporal

package
v0.0.0-...-92d349b Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountsDomain kv.Domain = "AccountsDomain"
	StorageDomain  kv.Domain = "StorageDomain"
	CodeDomain     kv.Domain = "CodeDomain"
)
View Source
const (
	AccountsHistory kv.History = "AccountsHistory"
	StorageHistory  kv.History = "StorageHistory"
	CodeHistory     kv.History = "CodeHistory"
)
View Source
const (
	AccountsHistoryIdx kv.InvertedIdx = "AccountsHistoryIdx"
	StorageHistoryIdx  kv.InvertedIdx = "StorageHistoryIdx"
	CodeHistoryIdx     kv.InvertedIdx = "CodeHistoryIdx"

	LogTopicIdx   kv.InvertedIdx = "LogTopicIdx"
	LogAddrIdx    kv.InvertedIdx = "LogAddrIdx"
	TracesFromIdx kv.InvertedIdx = "TracesFromIdx"
	TracesToIdx   kv.InvertedIdx = "TracesToIdx"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	kv.RwDB
	// contains filtered or unexported fields
}

func New

func New(db kv.RwDB, agg *state.AggregatorV3, cb1 tConvertV3toV2, cb2 tRestoreCodeHash, cb3 tParseIncarnation, systemContractLookup map[common.Address][]common.CodeRecord) (*DB, error)

func (*DB) Agg

func (db *DB) Agg() *state.AggregatorV3

func (*DB) BeginRo

func (db *DB) BeginRo(ctx context.Context) (kv.Tx, error)

TODO: it's temporary method, allowing inject TemproalTx without changing code. But it's not type-safe.

func (*DB) BeginRw

func (db *DB) BeginRw(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginRwNosync

func (db *DB) BeginRwNosync(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginTemporalRo

func (db *DB) BeginTemporalRo(ctx context.Context) (kv.TemporalTx, error)

func (*DB) BeginTemporalRw

func (db *DB) BeginTemporalRw(ctx context.Context) (kv.RwTx, error)

func (*DB) BeginTemporalRwNosync

func (db *DB) BeginTemporalRwNosync(ctx context.Context) (kv.RwTx, error)

func (*DB) Update

func (db *DB) Update(ctx context.Context, f func(tx kv.RwTx) error) error

func (*DB) UpdateNosync

func (db *DB) UpdateNosync(ctx context.Context, f func(tx kv.RwTx) error) error

func (*DB) View

func (db *DB) View(ctx context.Context, f func(tx kv.Tx) error) error

func (*DB) ViewTemporal

func (db *DB) ViewTemporal(ctx context.Context, f func(tx kv.TemporalTx) error) error

type Tx

type Tx struct {
	*mdbx.MdbxTx
	// contains filtered or unexported fields
}

func (*Tx) Agg

func (tx *Tx) Agg() *state.AggregatorV3

func (*Tx) AggCtx

func (tx *Tx) AggCtx() *state.AggregatorV3Context

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) DomainGet

func (tx *Tx) DomainGet(name kv.Domain, key, key2 []byte) (v []byte, ok bool, err error)

func (*Tx) DomainGetAsOf

func (tx *Tx) DomainGetAsOf(name kv.Domain, key, key2 []byte, ts uint64) (v []byte, ok bool, err error)

func (*Tx) DomainRange

func (tx *Tx) DomainRange(name kv.Domain, fromKey, toKey []byte, asOfTs uint64, asc order.By, limit int) (it iter.KV, err error)

func (*Tx) HistoryGet

func (tx *Tx) HistoryGet(name kv.History, key []byte, ts uint64) (v []byte, ok bool, err error)

func (*Tx) HistoryRange

func (tx *Tx) HistoryRange(name kv.History, fromTs, toTs int, asc order.By, limit int) (it iter.KV, err error)

func (*Tx) IndexRange

func (tx *Tx) IndexRange(name kv.InvertedIdx, k []byte, fromTs, toTs int, asc order.By, limit int) (timestamps iter.U64, err error)

func (*Tx) Rollback

func (tx *Tx) Rollback()

Jump to

Keyboard shortcuts

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