-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Eth RPC: Address performance of EthGetTransactionCount #10538
Comments
@snissn i think we should look into MpoolGetNonce - which exchanges have been reporting a 6-8 sec slow response. If we can narrow down the issue there - it should improve eth get tx count too |
i'm having trouble reproducing on master -- i'm running a lotus node and pummeling the node with the bash script below the response time is between 20 and 50 ms. Could there just be other slow endpoints causing their performance issues but eth_getTransactionCount is fast?
|
We might need to spin up a local net, then send L many messages and having them in mpool, and then call the api with the same account multiple times to repro |
this is interesting - an LRU cache for nonce with only 256 slots in it https://github.com/filecoin-project/lotus/blob/master/chain/messagepool/messagepool.go#L374 |
So, the issue is that lotus/chain/messagepool/messagepool.go Line 1081 in 3f74840
The answer is to not call
At the same time, we'll definitely want to increase the size of this cache. Also, for the current head, we could pre-cache in |
Thanks for coming up with this @Stebalien! ❤️ |
I've tested this with @snissn's test above and it pauses for 10 seconds every so often, so it's clearly related to tipset computation. |
Deploying to Glif canary nodes today to get production data. |
We identified
EthGetTransactionCount
as one of the hotspots on Glif production nodes. The goal of this issue is to investigate the reason and fix it.The text was updated successfully, but these errors were encountered: