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_getBlockByNumber with empty params returns "Invalid block, unable to parse RLP" instead of "Invalid method parameter" #7918

Open
jpnovais opened this issue Nov 25, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion) snack Smaller coding task - less than a day for an experienced dev

Comments

@jpnovais
Copy link
Contributor

Steps to Reproduce

curl -s -H 'content-type:application/json' --data '{"jsonrpc":"2.0","id":"53","method":"eth_getBlockByNumber","params":[]}' http://127.0.0.1:8545

Expected behavior:

{"jsonrpc":"2.0","id":"53","error":{"code":-32602,"message":"Invalid method parameter(s)", "data": "blockNumber is required"}}%

Actual behavior:

{"jsonrpc":"2.0","id":"53","error":{"code":-32602,"message":"Invalid block, unable to parse RLP"}}%

Frequency:
Always

Versions (Add all that apply)

  • Software version: 24.10.0
@jpnovais jpnovais added the bug Something isn't working label Nov 25, 2024
@macfarla macfarla added P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion) good first issue Good for newcomers snack Smaller coding task - less than a day for an experienced dev labels Nov 25, 2024
@vaidikcode
Copy link
Contributor

@macfarla I’ve been working on understanding the implementation of the eth_getBlockByNumber JSON-RPC method within the project. Still, I’ve been having trouble locating the specific code where this method is implemented and handled.

Could you kindly point me to the implementation of the eth_getBlockByNumber method, or let me know if there are any resources or documentation that would help me understand how these methods are structured and processed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P3 Medium (ex: JSON-RPC request not working with a specific client library due to loose spec assumtion) snack Smaller coding task - less than a day for an experienced dev
Projects
None yet
Development

No branches or pull requests

3 participants