-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debug_standardTraceBlockToFile JSON RPC method #1392
Add debug_standardTraceBlockToFile JSON RPC method #1392
Conversation
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@@ -34,30 +32,42 @@ | |||
import org.apache.tuweni.bytes.Bytes; | |||
import org.apache.tuweni.units.bigints.UInt256; | |||
|
|||
class EVMToolTracer implements OperationTracer { | |||
public class EVMToolTracer implements OperationTracer { |
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.
Since it's been moved out of EVM tool perhaps a different name, StandardJsonTracer
?
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.
Done
|
||
@JsonProperty("txHash") | ||
@Nullable | ||
String transactionHash(); |
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.
Use standard getter/setters
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.
Done
} | ||
|
||
public TraceOptions traceOptions() { | ||
return new TraceOptions(!disableStorage, !disableMemory, !disableStack); | ||
default Optional<Hash> getTransactionHash() { |
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.
This will need to be renamed, or dropped.
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.
Done
final Transaction transaction = transactions.get(i); | ||
if (selectedHash.isEmpty() | ||
|| selectedHash.filter(isEqual(transaction.getHash())).isPresent()) { | ||
final File tmpFile = |
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.
Do we want these going to tmp? perhaps our data root under traces?
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.
I don't have a strong opinion on it. I did this to be consistent with the other clients. But I just changed to put it in the data/traces now
Not your bug (it's mine) but in the EvmToolTracer we need to show 32 bytes per memory word. I'd do a suggestion but it's too far down. about line 99
becomes
|
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
I just updated the code to fix this issue |
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@@ -4,6 +4,7 @@ | |||
|
|||
### Additions and Improvements | |||
* The new version of the [web3js-eea library (v0.10)](https://github.com/PegaSysEng/web3js-eea) supports the onchain privacy group management changes made in Besu v1.5.3. | |||
* Added `debug_standardTraceBlockToFile` JSON-RPC API. This API accepts a block hash and will replay the block. It returns a list of files containing the result of the trace (one file per transaction). [\#1392](https://github.com/hyperledger/besu/pull/1392) |
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.
This should be moved to the 1.6.0-RC1 section once merged.
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
…to-file Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Karim TAAM karim.t2am@gmail.com
PR description
Add
debug_standardTraceBlockToFile
JSON RPC API. This API accepts a block hash and will replay the block. It returns a list of files containing the result of the trace (one file per transaction). The files are stored in the machine that serves this API.Request
Response
Changelog