Skip to content

cow: resume-cursor chain-log ingestion so no watch is lost to downtime #660

Description

@mfw78

Watch-tower harvest car. Derives from src/services/chain.ts (cold backfill from deploymentBlock, per-page lastProcessedBlock persistence). Blocks #657.

A missed ConditionalOrderCreated is silently permanent: the module's two chain-log rows do not declare resume, so a fresh or restarted subscription starts at head, and the #659 reconcile sweep cannot resurrect keys it has never seen. Declare durable cursors and a deploy-block cold start.

Why

Watch-tower survives restarts by backfilling from the registry deployment block and persisting its cursor per page; that operational lesson outlives its revert machinery. The Rust-native shape is manifest wiring, not a port: nexum-runtime already ships resume: bool plus max_lookback on chain-log rows with a durable per-subscription cursor and at-least-once redelivery (verified in manifest/types.rs and runtime/event_loop.rs). One real gap remains: a fresh resume subscription still starts at head; there is no start-block field.

Scope

Done when

  • Both chain-log rows declare resume; redelivery is a no-op, with a test.
  • Cold start backfills from the deploy block, not head, with the upstream rider filed if required.
  • Empty-watch-set plus non-genesis cursor triggers re-backfill, with a test.
  • The restart-gap test is green: no Created lost across downtime.

Blocked by: #652, #654.

Blocked by: #652, #654.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedCan't proceed. Waiting on something.component/chainalloy provider, chain host backend, RPC middlewarecomponent/cow-integrationshepherd:cow / cow-api order submissioncomponent/manifestnexum.toml / nexum-engine.toml parsing + config-valueeffort/daysFew days. Needs design.featureNew capability that doesn't exist yet.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions