informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
608 stars 224 forks source link

Introduce sync fall back not hang on current height #1104

Open g302ge opened 2 years ago

g302ge commented 2 years ago

Version(s) of tendermint-rs:

Description

I found a phenomenon in current consensus processing, that when a node fall behind with its neighbor nodes, it will panic right now which make this node no progress aka lose liveness. I think the second below maybe a enhancement for Tendermint:

  1. node first time startup, it will use the sync mode to sync blocks from its nighbors, all thing done, this node recover from sync to consensus mode.
  2. when a node fall behind with its nighbors, it will fall back to sync mode not hang on consensus mode to sync blocks from its nighbor after this action the node recover from sync to consensus.

    But in current implementation not only rust but go, there is only first approach, not second, I am confused why can't we support the second approach. Thx for reply

Definition of "done"

The correct behavior imaged as before second approach

thanethomson commented 2 years ago

Is this related to Tendermint Core or tendermint-rs?