-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3302b4f
commit 0c8add2
Showing
36 changed files
with
640 additions
and
516 deletions.
There are no files selected for viewing
139 changes: 0 additions & 139 deletions
139
v1.0/RPC Nodes/rpc-evm/rpc-horizen-eon/debug_tracecall.md
This file was deleted.
Oops, something went wrong.
76 changes: 0 additions & 76 deletions
76
v1.0/RPC Nodes/rpc-evm/rpc-horizen-eon/eth_maxpriorityfeepergas.md
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
v1.0/RPC Nodes/rpc-evm/rpc-horizen-eon.md → v1.0/RPC Nodes/rpc-evm/rpc-klaytn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
v1.0/RPC Nodes/rpc-evm/rpc-klaytn/debug_getbadblocks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
--- | ||
title: "debug_getbadblocks" | ||
slug: "rpc-klaytn-debug_getbadblocks" | ||
excerpt: "Klaytn RPC" | ||
category: 65c5e93c623cad004b45d505 | ||
hidden: false | ||
metadata: | ||
description: "Klaytn RPC" | ||
image: [] | ||
keywords: "klaytn, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html]{"html":"<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>"}[/block] | ||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, Klaytn, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<Klaytn>({network: Network.KLAYTN}) | ||
|
||
const result = await tatum.rpc.debugGetBadBlocks() | ||
|
||
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs | ||
``` | ||
{% endcode %} | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
### Overview | ||
|
||
`debug_getBadBlocks` is an RPC method that provides a list of the most recent bad blocks encountered by the client on the network. This feature is valuable for developers and node operators, as it enables them to identify and address any issues or anomalies related to block validation and synchronization. | ||
|
||
By accessing `debug_getBadBlocks`, they can diagnose potential problems and take appropriate actions to ensure the network's stability and integrity. | ||
|
||
### Parameters | ||
|
||
* This method does not accept any parameters. | ||
|
||
### Return Object | ||
|
||
The output is an array of objects, with each object representing the trace result of a transaction within the block. These objects include essential details such as the transaction hash and a block object, which can be null if no block was found for the transaction: | ||
|
||
* `baseFeePerGas`: The integer representation of the difficulty for this block encoded as hexadecimal. | ||
* `difficulty`: The integer representation of the difficulty for this block encoded as hexadecimal. | ||
* `extraData`: The extra data field of this block. | ||
* `gasLimit`: The maximum gas allowed in this block encoded as hexadecimal. | ||
* `gasUsed`: The total used gas by all transactions in this block encoded as hexadecimal. | ||
* `logsBloom`: The bloom filter for the logs of the block. Null if pending. | ||
* `miner`: The address of the beneficiary to whom the mining rewards were given. | ||
* `mixHash`: A 256-bit hash encoded as hexadecimal. | ||
* `nonce`: The hash of the generated proof-of-work. Null if pending. | ||
* `number`: The block number of the requested block encoded as hexadecimal. Null if pending. | ||
* `parentHash`: The hash of the parent block. | ||
* `receiptsRoot`: The root of the receipts trie of the block. | ||
* `sha3Uncles`: The SHA3 of the uncles' data in the block. | ||
* `size`: The size of this block in bytes as an Integer value encoded as hexadecimal. | ||
* `stateRoot`: The root of the final state trie of the block. | ||
* `timestamp`: The Unix timestamp for when the block was collated. | ||
* `transactions`: An array of transaction objects with the following fields: | ||
* `blockHash`: The hash of the block where this log was in. Null when it's a pending log. | ||
* `blockNumber`: The block number where this log was in. Null when it's a pending log. | ||
* `from`: The address of the sender. | ||
* `gas`: The gas provided by the sender, encoded as hexadecimal. | ||
* `gasPrice`: The gas price provided by the sender in wei, encoded as hexadecimal. | ||
* `maxFeePerGas`: The maximum fee per gas set in the transaction. | ||
* `maxPriorityFeePerGas`: The maximum priority gas fee set in the transaction. | ||
* `hash`: The hash of the transaction. | ||
* `input`: The data sent along with the transaction. | ||
* `nonce`: The number of transactions made by the sender before this one encoded as hexadecimal. | ||
* `to`: The address of the receiver. Null when it's a contract creation transaction. | ||
* `transactionIndex`: The integer of the transaction's index position that the log was created from. Null when it's a pending log. | ||
* `value`: The value transferred in wei encoded as hexadecimal. | ||
* `type`: The transaction type. | ||
* `accessList`: A list of addresses and storage keys that the transaction plans to access. | ||
* `chainId`: The chain id of the transaction, if any. | ||
* `v`: The standardized V field of the signature. | ||
* `r`: The R field of the signature. | ||
* `s`: The S field of the signature. | ||
* `transactionsRoot`: The root of the transaction trie of the block. | ||
* `uncles`: An array of uncle hashes. | ||
* `rlp`: The RLP encoded header. | ||
|
||
{% hint style="info" %} | ||
This method is available only on the full archive node. | ||
{% endhint %} | ||
|
||
### JSON-RPC Request and Response Examples | ||
|
||
#### Request | ||
|
||
```json | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"method": "debug_getBadBlocks", | ||
"params": [] | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": [] | ||
} | ||
``` |
Oops, something went wrong.