Skip to main content

Try It Now Dialog

debug_getBadBlocks


Method

  • JSON-RPC method name: debug_getBadBlocks
  • JSON-RPC version: 2.0

Parameters

This method does not accept any parameters.

Result

  • Name: Blocks
  • Type: object[]

Result schema

{
"title": "Bad block array",
"type": "array",
"items": {
"title": "Bad block",
"type": "object",
"required": [
"block",
"hash",
"rlp"
],
"additionalProperties": false,
"properties": {
"block": {
"title": "Block",
"type": "object",
"required": [
"hash",
"parentHash",
"sha3Uncles",
"miner",
"stateRoot",
"transactionsRoot",
"receiptsRoot",
"logsBloom",
"number",
"gasLimit",
"gasUsed",
"timestamp",
"extraData",
"mixHash",
"nonce",
"size",
"transactions",
"uncles"
],
"properties": {
"hash": {
"title": "Hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"parentHash": {
"title": "Parent block hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"sha3Uncles": {
"title": "Ommers hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"miner": {
"title": "Coinbase",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"stateRoot": {
"title": "State root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"transactionsRoot": {
"title": "Transactions root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"receiptsRoot": {
"title": "Receipts root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"logsBloom": {
"title": "Bloom filter",
"type": "string",
"pattern": "^0x[0-9a-f]{512}$"
},
"difficulty": {
"title": "Difficulty",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"number": {
"title": "Number",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasLimit": {
"title": "Gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasUsed": {
"title": "Gas used",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"timestamp": {
"title": "Timestamp",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"extraData": {
"title": "Extra data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"mixHash": {
"title": "Mix hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"nonce": {
"title": "Nonce",
"type": "string",
"pattern": "^0x[0-9a-f]{16}$"
},
"baseFeePerGas": {
"title": "Base fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"withdrawalsRoot": {
"title": "Withdrawals root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"blobGasUsed": {
"title": "Blob gas used",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"excessBlobGas": {
"title": "Excess blob gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"parentBeaconBlockRoot": {
"title": "Parent Beacon Block Root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"size": {
"title": "Block size",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"transactions": {
"anyOf": [
{
"title": "Transaction hashes",
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
},
{
"title": "Full transactions",
"type": "array",
"items": {
"type": "object",
"title": "Transaction information",
"required": [
"blockHash",
"blockNumber",
"from",
"hash",
"transactionIndex"
],
"oneOf": [
{
"title": "Signed 7702 Transaction",
"type": "object",
"required": [
"accessList",
"authorizationList",
"chainId",
"gas",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
],
"properties": {
"type": {
"title": "type",
"type": "string",
"pattern": "^0x4$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"gas": {
"title": "gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "value",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "input data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"maxPriorityFeePerGas": {
"title": "max priority fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei"
},
"maxFeePerGas": {
"title": "max fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei"
},
"gasPrice": {
"title": "gas price",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward."
},
"accessList": {
"title": "accessList",
"type": "array",
"description": "EIP-2930 access lists",
"items": {
"title": "Access list entry",
"type": "object",
"required": [
"address",
"storageKeys"
],
"additionalProperties": false,
"properties": {
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}
},
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID that this transaction is valid on"
},
"authorizationList": {
"title": "authorizationList",
"description": "List of authorizations for the transaction",
"type": "array",
"items": {
"type": "object",
"required": [
"chainId",
"nonce",
"address",
"yParity",
"r",
"s"
],
"properties": {
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID on which this transaction is valid"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"yParity": {
"title": "yParity",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature"
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
}
}
}
},
"yParity": {
"title": "yParity",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature."
},
"v": {
"title": "v",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`."
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
},
{
"title": "Signed 4844 Transaction",
"type": "object",
"required": [
"accessList",
"blobVersionedHashes",
"chainId",
"gas",
"input",
"maxFeePerBlobGas",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
],
"properties": {
"type": {
"title": "type",
"type": "string",
"pattern": "^0x3$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"gas": {
"title": "gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "value",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "input data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"maxPriorityFeePerGas": {
"title": "max priority fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei"
},
"maxFeePerGas": {
"title": "max fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei"
},
"maxFeePerBlobGas": {
"title": "max fee per blob gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The maximum total fee per gas the sender is willing to pay for blob gas in wei"
},
"gasPrice": {
"title": "gas price",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward."
},
"accessList": {
"title": "accessList",
"type": "array",
"description": "EIP-2930 access list",
"items": {
"title": "Access list entry",
"type": "object",
"required": [
"address",
"storageKeys"
],
"additionalProperties": false,
"properties": {
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}
},
"blobVersionedHashes": {
"title": "blobVersionedHashes",
"description": "List of versioned blob hashes associated with the transaction's EIP-4844 data blobs",
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID that this transaction is valid on"
},
"yParity": {
"title": "yParity",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature."
},
"v": {
"title": "v",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`."
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
},
{
"title": "Signed 1559 Transaction",
"type": "object",
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
],
"properties": {
"type": {
"title": "type",
"type": "string",
"pattern": "^0x2$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"title": "Contract Creation (null)",
"type": "null"
},
{
"title": "Address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"gas": {
"title": "gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "value",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "input data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"maxPriorityFeePerGas": {
"title": "max priority fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Maximum fee per gas the sender is willing to pay to miners in wei"
},
"maxFeePerGas": {
"title": "max fee per gas",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei"
},
"gasPrice": {
"title": "gas price",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward."
},
"accessList": {
"title": "accessList",
"type": "array",
"description": "EIP-2930 access list",
"items": {
"title": "Access list entry",
"type": "object",
"required": [
"address",
"storageKeys"
],
"additionalProperties": false,
"properties": {
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}
},
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID that this transaction is valid on."
},
"yParity": {
"title": "yParity",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature."
},
"v": {
"title": "v",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`."
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
},
{
"title": "Signed 2930 Transaction",
"type": "object",
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
],
"properties": {
"type": {
"title": "type",
"type": "string",
"pattern": "^0x1$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"title": "Contract Creation (null)",
"type": "null"
},
{
"title": "Address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"gas": {
"title": "gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "value",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "input data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"gasPrice": {
"title": "gas price",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The gas price willing to be paid by the sender in wei"
},
"accessList": {
"title": "accessList",
"type": "array",
"description": "EIP-2930 access list",
"items": {
"title": "Access list entry",
"type": "object",
"required": [
"address",
"storageKeys"
],
"additionalProperties": false,
"properties": {
"address": {
"title": "hex encoded address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"storageKeys": {
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
}
}
},
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID that this transaction is valid on."
},
"yParity": {
"title": "yParity",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature."
},
"v": {
"title": "v",
"type": "string",
"pattern": "^0x([0-9a-fA-F]?){1,2}$",
"description": "For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`."
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
},
{
"title": "Signed Legacy Transaction",
"type": "object",
"required": [
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"v",
"value"
],
"properties": {
"type": {
"title": "type",
"type": "string",
"pattern": "^0x0$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"to": {
"title": "to address",
"oneOf": [
{
"title": "Contract Creation (null)",
"type": "null"
},
{
"title": "Address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
]
},
"gas": {
"title": "gas limit",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"value": {
"title": "value",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"input": {
"title": "input data",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
},
"gasPrice": {
"title": "gas price",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "The gas price willing to be paid by the sender in wei"
},
"chainId": {
"title": "chainId",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
"description": "Chain ID that this transaction is valid on."
},
"v": {
"title": "v",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"r": {
"title": "r",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"s": {
"title": "s",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
}
],
"properties": {
"blockHash": {
"title": "block hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"blockNumber": {
"title": "block number",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"from": {
"title": "from address",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"hash": {
"title": "transaction hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"transactionIndex": {
"title": "transaction index",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
}
}
}
]
},
"withdrawals": {
"title": "Withdrawals",
"type": "array",
"items": {
"type": "object",
"title": "Validator withdrawal",
"required": [
"index",
"validatorIndex",
"address",
"amount"
],
"additionalProperties": false,
"properties": {
"index": {
"title": "index of withdrawal",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$"
},
"validatorIndex": {
"title": "index of validator that generated withdrawal",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$"
},
"address": {
"title": "recipient address for withdrawal value",
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"amount": {
"title": "value contained in withdrawal",
"type": "string",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
}
}
}
},
"uncles": {
"title": "Uncles",
"type": "array",
"items": {
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"requestsHash": {
"title": "EIP-7685 requests hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}
}
},
"hash": {
"title": "Hash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"rlp": {
"title": "RLP",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
}
}
}
}

Errors

This method may return JSON-RPC standard errors (e.g. -32600, -32601, -32602, -32603) as well as application-specific errors.

TODO: Document method-specific error codes and conditions.