testing_buildBlockV1
This method is a debugging and testing tool that simplifies the block production process into a single call.
**Specification:** - The client MUST build a new execution payload using the block specified by `parentBlockHash` as its parent. - The client MUST use the provided `payloadAttributes` to define the context of the new block. - If the `transactions` parameter is an empty array `[]`, the client MUST build an empty block (no transactions). - If the `transactions` parameter is JSON `null`, the client MAY build a block from its local transaction pool (mempool). - If the `transactions` parameter is a non-empty array, the client MUST include all transactions from the array on the block's transaction list, in the order they were provided, and MUST NOT include any transactions from its local transaction pool. - If `extraData` is provided, the client MUST set the `extraData` field of the resulting payload to this value. - This method MUST NOT modify the client's canonical chain or head block. It is a read-only method for payload generation.
**Security Considerations:** - This method is intended for testing environments ONLY and MUST NOT be exposed on public-facing RPC APIs. - It is strongly recommended that this method be disabled by default.
Builds a block on top of a given parentHash using the provided parameters. This is a testing-only method for generating test fixtures.
Parameters (by position)
Parent block hash string required
Payload attributes object required
PayloadAttributesV3
Show Payload attributes object
Payload attributes objectPayload attributes fields
-
parentBeaconBlockRoot
string32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
prevRandao
string32 byte hex value
Match pattern:
^0x[0-9a-f]{64}$
-
suggestedFeeRecipient
stringhex encoded address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
timestamp
stringhex encoded unsigned integer
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
withdrawals
array<object>Validator withdrawal
Show
withdrawalsobjectwithdrawalsfields-
address
stringrequiredrecipient address for withdrawal value
Match pattern:
^0x[0-9a-fA-F]{40}$
-
amount
stringrequiredvalue contained in withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
index
stringrequiredindex of withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
validatorIndex
stringrequiredindex of validator that generated withdrawal
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
additionalProperties
false
-
-
additionalProperties
true
Transactions array<string> or null required
An array of raw, signed transactions (hex-encoded) to include in the generated block, or null.
- If an empty array
[]: The client MUST build an empty block (no transactions). - If
null: The client MAY build a block from its local transaction pool (mempool). - If a non-empty array: The client MUST include ALL transactions from this array in the resulting block, in the order provided, and MUST NOT include any transactions from its local mempool.
Show Option 1 Transactions array
Transactions arrayTransactions fields
An array of raw, signed transactions (hex-encoded) to include in the generated block, or null.
- If an empty array
[]: The client MUST build an empty block (no transactions). - If
null: The client MAY build a block from its local transaction pool (mempool). - If a non-empty array: The client MUST include ALL transactions from this array in the resulting block, in the order provided, and MUST NOT include any transactions from its local mempool.
Transactions array<string> required
An array of raw, signed transactions (hex-encoded) to include in the generated block, or null.
- If an empty array
[]: The client MUST build an empty block (no transactions). - If
null: The client MAY build a block from its local transaction pool (mempool). - If a non-empty array: The client MUST include ALL transactions from this array in the resulting block, in the order provided, and MUST NOT include any transactions from its local mempool.
Match pattern: ^0x[0-9a-f]*$
Show Option 2 Transactions null
Transactions nullTransactions fields
An array of raw, signed transactions (hex-encoded) to include in the generated block, or null.
- If an empty array
[]: The client MUST build an empty block (no transactions). - If
null: The client MAY build a block from its local transaction pool (mempool). - If a non-empty array: The client MUST include ALL transactions from this array in the resulting block, in the order provided, and MUST NOT include any transactions from its local mempool.
Transactions null required
An array of raw, signed transactions (hex-encoded) to include in the generated block, or null.
- If an empty array
[]: The client MUST build an empty block (no transactions). - If
null: The client MAY build a block from its local transaction pool (mempool). - If a non-empty array: The client MUST include ALL transactions from this array in the resulting block, in the order provided, and MUST NOT include any transactions from its local mempool.
Extra data string or null
Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value.
Show Option 1 hex encoded bytes string
hex encoded bytes stringhex encoded bytes fields
Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value.
Extra data string
Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value.
Match pattern: ^0x[0-9a-f]*$
Show Option 2 Extra data null
Extra data nullExtra data fields
Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value.
Extra data null
Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value.
Result
Response object object
Response object
Show Response object object
Response object objectResponse object fields
-
blobsBundle
objectrequiredBlobs bundle
Show
blobsBundleobjectblobsBundlefields-
blobs
array<string>requiredhex encoded bytes
Match pattern:
^0x[0-9a-f]*$
-
commitments
array<string>required48 hex encoded bytes
Match pattern:
^0x[0-9a-f]{96}$
-
proofs
array<string>required48 hex encoded bytes
Match pattern:
^0x[0-9a-f]{96}$
-
additionalProperties
true
-
-
blockValue
stringrequiredExpected block value
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
executionPayload
objectrequiredExecution payload
Show
executionPayloadobjectexecutionPayloadfields-
baseFeePerGas
stringrequiredBase fee per gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,63})$
-
blobGasUsed
stringrequiredBlob gas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
blockHash
stringrequiredBlock hash
Match pattern:
^0x[0-9a-f]{64}$
-
blockNumber
stringrequiredBlock number
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
excessBlobGas
stringrequiredExcess blob gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
extraData
stringrequiredExtra data
Match pattern:
^0x[0-9a-f]{0,64}$
-
feeRecipient
stringrequiredRecipient of transaction priority fees
Match pattern:
^0x[0-9a-fA-F]{40}$
-
gasLimit
stringrequiredGas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
gasUsed
stringrequiredGas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
logsBloom
stringrequiredBloom filter
Match pattern:
^0x[0-9a-f]{512}$
-
parentHash
stringrequiredParent block hash
Match pattern:
^0x[0-9a-f]{64}$
-
prevRandao
stringrequiredPrevious randao value
Match pattern:
^0x[0-9a-f]{64}$
-
receiptsRoot
stringrequiredReceipts root
Match pattern:
^0x[0-9a-f]{64}$
-
stateRoot
stringrequiredState root
Match pattern:
^0x[0-9a-f]{64}$
-
timestamp
stringrequiredTimestamp
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
transactions
array<string>requiredhex encoded bytes
Match pattern:
^0x[0-9a-f]*$
-
withdrawals
array<object>requiredWithdrawal object V1
Show
withdrawalsobjectwithdrawalsfields-
address
stringrequiredWithdrawal address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
amount
stringrequiredWithdrawal amount
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
index
stringrequiredWithdrawal index
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
validatorIndex
stringrequiredValidator index
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
additionalProperties
true
-
-
additionalProperties
true
-
-
executionRequests
array<string>hex encoded bytes
Match pattern:
^0x[0-9a-f]*$
-
shouldOverrideBuilder
booleanrequiredShould override builder flag
-
additionalProperties
true
Errors
Error code: -32602
-
code
-32602
-
message
Invalid parameters
Error code: -32603
-
code
-32603
-
message
Internal error
Examples
testing_buildBlockV1 example
Request
{
"params": [
"0xe27a3e81bd7cfe2aec2cc9e832c73a17c93e7efcf659cf4b39883b96c48708c2",
{
"parentBeaconBlockRoot": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884365149a42212e8822",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"suggestedFeeRecipient": "0x0000000000000000000000000000000000000000",
"timestamp": "0x1ce",
"withdrawals": []
},
[],
null
]
}
Response
{
"blobsBundle": {
"blobs": [],
"commitments": [],
"proofs": []
},
"blockValue": "0x0",
"executionPayload": {
"baseFeePerGas": "0x7",
"blobGasUsed": "0x0",
"blockHash": "0x1234567890123456789012345678901234567890123456789012345678901234",
"blockNumber": "0x1",
"excessBlobGas": "0x0",
"extraData": "0x",
"feeRecipient": "0x0000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380",
"gasUsed": "0x0",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xe27a3e81bd7cfe2aec2cc9e832c73a17c93e7efcf659cf4b39883b96c48708c2",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",
"timestamp": "0x1ce",
"transactions": [],
"withdrawals": []
},
"shouldOverrideBuilder": false
}