Skip to main content

debug_getBadBlocks RPC Method

Returns a list of the last bad blocks that the client has seen on the network.

Updated on
Jul 3, 2024

debug_getBadBlocks RPC Method

Parameters

This method does not accept any parameters

Returns

result
object
The result object which contains the following fields:
hash
string
The hash of the transaction
block
object
A block object, or null when no block was found
baseFeePerGas
string
The integer of the difficulty for this block encoded as hexadecimal
blobGasUsed
string
The amount of gas used by the blob
difficulty
string
The integer of the difficulty for this block encoded as hexadecimal
excessBlobGas
string
The excess gas used by the blob
extraData
string
The extra data field of this block
gasLimit
string
The maximum gas allowed in this block encoded as hexadecimal
gasUsed
string
The total used gas by all transactions in this block encoded as hexadecimal
hash
string
The block hash of the requested block. Null if pending
logsBloom
string
The bloom filter for the logs of the block. Null if pending
miner
string
The address of the beneficiary to whom the mining rewards were given
mixHash
string
A string of a 256-bit hash encoded as hexadecimal
nonce
string
The hash of the generated proof-of-work. Null if pending
number
string
The block number of the requested block encoded as hexadecimal. Null if pending
parentBeaconBlockRoot
string
The root of the parent beacon block
parentHash
string
The hash of the parent block
receiptsRoot
string
The root of the receipts trie of the block
sha3Uncles
string
The SHA3 of the uncles data in the block
size
string
The size of this block in bytes as an Integer value encoded as hexadecimal
stateRoot
string
The root of the final state trie of the block
timestamp
string
The unix timestamp for when the block was collated
transactions
object
An array of transaction objects with the following fields:
blockHash
string
The hash of the block where this log was in. Null when it's a pending log
blockNumber
string
The block number where this log was in. Null when it's a pending log
from
string
The address of the sender
gas
string
The gas provided by the sender, encoded as hexadecimal
gasPrice
string
The gas price provided by the sender in wei, encoded as hexadecimal
maxFeePerGas
string
The maximum fee per gas set in the transaction
maxPriorityFeePerGas
string
The maximum priority gas fee set in the transaction
hash
string
The hash of the transaction
input
string
The data sent along with the transaction
nonce
string
The number of transactions made by the sender before this one encoded as hexadecimal
to
string
The address of the receiver. Null when it's a contract creation transaction
transactionIndex
string
The integer of the transaction's index position that the log was created from. Null when it's a pending log
value
string
The value transferred in wei encoded as hexadecimal
type
string
The transaction type
accessList
array
A list of addresses and storage keys that the transaction plans to access
chainId
string
The chain id of the transaction, if any
v
string
The standardized V field of the signature
r
string
The R field of the signature
s
string
The S field of the signature
yParity
string
Coordinate of key used in signature
transactionsRoot
string
The root of the transaction trie of the block
uncles
array
An array of uncle hashes
withdrawals
array
The withdrawals in a block
index
string
The index of the withdrawal to uniquely identify each withdrawal
validatorIndex
string
The index of the validator who initiated the withdrawal
address
string
The address to which the withdrawn amount is sent
amount
string
The amount of ether, provided in hexadecimal format, corresponding to a certain value in gwei
withdrawalsRoot
string
The Merkle root of withdrawal data. Also, please note that this field will not be included in a block requested before the EIP-4895 upgrade
rlp
string
The RLP encoded header
Request
1
curl https://docs-demo.bera-bartio.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"debug_getBadBlocks","params":[],"id":1,"jsonrpc":"2.0"}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free