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

Speed of RPC execution - speed of estimate gas execution - number of ethclient handles #21769

Closed
fxfactorial opened this issue Oct 30, 2020 · 5 comments

Comments

@fxfactorial
Copy link
Contributor

Several questions of which its hard to find any notes about

Looking for insight into how to increase the speed of execution of RPC calls - that is - does the size of the txn pool have any bearing on how quickly the RPC calls go through ? (assume IPC connection used) (wondering if dropping in https://github.com/valyala/fastjson would increase speed)

Or does the size of the txn pool have any bearing on the speed at which estimate gas goes through - is there any tip/trick to make estimate gas go faster? why is it so slow

What about the number of ethclient handles made? Is it better to have one handle with many queries that hit it up or to have many ethclients ?

@holiman
Copy link
Contributor

holiman commented Nov 26, 2020

More info about eth calls in general can be found here: #21772

@ligi
Copy link
Member

ligi commented Nov 26, 2020

The bottleneck is most likely the EVM execution. Gas estimation is basically doing a binary search to find the smallest gas price where the tx still succeeds. Things like JSON parsing are not really relevant performance wise here.
We do not really see ways to improve the situation. Ideas welcome - otherwise we can just recommend more computing power.
If you see it differently please provide us with numbers/benchmarks.

@fxfactorial
Copy link
Contributor Author

@ligi do you mean the loop run in (Interpreter).Run()? that is, the majority of time spent is there

@MariusVanDerWijden
Copy link
Member

Which loop are you referring too? core/vm/interpreter.go:210 ? This is the main loop of the EVM that executes the opcodes of the smart contract. So this is the most compute intensive loop and by far the biggest holdup which can not be optimized away of course.

@holiman
Copy link
Contributor

holiman commented Nov 3, 2021

This isn't really a bug report, rather a pretty vague set of questions, which have been mostly answered. Closing

@holiman holiman closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants