Commit c031b64
committed
fix(consensus): fix bootstrap stuck at genesis after blocksync mode changes
Two issues prevented consensus from starting at bootstrap:
1. TendermintNewHeight was incorrectly guarded by blocksync mode check,
preventing state machine initialization. State must be initialized
regardless of mode - only active participation should be blocked.
2. Resume handler did nothing when is_paused=false (initial state).
At bootstrap, enter_consensus_mode sends Resume but resume_consensus
returned early due to the is_paused guard, so start_height was never
called and no timeouts were scheduled.
Fixes:
- Remove blocksync guard from TendermintNewHeight handler
- Set is_paused=true before resume_consensus to ensure execution
- Handle height==current_height case for bootstrap/WAL recovery scenarios1 parent 692d239 commit c031b64
2 files changed
+16
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2052 | 2052 | | |
2053 | 2053 | | |
2054 | 2054 | | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
2070 | 2059 | | |
2071 | 2060 | | |
2072 | 2061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
| 1041 | + | |
| 1042 | + | |
1041 | 1043 | | |
1042 | | - | |
1043 | | - | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1044 | 1048 | | |
1045 | 1049 | | |
1046 | | - | |
1047 | | - | |
| 1050 | + | |
1048 | 1051 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1052 | 1055 | | |
| 1056 | + | |
1053 | 1057 | | |
1054 | 1058 | | |
1055 | 1059 | | |
1056 | | - | |
| 1060 | + | |
1057 | 1061 | | |
1058 | 1062 | | |
1059 | 1063 | | |
| |||
0 commit comments