Witness node cannot switch to correct fork on restart if was shut down on another long fork #1703
Closed
1 of 17 tasks
Labels
2d Developing
Status indicating currently designing and developing a solution
3d Bug
Classification indicating the existing implementation does not match the intention of the design
4a Low Priority
Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists
6 Deployment
Impact flag identifying the deployment process (e.g. Docker, Travis, etc.)
Milestone
Bug Description
If we shutdown a witness_node which is not on the correct fork when the chain is forking, if both forks are long, when restarting, it is unable to switch to the correct fork, and reports
unlinkable_block_exception
.If the correct fork is a soft fork, if we run the soft fork code with current data, it will crash on the forking block when replaying.
Related logs:
As analysed by @pmconrad:
That said, the fixed
50
here is probably too small:bitshares-core/libraries/chain/db_management.cpp
Line 68 in 8c1a78b
On the other hand, we probably should NOT rely on this
last_block
to determine usable head block number, because_block_id_to_block
may contain reversible blocks. But it's a bit tricky.bitshares-core/libraries/chain/db_management.cpp
Line 56 in 8c1a78b
Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
Expected Behavior
Able to switch forks.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: