ethereumjs-monorepo

@ethereumjs/statemanager


@ethereumjs/statemanager / StatefulBinaryTreeStateManager

Class: StatefulBinaryTreeStateManager

Defined in: statefulBinaryTreeStateManager.ts:58

Implements

Constructors

Constructor

new StatefulBinaryTreeStateManager(opts): StatefulBinaryTreeStateManager

Defined in: statefulBinaryTreeStateManager.ts:86

Parameters

opts

StatefulBinaryTreeStateManagerOpts

Returns

StatefulBinaryTreeStateManager

Properties

hashFunction()

hashFunction: (input) => Uint8Array

Defined in: statefulBinaryTreeStateManager.ts:64

Parameters

input

Uint8Array

Returns

Uint8Array


originalStorageCache

originalStorageCache: OriginalStorageCache

Defined in: statefulBinaryTreeStateManager.ts:63

Implementation of

StateManagerInterface.originalStorageCache


preStateRoot

preStateRoot: Uint8Array

Defined in: statefulBinaryTreeStateManager.ts:62

Methods

checkChunkWitnessPresent()

checkChunkWitnessPresent(_address, _codeOffset): Promise<boolean>

Defined in: statefulBinaryTreeStateManager.ts:738

Parameters

_address

Address

_codeOffset

number

Returns

Promise<boolean>

Implementation of

StateManagerInterface.checkChunkWitnessPresent


checkpoint()

checkpoint(): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:450

Returns

Promise<void>

Implementation of

StateManagerInterface.checkpoint


clearCaches()

clearCaches(): void

Defined in: statefulBinaryTreeStateManager.ts:732

Returns

void

Implementation of

StateManagerInterface.clearCaches


clearStorage()

clearStorage(address): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:446

Parameters

address

Address

Returns

Promise<void>

Implementation of

StateManagerInterface.clearStorage


commit()

commit(): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:455

Returns

Promise<void>

Implementation of

StateManagerInterface.commit


deleteAccount()

deleteAccount(address): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:245

Deletes an account from state under the provided address.

Parameters

address

Address

Address of the account which should be deleted

Returns

Promise<void>

Implementation of

StateManagerInterface.deleteAccount


dumpStorage()?

optional dumpStorage(_address): Promise<StorageDump>

Defined in: statefulBinaryTreeStateManager.ts:726

Parameters

_address

Address

Returns

Promise<StorageDump>

Implementation of

StateManagerInterface.dumpStorage


dumpStorageRange()?

optional dumpStorageRange(_address, _startKey, _limit): Promise<StorageRange>

Defined in: statefulBinaryTreeStateManager.ts:729

Parameters

_address

Address

_startKey

bigint

_limit

number

Returns

Promise<StorageRange>

Implementation of

StateManagerInterface.dumpStorageRange


flush()

flush(): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:481

Returns

Promise<void>


generateCanonicalGenesis()

generateCanonicalGenesis(genesisState): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:741

Parameters

genesisState

GenesisState

Returns

Promise<void>

Implementation of

StateManagerInterface.generateCanonicalGenesis


getAccount()

getAccount(address): Promise<undefined | Account>

Defined in: statefulBinaryTreeStateManager.ts:118

Gets the account associated with address or undefined if account does not exist

Parameters

address

Address

Address of the account to get

Returns

Promise<undefined | Account>

Implementation of

StateManagerInterface.getAccount


getCode()

getCode(address): Promise<Uint8Array<ArrayBufferLike>>

Defined in: statefulBinaryTreeStateManager.ts:324

Parameters

address

Address

Returns

Promise<Uint8Array<ArrayBufferLike>>

Implementation of

StateManagerInterface.getCode


getCodeSize()

getCodeSize(address): Promise<number>

Defined in: statefulBinaryTreeStateManager.ts:399

Parameters

address

Address

Returns

Promise<number>

Implementation of

StateManagerInterface.getCodeSize


getComputedValue()

getComputedValue(accessedState): Promise<null | `0x${string}`>

Defined in: statefulBinaryTreeStateManager.ts:521

Parameters

accessedState

BinaryTreeAccessedStateWithAddress

Returns

Promise<null | `0x${string}`>


getStateRoot()

getStateRoot(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: statefulBinaryTreeStateManager.ts:714

Returns

Promise<Uint8Array<ArrayBufferLike>>

Implementation of

StateManagerInterface.getStateRoot


getStorage()

getStorage(address, key): Promise<Uint8Array<ArrayBufferLike>>

Defined in: statefulBinaryTreeStateManager.ts:408

Parameters

address

Address

key

Uint8Array

Returns

Promise<Uint8Array<ArrayBufferLike>>

Implementation of

StateManagerInterface.getStorage


hasStateRoot()

hasStateRoot(root): Promise<boolean>

Defined in: statefulBinaryTreeStateManager.ts:723

Parameters

root

Uint8Array

Returns

Promise<boolean>

Implementation of

StateManagerInterface.hasStateRoot


initBinaryTreeExecutionWitness()

initBinaryTreeExecutionWitness(_blockNum, executionWitness?): void

Defined in: statefulBinaryTreeStateManager.ts:165

Parameters

_blockNum

bigint

executionWitness?
null BinaryTreeExecutionWitness

Returns

void

Implementation of

StateManagerInterface.initBinaryTreeExecutionWitness


modifyAccountFields()

modifyAccountFields(address, accountFields): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:263

Parameters

address

Address

accountFields

Partial

Returns

Promise<void>

Implementation of

StateManagerInterface.modifyAccountFields


putAccount()

putAccount(address, account?): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:209

Saves an account into state under the provided address.

Parameters

address

Address

Address under which to store account

account?

Account

The account to store or undefined if to be deleted

Returns

Promise<void>

Implementation of

StateManagerInterface.putAccount


putCode()

putCode(address, value): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:266

Parameters

address

Address

value

Uint8Array

Returns

Promise<void>

Implementation of

StateManagerInterface.putCode


putStorage()

putStorage(address, key, value): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:434

Parameters

address

Address

key

Uint8Array

value

Uint8Array

Returns

Promise<void>

Implementation of

StateManagerInterface.putStorage


revert()

revert(): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:469

Returns

Promise<void>

Implementation of

StateManagerInterface.revert


setStateRoot()

setStateRoot(stateRoot, clearCache?): Promise<void>

Defined in: statefulBinaryTreeStateManager.ts:718

Parameters

stateRoot

Uint8Array

clearCache?

boolean

Returns

Promise<void>

Implementation of

StateManagerInterface.setStateRoot


shallowCopy()

shallowCopy(_downlevelCaches?): StateManagerInterface

Defined in: statefulBinaryTreeStateManager.ts:735

Parameters

_downlevelCaches?

boolean

Returns

StateManagerInterface

Implementation of

StateManagerInterface.shallowCopy


verifyBinaryTreePostState()

verifyBinaryTreePostState(accessWitness): Promise<boolean>

Defined in: statefulBinaryTreeStateManager.ts:615

Parameters

accessWitness

BinaryTreeAccessWitnessInterface

Returns

Promise<boolean>

Implementation of

StateManagerInterface.verifyBinaryTreePostState