Refactor ancient hash retrieval logic#4
Open
CypherTroopers wants to merge 3 commits intocypherium:ecdsa_1.1from
Open
Refactor ancient hash retrieval logic#4CypherTroopers wants to merge 3 commits intocypherium:ecdsa_1.1from
CypherTroopers wants to merge 3 commits intocypherium:ecdsa_1.1from
Conversation
Updated it so that during re-sync, it automatically switches to Istanbul starting from block 182,532.
Updated it so that during re-sync, it automatically switches to Istanbul starting from block 182,532.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The ancient header RLP is stored with SignInfo included
↓
But when reading it back, the code calculates the header hash after excluding SignInfo
↓
Because the Keccak check is done on an RLP without SignInfo, the hash doesn’t match, so eth_getBlock ends up returning null
↓
I changed the RLP integrity check to use Header.Hash() after decoding instead
↓
Now it can be read correctly
Stop node
make clean
make cypher
start node
※ This change should be fine, but depending on the case, it might also make sense to modify the RLP Keccak check so that it includes the sign info