Repository navigation
Commit ac7c174
fix(host-rpc): ingest [from, tip] when backfill_from is above ceiling (#148)
* fix(host-rpc): ingest [from, tip] when backfill_from is above ceiling
When the sidecar restarted with its persisted host height within
`buffer_capacity/2` blocks of tip, `drain_backfill` declared backfill
complete without fetching any blocks. The first subsequent
`handle_new_head` then walked from an empty `chain_view`, returning a
single-block segment whose RU parent was not in the DB — crashing the
processor with "parent ru block not present in DB" until the chain
advanced past the ceiling (5–10 minutes).
The `/2` ceiling exists to leave hash-walk headroom on new tips, but it
must not drop blocks the node has already committed to ingesting. When
`from > backfill_ceiling` but `from <= tip`, ingest up to `tip` in this
batch instead of skipping.
Fixes ENG-2280.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(host-rpc): error on backfill cursor past tip+1
Provider tip regression (reorg, lagging replica) would silently switch
to frontfill from an inconsistent cursor, re-introducing the
parent-not-in-DB crash this branch addresses. Only `from == tip + 1` is
a legitimate completion; `from > tip + 1` now returns
`BackfillContinuityBreak`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5e85090 commit ac7c174
1 file changed
Lines changed: 51 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
510 | 532 | | |
511 | 533 | | |
512 | 534 | | |
| |||
534 | 556 | | |
535 | 557 | | |
536 | 558 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
542 | 575 | | |
543 | 576 | | |
544 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
545 | 587 | | |
546 | 588 | | |
547 | 589 | | |
| |||
577 | 619 | | |
578 | 620 | | |
579 | 621 | | |
580 | | - | |
| 622 | + | |
581 | 623 | | |
582 | 624 | | |
583 | 625 | | |
| |||
0 commit comments