-
Notifications
You must be signed in to change notification settings - Fork 68
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
invalid block nonce #149
Comments
Thanks @rafaelkallis . |
@Nana-EC I have added relay logs to the ticket above. |
Thanks @rafaelkallis Let's get more info.
My current guess is this is an issue on the go client side so this should help you see the response item |
My hypothesis is that the The go-ethereum client expects exactly 8 bytes for the nonce (see https:/ethereum/go-ethereum/blob/master/core/types/block.go#L42) The relay node sends To confirm I will setup a wiremock server and mock jsonrpc responses to confirm the behavior of go-ethereum. Expect a PR soon once I confirm the behavior. |
You actually have the right constant here
but use the "wrong" one here
|
Thanks. Good catch. Nonce return should be 8 Bytes. |
@rafaelkallis picking this up now |
For the record go-ethereum is incorrect based on the published specs. Nonce for blocks is of type Fix can stay, it improves compatibility within the bounds of the spec, so it's reasonable. |
Original spec does specify 8 bytes for a block hash however - https://eth.wiki/json-rpc/API#eth_getblockbyhash. I'll raise the issue in the execution APIs. |
@Nana-EC the nonce value is again wrong, please reopen |
Description
Hi! I trying to consume the relay node json-rpc api using
go-ethereum
, specifically I am trying to get a block by number.The operation fails with the error
hex string of odd length
.I wrote a test case for you to reproduce:
Steps to reproduce
Additional context
Relay logs
Hedera network
testnet
Version
0.1.0-rc1
Operating system
Linux
The text was updated successfully, but these errors were encountered: