Versions in this module Expand all Collapse all v0 v0.0.2 Dec 21, 2022 v0.0.1 Dec 21, 2022 Changes in this version + type FullNode struct + func (c *FullNode) Hash() ([]byte, bool) + func (c *FullNode) SetHash(b []byte) []byte + type KVStorage struct + func (kv *KVStorage) Batch() ethdb.Batch + func (kv *KVStorage) Close() error + func (kv *KVStorage) Get(k []byte) ([]byte, bool, error) + func (kv *KVStorage) GetCode(hash types.Hash) ([]byte, bool) + func (kv *KVStorage) Set(k []byte, v []byte) error + func (kv *KVStorage) SetCode(hash types.Hash, code []byte) error + type Metrics struct + AccountStateLruCacheHit metrics.Counter + CodeLruCacheHit metrics.Counter + CodeLruCacheMiss metrics.Counter + CodeLruCacheRead metrics.Counter + CodeLruCacheWrite metrics.Counter + StateLruCacheMiss metrics.Counter + TrieStateLruCacheHit metrics.Counter + func GetPrometheusMetrics(namespace string, labelsWithValues ...string) *Metrics + func NewDummyMetrics(metrics *Metrics) *Metrics + func NilMetrics() *Metrics + type Node interface + Hash func() ([]byte, bool) + SetHash func(b []byte) []byte + func GetNode(root []byte, storage Storage) (Node, bool, error) + type Putter interface + Set func(k, v []byte) + type ShortNode struct + func (c *ShortNode) Hash() ([]byte, bool) + func (c *ShortNode) SetHash(b []byte) []byte + type State struct + func NewState(storage Storage, metrics *Metrics) *State + func (s *State) AddAccountState(root types.Hash, t *Trie) + func (s *State) AddTrieState(root types.Hash, t *Trie) + func (s *State) GetCode(hash types.Hash) ([]byte, bool) + func (s *State) NewSnapshot() state.Snapshot + func (s *State) NewSnapshotAt(root types.Hash) (state.Snapshot, error) + func (s *State) SetCode(hash types.Hash, code []byte) error + type Storage interface + Batch func() ethdb.Batch + Close func() error + Get func(k []byte) ([]byte, bool, error) + GetCode func(hash types.Hash) ([]byte, bool) + Set func(k, v []byte) error + SetCode func(hash types.Hash, code []byte) error + func NewKVStorage(db ethdb.Database) Storage + func NewMemoryStorage() Storage + type Trie struct + func NewTrie() *Trie + func (t *Trie) Commit(objs []*state.Object) (state.Snapshot, []byte) + func (t *Trie) Get(k []byte) ([]byte, bool) + func (t *Trie) Hash() types.Hash + func (t *Trie) TryUpdate(key, value []byte) error + func (t *Trie) Txn() *Txn + type Txn struct + func (t *Txn) Commit() *Trie + func (t *Txn) Delete(key []byte) + func (t *Txn) Hash() ([]byte, error) + func (t *Txn) Insert(key, value []byte) + func (t *Txn) Lookup(key []byte) []byte + type ValueNode struct + func (v *ValueNode) Hash() ([]byte, bool) + func (v *ValueNode) SetHash(b []byte) []byte