github.com/amazechain/amc@v0.1.3/docs/jsonrpc/debug.md (about)

     1  # `debug` Namespace
     2  
     3  The `debug` API provides several methods to inspect the Ethereum state, including Geth-style traces.
     4  
     5  ## `debug_getRawHeader`
     6  
     7  Returns an RLP-encoded header.
     8  
     9  | Client | Method invocation                                     |
    10  |--------|-------------------------------------------------------|
    11  | RPC    | `{"method": "debug_getRawHeader", "params": [block]}` |
    12  
    13  ## `debug_getRawBlock`
    14  
    15  Retrieves and returns the RLP encoded block by number, hash or tag.
    16  
    17  | Client | Method invocation                                    |
    18  |--------|------------------------------------------------------|
    19  | RPC    | `{"method": "debug_getRawBlock", "params": [block]}` |
    20  
    21  ## `debug_getRawTransaction`
    22  
    23  Returns an EIP-2718 binary-encoded transaction.
    24  
    25  | Client | Method invocation                                            |
    26  |--------|--------------------------------------------------------------|
    27  | RPC    | `{"method": "debug_getRawTransaction", "params": [tx_hash]}` |
    28  
    29  ## `debug_getRawReceipts`
    30  
    31  Returns an array of EIP-2718 binary-encoded receipts.
    32  
    33  | Client | Method invocation                                       |
    34  |--------|---------------------------------------------------------|
    35  | RPC    | `{"method": "debug_getRawReceipts", "params": [block]}` |
    36  
    37  ## `debug_getBadBlocks`
    38  
    39  Returns an array of recent bad blocks that the client has seen on the network.
    40  
    41  | Client | Method invocation                                |
    42  |--------|--------------------------------------------------|
    43  | RPC    | `{"method": "debug_getBadBlocks", "params": []}` |
    44  
    45  ## `debug_traceChain`
    46  
    47  Returns the structured logs created during the execution of EVM between two blocks (excluding start) as a JSON object.
    48  
    49  | Client | Method invocation                                                    |
    50  |--------|----------------------------------------------------------------------|
    51  | RPC    | `{"method": "debug_traceChain", "params": [start_block, end_block]}` |
    52  
    53  ## `debug_traceBlock`
    54  
    55  The `debug_traceBlock` method will return a full stack trace of all invoked opcodes of all transaction that were included in this block.
    56  
    57  This expects an RLP-encoded block.
    58  
    59  > **Note**
    60  > 
    61  > The parent of this block must be present, or it will fail.
    62  
    63  | Client | Method invocation                                       |
    64  |--------|---------------------------------------------------------|
    65  | RPC    | `{"method": "debug_traceBlock", "params": [rlp, opts]}` |
    66  
    67  ## `debug_traceBlockByHash`
    68  
    69  Similar to [`debug_traceBlock`](#debug_traceblock), `debug_traceBlockByHash` accepts a block hash and will replay the block that is already present in the database.
    70  
    71  | Client | Method invocation                                                    |
    72  |--------|----------------------------------------------------------------------|
    73  | RPC    | `{"method": "debug_traceBlockByHash", "params": [block_hash, opts]}` |
    74  
    75  ## `debug_traceBlockByNumber`
    76  
    77  Similar to [`debug_traceBlockByHash`](#debug_traceblockbyhash), `debug_traceBlockByNumber` accepts a block number and will replay the block that is already present in the database.
    78  
    79  | Client | Method invocation                                                        |
    80  |--------|--------------------------------------------------------------------------|
    81  | RPC    | `{"method": "debug_traceBlockByNumber", "params": [block_number, opts]}` |
    82  
    83  ## `debug_traceTransaction`
    84  
    85  The `debug_traceTransaction` debugging method will attempt to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it will finally attempt to execute the transaction that corresponds to the given hash.
    86  
    87  | Client | Method invocation                                           |
    88  |--------|-------------------------------------------------------------|
    89  | RPC    | `{"method": "debug_traceTransaction", "params": [tx_hash, opts]}` |
    90  
    91  ## `debug_traceCall`
    92  
    93  The `debug_traceCall` method lets you run an `eth_call` within the context of the given block execution using the final state of parent block as the base.
    94  
    95  The first argument (just as in `eth_call`) is a transaction request.
    96  
    97  The block can optionally be specified either by hash or by number as the second argument.
    98  
    99  | Client | Method invocation                                                     |
   100  |--------|-----------------------------------------------------------------------|
   101  | RPC    | `{"method": "debug_traceCall", "params": [call, block_number, opts]}` |