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

eth_getLogs run very slowly and return null #25453

Closed
BabySid opened this issue Aug 1, 2022 · 6 comments
Closed

eth_getLogs run very slowly and return null #25453

BabySid opened this issue Aug 1, 2022 · 6 comments
Labels

Comments

@BabySid
Copy link

BabySid commented Aug 1, 2022

System information

Geth version:

Version: 1.10.19-stable
Git Commit: 23bee16208718975f9b9e012949b8d4ee1223108
Git Commit Date: 20220615
Architecture: amd64
Go Version: go1.18.1
Operating System: linux
GOPATH=
GOROOT=go

OS & Version: Linux
Commit hash : (if develop)

Expected behaviour

API return fast and include some data.

{"jsonrpc":"2.0","id":1,"result":[{"address":"0xde1fcfb0851916ca5101820a69b13a4e276bd81f","blockHash":"0xdfca532e61dd31d6c839ddbc13f136fae698dcb8bf91d7cb03d7a288f4c5322b","blockNumber":"0xcf786d","data":"0x0000000000000000000000005e4e65926ba27467555eb562121fac00d24e9dd20000000000000000000000000000000000000000000000000000000000000000","logIndex":"0x3a","removed":false,"topics":["0x9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c","0x02b616af23339f1e031e76333e2d5b1c3067beb78578c961911872cc2127ef8b"],"transactionHash":"0xbabb37235bd38ae5a29717590eedfd9b02f84a12b890b2126feac68f223d7448","transactionIndex":"0x21"}]}

Actual behaviour

curl: (52) Empty reply from server

Steps to reproduce the behaviour

  1. run the geth node using args below
bin/geth --identity "MainNet" --datadir ./mainnet --port "30304" --maxpeers 150 --allow-insecure-unlock --gcmode "archive" --networkid 1 --mainnet --http --http.port 8003 --http.api 'admin,eth,miner,debug,net,txpool,personal,web3' --http.corsdomain '*' --ws.port "8004" --ws.api 'admin,eth,miner,debug,net,txpool,personal,web3'
2. run command when node has synced

curl http://127.0.0.1:8003 -X POST -H "Content-Type: application/json" --data '{"method":"eth_getLogs","params":[{"fromBlock":"0xcf7732","toBlock":"0xe0dc52","address":"0xde1fcfb0851916ca5101820a69b13a4e276bd81f","topics":["0x9416a153a346f93d95f94b064ae3f148b6460473c6e82b3f9fc2521b873fcd6c","0x02b616af23339f1e031e76333e2d5b1c3067beb78578c961911872cc2127ef8b"]}],"id":1,"jsonrpc":"2.0"}'

it returns ```curl: (52) Empty reply from server```

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

@s1na
Copy link
Contributor

s1na commented Aug 1, 2022

I'm guessing your query is timing out. We have this long-standing issue due to standard Go libraries that when a request times out you get an empty response instead of an error message.

@s1na
Copy link
Contributor

s1na commented Aug 1, 2022

Duplicate of #21430

@s1na s1na marked this as a duplicate of #21430 Aug 1, 2022
@BabySid
Copy link
Author

BabySid commented Aug 1, 2022

I'm guessing your query is timing out. We have this long-standing issue due to standard Go libraries that when a request times out you get an empty response instead of an error message.

Thank you for your reply. Is there any way to improve the performance of this method?
I have observed that the reponse time of the method on many third-party node providers is really fast.

@s1na
Copy link
Contributor

s1na commented Aug 1, 2022

As a user I don't think there's a lot you can do to improve the performance. Some optimization ideas are being discussed in #25336 that should possibly yield higher speeds.

@BabySid
Copy link
Author

BabySid commented Aug 2, 2022

As a user I don't think there's a lot you can do to improve the performance. Some optimization ideas are being discussed in #25336 that should possibly yield higher speeds.

Thanks all the same.

@ligi
Copy link
Member

ligi commented Aug 4, 2022

closed as duplicate

@ligi ligi closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants