dir : consensus/state.go
합의 단계 확인 (height, round, step)
if ti.Height != rs.Height || ti.Round < rs.Round || ... {...}
현재 Step에 따라 step시작 함수 호출
switch ti.Step {
// 새로운 Round 진입
case cstypes.RoundStepNewHeight:
cs.enterNewRound(ti.Height, 0)
// Propose 단계 진입
case cstpyes.RoundStepNewRound:
cs.enterPropose(ti.Height,0)
// propose 단계가 끝난 경우 prevote 단계 진입
case cstypes.RoundStepPropose:
// evt를 publish
if err := cs.eventBus.PublishEventTimeoutPropose(...) {...}
cs.enterPrevote(ti.Height, ti.Round)
// prevote 시간이 끝날 경우 precommit 단계 진입
case cstypes.RoundStepPrevoteWait:
// evt publish
// ...
cs.enterPrecommit(ti.Height, ti.Round)
case cstypes.RoundStepPrecommitWait:
// evt publish
// ...
cs.enterPrecommit(ti.Height, ti.Round)
cs.enterNewRound(ti.Height, ti.Round+1)
default:
panic(...)
}