Commit 5d46ed1
authored
fix(sequencer): only warn about missing proposed checkpoint once overdue (#23807)
## Motivation
The orphan-block guard in `checkSync` (added in #23606) was logging at
`warn` on every non-proposer validator, ~once per second for a full
slot, every slot. Under pipelining a node receives and re-executes a
block proposal for the next checkpoint up to one slot before the
matching checkpoint proposal arrives, so the world-state tip
legitimately sits in an as-yet-unproposed checkpoint for that whole
window. That is the happy path, not the abnormal "proposer published
blocks but never the checkpoint" case the guard is meant to flag.
Observed on `next-net`: 118 warnings in ~59s on a healthy validator for
a single slot.
## Approach
The condition that distinguishes "checkpoint hasn't arrived yet" from
"checkpoint will never arrive" is purely temporal — which is exactly
what the archiver already computes in `pruneOrphanProposedBlocks` to
decide when to prune an orphan block. The guard now reuses that same
deadline: it still refuses to build (`return undefined`) whenever the
orphan-shaped state holds, but only escalates to `warn` once the
enclosing checkpoint is overdue by that deadline; within the normal
pipelining window it logs at `debug`. The warn therefore fires at the
same instant the archiver would prune the orphan.
## Changes
- **sequencer-client**: Add `isProposedCheckpointOverdue`, mirroring the
archiver's orphan-prune deadline (`start of slot after the block's build
slot + grace`, grace derived from `blockDurationMs` as the node wiring
does). Gate the existing guard's log level on it — `warn` when overdue,
`debug` otherwise. Control flow is unchanged.
- **sequencer-client (tests)**: Thread a real `blockSlot` through the
orphan-guard test setup and split the warning test into an overdue case
(expects `warn`) and a within-window case (expects no `warn`).1 parent 75fdca8 commit 5d46ed1
2 files changed
Lines changed: 66 additions & 6 deletions
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
1335 | 1336 | | |
1336 | 1337 | | |
1337 | 1338 | | |
| 1339 | + | |
1338 | 1340 | | |
1339 | 1341 | | |
1340 | 1342 | | |
| |||
1376 | 1378 | | |
1377 | 1379 | | |
1378 | 1380 | | |
1379 | | - | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1380 | 1384 | | |
1381 | 1385 | | |
1382 | 1386 | | |
| |||
1385 | 1389 | | |
1386 | 1390 | | |
1387 | 1391 | | |
1388 | | - | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1389 | 1397 | | |
1390 | | - | |
| 1398 | + | |
| 1399 | + | |
1391 | 1400 | | |
1392 | 1401 | | |
| 1402 | + | |
1393 | 1403 | | |
1394 | 1404 | | |
1395 | 1405 | | |
1396 | 1406 | | |
1397 | 1407 | | |
| 1408 | + | |
1398 | 1409 | | |
1399 | 1410 | | |
1400 | 1411 | | |
| |||
1411 | 1422 | | |
1412 | 1423 | | |
1413 | 1424 | | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1414 | 1446 | | |
1415 | 1447 | | |
1416 | 1448 | | |
| 1449 | + | |
1417 | 1450 | | |
1418 | 1451 | | |
1419 | 1452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
730 | | - | |
| 731 | + | |
731 | 732 | | |
732 | 733 | | |
733 | 734 | | |
| |||
736 | 737 | | |
737 | 738 | | |
738 | 739 | | |
739 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
740 | 752 | | |
741 | 753 | | |
742 | 754 | | |
| |||
787 | 799 | | |
788 | 800 | | |
789 | 801 | | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
790 | 817 | | |
791 | 818 | | |
792 | 819 | | |
| |||
0 commit comments