← Celo overview
Celo · debug
debug_getBadBlocks
Returns an array of recent bad blocks that the client has seen on the network.
Result
Blocks
Schema
{
"type": "array",
"title": "Bad block array",
"items": {
"type": "object",
"title": "Bad block",
"properties": {
"block": {
"type": "object",
"title": "Block",
"properties": {
"baseFeePerGas": {
"type": "string",
"title": "Base fee per gas",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"blobGasUsed": {
"type": "string",
"title": "Blob gas used",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"blockAccessListHash": {
"type": "string",
"title": "EIP-7928 block access list hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"difficulty": {
"type": "string",
"title": "Difficulty",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"excessBlobGas": {
"type": "string",
"title": "Excess blob gas",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"extraData": {
"type": "string",
"title": "Extra data",
"pattern": "^0x[0-9a-f]*$"
},
"gasLimit": {
"type": "string",
"title": "Gas limit",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"gasUsed": {
"type": "string",
"title": "Gas used",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"hash": {
"type": "string",
"title": "Hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"logsBloom": {
"type": "string",
"title": "Bloom filter",
"pattern": "^0x[0-9a-f]{512}$"
},
"miner": {
"type": "string",
"title": "Coinbase",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"mixHash": {
"type": "string",
"title": "Mix hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"nonce": {
"type": "string",
"title": "Nonce",
"pattern": "^0x[0-9a-f]{16}$"
},
"number": {
"type": "string",
"title": "Number",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"parentBeaconBlockRoot": {
"type": "string",
"title": "Parent Beacon Block Root",
"pattern": "^0x[0-9a-f]{64}$"
},
"parentHash": {
"type": "string",
"title": "Parent block hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"receiptsRoot": {
"type": "string",
"title": "Receipts root",
"pattern": "^0x[0-9a-f]{64}$"
},
"requestsHash": {
"type": "string",
"title": "EIP-7685 requests hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"sha3Uncles": {
"type": "string",
"title": "Ommers hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"size": {
"type": "string",
"title": "Block size",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"stateRoot": {
"type": "string",
"title": "State root",
"pattern": "^0x[0-9a-f]{64}$"
},
"timestamp": {
"type": "string",
"title": "Timestamp",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"transactions": {
"anyOf": [
{
"type": "array",
"title": "Transaction hashes",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
},
{
"type": "array",
"title": "Full transactions",
"items": {
"type": "object",
"title": "Transaction information",
"properties": {
"blockHash": {
"type": "string",
"title": "block hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"blockNumber": {
"type": "string",
"title": "block number",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"blockTimestamp": {
"type": "string",
"title": "block timestamp",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
},
"from": {
"type": "string",
"title": "from address",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"hash": {
"type": "string",
"title": "transaction hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"transactionIndex": {
"type": "string",
"title": "transaction index",
"pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
}
},
"required": [
"blockHash",
"blockNumber",
"blockTimestamp",
"from",
"hash",
"transactionIndex"
],
"oneOf": [
{
"type": "object",
"title": "Signed 7702 Transaction",
"properties": {
"accessList": {
"type": "unknown"
},
"authorizationList": {
"type": "unknown"
},
"chainId": {
"type": "unknown"
},
"gas": {
"type": "unknown"
},
"gasPrice": {
"type": "unknown"
},
"input": {
"type": "unknown"
},
"maxFeePerGas": {
"type": "unknown"
},
"maxPriorityFeePerGas": {
"type": "unknown"
},
"nonce": {
"type": "unknown"
},
"r": {
"type": "unknown"
},
"s": {
"type": "unknown"
},
"to": {
"type": "unknown"
},
"type": {
"type": "unknown"
},
"v": {
"type": "unknown"
},
"value": {
"type": "unknown"
},
"yParity": {
"type": "unknown"
}
},
"required": [
"accessList",
"authorizationList",
"chainId",
"gas",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 4844 Transaction",
"properties": {
"accessList": {
"type": "unknown"
},
"blobVersionedHashes": {
"type": "unknown"
},
"chainId": {
"type": "unknown"
},
"gas": {
"type": "unknown"
},
"gasPrice": {
"type": "unknown"
},
"input": {
"type": "unknown"
},
"maxFeePerBlobGas": {
"type": "unknown"
},
"maxFeePerGas": {
"type": "unknown"
},
"maxPriorityFeePerGas": {
"type": "unknown"
},
"nonce": {
"type": "unknown"
},
"r": {
"type": "unknown"
},
"s": {
"type": "unknown"
},
"to": {
"type": "unknown"
},
"type": {
"type": "unknown"
},
"v": {
"type": "unknown"
},
"value": {
"type": "unknown"
},
"yParity": {
"type": "unknown"
}
},
"required": [
"accessList",
"blobVersionedHashes",
"chainId",
"gas",
"input",
"maxFeePerBlobGas",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"to",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 1559 Transaction",
"properties": {
"accessList": {
"type": "unknown"
},
"chainId": {
"type": "unknown"
},
"gas": {
"type": "unknown"
},
"gasPrice": {
"type": "unknown"
},
"input": {
"type": "unknown"
},
"maxFeePerGas": {
"type": "unknown"
},
"maxPriorityFeePerGas": {
"type": "unknown"
},
"nonce": {
"type": "unknown"
},
"r": {
"type": "unknown"
},
"s": {
"type": "unknown"
},
"to": {
"type": "unknown"
},
"type": {
"type": "unknown"
},
"v": {
"type": "unknown"
},
"value": {
"type": "unknown"
},
"yParity": {
"type": "unknown"
}
},
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"maxFeePerGas",
"maxPriorityFeePerGas",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed 2930 Transaction",
"properties": {
"accessList": {
"type": "unknown"
},
"chainId": {
"type": "unknown"
},
"gas": {
"type": "unknown"
},
"gasPrice": {
"type": "unknown"
},
"input": {
"type": "unknown"
},
"nonce": {
"type": "unknown"
},
"r": {
"type": "unknown"
},
"s": {
"type": "unknown"
},
"to": {
"type": "unknown"
},
"type": {
"type": "unknown"
},
"v": {
"type": "unknown"
},
"value": {
"type": "unknown"
},
"yParity": {
"type": "unknown"
}
},
"required": [
"accessList",
"chainId",
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"value",
"yParity"
]
},
{
"type": "object",
"title": "Signed Legacy Transaction",
"properties": {
"chainId": {
"type": "unknown"
},
"gas": {
"type": "unknown"
},
"gasPrice": {
"type": "unknown"
},
"input": {
"type": "unknown"
},
"nonce": {
"type": "unknown"
},
"r": {
"type": "unknown"
},
"s": {
"type": "unknown"
},
"to": {
"type": "unknown"
},
"type": {
"type": "unknown"
},
"v": {
"type": "unknown"
},
"value": {
"type": "unknown"
}
},
"required": [
"gas",
"gasPrice",
"input",
"nonce",
"r",
"s",
"type",
"v",
"value"
]
}
]
}
}
]
},
"transactionsRoot": {
"type": "string",
"title": "Transactions root",
"pattern": "^0x[0-9a-f]{64}$"
},
"uncles": {
"type": "array",
"title": "Uncles",
"items": {
"type": "string",
"title": "32 byte hex value",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"withdrawals": {
"type": "array",
"title": "Withdrawals",
"items": {
"type": "object",
"title": "Validator withdrawal",
"properties": {
"address": {
"type": "string",
"title": "recipient address for withdrawal value",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"amount": {
"type": "string",
"title": "value contained in withdrawal",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,63})$"
},
"index": {
"type": "string",
"title": "index of withdrawal",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$"
},
"validatorIndex": {
"type": "string",
"title": "index of validator that generated withdrawal",
"pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$"
}
},
"required": [
"index",
"validatorIndex",
"address",
"amount"
]
}
},
"withdrawalsRoot": {
"type": "string",
"title": "Withdrawals root",
"pattern": "^0x[0-9a-f]{64}$"
}
},
"required": [
"hash",
"parentHash",
"sha3Uncles",
"miner",
"stateRoot",
"transactionsRoot",
"receiptsRoot",
"logsBloom",
"number",
"gasLimit",
"gasUsed",
"timestamp",
"extraData",
"mixHash",
"nonce",
"size",
"transactions",
"uncles"
]
},
"hash": {
"type": "string",
"title": "Hash",
"pattern": "^0x[0-9a-f]{64}$"
},
"rlp": {
"type": "string",
"title": "RLP",
"pattern": "^0x[0-9a-f]*$"
}
},
"required": [
"block",
"hash",
"rlp"
]
}
}Example request
Endpoint: https://your-celo-node.azxa.io
JSON-RPC
{
"jsonrpc": "2.0",
"id": 1,
"method": "debug_getBadBlocks",
"params": []
}Example response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"block": {
"difficulty": "0x1",
"extraData": "0x00000000000000000000000000000000000000000000000000000000000000008c6a091f07e4ba…170b96466ec06bb3fd01",
"gasLimit": "0xffffffffffff",
"gasUsed": "0x1a488",
"hash": "0x85c2edc1ca74b4863cab46ff6ed4df514a698aa7c29a9bce58742a33af07d7e6",
"logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000…00000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0xd",
"parentHash": "0x544a2f7a4c8defc0d8da44aa0c0db7c36b56db2605c01ed266e919e936579d31",
"receiptsRoot": "0xccd2d33763dc0ac3fe02d4ecbbcd7d2bdc6f57db635ba31007184679303721d7",
"…": "7 more fields"
},
"hash": "0x85c2edc1ca74b4863cab46ff6ed4df514a698aa7c29a9bce58742a33af07d7e6",
"rlp": "0xf9039df9025ca0544a2f7a4c8defc0d8da44aa0c0db7c36b56db2605c01ed266e919e936579d31…e300daade975589fcac0"
},
{
"block": {
"difficulty": "0x2",
"extraData": "0x00000000000000000000000000000000000000000000000000000000000000004d04551bdd9ae0…53066bfa4018142c0701",
"gasLimit": "0xffffffffffff",
"gasUsed": "0x1a4c9",
"hash": "0x601a3ae9b6eceb2476d249e1cffe058ba3ff2c9c1b28b1ec7a0259fdd1d90121",
"logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000…00000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x8",
"parentHash": "0x98ae440cd7b904d842daa6c263608969a3c8ce6a9acd6bd1f99b394f5f28a207",
"receiptsRoot": "0x2b5c77f6e7764d2468178fab7253346b9b8bb6a34b63946f6bdc2f5ad398bfc3",
"…": "7 more fields"
},
"hash": "0x601a3ae9b6eceb2476d249e1cffe058ba3ff2c9c1b28b1ec7a0259fdd1d90121",
"rlp": "0xf9039df9025ca098ae440cd7b904d842daa6c263608969a3c8ce6a9acd6bd1f99b394f5f28a207…68344cfc972a7973c0c0"
}
]
}cURL
curl -X POST https://your-celo-node.azxa.io \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"debug_getBadBlocks","params":[]}'