-
Notifications
You must be signed in to change notification settings - Fork 678
fix: add debug_traceTransaction
RPC method
#614
Conversation
Ah, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a few comments
This is merge'able now! \o/ The biggest changes came from the memory optimization work, and the This needs some testing against more intense transactions, but so far basic testing with truffle-debugger is A-Ok. Would love more feedback if any! |
d706c0c
to
0235759
Compare
70602fb
to
1409d24
Compare
48a2100
to
d461ce5
Compare
6623f08
to
2adb43c
Compare
1. Clean up errors caught by compled solc. Bad solc. 2. Add a debug contract that can create a lot of instructions in a loop 3. Add a test that tries to check memory allocation of the trace function
Optimize debug_traceTransaction for memory usage by using objects to track data within the trace. Most of the optimization occurs in the TraceData class itself, where values are memoized and only create a new TraceData object if one isn't created for that value yet. In the associated test, this reduces the number of objects used to create the trace by 47%.
2adb43c
to
6584e26
Compare
debug_traceTransaction
RPC method
Co-authored-by: David Murdoch <[email protected]>
Co-authored-by: David Murdoch <[email protected]>
Co-authored-by: David Murdoch <[email protected]>
Two important notes:
ts
.Note that I copied over many of the original comments to this version. I also added some comments of my own.