Chain wont resync after producer goes down
How to reproduce
- 3 block producers A, B and C running with latest commit 4f29311 .
- The block producers work perfect and the net is in sync.
- We vote out A and B, so only C is producing blocks
- The chain is in Sync
- Producer C gets disconnected ( crash or network problems,etc)
- Producer A and B start waiting for connections
- Producer C starts with replay
- Producer A and B rejects the blocks C sends.
What we think it happens
The error seems to be that the disconnected nodes ask for the first block that is missing (in screens 1321) but when compares the id and the previous block, shows data for the block that is missing +1 (in screens block 1322)
Error Log Producer B
1558159ms thread-0 net_plugin.cpp:1489 recv_block ] block not accepted, try requesting one more time
1558159ms thread-0 controller.cpp:755 push_block ] 10 assert_exception: Assert Exception
prior != by_id_idx.end(): unlinkable block
{"id":"0000052aba54123c48349df507fdb62034250b1a29fd45842d0d965be3c45749","previous":"0000052936566f8f45f98245f562c897e444d3da2b3cd2e4ba83474ed0041fc4"}
thread-0 fork_database.cpp:153 add
1558160ms thread-0 net_plugin.cpp:2475 handle_message ] unable to accept block on assert exception Assert Exception (10)
prior != by_id_idx.end(): unlinkable block
rethrow
from xps15:9876 - e18b454
1558160ms thread-0 net_plugin.cpp:1495 recv_block ] second attempt to retrive block 1321 failed
1558160ms thread-0 net_plugin.cpp:2074 operator() ] Error reading message from connecting client: Bad file descriptor
1579976ms thread-0 net_plugin.cpp:703 connection ] accepted network connection
1588313ms thread-0 controller.cpp:755 push_block ] 10 assert_exception: Assert Exception
itr->second <= result.block_num - h.confirmed: producer double-confirming known range
{}
thread-0 block_header_state.cpp:168 next
1588314ms thread-0 net_plugin.cpp:2475 handle_message ] unable to accept block on assert exception Assert Exception (10)
itr->second <= result.block_num - h.confirmed: producer double-confirming known range
rethrow
from xps15:9876 - e18b454
1588314ms thread-0 net_plugin.cpp:1489 recv_block ] block not accepted, try requesting one more time
1588316ms thread-0 controller.cpp:755 push_block ] 10 assert_exception: Assert Exception
prior != by_id_idx.end(): unlinkable block
{"id":"0000052aba54123c48349df507fdb62034250b1a29fd45842d0d965be3c45749","previous":"0000052936566f8f45f98245f562c897e444d3da2b3cd2e4ba83474ed0041fc4"}
Screens Producer B

Screens block producer C

We have a similar problem here testing the producer_api_plugin. We pause BP node 1, resume BP node 2, which works. We then pause BP node 2, and resume BP node 1. Then, BP node 2 goes down from this error and it can't resync with the chain.
Thanks for sharing your detailed example @notchxor
If someone is trying to fix this in their testnet setup. We end up booting again.
#3442 I filed a separate issue for the scenario where I encountered the assertion exception. It's a milestone to be fixed for version 1.0.
Anyone know how to setup Mainnet ?
We haven't received any update for this. If you still have the problem and wish to discuss further, please post it in https://eosio.stackexchange.com