4byteTracer implementation for debug_trace json-rpc#9202
Closed
JukLee0ira wants to merge 2 commits intobesu-eth:mainfrom
Closed
4byteTracer implementation for debug_trace json-rpc#9202JukLee0ira wants to merge 2 commits intobesu-eth:mainfrom
JukLee0ira wants to merge 2 commits intobesu-eth:mainfrom
Conversation
160269b to
20fa62c
Compare
Signed-off-by: JukLee0ira <meebookMonkey@163.com>
9fb14e1 to
e0cfa80
Compare
Contributor
|
@JukLee0ira Can you update your branch with latest changes. The changes look straight forward, I need to do some manual testing before we can get it merge. |
Contributor
|
@JukLee0ira Looks like there is an issue with formatting, spotless is failing. You can run |
10 tasks
Contributor
|
Implemented by #9642 with credits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
Hi,team! I noticed the issue #8326, so I added this 4byteTracer. The 4byte Tracer is used to identify function signatures in transactions and is a very useful tool. It creates a mapping from 4-byte signatures to call counts, helping us in scenarios like analyzing contract function call patterns, security analysis, and audits.
Call Example
Before using it, make sure to enable the feature with
--Xenable-extra-debug-tracers=trueExpected Return Results
The return result is as follows, it's a mapping table:
{ "jsonrpc": "2.0", "id": 1, "result": { "0x9dc2c8f5-0": 1 } }In this example,
"0x9dc2c8f5-0": 1means:0x9dc2c8f5was called 1 timeImplementation Logic
len(input)-4to calculate parameter data size (excluding the selector)I'd greatly appreciate any feedback or guidance you might have. I'm happy to make adjustments based on your thoughts!
Fixed Issue(s)
#8326
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests