Summary
During runtime we quiesce p2p when indexing to prevent index corruption. When tbc unquiesces several p2p commands may have happened, including a forking event, which wasn't tracked. When tbc tries to recover it may end up with a chain geometry it currently cannot process.
Changes
Remove index flag and overload that into the quiesce flag
Add a function that can determine the common ancestor between two blocks.
Add a function that determines the current chain state and unwinds indexes to a common ancestor and then winds them back to tip.
Summary During runtime we quiesce p2p when indexing to prevent index corruption. When tbc unquiesces several p2p commands may have happened, including a forking event, which wasn't tracked. When tbc tries to recover it may end up with a chain geometry it currently cannot process.
Changes