Commit 3121f40
committed
fix(consensus): prevent blocksync race condition during commit step
When a node is in Commit step for height H and receives NewRound(H+1),
it was incorrectly entering blocksync mode even though it was about to
advance naturally. This caused network-wide deadlocks where the committing
node would wait for a block that couldn't be finalized without its vote.
Add get_tendermint_height_and_step() helper to atomically fetch both values,
and skip blocksync when receiving NewRound(H+1) while in Commit step for H.1 parent c031b64 commit 3121f40
2 files changed
+44
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
469 | 481 | | |
470 | 482 | | |
471 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
2349 | 2350 | | |
2350 | 2351 | | |
2351 | 2352 | | |
2352 | | - | |
2353 | | - | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
2354 | 2380 | | |
2355 | | - | |
| 2381 | + | |
2356 | 2382 | | |
2357 | 2383 | | |
2358 | 2384 | | |
2359 | 2385 | | |
2360 | 2386 | | |
| 2387 | + | |
2361 | 2388 | | |
2362 | 2389 | | |
2363 | 2390 | | |
2364 | 2391 | | |
2365 | | - | |
2366 | 2392 | | |
2367 | 2393 | | |
2368 | | - | |
2369 | 2394 | | |
2370 | 2395 | | |
2371 | 2396 | | |
| |||
2377 | 2402 | | |
2378 | 2403 | | |
2379 | 2404 | | |
2380 | | - | |
| 2405 | + | |
2381 | 2406 | | |
2382 | 2407 | | |
2383 | 2408 | | |
| |||
0 commit comments