Skip to content

cow: reorg-aware ingestion and submission-policy pass #654

Description

@mfw78

Follow-on car to the dispatch pass; stacked.

Harden ingestion and the submission journal for the type-blind wire: K-confirmation event handling, a (watch, uid) journal key with an offchainInput digest, and a refusal policy that never tears down a watch.

Why

Teardown comes only from INVALID (or NextPoll::Never); FILLED/INVALIDATED is per-orderUid and only suppresses the post for that uid while the watch persists, so a filled TWAP tranche never kills the remaining tranches. Orderbook refusals schedule or park, because the old TWAP-tuned teardown assumptions do not survive type-blindness. A uid-only journal key aliases byte-identical orders across watches, and #546's land-schema-early protocol says pay the schema break now: the submission key includes an offchainInput digest even though fan-out is W3. K-confirmation preserves the #54 removal-event behaviour under reorgs.

Scope

Done when

  • Created/Removed acted on only at depth K; a reorg test shows no premature teardown or watch loss.
  • Journal and submission keys land per schema, goldens regenerated.
  • No refusal class and no per-uid FILLED/INVALIDATED verdict maps to watch removal; the audit rationale is recorded in the PR body.

Blocked by: #653.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/cow-integrationshepherd:cow / cow-api order submissioncomponent/modulesshipped guest modules (twap, ethflow, examples, fixtures)effort/daysFew days. Needs design.featureNew capability that doesn't exist yet.pr-trainPart of the current stacked PR train; lands in sequence, do not merge out of order.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions