VM Standard Tracing
Last updated
Last updated
NOTE Some debug namespace APIs are unsafe/unappropriate to be opened to public. We recommend you to provide the debug namespace APIs to authorized users only. However, if you want to maintain a public EN and provide debug namespace APIs to the public, we strongly recommend you to set the rpc.unsafe-debug.disable
flag which will disable APIs that are unsafe/unappropriate to be opened to the public and enable only a subset of the debug namespace APIs. The enabled APIs are as follows:
VM Tracing APIs, however with limited functionality (only pre-defined tracers are allowed)
debug_dumpBlock, debug_dumpStateTrie, debug_getBlockRlp, debug_getModifiedAccountsByHash, debug_getModifiedAccountsByNumber, debug_getBadBlocks, debug_getModifiedStorageNodesByNumber
debug_metrics
Similar to debug_traceBadBlock, standardTraceBadBlockToFile
accepts a bad block hash and will replay the bad block. It returns a list of file names containing tracing result. Note that the files will be stored in the machine that serves this API.
Client | Method Invocation |
---|---|
Parameters
Name | Type | Description |
---|---|---|
Return Value
Type | Description |
---|---|
Example
Console
HTTP RPC
Similar to debug_traceBlock, standardTraceBlockToFile
accepts a block hash and will replay the block that is already present in the database. It returns a list of file names containing tracing result. Note that the files will be stored in the machine that serves this API.
Parameters
Return Value
Example
Console
HTTP RPC
You may give trace API function a secondary optional argument, which specifies the options for this specific call. The possible options are:
disableStorage
: BOOL
. Setting this to true will disable storage capture (default = false).
disableMemory
: BOOL
. Setting this to true will disable memory capture (default = false).
disableStack
: BOOL
. Setting this to true will disable stack capture (default = false).
txHash
: string
. Setting this value will trace only the specified transaction.
Client | Method Invocation |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Console
debug.standardTraceBadBlockToFile(hash, [options])
RPC
{"method": "debug_standardTraceBadBlockToFile", "params": [hash, {}]}
hash
32-byte DATA
블록의 해시입니다.
options
object
표준 추적 옵션을 참고하세요.
JSON array
파일명의 목록입니다. 각 파일은 트랜잭션 추적 결과를 나타냅니다. 파일명 형식은 block_{first 4 bytes of the block hash}-{transaction index}-{first 4 bytes of the transaction hash}-{random string}
입니다.
Console
debug.standardTraceBlockToFile(hash, [options])
RPC
{"method": "debug_standardTraceBlockToFile", "params": [hash, {}]}
hash
32-byte DATA
Hash of a block.
options
object
JSON array
A list of file names. Each represents a tracing result of a transaction. The format of a file name is block_{first 4 bytes of the block hash}-{transaction index}-{first 4 bytes of the transaction hash}-{random string}
.