kaspanet / kaspad

Kaspad was the reference full node Kaspa implementation written in Go (golang), now rewritten in Rust: https://github.com/kaspanet/rusty-kaspa
ISC License
457 stars 231 forks source link

Fatal error during IBD: ⟨…⟩ is not in the selected parent chain of ⟨…⟩ #1873

Closed cbytensky closed 2 years ago

cbytensky commented 2 years ago

Log strings of error:

2021-12-09 14:29:39.225 [INF] PROT: Downloading headers from <a12de9be6750eb8e92fcf9e33db49fd8: 135.181.223.100:16111>
2021-12-09 14:29:39.552 [INF] PROT: IBD finished (interrupted)
2021-12-09 14:29:39.552 [CRT] PROT: Exiting: Fatal error in goroutine `flow-HandleRelayInvs 17`: d1f9c2e84e16a1f731ebfe8bce06f9b83b09dde081a41763861d58d7876e1bef is not in the selected parent chain of be4c415d378f9113fabd3c09fcc84ddb6a00f900c87cb6a1186993ddc3014e2d
github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager.(*dagTraversalManager).SelectedChildIterator
    /root/go/src/github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go:78

I nodiced that be4c415d378f9113fabd3c09fcc84ddb6a00f900c87cb6a1186993ddc3014e2d is the latest pruning point.

Datadir (18 MB): https://drive.google.com/file/d/1GRhMZdWpZDU7ixBfnfoW3Lw9DioWsK6F

Reproduced both on dev and master branches.

Enissay commented 2 years ago

I saw many people reporting the same on Discord... Please advise

2021-12-09 21:12:40.385 [INF] CMGR: Connecting to 23.88.70.20:16111
2021-12-09 21:12:40.439 [INF] TXMP: P2P Connected to 23.88.70.20:16111
2021-12-09 21:12:40.439 [INF] CMGR: Connecting to [240e:479:2408:fc4:31bb:252c:ebe6:526e]:16111
2021-12-09 21:12:40.547 [INF] PROT: IBD started
2021-12-09 21:12:40.574 [INF] PROT: Starting IBD with headers proof
2021-12-09 21:12:40.592 [INF] PROT: Downloading the pruning point proof from <3af270e6f22074b7d8c7af9b5971a099: 23.88.70.20:16111>
2021-12-09 21:12:41.439 [INF] CMGR: Connecting to [2601:154:c280:510:a190:bde9:5157:1616]:16111
2021-12-09 21:12:46.442 [INF] CMGR: Connecting to [2a0d:6fc0:c3c:e00:f931:439:708d:ec85]:16111
2021-12-09 21:12:48.865 [INF] PROT: IBD finished (interrupted)
2021-12-09 21:12:48.865 [CRT] PROT: Exiting: Fatal error in goroutine flow-HandleRelayInvs 24: not found
key 012f0b25feeb7d5fb2b2a7ef9 not found
github.com/kaspanet/kaspad/infrastructure/db/database/ldb.(LevelDB).Get
    /home/eny/kaspad/infrastructure/db/database/ldb/leveldb.go:69
github.com/kaspanet/kaspad/domain/consensus/database.(dbManager).Get
    /home/eny/kaspad/domain/consensus/database/dbmanager.go:13
github.com/kaspanet/kaspad/domain/consensus/datastructures/blockrelationstore.(blockRelationStore).BlockRelation
    /home/eny/kaspad/domain/consensus/datastructures/blockrelationstore/block_relation_store.go:51
github.com/kaspanet/kaspad/domain/consensus/processes/dagtopologymanager.(dagTopologyManager).Parents
    /home/eny/kaspad/domain/consensus/processes/dagtopologymanager/dagtopologymanager.go:35
github.com/kaspanet/kaspad/domain/consensus/processes/pruningproofmanager.(pruningProofManager).ValidatePruningPointProof
    /home/eny/kaspad/domain/consensus/processes/pruningproofmanager/pruningproofmanager.go:496
github.com/kaspanet/kaspad/domain/consensus.(consensus).ValidatePruningPointProof
    /home/eny/kaspad/domain/consensus/consensus.go:760
surinder83singh commented 2 years ago

even with fresh datadir it show same error,

2021-12-10 05:04:20.420 [INF] PROT: Downloading headers from <03b318984d76779b403c800500e2e83e: 65.21.134.230:16111> 2021-12-10 05:04:20.940 [INF] PROT: IBD finished (interrupted) 2021-12-10 05:04:20.940 [CRT] PROT: Exiting: Fatal error in goroutine flow-HandleRelayInvs 87: d1f9c2e84e16a1f731ebfe8bce06f9b83b09dde081a41763861d58d7876e1bef is not in the selected parent chain of be4c415d378f9113fabd3c09fcc84ddb6a00f900c87cb6a1186993ddc3014e2d github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager.(dagTraversalManager).SelectedChildIterator /Users/surindersingh/emanator/go/src/github.com/kaspanet/kaspad/domain/consensus/processes/dagtraversalmanager/selected_child_iterator.go:78 github.com/kaspanet/kaspad/domain/consensus/processes/pruningmanager.(pruningManager).nextPruningPointAndCandidateByBlockHash /Users/surindersingh/emanator/go/src/github.com/kaspanet/kaspad/domain/consensus/processes/pruningmanager/pruningmanager.go:222 github.com/kaspanet/kaspad/domain/consensus/processes/pruningmanager.(*pruningManager).ExpectedHeaderPruningPoint