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 must return "block unknown" when blockHash is not found #8007

Open
jpnovais opened this issue Dec 9, 2024 · 2 comments · May be fixed by #8051
Open

eth_getLogs must return "block unknown" when blockHash is not found #8007

jpnovais opened this issue Dec 9, 2024 · 2 comments · May be fixed by #8051
Assignees
Labels
bug Something isn't working linea helps L2s using besu P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc))

Comments

@jpnovais
Copy link
Contributor

jpnovais commented Dec 9, 2024

Steps to Reproduce

curl -s -H 'content-type:application/json' --data '{"jsonrpc":"2.0","id":"53","method":"eth_getLogs","params":[{"topics":["0x55f4c645c36aa5cd3f443d6be44d7a7a5df9d2100d7139dfc69d4289ee072319"],"blockHash":"0x00000000000000000000000000000000000000000000000000000000000000ff"}]}' http://localhost:8445

Expected behavior:
If the node does not have the block shall return an error instead of saying "That block does not have logs". This can be problematic if the node is behind a load balancer and is not 100% in sync

{"jsonrpc":"2.0","id":"53","error":{"code":-32000,"message":"unknown block"}}

Actual behavior:

{"jsonrpc":"2.0","id":"53","result":[]}

Frequency: Consystently

Versions (Add all that apply)

  • Software version: besu 24.10

Notes:

Geth and Infura return unknown block

@jpnovais jpnovais added the bug Something isn't working label Dec 9, 2024
@macfarla macfarla added P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc)) linea helps L2s using besu labels Dec 9, 2024
@jframe jframe added good first issue Good for newcomers and removed good first issue Good for newcomers labels Dec 9, 2024
@jonson
Copy link

jonson commented Dec 11, 2024

👋 I think I can grab this one!

@macfarla
Copy link
Contributor

there are plenty of tests already that should guide you too

eg files named like ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getLogs_blockhash.json

@jonson jonson linked a pull request Dec 18, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linea helps L2s using besu P2 High (ex: Degrading performance issues, unexpected behavior of core features (DevP2P, syncing, etc))
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants