@ethereumjs/statemanager / StorageCache
Defined in: cache/storage.ts:20
Cachenew StorageCache(
opts):StorageCache
Defined in: cache/storage.ts:35
StorageCache
Cache.constructor
_checkpoints:
number=0
Defined in: cache/cache.ts:9
Cache._checkpoints
_debug:
Debugger
Defined in: cache/cache.ts:7
Cache._debug
_diffCache:
Map<string,DiffStorageCacheMap>[] =[]
Defined in: cache/storage.ts:33
Diff cache collecting the state of the cache at the beginning of checkpoint height (respectively: before a first modification)
If the whole cache element is undefined (in contrast to the account), the element didn’t exist in the cache before.
_lruCache:
LRUCache<string,StorageCacheMap,unknown> |undefined
Defined in: cache/storage.ts:21
_orderedMapCache:
OrderedMap<string,StorageCacheMap> |undefined
Defined in: cache/storage.ts:22
_stats:
object
Defined in: cache/cache.ts:11
deletions:
number=0
hits:
number=0
reads:
number=0
size:
number=0
writes:
number=0
Cache._stats
_saveCachePreState(
addressHex,keyHex):void
Defined in: cache/storage.ts:53
string
string
void
checkpoint():
void
Defined in: cache/storage.ts:302
Marks current state of cache as checkpoint, which can later on be reverted or committed.
void
clear():
void
Defined in: cache/storage.ts:344
Clears cache.
void
clearStorage(
address):void
Defined in: cache/storage.ts:176
Deletes all storage slots for address from the cache
Address
void
commit():
void
Defined in: cache/storage.ts:269
Commits to current state of cache (no effect on trie).
void
del(
address,key):void
Defined in: cache/storage.ts:146
Marks storage key for address as deleted in cache.
Address
Address
Uint8Array
Storage key
void
dump(
address):StorageCacheMap|undefined
Defined in: cache/storage.ts:360
Dumps the RLP-encoded storage values for an account specified by address.
Address
The address of the account to return storage for
StorageCacheMap | undefined
account or undefined if the account is not in the cacheflush(): [
string,string,Uint8Array<ArrayBufferLike> |undefined][]
Defined in: cache/storage.ts:189
Flushes cache by returning storage slots that have been modified or deleted and resetting the diff cache (at checkpoint height).
[string, string, Uint8Array<ArrayBufferLike> | undefined][]
get(
address,key):Uint8Array<ArrayBufferLike> |undefined
Defined in: cache/storage.ts:121
Returns the queried slot as the RLP encoded storage value hexToBytes(‘0x80’): slot is known to be empty undefined: slot is not in cache
Address
Address of account
Uint8Array
Storage key
Uint8Array<ArrayBufferLike> | undefined
Storage value or undefined
put(
address,key,value):void
Defined in: cache/storage.ts:82
Puts storage value to cache under address_key cache key.
Address
Account address
Uint8Array
Storage key
Uint8Array
void
revert():
void
Defined in: cache/storage.ts:227
Revert changes to cache last checkpoint (no effect on trie).
void
size():
number
Defined in: cache/storage.ts:314
Returns the size of the cache
number
stats(
reset):object
Defined in: cache/storage.ts:326
Returns a dict with cache stats
boolean = true
object
deletions:
number=0
hits:
number=0
reads:
number=0
size:
number=0
writes:
number=0