Generating basic traces
To generate a raw EVM opcode trace, the Parallax client provides a few RPC API endpoints. The most commonly used is debug_traceTransaction. In its simplest form,traceTransaction accepts a transaction hash as its only argument. It then traces the transaction, aggregates all the generated data and returns it as a large JSON object. A sample invocation from the Parallax client console would be:
--http command and the debug API namespace must be exposed using --http.api=debug.
eth.getBlock('latest') then passing a transaction hash from the returned block to debug.traceTransaction()) or from a block explorer.
It is also possible to configure the trace by passing Boolean (true/false) values for four parameters that tweak the verbosity of the trace. By default, the EVM memory and Return data are not reported but the EVM stack and EVM storage are. To report the maximum amount of data:
Limits of basic traces
Although the raw opcode traces generated above are useful, having an individual log entry for every single opcode is too low level for most use cases, and will require developers to create additional tools to post-process the traces. Additionally, a full opcode trace can easily go into the hundreds of megabytes, making them very resource intensive to get out of the node and process externally. To avoid those issues, the Parallax client supports running custom JavaScript tracers within the Parallax node, which have full access to the EVM stack, memory and contract storage. This means developers only have to gather the data they actually need, and do any processing at the source.Summary
This page described how to do basic traces in the Parallax client Basic traces are very low level and can generate lots of data that might not all be useful. Therefore, it is also possible to use a set of built-in tracers or write custom ones in Javascript or Go. Read more about built-in and custom tracers.Adapted from Basic traces in the go-ethereum documentation, © The go-ethereum Authors. See the third-party notices.

