-
Notifications
You must be signed in to change notification settings - Fork 879
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
Fix eth_getBlockByNumber with empty params returns #8134
Fix eth_getBlockByNumber with empty params returns #8134
Conversation
Signed-off-by: Iryoung Jeong <[email protected]>
Signed-off-by: Iryoung Jeong <[email protected]>
8507822
to
5d160fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, appreciate the limited scope for this PR
Signed-off-by: Iryoung Jeong <[email protected]>
I realized I missed updating one test case, so I’ve added a commit to address it and ensure the test passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional changes LGTM
Finally, all checks have passed, but it says, |
I'll handle getting it merged from here. Thanks again for your contribution! |
Thank you for your help! I’ll explore other issues to find something suitable and continue contributing. |
PR description
This PR addresses a bug in the eth_getBlockByNumber method, where invoking it with empty parameters results in the error message "Invalid block, unable to parse RLP".
There're some consideration while I investigate & fix the bug
I would have preferred to use the message proposed in the issue; however, a pre-defined error message better fits this situation, so I opted to use it.
Adding data would require modifications to org.hyperledger.besu.ethereum.api.jsonrpc.execution.BaseJsonRpcProcessor.process(), which is outside the scope of this fix.
The message for RpcErrorType.INVALID_BLOCK_PARAMS might seem slightly inconsistent, but adjusting it is also beyond the scope of this PR.
Request
Fixed Issue(s)
fixes #7918
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests