-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Invalid old blocks #9306
Description
I'm running:
- Which Parity version?: 2.0.1
- Which operating system?: Linux
- How installed?: binaries
- Are you fully synchronized?: yes
- Which network are you connected to?: ethereum
- Did you try to restart the node?: yes
After warp sync completes, old/ancient blocks are downloaded. On my node, starting at #1 some of those blocks are invalid, followed by valid blocks. Originally this was true only for #1, all other blocks that I queried were valid. After a fresh sync, the same occurred except the range #1..#57 was invalid:
Block 1 ❌
Expected 0x88e96d4537bea4d9c05d12549907b32561d3bf31f45aae734cdc119f13406cb6
curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1", false], "id": 75}' localhost:8545 | jq ".result.hash"
"0x49077beab2fa25f648dab021318e203f9f4dc6aed7e4b6b26526f63673b8ef41"
Block 57 ❌
Expected 0xf394e8a094b2c701e66c8074ee7da247b676f71ba1633a68435f5e2aee975c5c
curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x39", false], "id": 75}' localhost:8545 | jq ".result.hash"
"0xa638e3dd16207e5cebab1b057e0e9b97762321df22b7cd28ff0a6cdc7b78a7d1"
Block 58 ✔️
Expected 0xcd5b5c4cecd7f18a13fe974255badffd58e737dc67596d56bc01f063dd282e9e
curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x3a", false], "id": 75}' localhost:8545 | jq ".result.hash"
"0xcd5b5c4cecd7f18a13fe974255badffd58e737dc67596d56bc01f063dd282e9e"
It appears that one of our bootnodes is the source of these bad blocks. @ngotchac has been investigating that.
I'm going to run a fresh sync with sync tracing enabled to get more detailed logs.