iotaledger / inx-tendercoo

INX-Tendercoo enables a committee of validators to operate as a distributed Coordinator using Tendermint Core BFT consensus.
Apache License 2.0
1 stars 0 forks source link

Fix: Make resume state more robust #43

Closed Wollac closed 1 year ago

Wollac commented 1 year ago

Seems like Tendermint uses a 2-stage approach:

  1. it first writes the signature to a dedicated state file
  2. it then stores the signed message in the DB and broadcasts it

Since it is very hard to retrieve the height from the DB, we instead retrieve it from the state file and subtract one to always be safe. Now, in the worst case Tendermint needs to replay more blocks then absolutely necessary. However, this is fast and prevents issues when the state is not 100% clean.