-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
rpc: Significantly speedup debug_traceCallMany #7700
base: main
Are you sure you want to change the base?
Conversation
|
FYI: likely this PR will also improve speed: #7706 |
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.
-
Unlikely this change can work - because: if latest block = 10, and you re-exec transactions from this block - you need exec them on state 10-1, not on latests state (latest state already has changes made by block 10).
-
Seems this RPC method has no tests.
To accept this PR: -
you or @hrthaowang (or somebody else) - please create another PR with tests. And maybe add link to some docs/spec.
Docs of this method: Request for a New RPC Endpoint eth_callMany #4471 - need copy docs fro github to source code.
This scenario arises when the value of On the other hand, when
Although I'm unsure if my expertise permits me to accomplish this, I might attempt it when I have some free time available if no one else is willing to undertake the task. |
In this case need:
|
This PR is stale because it has been open for 40 days with no activity. |
I tried to write some test for this but my experience doesn't allow it. Furthermore I couldn't find any existing tests, not even for trace.callMany to get a hang of it. if anyone wants to do it it would be cool. I have this change running one mont on my node and everything looks ok. |
This PR is stale because it has been open for 40 days with no activity. |
I believe this PR is rather a "bugfix" than an "improvement". In case transactionIndex is -1, TraceCallMany() must not replay all the transactions of the specified block on top of the state of the block previous to it. This is a major overhead, there are usually 100-200 transactions per block. Instead it must just pick up the state of the specified block. This PR does not requre any tests and shoud be accepted without adding any. |
Currently, when using the default value of
transactionIndex
(-1) in thedebug_traceCallMany
function, the state is obtained from the previous block and all the transactions are replayed.This pull request retrieves the most recent state, resulting in a significant decrease in tracing time from 50-150 ms to just 1 ms.
I have tested the modification and it functions as intended. However, I kindly request you to review it, as I lack experience with the Go programming language and the client internals.