@ethereumjs/common / BinaryTreeStateManagerInterface
Defined in: interfaces.ts:146
Minimal surface of a binary-tree-backed state manager as required for
binary execution witness generation (see generateBinaryExecutionWitness
in the @ethereumjs/evm package).
StatefulBinaryTreeStateManager from @ethereumjs/statemanager implements
this interface; custom state managers can implement it to support witness
generation without depending on the concrete class.
The tree shape is structural (rather than referencing the BinaryTree
class) so that this package does not depend on @ethereumjs/binarytree;
BinaryTree satisfies it.
readonlytree:object
Defined in: interfaces.ts:154
The underlying binary tree holding the state.
get(
stem,suffixes):Promise<(Uint8Array<ArrayBufferLike> |null)[]>
Retrieves the values at the given suffixes of the node at stem.
Uint8Array
number[]
Promise<(Uint8Array<ArrayBufferLike> | null)[]>
root(
value?):Uint8Array
Gets (no argument) and/or sets (Uint8Array argument) the current root
of the tree.
Uint8Array<ArrayBufferLike> | null
Uint8Array
withLock<
T>(operation):Promise<T>
Runs operation while holding the tree’s internal lock, releasing the
lock when the returned promise settles.
T
() => Promise<T>
Promise<T>
getStateRoot():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: interfaces.ts:150
Gets the current state root of the underlying tree.
Promise<Uint8Array<ArrayBufferLike>>