This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
blockwatch/core: Fix Kovan incorrect block hash bug #181
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ereum isn't properly computing block hashes for Kovan
…outine when it's closed
fabioberger
changed the title
blockwatch/core: Fix Kovan incorrect block hash bug
[WIP] blockwatch/core: Fix Kovan incorrect block hash bug
Jun 19, 2019
fabioberger
changed the title
[WIP] blockwatch/core: Fix Kovan incorrect block hash bug
blockwatch/core: Fix Kovan incorrect block hash bug
Jun 19, 2019
albrow
suggested changes
Jun 19, 2019
Co-Authored-By: Alex Browne <stephenalexbrowne@gmail.com>
Co-Authored-By: Alex Browne <stephenalexbrowne@gmail.com>
…h into fix/kovanBlockHashIssue
albrow
reviewed
Jun 19, 2019
albrow
approved these changes
Jun 19, 2019
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.
Approved with one small comment.
not kovan issue mainet ethereum do not accept spam issue..if im closed this project same stuck overall |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MarkM mentioned Mesh not firing events when connected to Kovan on our discord.
Turns out Kovan uses a different structure for block headers then mainnet that isn't
rlp
compatible and since we are using go-ethereum'sEthClient
, it is generating incorrect block hashes for Kovan blocks. More details on this discrepancy between mainnet and Kovan here: ethereum/go-ethereum#18166.The fix is to use a raw JSON RPC request to
eth_blockByNumber
which returns a pre-computed block hash that is always properly formatted instead of re-computing the block hash given the block header struct returned fromEthClient
'sBlockByNumber()
method.Additionally, this PR also logs all BlockWatcher errors, which were not being logged previously.