You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: generalize chain_events into a reusable backfill+stream watcher #1092
Spun out of the #1089 review (maintainer note, summary item F).
The slash watcher (crates/node/src/slash_watcher.rs, #1032) is now the third hand-rolled resubscribe/backoff/backfill loop, after payment_settlement.rs (settlement) and the in-flight #1087 blacklist watcher. They already share backfill_windows + MAX_BACKFILL_BLOCK_SPAN, but each re-implements the same shape:
install a filter (optionally with indexed-topic constraints),
read head → windowed get_logs backfill over [cursor, head],
drain the live stream, skipping removed logs,
resubscribe with exponential backoff, carrying a cursor across cycles.
Proposal: generalize crates/node/src/chain_events.rs into a small backfill+stream watcher abstraction (filter builder + per-log callback + cursor/backoff policy) and migrate settlement, slash, and blacklist onto it, so the loops can't diverge (they already drift — e.g. the slash watcher's window span was briefly 9k vs the settlement 10k before being unified).
Non-blocking; the three copies are individually correct today.
Activity
feat(node): eth_getLogs resumable watcher, off eth_newFilter (#1106, #…
fix(node,cli): correct wrong watcher docs + close the publish-resolve…
refactor(node): retire dead/redundant watcher surface (#1231) (#1234)