fix: indexer wedging on startup - #3713
Conversation
fd97994 to
ff954d7
Compare
Pull request overviewFixes #3623 — an MPC node that state-syncs from scratch (or returns from long downtime) was wedging its indexer at genesis. Root cause: Changes:
Reviewed changesPer-file summary
FindingsBlocking (must fix before merge): none. Non-blocking (nits, follow-ups, suggestions):
|
| const EVENT_TIMEOUT: Duration = Duration::from_secs(10); | ||
| // Generous: the gateway now waits for the node to catch up to its peers before | ||
| // streaming (see `wait_for_full_sync`), which delays the first block update on a | ||
| // loaded CI box. | ||
| const EVENT_TIMEOUT: Duration = Duration::from_secs(30); |
There was a problem hiding this comment.
the changes I am adding forced this constant to be bumped as tests would pass locally but not in CI
…es-at-genesis-on-a-freshly-state-synced-node2
9d5a6ec to
ceabf3b
Compare
|
@claude review this is a new solution, so please disregard your previous review |
Pull request overviewThis is a fresh take on #3623 (the mpc-node indexer wedging at genesis on a freshly state-synced node). Instead of introducing a peer-height gate on Changes:
Reviewed changesPer-file summary
FindingsBlocking (must fix before merge): none. Non-blocking (nits, follow-ups, suggestions):
✅ Approved — logic is sound, well-tested, and appropriately scoped to the node-side wedge described in #3623. The items above are follow-ups, not merge blockers. |
kevindeforth
left a comment
There was a problem hiding this comment.
Looks good, but I doubt the value of the LLM generated code comments.
kevindeforth
left a comment
There was a problem hiding this comment.
Thank you!
Note for future reference: this is a patch only that should be reverted once near/nearcore#16004 is fixed.
Tested on testnet TEE — fix confirmed ✅Built this branch ( Result: all 5 caught up to head, 0 wedges. The indexer streamer started at the live tip, not at genesis:
Throughout header→state→block sync the indexer correctly deferred (no Note: these are non-participant idxtest nodes, so this exercises the indexer/sync path only (not signing/attestation) — which is the scope of the fix. |
Closes #3623 (II)