Appearance
testing_buildBlockV1
not served
Builds a block on top of a given parentHash using the provided parameters. This is a testing-only method for generating test fixtures.
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
parentBlockHashas its parent. - The client MUST use the provided
payloadAttributesto define the context of the new block. - If the
transactionsparameter is an empty array[], the client MUST build an empty block (no transactions). - If the
transactionsparameter is JSONnull, the client MAY build a block from its local transaction pool (mempool). - If the
transactionsparameter 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
extraDatais provided, the client MUST set theextraDatafield 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.
Not served yet
Cinder does not serve this method. A test-only method of the specification. Cinder tests with EEST fixtures instead.
INFO
This page is generated from the specification. The text comes from the OpenRPC description of the method.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Parent block hash | string | yes | 32 byte hex value |
Payload attributes | object | yes | PayloadAttributesV3 |
Transactions | string[] or null | yes | 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 | hex encoded bytes or null | no | Data to be set as the extraData field of the built block. If provided, the client MUST use this exact value. |
Returns
object: Response object
Errors
| Code | Message |
|---|---|
| -32602 | Invalid parameters |
| -32603 | Internal error |
Specification
The official specification: testing_buildBlockV1 in ethereum/execution-apis.
Schema (OpenRPC)
Parameter Parent block hash: string
json
{
"pattern": "^0x[0-9a-f]{64}$",
"title": "32 byte hex value",
"type": "string"
}Parameter Payload attributes: object
json
{
"properties": {
"parentBeaconBlockRoot": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "32 byte hex value",
"type": "string"
},
"prevRandao": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "32 byte hex value",
"type": "string"
},
"suggestedFeeRecipient": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"title": "hex encoded address",
"type": "string"
},
"timestamp": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"title": "hex encoded unsigned integer",
"type": "string"
},
"withdrawals": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"title": "recipient address for withdrawal value",
"type": "string"
},
"amount": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$",
"title": "value contained in withdrawal",
"type": "string"
},
"index": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "index of withdrawal",
"type": "string"
},
"validatorIndex": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "index of validator that generated withdrawal",
"type": "string"
}
},
"required": [
"index",
"validatorIndex",
"address",
"amount"
],
"title": "Validator withdrawal",
"type": "object"
},
"title": "Withdrawals",
"type": "array"
}
},
"title": "PayloadAttributesV3",
"type": "object"
}Parameter Transactions: string[] or null
json
{
"oneOf": [
{
"items": {
"pattern": "^0x[0-9a-f]*$",
"title": "hex encoded bytes",
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Transactions"
}Parameter Extra data: hex encoded bytes or null
json
{
"oneOf": [
{
"pattern": "^0x[0-9a-f]*$",
"title": "hex encoded bytes",
"type": "string"
},
{
"type": "null"
}
]
}Result: object
json
{
"properties": {
"blobsBundle": {
"properties": {
"blobs": {
"items": {
"pattern": "^0x[0-9a-f]*$",
"title": "hex encoded bytes",
"type": "string"
},
"title": "Blobs",
"type": "array"
},
"commitments": {
"items": {
"pattern": "^0x[0-9a-f]{96}$",
"title": "48 hex encoded bytes",
"type": "string"
},
"title": "Commitments",
"type": "array"
},
"proofs": {
"items": {
"pattern": "^0x[0-9a-f]{96}$",
"title": "48 hex encoded bytes",
"type": "string"
},
"title": "Proofs",
"type": "array"
}
},
"required": [
"commitments",
"proofs",
"blobs"
],
"title": "Blobs bundle",
"type": "object"
},
"blockValue": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$",
"title": "Expected block value",
"type": "string"
},
"executionPayload": {
"properties": {
"baseFeePerGas": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$",
"title": "Base fee per gas",
"type": "string"
},
"blobGasUsed": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Blob gas used",
"type": "string"
},
"blockHash": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "Block hash",
"type": "string"
},
"blockNumber": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Block number",
"type": "string"
},
"excessBlobGas": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Excess blob gas",
"type": "string"
},
"extraData": {
"pattern": "^0x[0-9a-f]{0,64}$",
"title": "Extra data",
"type": "string"
},
"feeRecipient": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"title": "Recipient of transaction priority fees",
"type": "string"
},
"gasLimit": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Gas limit",
"type": "string"
},
"gasUsed": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Gas used",
"type": "string"
},
"logsBloom": {
"pattern": "^0x[0-9a-f]{512}$",
"title": "Bloom filter",
"type": "string"
},
"parentHash": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "Parent block hash",
"type": "string"
},
"prevRandao": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "Previous randao value",
"type": "string"
},
"receiptsRoot": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "Receipts root",
"type": "string"
},
"stateRoot": {
"pattern": "^0x[0-9a-f]{64}$",
"title": "State root",
"type": "string"
},
"timestamp": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Timestamp",
"type": "string"
},
"transactions": {
"items": {
"pattern": "^0x[0-9a-f]*$",
"title": "hex encoded bytes",
"type": "string"
},
"title": "Transactions",
"type": "array"
},
"withdrawals": {
"items": {
"properties": {
"address": {
"pattern": "^0x[0-9a-fA-F]{40}$",
"title": "Withdrawal address",
"type": "string"
},
"amount": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Withdrawal amount",
"type": "string"
},
"index": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Withdrawal index",
"type": "string"
},
"validatorIndex": {
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
"title": "Validator index",
"type": "string"
}
},
"required": [
"index",
"validatorIndex",
"address",
"amount"
],
"title": "Withdrawal object V1",
"type": "object"
},
"title": "Withdrawals",
"type": "array"
}
},
"required": [
"parentHash",
"feeRecipient",
"stateRoot",
"receiptsRoot",
"logsBloom",
"prevRandao",
"blockNumber",
"gasLimit",
"gasUsed",
"timestamp",
"extraData",
"baseFeePerGas",
"blockHash",
"transactions",
"withdrawals",
"blobGasUsed",
"excessBlobGas"
],
"title": "Execution payload",
"type": "object"
},
"executionRequests": {
"items": {
"pattern": "^0x[0-9a-f]*$",
"title": "hex encoded bytes",
"type": "string"
},
"title": "Execution requests",
"type": "array"
},
"shouldOverrideBuilder": {
"title": "Should override builder flag",
"type": "boolean"
}
},
"required": [
"executionPayload",
"blockValue",
"blobsBundle",
"shouldOverrideBuilder"
],
"title": "Response object",
"type": "object"
}