-
-
Notifications
You must be signed in to change notification settings - Fork 93
Let's use debug_traceTransaction of ganache-cli [Feature request] #197
Comments
Thanks for this suggestion @k06a! Unfortunately there are performance drawbacks to I'd like to keep the gas-reporter simple / reliable and improve its execution speed via #171. There are two other projects which might be better candidates for collecting more granular gas metrics, since they've already done all the difficult work of translating the trace into meaningful data:
|
@cgewecke thanks for detailed answer, what do you think about Parity Trace Module? Maybe shipping similar functionality to ganache-cli could improve eth-gas-reporter. |
I've never used it tbh ... do you know of an example output with subtraces? It's hard to see exactly what's going in their sample API responses. |
Check this one: https://etherscan.io/vmtrace?txhash=0x2ee34e9200979b187f5c9c4fa529e0a0625017e53f92e06f7256e0b2dc2de892&type=parity#raw Try to copy it to my utility to see callstack visually: https://k06a.github.io/parity-trace-decoder/ |
@k06a Oh wow, that's really cool... I wonder if this might be easiest to use as it's own utility, for cases where a detailed analysis is helpful.
There is a recipe for attaching to ganache-cli's vm from outside and adding whatever trace functionality you want at solidity-coverage here and here. In principle if you wanted to build a parity trace API for ganache yourself you could... Think BuidlerEVM is going to expose a trace hook that includes gas used data soon as well - they do their own decoding. It looks like it would be straightforward to pick out the relevant data there and reformat it in way that's easy to read. |
This would allow measuring every external CALL/STATICCALL/DELEGATECALL that happened inside a transaction. Related thread: trufflesuite/ganache#248
The text was updated successfully, but these errors were encountered: