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

Cannot request eth_getBlockByNumber("safe", false) while syncing #528

Closed
du5 opened this issue Sep 30, 2024 · 3 comments · Fixed by #532
Closed

Cannot request eth_getBlockByNumber("safe", false) while syncing #528

du5 opened this issue Sep 30, 2024 · 3 comments · Fixed by #532
Assignees

Comments

@du5
Copy link

du5 commented Sep 30, 2024

Commit hash: f10d0fe

# Node did not complete sync when sending request
curl http://192.168.0.103:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["safe",false],"id":1}'
[EROR] [09-30|10:30:16.663] RPC method eth_getBlockByNumber crashed: runtime error: invalid memory address or nil pointer dereference
[service.go:223 panic.go:785 panic.go:262 signal_unix.go:900 helper.go:101 helper.go:49 eth_api.go:280 eth_block.go:446 eth_block.go:223 value.go:581 value.go:365 service.go:228 handler.go:538 handler.go:488 handler.go:429 handler.go:249 handler.go:342 asm_amd64.s:1700]
[WARN] [09-30|10:30:16.663] [rpc] served                             conn=34.126.104.26 method=eth_getBlockByNumber reqid=1 err="method handler crashed"

When the synchronization is complete, everything is ok

@blxdyx
Copy link
Collaborator

blxdyx commented Oct 8, 2024

Are your run rpc as a separated process?

@du5
Copy link
Author

du5 commented Oct 11, 2024

I use erigon3 --http=true, not rpcdaemon, the complete startup command is erigon3 --prune.mode=minimal --chain=bsc --http --ws --port=30303 --sync.loop.block.limit=90000 --batchSize=4g

@MatusKysel MatusKysel linked a pull request Oct 14, 2024 that will close this issue
@MatusKysel
Copy link
Collaborator

fix is ready #532. Once it's merge please test it @du5

@MatusKysel MatusKysel self-assigned this Oct 14, 2024
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

Successfully merging a pull request may close this issue.

3 participants