Commit b0db814
committed
fix(starfish): skip block proposal when behind quorum commit round (#11384)
# Description of change
Under `consensus_block_restrictions`, Core's `try_new_block` requires
the candidate round to exceed an approximation of the network's quorum
commit round (`local_commit_round + quorum_commit_index -
local_commit_index`). Threads `commit_vote_monitor` through `Core::new`.
Blocks at or below the quorum commit round cannot improve the commit
rule and waste peer bandwidth, so skipping them is a pure efficiency
improvement when behind.
Stacked on top of #11383.
## Links to any relevant issues
Fixes #11190
Part of #11323
## How the change has been tested
- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have checked that new and existing unit tests pass locally with
my changes1 parent 71739ba commit b0db814
4 files changed
Lines changed: 44 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| 185 | + | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| |||
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
206 | | - | |
207 | | - | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2458 | 2458 | | |
2459 | 2459 | | |
2460 | 2460 | | |
| 2461 | + | |
2461 | 2462 | | |
2462 | 2463 | | |
2463 | 2464 | | |
| |||
2624 | 2625 | | |
2625 | 2626 | | |
2626 | 2627 | | |
| 2628 | + | |
2627 | 2629 | | |
2628 | 2630 | | |
2629 | 2631 | | |
| |||
2803 | 2805 | | |
2804 | 2806 | | |
2805 | 2807 | | |
| 2808 | + | |
2806 | 2809 | | |
2807 | 2810 | | |
2808 | 2811 | | |
| |||
3132 | 3135 | | |
3133 | 3136 | | |
3134 | 3137 | | |
| 3138 | + | |
3135 | 3139 | | |
3136 | 3140 | | |
3137 | 3141 | | |
| |||
3273 | 3277 | | |
3274 | 3278 | | |
3275 | 3279 | | |
| 3280 | + | |
3276 | 3281 | | |
3277 | 3282 | | |
3278 | 3283 | | |
| |||
3439 | 3444 | | |
3440 | 3445 | | |
3441 | 3446 | | |
| 3447 | + | |
3442 | 3448 | | |
3443 | 3449 | | |
3444 | 3450 | | |
| |||
3632 | 3638 | | |
3633 | 3639 | | |
3634 | 3640 | | |
| 3641 | + | |
3635 | 3642 | | |
3636 | 3643 | | |
3637 | 3644 | | |
| |||
3857 | 3864 | | |
3858 | 3865 | | |
3859 | 3866 | | |
| 3867 | + | |
3860 | 3868 | | |
3861 | 3869 | | |
3862 | 3870 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| 170 | + | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| |||
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
750 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
751 | 758 | | |
752 | 759 | | |
753 | 760 | | |
754 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
755 | 775 | | |
756 | 776 | | |
757 | 777 | | |
| |||
1497 | 1517 | | |
1498 | 1518 | | |
1499 | 1519 | | |
| 1520 | + | |
1500 | 1521 | | |
1501 | 1522 | | |
1502 | 1523 | | |
| |||
1508 | 1529 | | |
1509 | 1530 | | |
1510 | 1531 | | |
| 1532 | + | |
1511 | 1533 | | |
1512 | 1534 | | |
1513 | 1535 | | |
| |||
1643 | 1665 | | |
1644 | 1666 | | |
1645 | 1667 | | |
| 1668 | + | |
1646 | 1669 | | |
1647 | 1670 | | |
1648 | 1671 | | |
| |||
1772 | 1795 | | |
1773 | 1796 | | |
1774 | 1797 | | |
| 1798 | + | |
1775 | 1799 | | |
1776 | 1800 | | |
1777 | 1801 | | |
| |||
1916 | 1940 | | |
1917 | 1941 | | |
1918 | 1942 | | |
| 1943 | + | |
1919 | 1944 | | |
1920 | 1945 | | |
1921 | 1946 | | |
| |||
2016 | 2041 | | |
2017 | 2042 | | |
2018 | 2043 | | |
| 2044 | + | |
2019 | 2045 | | |
2020 | 2046 | | |
2021 | 2047 | | |
| |||
2177 | 2203 | | |
2178 | 2204 | | |
2179 | 2205 | | |
| 2206 | + | |
2180 | 2207 | | |
2181 | 2208 | | |
2182 | 2209 | | |
| |||
2394 | 2421 | | |
2395 | 2422 | | |
2396 | 2423 | | |
| 2424 | + | |
2397 | 2425 | | |
2398 | 2426 | | |
2399 | 2427 | | |
| |||
3310 | 3338 | | |
3311 | 3339 | | |
3312 | 3340 | | |
| 3341 | + | |
3313 | 3342 | | |
3314 | 3343 | | |
3315 | 3344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| 558 | + | |
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
| |||
766 | 767 | | |
767 | 768 | | |
768 | 769 | | |
| 770 | + | |
769 | 771 | | |
770 | 772 | | |
771 | 773 | | |
| |||
0 commit comments