-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
ethclient: missing mixHash in JSON block header #3230
Comments
You get this error because the server did not return all required fields. The field is needed because we cannot recompute the header hash correctly if mixHash is missing. |
Can this be because of an inconsistency between Parity's and Geth's JSON On 11/03/2016 06:10 PM, Felix Lange wrote:
|
The only server implementation that returns this field is geth 1.5.0, which is not released yet. If you are using parity please ask them to include this field in API responses. |
This is now fixed in the parity master branch, closing. |
I seem to have bumped into this again. Just started using stable Parity. |
I have the same issue also. @stevenroose would you mind reopen this issue again? Thanks. |
@dtco-kimi I don't have reopen permissions, sorry. You should ask @fjl |
It seems like this problem only occurs when using Parity against Kovan (POA chain). There, the field is not returned. When running Parity against ropsten it actually returns the field. It would be great if the go-ethereum ethclient would gracefully ignore the field not being present. I don't know if there's an easy way to distinguish between POA/POW chains and only error out when interacting with a POW chain and the field is missing. That could be a good solution. |
Having the same Issue with my own POA (Parity) Network. Would be glad if the suggestion of pstehlik could be somehow implemented :) |
As I am writing this I really think I should not post this, but as a quick fix you can just modify those lines in the json unmarshaller in https://github.com/ethereum/go-ethereum/blob/master/core/types/gen_header_json.go .
A better way would be of having the possibility of creating a header type just for a POA chain which does not require Nonce and MixDigest. But I am still not in the code, yet so there might be a better way to solve this. |
System information
Geth version: develop branch
OS & Version: Arch Linux
Commit hash : ed2bc7f
Expected behaviour
ethclient.HeaderByNumber
should return a*types.Header
instanceActual behaviour
JSON unmarshal error:
missing mixHash in JSON block header
The text was updated successfully, but these errors were encountered: