Skip to content

Refactor ancient hash retrieval logic#4

Open
CypherTroopers wants to merge 3 commits intocypherium:ecdsa_1.1from
CypherTroopers:ecdsa_1.1
Open

Refactor ancient hash retrieval logic#4
CypherTroopers wants to merge 3 commits intocypherium:ecdsa_1.1from
CypherTroopers:ecdsa_1.1

Conversation

@CypherTroopers
Copy link

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant