Skip to content
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

Implement debug_standardTraceBlockToFile method #5501

Merged
merged 47 commits into from
Aug 13, 2023

Conversation

rubo
Copy link
Contributor

@rubo rubo commented Mar 26, 2023

Resolves #2263

Changes

  • Implemented debug_standardTraceBlockToFile JSON-RPC method
  • The GethLikeTxTracer class is now abstract with two separate implementations of GethLikeTxFileTracer and GethLikeTxMemoryTracer for file and memory tracing respectively
  • The GethLikeBlockTracer class is replaced with two separate implementations of GethLikeBlockFileTracer and GethLikeBlockMemoryTracer for file and memory tracing respectively
  • To adhere to the latest Geth updates, in GethTraceOptions, the DisableMemory property has been deprecated in favor of the new EnableMemory, and the new TxHash has been added
  • To optimize memory tracing, changed List<string> to IEnumerable<string> in ITxTracer.SetOperationMemory(). Hence, the large number of changed files.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Remarks

This PR replaces #4304.

To make the initial review easier, some optimizations have not been applied.

@rubo rubo added rpc wip Work in Progress labels Mar 26, 2023
@rubo rubo added the evm label Mar 26, 2023
@rubo rubo requested a review from LukaszRozmej March 26, 2023 11:12
@rubo rubo force-pushed the feature/debug_standardtraceblocktofile-2 branch from 280e5b4 to 8df8387 Compare March 26, 2023 20:15
@rubo rubo removed the wip Work in Progress label Mar 27, 2023
@rubo rubo marked this pull request as ready for review March 28, 2023 19:22
@rubo rubo force-pushed the feature/debug_standardtraceblocktofile-2 branch from 77d2009 to 418b308 Compare April 3, 2023 13:33
@rubo rubo force-pushed the feature/debug_standardtraceblocktofile-2 branch from 7fbfb89 to 96fc01d Compare April 24, 2023 14:40
@LukaszRozmej
Copy link
Member

Ok I get that file format is probably different, still would love to see Stream as the target and also main format being able to be streamed, so we can try using it in JSON RPC for huge boost in perf.

@rubo rubo requested a review from LukaszRozmej May 12, 2023 21:19
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could experiment with other tracers serializing responses directly to Stream's, but this can be explored in future work.

@rubo rubo marked this pull request as draft August 11, 2023 12:00
@rubo rubo marked this pull request as ready for review August 13, 2023 19:53
@rubo rubo merged commit 72edfbb into master Aug 13, 2023
61 checks passed
@rubo rubo deleted the feature/debug_standardtraceblocktofile-2 branch August 13, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement debug_standardTraceBlockToFile
2 participants