Documentation
¶
Overview ¶
Package state provides a caching layer atop the Ethereum state trie.
Index ¶
- func NewDatabase(db ethdb.Database) ethstate.Database
- func NewDatabaseWithConfig(db ethdb.Database, config *triedb.Config) ethstate.Database
- func NewDatabaseWithNodeDB(db ethdb.Database, triedb *triedb.Database) ethstate.Database
- func WithConcurrentWorkers(prefetchers int) ethstate.PrefetcherOption
- type Database
- type Dump
- type DumpAccount
- type DumpCollector
- type DumpConfig
- type StateDB
- type Trie
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabaseWithConfig ¶
func NewDatabaseWithNodeDB ¶ added in v0.5.3
func WithConcurrentWorkers ¶ added in v0.7.1
func WithConcurrentWorkers(prefetchers int) ethstate.PrefetcherOption
Types ¶
type DumpAccount ¶
type DumpAccount = ethstate.DumpAccount
type DumpCollector ¶
type DumpCollector = ethstate.DumpCollector
type DumpConfig ¶
type DumpConfig = ethstate.DumpConfig
type StateDB ¶
StateDB structs within the ethereum protocol are used to store anything within the merkle trie. StateDBs take care of caching and storing nested states. It's the general query interface to retrieve:
* Contracts * Accounts
Once the state is committed, tries cached in stateDB (including account trie, storage tries) will no longer be functional. A new state instance must be created with new root and updated database for accessing post- commit states.
Click to show internal directories.
Click to hide internal directories.