@ethereumjs/vm / BlockBuilder
Defined in: vm/src/buildBlock.ts:77
Incrementally assembles a block by executing transactions against a VM.
Created via buildBlock; seals the header and transactions trie when finalized.
new BlockBuilder(
vm,opts):BlockBuilder
Defined in: vm/src/buildBlock.ts:118
BlockBuilder
blobGasUsed:
bigint=BIGINT_0
Defined in: vm/src/buildBlock.ts:94
The cumulative blob gas used by the blobs in a block
gasUsed:
bigint=BIGINT_0
Defined in: vm/src/buildBlock.ts:82
Cumulative gas used by transactions added to the block (header gasUsed).
Under EIP-8037 this is max(regular, state) of the two dimensions.
get minerValue():
bigint
Defined in: vm/src/buildBlock.ts:114
bigint
get transactionReceipts():
TxReceipt[]
Defined in: vm/src/buildBlock.ts:110
addTransaction(
tx,__namedParameters?):Promise<RunTxResult>
Defined in: vm/src/buildBlock.ts:257
Run and add a transaction to the block being built. Please note that this modifies the state of the VM. Throws if the transaction’s gasLimit is greater than the remaining gas in the block (EIP-8037: per-dimension remaining).
TypedTransaction
boolean
boolean
Promise<RunTxResult>
build(
sealOpts?):Promise<{block:Block;blockLevelAccessList:BlockLevelAccessList|undefined;requests:CLRequest<CLRequestType>[] |undefined; }>
Defined in: vm/src/buildBlock.ts:396
This method constructs the finalized block, including withdrawals and any CLRequests. It also:
nonce and mixHash,
which is validated along with the block number and difficulty by ethash.
For PoA, please pass blockOption.cliqueSigner into the buildBlock constructor,
as the signer will be awarded the txs amount spent on gas as they are added.Note: we add CLRequests here because they can be generated at any time during the lifecycle of a pending block so need to be provided only when the block is finalized.
Promise<{ block: Block; blockLevelAccessList: BlockLevelAccessList | undefined; requests: CLRequest<CLRequestType>[] | undefined; }>
getStatus():
BlockStatus
Defined in: vm/src/buildBlock.ts:179
BlockStatus
initState():
Promise<void>
Defined in: vm/src/buildBlock.ts:496
Promise<void>
logsBloom():
Uint8Array<ArrayBufferLike>
Defined in: vm/src/buildBlock.ts:196
Calculates and returns the logs bloom for the block.
Uint8Array<ArrayBufferLike>
receiptTrie():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: vm/src/buildBlock.ts:208
Calculates and returns the receiptTrie for the block.
Promise<Uint8Array<ArrayBufferLike>>
revert():
Promise<void>
Defined in: vm/src/buildBlock.ts:374
Reverts the checkpoint on the StateManager to reset the state from any transactions that have been run.
Promise<void>
transactionsTrie():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: vm/src/buildBlock.ts:186
Calculates and returns the transactionsTrie for the block.
Promise<Uint8Array<ArrayBufferLike>>