Replay
Consensus module will replay all the messages of the last height written to WAL before a crash (if such occurs). The private validator may try to sign messages during replay because it runs somewhat autonomously and does not know about replay process. For example, if we got all the way to precommit in the WAL and then crash, after we replay the proposal message, the private validator will try to sign a prevote. But it will fail. That’s ok because we’ll see the prevote later in the WAL. Then it will go to precommit, and that time it will work because the private validator contains theLastSignBytes and then we’ll replay the
precommit from the WAL.
Make sure to read about WAL corruption
and recovery strategies.